remy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/remy/remy.rb CHANGED
@@ -109,7 +109,7 @@ module Remy
109
109
  ip_addresses = [options_hash[:ip_address]]
110
110
  end
111
111
  else
112
- names_or_ip_addresses = rake_args.split(' ').collect {|name| name.strip }
112
+ names_or_ip_addresses = rake_args.present? ? rake_args.split(' ').collect {|name| name.strip } : []
113
113
  names_or_ip_addresses.each do |name_or_ip_address|
114
114
  # From: http://www.regular-expressions.info/examples.html
115
115
  ip_address_regex = '\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b'
data/lib/remy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Remy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/spec/remy_spec.rb CHANGED
@@ -266,9 +266,16 @@ describe Remy do
266
266
  before do
267
267
  Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), 'fixtures/hello_world_chef.yml') }
268
268
  end
269
+
269
270
  it 'should return the ip address in the yml file if no ip address is given and an ip is present in the yml files' do
270
271
  Remy.send(:determine_ip_addresses_for_remy_run, '').should == ['50.57.162.242']
271
272
  end
273
+
274
+ it 'should handle receiving no parameters' do
275
+ expect do
276
+ Remy.send(:determine_ip_addresses_for_remy_run, nil).should == ['50.57.162.242']
277
+ end.to_not raise_error
278
+ end
272
279
  end
273
280
 
274
281
  context 'no top level ip address is present in the yml files' do
@@ -283,6 +290,12 @@ describe Remy do
283
290
  it 'should return the ip address if an ip address is given and no top-level ip address is in the yml files' do
284
291
  Remy.send(:determine_ip_addresses_for_remy_run, '1.2.3.4').should == ['1.2.3.4']
285
292
  end
293
+
294
+ it 'should handle receiving no parameters' do
295
+ expect do
296
+ Remy.send(:determine_ip_addresses_for_remy_run, nil).should == []
297
+ end.to_not raise_error
298
+ end
286
299
  end
287
300
 
288
301
  context ':servers section present in the yml files' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Greg Woodward & Ryan Dy
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-04 00:00:00 Z
18
+ date: 2011-12-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bourne
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  requirements: []
215
215
 
216
216
  rubyforge_project: remy
217
- rubygems_version: 1.8.10
217
+ rubygems_version: 1.8.6
218
218
  signing_key:
219
219
  specification_version: 3
220
220
  summary: Remy gem