cloud_info 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,7 +17,6 @@ task :install do
17
17
  $stdout.puts "Use sudo?"
18
18
  sudo = ($stdin.gets.downcase[0..0] == 'y') ? 'sudo ' : ''
19
19
  $stdout.puts "Installing gem..."
20
- `#{sudo} gem uninstall #{GEM_NAME} -x`
21
20
  `#{sudo} gem install pkg/#{GEM_NAME}*.gem`
22
21
  `rm -Rf pkg`
23
22
  end
data/gemspec.rb CHANGED
@@ -16,5 +16,5 @@ GEM_SPEC = Gem::Specification.new do |s|
16
16
  s.name = GEM_NAME
17
17
  s.platform = Gem::Platform::RUBY
18
18
  s.require_path = "lib"
19
- s.version = "0.1.1"
19
+ s.version = "0.1.2"
20
20
  end
@@ -100,10 +100,10 @@ class CloudInfo
100
100
  h["#{env_name}_app#{counters[:app] += 1}"] = host
101
101
  when "util"
102
102
  if node["name"] =~ /util/
103
- h["#{env_name}_util#{counters[:util]}"] = host
103
+ h["#{env_name}_#{node["name"]}"] = host
104
104
  counters[:util] += 1
105
105
  elsif
106
- h["#{env_name}_memcached#{counters[:memcached]}"] = host
106
+ h["#{env_name}_#{node["name"]}"] = host
107
107
  counters[:memcached] += 1
108
108
  end
109
109
  when "db_master"
data/lib/cloud_info.rb CHANGED
@@ -14,7 +14,6 @@ class CloudInfo
14
14
  # if a cache exist it uses it instead of finding the servers
15
15
  def hosts(use_cache = true)
16
16
  # check yaml file first
17
- puts "tung : #{@cache_path.inspect}"
18
17
  if use_cache and File.exist?(@cache_path)
19
18
  @hosts = (CloudInfo.read_yaml(@cache_path) || {})[env_name]
20
19
  end
@@ -31,7 +30,6 @@ class CloudInfo
31
30
  all_hosts[env_name] = @hosts
32
31
  CloudInfo.write_yaml(@cache_path, all_hosts)
33
32
  end
34
- pp @hosts
35
33
  @hosts
36
34
  end
37
35
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tung Nguyen