Module: GitWorkflow::Callbacks::PivotalTrackerSupport::ClassMethods
- Defined in:
- lib/git_workflow/callbacks/pivotal_tracker_support.rb
Instance Method Summary collapse
- #enable_http_proxy_if_present ⇒ Object
- #pivotal_tracker_url_for(project_id, story_id) ⇒ Object
- #value_of_environment_variable(key) ⇒ Object
Instance Method Details
#enable_http_proxy_if_present ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/git_workflow/callbacks/pivotal_tracker_support.rb', line 48 def enable_http_proxy_if_present proxy = value_of_environment_variable('http_proxy') proxy ||= value_of_environment_variable('HTTP_PROXY') unless proxy.nil? debug("Enabling HTTP proxy '#{ proxy }'") RestClient.proxy = proxy end end |
#pivotal_tracker_url_for(project_id, story_id) ⇒ Object
57 58 59 |
# File 'lib/git_workflow/callbacks/pivotal_tracker_support.rb', line 57 def pivotal_tracker_url_for(project_id, story_id) "http://www.pivotaltracker.com/services/v3/projects/#{ project_id }/stories/#{ story_id }" end |
#value_of_environment_variable(key) ⇒ Object
44 45 46 |
# File 'lib/git_workflow/callbacks/pivotal_tracker_support.rb', line 44 def value_of_environment_variable(key) ENV[key] end |