hubcap 1.2.1 → 1.2.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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubcap (1.2.1)
4
+ hubcap (1.2.2)
5
5
  capistrano (~> 2.13)
6
6
 
7
7
  GEM
data/lib/hubcap/group.rb CHANGED
@@ -4,6 +4,7 @@ class Hubcap::Group
4
4
 
5
5
  attr_reader(:name, :parent, :children)
6
6
 
7
+
7
8
  # Supply the parent group, the name of this new group and a block of code to
8
9
  # evaluate in the context of this new group.
9
10
  #
@@ -32,8 +33,9 @@ class Hubcap::Group
32
33
  #
33
34
  def absorb(path)
34
35
  p = path
35
- p += '.rb' unless File.exists?(p)
36
+ p += '.rb' unless File.exists?(p) && !File.directory?(p)
36
37
  raise("File not found: #{path}") unless File.exists?(p)
38
+ raise("#{path} is a directory") if File.directory?(p)
37
39
  code = IO.read(p)
38
40
  eval(code, binding, p)
39
41
  end
@@ -143,18 +145,6 @@ class Hubcap::Group
143
145
  # or:
144
146
  # role(:cap => [:app, :db], :puppet => 'relishapp')
145
147
  #
146
- # def role(*args)
147
- # if args.length == 1 && args.first.kind_of?(Hash)
148
- # h = args.first
149
- # @cap_roles += [h[:cap]].flatten if h.has_key?(:cap)
150
- # @puppet_roles += [h[:puppet]].flatten if h.has_key?(:puppet)
151
- # else
152
- # @cap_roles += args
153
- # @puppet_roles += args
154
- # end
155
- # end
156
-
157
-
158
148
  def role(*args)
159
149
  cap_role(*args)
160
150
  puppet_role(*args)
@@ -203,6 +193,7 @@ class Hubcap::Group
203
193
  }
204
194
  update_with_stringified_keys(@params, hash)
205
195
  end
196
+
206
197
 
207
198
  # Adds extra (inheritable) attributes to the referencing scope
208
199
  # These attributes are not used by hubcap or puppet, but can be used by
@@ -218,6 +209,7 @@ class Hubcap::Group
218
209
  }
219
210
  update_with_stringified_keys(@extra_attributes, hash)
220
211
  end
212
+
221
213
 
222
214
  # Defines hostnames that point to IP addresses. Eg,
223
215
  #
@@ -264,10 +256,12 @@ class Hubcap::Group
264
256
  @parent ? @parent.hosts.merge(@hosts) : @hosts
265
257
  end
266
258
 
259
+
267
260
  def extras
268
261
  @parent ? @parent.extras.merge(@extra_attributes) : @extra_attributes
269
262
  end
270
263
 
264
+
271
265
  # Takes a name and returns an IP address. It looks at the @hosts table first,
272
266
  # then falls back to a normal DNS look-up.
273
267
  #
@@ -1,5 +1,5 @@
1
1
  module Hubcap
2
2
 
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,43 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Joseph Pearson
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-12-10 00:00:00.000000000 Z
12
+ date: 2017-12-14 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: capistrano
15
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &22839400 !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '2.13'
20
22
  type: :runtime
21
23
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: '2.13'
24
+ version_requirements: *22839400
27
25
  - !ruby/object:Gem::Dependency
28
26
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &22838300 !ruby/object:Gem::Requirement
28
+ none: false
30
29
  requirements:
31
- - - '>='
30
+ - - ! '>='
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0'
34
33
  type: :development
35
34
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
35
+ version_requirements: *22838300
41
36
  description: Create a hub for your server configuration. Use it with Capistrano, Puppet
42
37
  and others.
43
38
  email:
@@ -78,26 +73,27 @@ files:
78
73
  homepage: https://github.com/joseph/hubcap
79
74
  licenses:
80
75
  - MIT
81
- metadata: {}
82
76
  post_install_message:
83
77
  rdoc_options: []
84
78
  require_paths:
85
79
  - lib
86
80
  required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
87
82
  requirements:
88
- - - '>='
83
+ - - ! '>='
89
84
  - !ruby/object:Gem::Version
90
85
  version: '0'
91
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
92
88
  requirements:
93
- - - '>='
89
+ - - ! '>='
94
90
  - !ruby/object:Gem::Version
95
91
  version: '0'
96
92
  requirements: []
97
93
  rubyforge_project:
98
- rubygems_version: 2.0.14
94
+ rubygems_version: 1.8.11
99
95
  signing_key:
100
- specification_version: 4
96
+ specification_version: 3
101
97
  summary: Hubcap Capistrano/Puppet extension
102
98
  test_files:
103
99
  - test/data/example.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: b6c7801199d9b0a21c799941f3ef21c7734562bd
4
- data.tar.gz: 30d80572504bef6604ec5732794fe03e07b5af08
5
- SHA512:
6
- metadata.gz: 1b4e62ef8235240a68b5f9dc9920069cda86c099edbc2fa1e4d8d8628e78ac573a21190561ae78888f61ad9396b3c48ea38caa0254d7e4d80637e72334c7124a
7
- data.tar.gz: 501d4a8444084f68b789cfb5743fabf86b1dfe0d42c9cb4e9c106f40994c8da973181528f95b51fd18d1d112dc5faea6db00a9ed5b7ff70ba6dec87d81cb7211