Class: LabClient::Branch
- Includes:
- ClassHelpers
- Defined in:
- lib/labclient/branches/branch.rb
Overview
Inspect Helper
Instance Attribute Summary
Attributes inherited from Klass
Attributes inherited from LabStruct
Instance Method Summary collapse
- #commit ⇒ Object
- #inspect ⇒ Object
- #pipelines ⇒ Object
-
#wait_for_pipelines(total_time = 300, sleep_time = 15) ⇒ Object
Wait for Import / Set a Hard Limit.
Methods included from ClassHelpers
Methods inherited from Klass
#api_methods, #collect_project_id, #collect_release_id, #collect_repository_id, date_time_attrs, #format_time?, #group_name, #help, #initialize, #klass, #success?, #to_json, #update_self, user_attrs, #valid_group_project_levels, #verbose
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from CurlHelper
Methods inherited from LabStruct
#as_json, #client, #keys, #slice, #success?
Constructor Details
This class inherits a constructor from LabClient::Klass
Instance Method Details
#commit ⇒ Object
11 12 13 |
# File 'lib/labclient/branches/branch.rb', line 11 def commit Commit.new(@table[:commit], response, client) end |
#inspect ⇒ Object
7 8 9 |
# File 'lib/labclient/branches/branch.rb', line 7 def inspect "#<Branch name: #{name}>" end |
#pipelines ⇒ Object
15 16 17 18 |
# File 'lib/labclient/branches/branch.rb', line 15 def pipelines project_id = collect_project_id client.pipelines.list(project_id, ref: name) end |
#wait_for_pipelines(total_time = 300, sleep_time = 15) ⇒ Object
Wait for Import / Set a Hard Limit
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/labclient/branches/branch.rb', line 21 def wait_for_pipelines(total_time = 300, sleep_time = 15) Timeout.timeout(total_time) do loop do reload puts 'Waiting for Pipelines' break unless pipelines.empty? sleep sleep_time end end end |