escobar 0.1.1 → 0.1.2
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/exe/escobar +14 -0
- data/lib/escobar/heroku/app.rb +21 -0
- data/lib/escobar/heroku/coupling.rb +6 -2
- data/lib/escobar/version.rb +1 -1
- data/lib/escobar.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 343adec7bff5a835b00169a2f8afad75759f8cf1
|
4
|
+
data.tar.gz: bdedccdd983055a9e1611817757d521f379b7fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0ec16918caa31cafd9bcb0fe5f32880b2de23c35ca7b00160c896913c18e657a1533870099d50e18bf4af53a6208cb12ad0594a2a3bc23c90edb732816b9d58
|
7
|
+
data.tar.gz: 8cc1e6c8fadc0398ecf8eba8f104b52dae56ae7a07a1ef9615bf6464ee5b7fcb469ebb4e8be83d1cc36d6707b4c13024a28cb8d4434a984ca41daccd2cde7bae
|
data/exe/escobar
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "pry"
|
4
|
+
require "escobar"
|
5
|
+
|
6
|
+
client = Escobar::Client.from_environment
|
7
|
+
|
8
|
+
client.app_names.sort.each do |name|
|
9
|
+
pipeline = client[name]
|
10
|
+
puts "#{name}:"
|
11
|
+
pipeline.couplings.each do |environment|
|
12
|
+
puts " #{environment.name}: #{environment.app.name}"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Escobar
|
2
|
+
module Heroku
|
3
|
+
# Class representing a heroku application
|
4
|
+
class App
|
5
|
+
attr_reader :client, :id
|
6
|
+
def initialize(client, id)
|
7
|
+
@id = id
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
def name
|
12
|
+
info["name"]
|
13
|
+
end
|
14
|
+
|
15
|
+
def info
|
16
|
+
@info ||= client.get("/apps/#{id}")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -2,13 +2,17 @@ module Escobar
|
|
2
2
|
module Heroku
|
3
3
|
# Class representing a deployable environment
|
4
4
|
class Coupling
|
5
|
-
attr_reader :app, :client, :id, :name
|
5
|
+
attr_reader :app, :app_id, :client, :id, :name
|
6
6
|
def initialize(client, coupling)
|
7
7
|
@id = coupling["id"]
|
8
|
-
@app = coupling["app"]["id"]
|
9
8
|
@name = coupling["stage"]
|
9
|
+
@app_id = coupling["app"]["id"]
|
10
10
|
@client = client
|
11
11
|
end
|
12
|
+
|
13
|
+
def app
|
14
|
+
@app ||= Escobar::Heroku::App.new(client, app_id)
|
15
|
+
end
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
data/lib/escobar/version.rb
CHANGED
data/lib/escobar.rb
CHANGED
@@ -47,6 +47,7 @@ end
|
|
47
47
|
|
48
48
|
require_relative "./escobar/client"
|
49
49
|
require_relative "./escobar/github"
|
50
|
+
require_relative "./escobar/heroku/app"
|
50
51
|
require_relative "./escobar/heroku/client"
|
51
52
|
require_relative "./escobar/heroku/coupling"
|
52
53
|
require_relative "./escobar/heroku/pipeline"
|
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.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Corey Donohoe
|
@@ -167,7 +167,8 @@ dependencies:
|
|
167
167
|
description: Heroku pipelines and GitHub Deployments
|
168
168
|
email:
|
169
169
|
- atmos@atmos.org
|
170
|
-
executables:
|
170
|
+
executables:
|
171
|
+
- escobar
|
171
172
|
extensions: []
|
172
173
|
extra_rdoc_files: []
|
173
174
|
files:
|
@@ -185,9 +186,11 @@ files:
|
|
185
186
|
- bin/console
|
186
187
|
- bin/setup
|
187
188
|
- escobar.gemspec
|
189
|
+
- exe/escobar
|
188
190
|
- lib/escobar.rb
|
189
191
|
- lib/escobar/client.rb
|
190
192
|
- lib/escobar/github.rb
|
193
|
+
- lib/escobar/heroku/app.rb
|
191
194
|
- lib/escobar/heroku/client.rb
|
192
195
|
- lib/escobar/heroku/coupling.rb
|
193
196
|
- lib/escobar/heroku/pipeline.rb
|