lmc 0.12.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec4925e30542f46b5b9c991de79a672a9eabeffda07028620aaa6fa14e62c551
4
- data.tar.gz: 0eb5b5654694a1eb90e920df6d00d67cf4b8dda7c42fa167760d9c329bd88341
3
+ metadata.gz: cfd78ebb37da9e527f2da6cdf0d7297994c49031cef7af9ce0534f86d2d66b01
4
+ data.tar.gz: bada57081f44bbdd303ebf2ebedee80c0e6c21be9e354614ba976ca96d4bc627
5
5
  SHA512:
6
- metadata.gz: ebbb8a5bcb4eb5cdaf9f0236394f18572922a70e42f7218b9d942420e4234ff30071549fff0c37e5e6e82ffcf3cce61b8b351921915ca749f7e947a8b33e74f0
7
- data.tar.gz: c4008e578e219956662b9b0239a543c95f921099cee0dca7553b8770cf4a986fd872b3867a506327a2c4ea522244984341e72dfb970193f1837729c71b078601
6
+ metadata.gz: 1ada15e1c15fedb1553b6f04334dee02bbcdad709c75b2750487932abd162245ab845b476be3f2d3d71cb43133df1800c2c4fc5b264ee1ba2b9bef339607c083
7
+ data.tar.gz: 1d08d68450769836432be5f38e16791de5dbf5bbbbedae30bd8eefd36d3a87aab5982bd0ed64080e30fb30ff673ddc84c8d8e0fec84b714f92276003adef2632
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
4
+ <mapping directory="" vcs="Git" />
5
5
  </component>
6
6
  </project>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "result": {
3
- "covered_percent": 91.53
3
+ "covered_percent": 91.59
4
4
  }
5
5
  }
@@ -123,9 +123,14 @@ module LMC
123
123
  end
124
124
 
125
125
  def children
126
- @cloud.auth_for_accounts([id, ROOT_ACCOUNT_UUID])
127
- response = @cloud.get ['cloud-service-auth', 'accounts', id, 'children']
128
- response.map { |child| Account.new @cloud, child }
126
+ @cloud.auth_for_accounts([ROOT_ACCOUNT_UUID])
127
+ # Projects can not have children, return empty map immediately as optimization
128
+ if type != "PROJECT"
129
+ response = @cloud.get ['cloud-service-auth', 'accounts', id, 'children']
130
+ response.map { |child| Account.new @cloud, child }
131
+ else
132
+ []
133
+ end
129
134
  end
130
135
 
131
136
  def logs
@@ -172,16 +172,17 @@ module LMC
172
172
  end
173
173
 
174
174
  def redeem_ticket(tries)
175
+ wait_seconds = 0.5
175
176
  attempts = 1
176
177
  until @response
177
- raise 'Too many attempts' if attempts > tries
178
+ raise "Timeout waiting for config (#{attempts * wait_seconds}s)" if attempts > tries
178
179
  attempts += 1
179
180
  body = @cloud.get(url_ticket).body
180
181
  unless body.respond_to? :ticketId
181
182
  @ticket_id = nil
182
183
  @response = body
183
184
  end
184
- sleep 0.5
185
+ sleep wait_seconds * attempts
185
186
  end
186
187
  end
187
188
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LMC
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lmc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - erpel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-20 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler