Module: Capybara::Bamboo::Client::BambooHelper
- Included in:
- Capybara::Bamboo::Client
- Defined in:
- lib/capybara-bamboo-client/bamboo_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
- #app_host_from_url(bamboo_url) ⇒ Object
- #get_plan_key(link_id) ⇒ Object
- #register_driver(timeout, phantomjs_path, app_host) ⇒ Object
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/capybara-bamboo-client/bamboo_helper.rb', line 6 def self.included(base) super end |
Instance Method Details
#app_host_from_url(bamboo_url) ⇒ Object
24 25 26 |
# File 'lib/capybara-bamboo-client/bamboo_helper.rb', line 24 def app_host_from_url(bamboo_url) /(.*)\/browse\/(.*)/.match(bamboo_url)[1] end |
#get_plan_key(link_id) ⇒ Object
20 21 22 |
# File 'lib/capybara-bamboo-client/bamboo_helper.rb', line 20 def get_plan_key(link_id) link_id.split(':').last end |
#register_driver(timeout, phantomjs_path, app_host) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/capybara-bamboo-client/bamboo_helper.rb', line 10 def register_driver(timeout, phantomjs_path, app_host) Capybara.current_driver = :poltergeist Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, {js_errors: false, phantomjs: phantomjs_path}) end Capybara.run_server = false Capybara.app_host = app_host Capybara.default_wait_time = timeout end |