server-blender-manifest 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -40,10 +40,22 @@ module Blender::Manifest::Nodes
40
40
 
41
41
  # resolves host name using 'host' executable
42
42
  # @return host's IP by its name or nil if not found
43
+ # Note: cached value from @host_ips will be used if exists
43
44
  require 'resolv'
44
45
  def host_ip(name)
45
46
  return nil unless name && !name.empty?
46
- Resolv.getaddress(name) rescue nil
47
+ @host_ips ||= {}
48
+ @host_ips[name] ||= Resolv.getaddress(name) rescue nil
49
+ end
50
+
51
+ # sets cache value for host ip
52
+ # allows resolving hosts that can't be resolved through the sytem
53
+ # @param [String] name host name
54
+ # @param [String] ip host ip
55
+ # @return ip
56
+ def set_host_ip(name, ip)
57
+ @host_ips ||= {}
58
+ @host_ips[name] = ip
47
59
  end
48
60
 
49
61
  # define node and conditionally execute code block only on the specific node
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{server-blender-manifest}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Vitaly Kushner"]
12
- s.date = %q{2011-01-17}
12
+ s.date = %q{2011-01-31}
13
13
  s.description = %q{This gem is part of the server-blender family (http://astrails.com/opensource/server-blender)
14
14
  It contains server-side root manifest implementation for blender recipes. See server-blender for more information.
15
15
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server-blender-manifest
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
  - Vitaly Kushner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-17 00:00:00 +02:00
18
+ date: 2011-01-31 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency