heroku_hatchet 7.1.0 → 7.1.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: f8c7a94962a255edf58024ed43c7102fc7eb97e07a3d1127ccec6f1cb16c560b
4
- data.tar.gz: 36c1999581499ba71e09c93376281bb57105be30d7c42637b1e38a29decdd602
3
+ metadata.gz: 9dda03e482a8634af97061a88f4b4ed424697928742d1e0b1c654b2837fbe4e0
4
+ data.tar.gz: c5958a54971f4470faee1007a94ee4902622d21ebca28ae8c5fbc5dbfff181f9
5
5
  SHA512:
6
- metadata.gz: bbc833ba77cc7ce963795cc90ec282489b35a235e5c161e85704b15d2cd430a1a426906d26bdee3f00045a637b56eb31b11778beb220b459c7e79d2d87f1306a
7
- data.tar.gz: a7c48cc4ce7103313cdfa8dcd5a27d519ade4fa02d328b837f1cd6c0d4f02af377ec2df764235af0d66316b535ea145716ff0974c797ee32b243ad415472db86
6
+ metadata.gz: a4c7794985aa05f0206de153a9f1dc3e01d5eac6b870e35990bd53a8c8ae0ed7c5ba67c9db9fb2b76fe8c4cc6f8a934ad173ba0140135356738f91a3bac54b6b
7
+ data.tar.gz: 542c31aa8fea0633175f2654a8ac21ffa53525a03c6127f19ce930a71883f5eaed8749915c9e971d574e5feace1eaab82765473b6d04430ac2161b2410603fb9
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 7.1.1
4
+
5
+ - Fix destroy_all functionality (https://github.com/heroku/hatchet/pull/121)
6
+
3
7
  ## 7.1.0
4
8
 
5
9
  - Initializing an `App` can now take a `retries` key to overload the global hatchet env var (https://github.com/heroku/hatchet/pull/119)
@@ -80,7 +80,7 @@ module Hatchet
80
80
 
81
81
  # No guardrails, will delete all apps that match the hatchet namespace
82
82
  def destroy_all
83
- get_apps
83
+ refresh_app_list
84
84
 
85
85
  (@finished_hatchet_apps + @unfinished_hatchet_apps).each do |app|
86
86
  begin
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "7.1.0"
2
+ VERSION = "7.1.1"
3
3
  end
@@ -1,6 +1,22 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe "Reaper" do
4
+ it "destroy all" do
5
+ reaper = Hatchet::Reaper.new(api_rate_limit: Object.new, hatchet_app_limit: 1, io: StringIO.new)
6
+
7
+ def reaper.get_heroku_apps
8
+ @mock_apps ||= [
9
+ {"name" => "hatchet-t-unfinished", "id" => 2, "maintenance" => false, "created_at" => Time.now.to_s},
10
+ {"name" => "hatchet-t-foo", "id" => 1, "maintenance" => true, "created_at" => Time.now.to_s}
11
+ ]
12
+ end
13
+ def reaper.destroy_with_log(*args); @destroy_with_log_count ||= 0; @destroy_with_log_count += 1; end
14
+
15
+ reaper.destroy_all
16
+
17
+ expect(reaper.instance_variable_get("@destroy_with_log_count")).to eq(1)
18
+ end
19
+
4
20
  describe "cycle" do
5
21
  it "does not delete anything if under the limit" do
6
22
  reaper = Hatchet::Reaper.new(api_rate_limit: Object.new, hatchet_app_limit: 1, io: StringIO.new)
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.1.0
4
+ version: 7.1.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-08-20 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: platform-api