ey_info 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ey_info.rb +7 -2
  2. metadata +3 -3
@@ -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.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
- @api_token = YAML.load_file(File.expand_path("~/.eyrc"))["api_token"]
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tung Nguyen