- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Hanami::CLI::RubyFileGenerator, convert Operation to use it instead of ERB #186
Merged
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
d3e5e78
Add dry-operation to default Gemfile
cllns 888c388
Add base Operation class, based on dry-operation
cllns 24d3d6b
Fix view spec
cllns bc2670a
Add Operation generators
cllns 1c37df3
Add empty `call` method definition
cllns a3f6a03
Remove ostruct
cllns d93dfc8
Merge branch 'main' into add-dry-operation
cllns 649bdcb
Allow slash separator for generator
cllns f74519f
Allow slash separator for generator
cllns 0f9f814
Rename module to admin
cllns 663abc6
Remove newlines in generated files
cllns 3b72feb
Remove input as default args
cllns 0f81a5c
Remove Operations namespace, generate in app/ or slices/SLICE_NAME/
cllns a5bd2f3
Prevent generating operation without namespace
cllns eb391ca
Revert "Prevent generating operation without namespace"
cllns 1023225
Add recommendation to add namespace to operations
cllns 6a3c32a
Change examples
cllns 8dc3de4
Switch to outputting directly, remove Files#recommend
cllns 7059e7e
Add Hanami::CLI::RubyFileGenerator
cllns 0dfdf7d
x.x.x => 2.2.0
cllns 8f90b33
x.x.x => 2.2.0
cllns 8e62aa3
Include Dry::Monads[:result] in base Action
cllns f0e0994
Add .module tests
cllns ed47e5e
Convert top-level app operation to use RubyFileGenerator
cllns 4769bd6
Convert nested app operation to use RubyFileGenerator
cllns 8e5c575
Support slash separators
cllns 8effa30
Convert top-level slice operation to use RubyFileGenerator
cllns 06f2750
Remove OperationContext
cllns 79699f0
Remove namespaces instance variable
cllns 3879144
Refactor to variables
cllns 6f6fce3
Remove last temporary instance variable
cllns 30c2a94
Refactor
cllns da093d4
More refactoring, for clarity
cllns 40237de
Rename variable for clarity
cllns f0cf827
Rename helper method
cllns 2dff130
Simplify RubyFileGenerator, support older versions
cllns 36c7b3b
Convert Operation generator to use simplified RubyFileGenerator
cllns 1c47e7e
Merge branch 'add-dry-operation' into add-file-generator
cllns 2a4f0b6
Remove un-used errors
cllns 0223bea
Refactor
cllns 8e458ce
Older kwargs forwarding style
cllns d4e13bd
Refactor
cllns f9221f0
Rename variable
cllns 5f5887b
Add explanatory comment
cllns e9e7051
Merge remote-tracking branch 'origin/main' into add-file-generator
cllns a051c7d
Fix base slice action
cllns d0d02c7
Remove un-used ERB templates
cllns 145f7ee
Remove OperationContext
cllns b76942c
Ternary over and/or
cllns 26a665b
Fix missing 'end' from bad merge
cllns b07cf35
Fix namespace recommendation
cllns 23aace2
Merge remote-tracking branch 'origin/main' into add-file-generator
cllns f649975
Extract App::Generate::Command
cllns 5239824
Specify full name, to use App::Command
cllns 511b6a0
Merge remote-tracking branch 'origin' into add-file-generator
cllns fffd123
Use constants file
cllns 54dd28b
Move class methods above initialize
cllns 303f502
Use constants file
cllns e824e5d
Add yard comments
cllns 94c92e1
Revert "Use constants file"
cllns 66d0c80
Fix indent to be two spaces
cllns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
Add yard comments
- Loading branch information
commit e824e5d1582e39bce3094de94048b4753d0d3e3b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. This class is easy to follow and is so powerful in how much it will simplify the rest of the generators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I'm surprised I wasn't able to find any prior work for creating a Ruby file in Ruby. It was pretty fun to write though, so I don't mind :D