Class: Capybara::Bamboo::Client::Plan
- Inherits:
-
Object
- Object
- Capybara::Bamboo::Client::Plan
- Includes:
- DSL
- Defined in:
- lib/capybara-bamboo-client/plan.rb
Instance Method Summary collapse
- #disable ⇒ Object
- #enable ⇒ Object
-
#initialize(opts) ⇒ Plan
constructor
A new instance of Plan.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(opts) ⇒ Plan
Returns a new instance of Plan.
9 10 11 12 13 14 |
# File 'lib/capybara-bamboo-client/plan.rb', line 9 def initialize(opts) opts.keys.each do |attr_key| self.class.send(:attr_accessor, attr_key) instance_variable_set("@#{attr_key}", opts[attr_key]) end end |
Instance Method Details
#disable ⇒ Object
16 17 18 |
# File 'lib/capybara-bamboo-client/plan.rb', line 16 def disable visit "/build/admin/suspendBuild.action?returnUrl=%2Fchain%2Fadmin%2Fconfig%2FdefaultStages.action%3FbuildKey%3D#{key}&buildKey=#{key}" end |
#enable ⇒ Object
20 21 22 |
# File 'lib/capybara-bamboo-client/plan.rb', line 20 def enable visit "/build/admin/resumeBuild.action?returnUrl=%2Fchain%2Fadmin%2Fconfig%2FdefaultStages.action%3FbuildKey%3D#{key}&buildKey=#{key}" end |
#start ⇒ Object
24 25 26 |
# File 'lib/capybara-bamboo-client/plan.rb', line 24 def start visit "/build/admin/triggerManualBuild.action?buildKey=#{key}" end |
#stop ⇒ Object
28 29 30 |
# File 'lib/capybara-bamboo-client/plan.rb', line 28 def stop visit "/build/admin/ajax/stopPlan.action?planKey=#{key}" end |