escobar 0.3.9 → 0.3.10

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
  SHA1:
3
- metadata.gz: c241487c5b5f18347663a1168065ca951ae26f97
4
- data.tar.gz: da5f181b77a11d74c30feb811a663b3dbf9bdc9a
3
+ metadata.gz: 0f3dfeb14f7fa6047a24e3370400d543c001a13f
4
+ data.tar.gz: a3d0b58deb63550a59246488c858819b789bdc3c
5
5
  SHA512:
6
- metadata.gz: 308dfbaab7182068b8ebb41a38f9c863c1af02be926b56eb6b7d6326d27c8533574d9ef93c738ae1abb46589fef56133c52127eda058f3230ddef7aa5d3e83bc
7
- data.tar.gz: ebc8e58566614a2f096e0b6c5d70661a5ad3962a1c03e2efb3511f3a50a3ba6cb48d522d46509c83cd946b92d2ba1cef03b7556bc18622b54de226dfc8027dcb
6
+ metadata.gz: 63dd447a41143f2c6a45e5f99bc7ed557d89f1ef46cb080de9c02f44ea8b300d3f45b683e077ef7cf6e7ffc452fc395f53c56fd68d2d5d01dfa9bf6473b3bc6e
7
+ data.tar.gz: 296aae0ef9b76318ee19edb88e97d4bf242d14c1885a56e26f6b3dd84aa038aed6ffb96551e0aa81f6d004d8ad8b726fad5b294d6d6121789576dcae933b02d6
@@ -28,6 +28,10 @@ module Escobar
28
28
  end
29
29
  end
30
30
 
31
+ def dynos
32
+ @dynos ||= Escobar::Heroku::Dynos.new(client, id)
33
+ end
34
+
31
35
  def dashboard_url
32
36
  "https://dashboard.heroku.com/apps/#{name}"
33
37
  end
@@ -0,0 +1,27 @@
1
+ module Escobar
2
+ module Heroku
3
+ # Class representing an app's dyno state
4
+ class Dynos
5
+ attr_reader :app_id, :client
6
+
7
+ attr_accessor :command_id
8
+ attr_accessor :github_url
9
+ attr_accessor :pipeline_name
10
+
11
+ def initialize(client, app_id)
12
+ @app_id = app_id
13
+ @client = client
14
+ end
15
+
16
+ def info
17
+ @info ||= client.heroku.get("/apps/#{app_id}/dynos")
18
+ end
19
+
20
+ def newer_than?(epoch)
21
+ info.all? do |dyno|
22
+ epoch < Time.parse(dyno["created_at"]).utc
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module Escobar
2
- VERSION = "0.3.9".freeze
2
+ VERSION = "0.3.10".freeze
3
3
  end
data/lib/escobar.rb CHANGED
@@ -57,5 +57,6 @@ require_relative "./escobar/heroku/build"
57
57
  require_relative "./escobar/heroku/build_request"
58
58
  require_relative "./escobar/heroku/client"
59
59
  require_relative "./escobar/heroku/coupling"
60
+ require_relative "./escobar/heroku/dynos"
60
61
  require_relative "./escobar/heroku/pipeline"
61
62
  require_relative "./escobar/heroku/release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escobar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Donohoe
@@ -195,6 +195,7 @@ files:
195
195
  - lib/escobar/heroku/build_request.rb
196
196
  - lib/escobar/heroku/client.rb
197
197
  - lib/escobar/heroku/coupling.rb
198
+ - lib/escobar/heroku/dynos.rb
198
199
  - lib/escobar/heroku/pipeline.rb
199
200
  - lib/escobar/heroku/release.rb
200
201
  - lib/escobar/version.rb