heroku_hatchet 6.0.0 → 7.1.3
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 +4 -4
- data/.circleci/config.yml +2 -0
- data/CHANGELOG.md +36 -1
- data/README.md +774 -174
- data/bin/hatchet +13 -6
- data/hatchet.gemspec +1 -2
- data/hatchet.json +2 -1
- data/hatchet.lock +2 -0
- data/lib/hatchet.rb +2 -3
- data/lib/hatchet/api_rate_limit.rb +6 -17
- data/lib/hatchet/app.rb +150 -41
- data/lib/hatchet/config.rb +1 -1
- data/lib/hatchet/git_app.rb +29 -2
- data/lib/hatchet/reaper.rb +159 -56
- data/lib/hatchet/reaper/app_age.rb +49 -0
- data/lib/hatchet/reaper/reaper_throttle.rb +55 -0
- data/lib/hatchet/shell_throttle.rb +71 -0
- data/lib/hatchet/test_run.rb +2 -1
- data/lib/hatchet/version.rb +1 -1
- data/spec/hatchet/allow_failure_git_spec.rb +42 -2
- data/spec/hatchet/app_spec.rb +145 -6
- data/spec/hatchet/ci_spec.rb +10 -1
- data/spec/hatchet/git_spec.rb +9 -3
- data/spec/hatchet/lock_spec.rb +63 -1
- data/spec/unit/reaper_spec.rb +169 -0
- data/spec/unit/shell_throttle.rb +28 -0
- metadata +16 -23
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "ShellThrottle" do
|
4
|
+
it "throttles when throw is called" do
|
5
|
+
platform_api = Hatchet::Runner.new("default_ruby").platform_api
|
6
|
+
|
7
|
+
@count = 0
|
8
|
+
Hatchet::ShellThrottle.new(platform_api: platform_api).call do
|
9
|
+
@count += 1
|
10
|
+
if @count >= 2
|
11
|
+
# No throttle
|
12
|
+
else
|
13
|
+
throw(:throttle)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
expect(@count).to eq(2)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "does not throttle when throw is NOT called" do
|
20
|
+
platform_api = Hatchet::Runner.new("default_ruby").platform_api
|
21
|
+
|
22
|
+
@count = 0
|
23
|
+
Hatchet::ShellThrottle.new(platform_api: platform_api).call do
|
24
|
+
@count += 1
|
25
|
+
end
|
26
|
+
expect(@count).to eq(1)
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3
|
19
|
+
version: '3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3
|
26
|
+
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rrrretry
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: repl_runner
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.0.3
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.3
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: threaded
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,6 +193,9 @@ files:
|
|
207
193
|
- lib/hatchet/config.rb
|
208
194
|
- lib/hatchet/git_app.rb
|
209
195
|
- lib/hatchet/reaper.rb
|
196
|
+
- lib/hatchet/reaper/app_age.rb
|
197
|
+
- lib/hatchet/reaper/reaper_throttle.rb
|
198
|
+
- lib/hatchet/shell_throttle.rb
|
210
199
|
- lib/hatchet/tasks.rb
|
211
200
|
- lib/hatchet/test_run.rb
|
212
201
|
- lib/hatchet/version.rb
|
@@ -222,12 +211,14 @@ files:
|
|
222
211
|
- spec/hatchet/local_repo_spec.rb
|
223
212
|
- spec/hatchet/lock_spec.rb
|
224
213
|
- spec/spec_helper.rb
|
214
|
+
- spec/unit/reaper_spec.rb
|
215
|
+
- spec/unit/shell_throttle.rb
|
225
216
|
- tmp/parallel_runtime_test.log
|
226
217
|
homepage: https://github.com/heroku/hatchet
|
227
218
|
licenses:
|
228
219
|
- MIT
|
229
220
|
metadata: {}
|
230
|
-
post_install_message:
|
221
|
+
post_install_message:
|
231
222
|
rdoc_options: []
|
232
223
|
require_paths:
|
233
224
|
- lib
|
@@ -243,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
234
|
version: '0'
|
244
235
|
requirements: []
|
245
236
|
rubygems_version: 3.1.2
|
246
|
-
signing_key:
|
237
|
+
signing_key:
|
247
238
|
specification_version: 4
|
248
239
|
summary: Hatchet is a an integration testing library for developing Heroku buildpacks.
|
249
240
|
test_files:
|
@@ -257,3 +248,5 @@ test_files:
|
|
257
248
|
- spec/hatchet/local_repo_spec.rb
|
258
249
|
- spec/hatchet/lock_spec.rb
|
259
250
|
- spec/spec_helper.rb
|
251
|
+
- spec/unit/reaper_spec.rb
|
252
|
+
- spec/unit/shell_throttle.rb
|