Module: Awspec::Helper::Finder::Codebuild
- Included in:
- Awspec::Helper::Finder
- Defined in:
- lib/awspec/helper/finder/codebuild.rb
Instance Method Summary collapse
Instance Method Details
#find_codebuild_project(id) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/awspec/helper/finder/codebuild.rb', line 6 def find_codebuild_project(id) projects = select_all_codebuild_projects.select do |project| project == id end projects.single_resource(id) end |
#select_all_codebuild_projects ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/awspec/helper/finder/codebuild.rb', line 13 def select_all_codebuild_projects req = {} projects = [] loop do res = codebuild_client.list_projects(req) projects.push(*res.projects) break if res.next_token.nil? req[:next_token] = res.next_token end projects end |