-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Scaffolding commands #94
Conversation
Debugged files generated with scaffolding commands, updated integration tests to match the refined files paths, updated Readme. Run integration and system tests locally.
Updated the generated files, added command for steps, updated readme. Run integration and system tests locally. Tested also web frameworks.
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.
Great work please just refactor the handle scaffolding method
Run integration and system test
lib/commands/scaffolding_commands.rb
Outdated
@@ -27,7 +29,9 @@ def page(name) | |||
required: false, desc: 'This will delete the selected feature', aliases: '-d' | |||
|
|||
def feature(name) | |||
handle_scaffolding(name, 'feature') | |||
return delete_scaffolding(name, 'feature', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
DuplicateMethodCall: ScaffoldingCommands#feature calls 'options[:path]' 2 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Duplicate-Method-Call.md]
lib/commands/scaffolding_commands.rb
Outdated
@@ -47,7 +53,21 @@ def spec(name) | |||
type: :boolean, required: false, desc: 'This will delete the selected helper', aliases: '-d' | |||
|
|||
def helper(name) | |||
handle_scaffolding(name, 'helper') | |||
return delete_scaffolding(name, 'helper', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
DuplicateMethodCall: ScaffoldingCommands#helper calls 'options[:path]' 2 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Duplicate-Method-Call.md]
lib/commands/scaffolding_commands.rb
Outdated
@@ -15,7 +15,9 @@ class ScaffoldingCommands < Thor | |||
type: :boolean, required: false, desc: 'This will delete the selected page', aliases: '-d' | |||
|
|||
def page(name) | |||
handle_scaffolding(name, 'page') | |||
return delete_scaffolding(name, 'page', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
DuplicateMethodCall: ScaffoldingCommands#page calls 'options[:path]' 2 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Duplicate-Method-Call.md]
lib/commands/scaffolding_commands.rb
Outdated
@@ -37,7 +41,9 @@ def feature(name) | |||
type: :boolean, required: false, desc: 'This will delete the selected spec', aliases: '-d' | |||
|
|||
def spec(name) | |||
handle_scaffolding(name, 'spec') | |||
return delete_scaffolding(name, 'spec', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
DuplicateMethodCall: ScaffoldingCommands#spec calls 'options[:path]' 2 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Duplicate-Method-Call.md]
lib/commands/scaffolding_commands.rb
Outdated
type: :boolean, required: false, desc: 'This will delete the selected steps', aliases: '-d' | ||
|
||
def steps(name) | ||
return delete_scaffolding(name, 'steps', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
DuplicateMethodCall: ScaffoldingCommands#steps calls 'options[:path]' 2 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Duplicate-Method-Call.md]
lib/commands/scaffolding_commands.rb
Outdated
@@ -15,7 +15,9 @@ class ScaffoldingCommands < Thor | |||
type: :boolean, required: false, desc: 'This will delete the selected page', aliases: '-d' | |||
|
|||
def page(name) | |||
handle_scaffolding(name, 'page') | |||
return delete_scaffolding(name, 'page', options[:path]) if options[:delete] |
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.
[reek] reported by reviewdog 🐶
RepeatedConditional: ScaffoldingCommands tests 'options[:delete]' at least 5 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Repeated-Conditional.md]
@@ -15,7 +15,9 @@ class ScaffoldingCommands < Thor | |||
type: :boolean, required: false, desc: 'This will delete the selected page', aliases: '-d' | |||
|
|||
def page(name) | |||
handle_scaffolding(name, 'page') | |||
return delete_scaffolding(name, 'page') if options[:delete] |
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.
[reek] reported by reviewdog 🐶
RepeatedConditional: ScaffoldingCommands tests 'options[:delete]' at least 5 times [https://github.com/troessner/reek/blob/v6.3.0/docs/Repeated-Conditional.md]
Refined the generated files, added the steps command, updated scaffolding test, updated Readme. Run integration and system tests. Run tests on web frameworks.