ey_info 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.
- data/lib/ey_info.rb +7 -2
- metadata +3 -3
data/lib/ey_info.rb
CHANGED
|
@@ -7,7 +7,7 @@ require 'pp'
|
|
|
7
7
|
require File.expand_path("../text_injector", __FILE__)
|
|
8
8
|
|
|
9
9
|
module EyInfo
|
|
10
|
-
Version = "0.1.
|
|
10
|
+
Version = "0.1.2"
|
|
11
11
|
|
|
12
12
|
class CLI
|
|
13
13
|
def self.run(args)
|
|
@@ -134,7 +134,12 @@ module EyInfo
|
|
|
134
134
|
|
|
135
135
|
class Hosts
|
|
136
136
|
def initialize(options = {})
|
|
137
|
-
|
|
137
|
+
path = File.expand_path("~/.eyrc")
|
|
138
|
+
if File.exist?(path)
|
|
139
|
+
@api_token = YAML.load_file(File.expand_path("~/.eyrc"))["api_token"]
|
|
140
|
+
else
|
|
141
|
+
raise "~/.eyrc file does not exist, need to run 'engineyard environments' at least once and log in"
|
|
142
|
+
end
|
|
138
143
|
@api = EY::API.new(@api_token)
|
|
139
144
|
@envs = @api.apps.map{ |a| a.environments }
|
|
140
145
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ey_info
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 31
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.1.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Tung Nguyen
|