heroku_hatchet 7.3.0 → 7.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f133f985be889073e9f62caf69e73e05373eecaed11cb13a209fe6bd80874f1c
4
- data.tar.gz: 910dd76398351f6ecf19e6a882b7652fe531e6a19843fa64d3f5e57ef5e68696
3
+ metadata.gz: 6c1b161f5f43f135f7eb4e6c803b6228b15e51904001a744572cca572e26a799
4
+ data.tar.gz: e804ea689f9934308978e4804799fee00a0d252d3e64cb62eb29a20c4d05659f
5
5
  SHA512:
6
- metadata.gz: 952b664cbb78a6b7250f98a3532a5754bf3fe16526ef915594504d6c9ee77ddf97ac204ab9438d3223da33f431c27e335c9495c86c74baeb69db45fd22682f63
7
- data.tar.gz: e282d36a9196b74f9999c7c7b57ae55cd1da508f09187058baf92fa711800e882c806299f472ac06cceda88cfe2eba63b3e7eb67c0ac0e657436fc1c207f0e02
6
+ metadata.gz: b2b9364b374e384b3e5d16f159774d4b1da90d3a79c5c3afad6092d05209a13bd8d52c2d34c97feb4da0b989339d120a4562c65b121e7ec6b3d843ae3657cefe
7
+ data.tar.gz: '026904fd62500a2874d57f9c8462aee651f62dd1467c6281bc7061312d2a683203f8e1237577d2bb66ab3f4d5174bdf2fe408e3c165a950a1cf4a386673f4a29'
@@ -29,9 +29,9 @@ references:
29
29
  bundle clean
30
30
 
31
31
  jobs:
32
- "ruby-2.5":
32
+ "ruby-2.2":
33
33
  docker:
34
- - image: circleci/ruby:2.5
34
+ - image: circleci/ruby:2.2
35
35
  steps:
36
36
  - checkout
37
37
  - <<: *restore
@@ -39,9 +39,9 @@ jobs:
39
39
  - <<: *hatchet_setup
40
40
  - <<: *unit
41
41
  - <<: *save
42
- "ruby-2.6":
42
+ "ruby-2.5":
43
43
  docker:
44
- - image: circleci/ruby:2.6
44
+ - image: circleci/ruby:2.5
45
45
  steps:
46
46
  - checkout
47
47
  - <<: *restore
@@ -64,6 +64,6 @@ workflows:
64
64
  version: 2
65
65
  build:
66
66
  jobs:
67
+ - "ruby-2.2"
67
68
  - "ruby-2.5"
68
- - "ruby-2.6"
69
69
  - "ruby-2.7"
@@ -1,5 +1,11 @@
1
1
  ## HEAD
2
2
 
3
+ ## 7.3.1
4
+
5
+ - Fix Ruby incompatibility introduced by using `&.` and `rescue` without
6
+ `begin`/`end` without a `required_ruby_version` in hatchet.gemspec.
7
+ (https://github.com/heroku/hatchet/pull/139)
8
+
3
9
  ## 7.3.0
4
10
 
5
11
  - Deprecations
@@ -52,7 +52,7 @@ class HatchetCLI < Thor
52
52
  Threaded.later do
53
53
  commit = lock_hash[directory]
54
54
  directory = File.expand_path(directory)
55
- if !Dir[directory]&.empty?
55
+ if !(Dir[directory] && Dir[directory].empty?)
56
56
  puts "== pulling '#{git_repo}' into '#{directory}'\n"
57
57
  pull(directory, git_repo)
58
58
  else
@@ -17,17 +17,17 @@ Gem::Specification.new do |gem|
17
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
+ gem.required_ruby_version = '>= 2.2.0'
20
21
 
21
22
  gem.add_dependency "platform-api", "~> 3"
22
23
  gem.add_dependency "rrrretry", "~> 1"
23
24
  gem.add_dependency "excon", "~> 0"
24
- gem.add_dependency "thor", "~> 0"
25
+ gem.add_dependency "thor", "~> 1"
25
26
  gem.add_dependency "threaded", "~> 0"
26
27
 
27
28
  gem.add_development_dependency "rspec"
28
29
  gem.add_development_dependency "rake", ">= 10"
29
30
  gem.add_development_dependency "mocha", ">= 1"
30
31
  gem.add_development_dependency "parallel_split_test"
31
- gem.add_development_dependency "travis", ">= 1"
32
32
  gem.add_development_dependency "rspec-retry"
33
33
  end
@@ -46,3 +46,22 @@ module Hatchet
46
46
  end
47
47
  end
48
48
  end
49
+
50
+ unless ::String.instance_methods.include?(:strip_heredoc)
51
+ # We can get rid of this when all rubies can support <<~ syntax
52
+ class ::String
53
+ def strip_heredoc
54
+ gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "".freeze)
55
+ end
56
+ end
57
+ end
58
+
59
+ unless ::String.instance_methods.include?(:match?)
60
+ # We can get rid of this when all rubies can support String#match? method
61
+ class ::String
62
+ def match?(value)
63
+ self =~ value
64
+ end
65
+ end
66
+ end
67
+
@@ -46,7 +46,7 @@ module Hatchet
46
46
  def path_for_name(name)
47
47
  possible_paths = [repos[name.to_s], "repos/#{name}", name].compact
48
48
  path = possible_paths.detect do |path|
49
- !Dir[path]&.empty?
49
+ !(Dir[path] && Dir[path].empty?)
50
50
  end
51
51
  raise BadRepoName.new(name, possible_paths) if path.nil? || path.empty?
52
52
  path
@@ -9,14 +9,16 @@ module Hatchet
9
9
  output = ""
10
10
 
11
11
  ShellThrottle.new(platform_api: @platform_api).call do
12
- output = git_push_heroku_yall
13
- rescue FailedDeploy => e
14
- case e.output
15
- when /reached the API rate limit/, /429 Too Many Requests/
16
- throw(:throttle)
17
- else
18
- raise e unless @allow_failure
19
- output = e.output
12
+ begin
13
+ output = git_push_heroku_yall
14
+ rescue FailedDeploy => e
15
+ case e.output
16
+ when /reached the API rate limit/, /429 Too Many Requests/
17
+ throw(:throttle)
18
+ else
19
+ raise e unless @allow_failure
20
+ output = e.output
21
+ end
20
22
  end
21
23
  end
22
24
 
@@ -55,7 +55,7 @@ module Hatchet
55
55
  # To be safe try to delete an app even if we're not over the limit
56
56
  # since the exception may have been caused by going over the maximum account limit
57
57
  if app_exception_message
58
- io.puts <<~EOM
58
+ io.puts <<-EOM.strip_heredoc
59
59
  WARNING: Running reaper due to exception on app
60
60
  #{stats_string}
61
61
  Exception: #{app_exception_message}
@@ -122,7 +122,7 @@ module Hatchet
122
122
 
123
123
  # Sleep, try again later
124
124
  @reaper_throttle.call(max_sleep: age.sleep_for_ttl) do |sleep_for|
125
- io.puts <<~EOM
125
+ io.puts <<-EOM.strip_heredoc
126
126
  WARNING: Attempting to destroy an app without maintenance mode on, but it is not old enough. app: #{app["name"]}, app_age: #{age.in_minutes} minutes
127
127
  This can happen if App#teardown! is not called on an application, which will leave it in an 'unfinished' state
128
128
  This can also happen if you're trying to run more tests concurrently than your currently set value for HATCHET_APP_COUNT
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "7.3.0"
2
+ VERSION = "7.3.1"
3
3
  end
@@ -5,7 +5,7 @@ describe "AllowFailureGitTest" do
5
5
  let(:release_fail_proc) {
6
6
  Proc.new do
7
7
  File.open("Procfile", "w+") do |f|
8
- f.write <<~EOM
8
+ f.write <<-EOM.strip_heredoc
9
9
  release: echo "failing on release" && exit 1
10
10
  EOM
11
11
  end
@@ -57,7 +57,7 @@ describe "isolated lock tests" do
57
57
  end
58
58
 
59
59
  dir.join("hatchet.lock").open("w+") do |f|
60
- f.puts <<~EOM
60
+ f.puts <<-EOM.strip_heredoc
61
61
  ---
62
62
  - - "./repos/foo/lock_fail_main_default_is_master"
63
63
  - main
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.0
4
+ version: 7.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2020-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: threaded
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: travis
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '1'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '1'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: rspec-retry
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -237,14 +223,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
223
  requirements:
238
224
  - - ">="
239
225
  - !ruby/object:Gem::Version
240
- version: '0'
226
+ version: 2.2.0
241
227
  required_rubygems_version: !ruby/object:Gem::Requirement
242
228
  requirements:
243
229
  - - ">="
244
230
  - !ruby/object:Gem::Version
245
231
  version: '0'
246
232
  requirements: []
247
- rubygems_version: 3.1.2
233
+ rubygems_version: 3.1.4
248
234
  signing_key:
249
235
  specification_version: 4
250
236
  summary: Hatchet is a an integration testing library for developing Heroku buildpacks.