Class: OptimisWorkflow::Commands::StartHotfix
- Inherits:
-
StartCommand
- Object
- Base
- StartCommand
- OptimisWorkflow::Commands::StartHotfix
- Defined in:
- lib/optimis-workflow/commands/start_hotfix.rb
Instance Attribute Summary collapse
-
#stable_branch ⇒ Object
readonly
Returns the value of attribute stable_branch.
Attributes inherited from Base
Instance Method Summary collapse
- #help_msg ⇒ Object
-
#initialize(args) ⇒ StartHotfix
constructor
A new instance of StartHotfix.
- #local_stuff ⇒ Object
Methods inherited from StartCommand
Methods inherited from Base
Methods included from OptimisWorkflow::Common
#current_dir, #mark_as_started_on_pivotal, #payload, #settings, #settings_file, #start_feature
Constructor Details
#initialize(args) ⇒ StartHotfix
Returns a new instance of StartHotfix.
7 8 9 10 11 12 13 14 |
# File 'lib/optimis-workflow/commands/start_hotfix.rb', line 7 def initialize(args) super(args) if args.empty? puts "\nError! Please pass in a hotfix story id" exit 1 end @stable_branch = args[1] || 'stable' end |
Instance Attribute Details
#stable_branch ⇒ Object (readonly)
Returns the value of attribute stable_branch.
5 6 7 |
# File 'lib/optimis-workflow/commands/start_hotfix.rb', line 5 def stable_branch @stable_branch end |
Instance Method Details
#help_msg ⇒ Object
16 17 18 |
# File 'lib/optimis-workflow/commands/start_hotfix.rb', line 16 def help_msg "Syntax: start-hotfix STORYID [stable]" end |
#local_stuff ⇒ Object
20 21 22 |
# File 'lib/optimis-workflow/commands/start_hotfix.rb', line 20 def local_stuff system "git checkout -b hotfix-#{args[0]} #{stable_branch}" end |