remy 0.0.3 → 0.0.4
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/.rdebugrc +3 -0
- data/.rvmrc +1 -1
- data/README.md +3 -3
- data/lib/remy/bootstrap.rb +2 -2
- data/lib/remy/chef.rb +13 -17
- data/lib/remy/config/chef.rb +56 -0
- data/lib/remy/config/node.rb +9 -0
- data/lib/remy/{remy.rb → config.rb} +17 -47
- data/lib/remy/server.rb +1 -1
- data/lib/remy/utility.rb +7 -0
- data/lib/remy/version.rb +1 -1
- data/lib/remy.rb +2 -1
- data/lib/tasks/remy.rake +5 -11
- data/remy.gemspec +1 -2
- data/spec/fixtures/chef.yml +5 -5
- data/spec/fixtures/hello_world_chef.yml +1 -1
- data/spec/fixtures/node.json +1 -0
- data/spec/remy/bootstrap_spec.rb +9 -9
- data/spec/remy/config/chef_spec.rb +360 -0
- data/spec/remy/config/node_spec.rb +20 -0
- data/spec/remy/integration/chef_spec.rb +4 -4
- data/spec/remy/utility_spec.rb +22 -0
- data/spec/remy_spec.rb +23 -251
- data/spec/spec_helper.rb +7 -4
- data/spec/tasks/remy_spec.rb +14 -0
- metadata +100 -146
- data/spec/remy/chef_spec.rb +0 -82
metadata
CHANGED
@@ -1,161 +1,113 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: remy
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 3
|
10
|
-
version: 0.0.3
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Greg Woodward & Ryan Dy
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
21
|
-
name: bourne
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
32
|
-
type: :development
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: mocha
|
36
|
-
prerelease: false
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
-
none: false
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 3
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
46
|
-
type: :development
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-07-20 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
49
15
|
name: i18n
|
50
|
-
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70190525834600 !ruby/object:Gem::Requirement
|
52
17
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
60
22
|
type: :development
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: json
|
64
23
|
prerelease: false
|
65
|
-
|
24
|
+
version_requirements: *70190525834600
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: json
|
27
|
+
requirement: &70190525834180 !ruby/object:Gem::Requirement
|
66
28
|
none: false
|
67
|
-
requirements:
|
68
|
-
- -
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
|
71
|
-
segments:
|
72
|
-
- 0
|
73
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
74
33
|
type: :development
|
75
|
-
version_requirements: *id004
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: rspec
|
78
34
|
prerelease: false
|
79
|
-
|
35
|
+
version_requirements: *70190525834180
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70190525833680 !ruby/object:Gem::Requirement
|
80
39
|
none: false
|
81
|
-
requirements:
|
40
|
+
requirements:
|
82
41
|
- - ~>
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
hash: 19
|
85
|
-
segments:
|
86
|
-
- 2
|
87
|
-
- 7
|
88
|
-
- 0
|
42
|
+
- !ruby/object:Gem::Version
|
89
43
|
version: 2.7.0
|
90
44
|
type: :development
|
91
|
-
version_requirements: *id005
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: activesupport
|
94
45
|
prerelease: false
|
95
|
-
|
46
|
+
version_requirements: *70190525833680
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: activesupport
|
49
|
+
requirement: &70190520085720 !ruby/object:Gem::Requirement
|
96
50
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
segments:
|
102
|
-
- 2
|
103
|
-
version: "2"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2'
|
104
55
|
type: :runtime
|
105
|
-
|
106
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70190520085720
|
58
|
+
- !ruby/object:Gem::Dependency
|
107
59
|
name: chef
|
60
|
+
requirement: &70190520085340 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :runtime
|
108
67
|
prerelease: false
|
109
|
-
|
68
|
+
version_requirements: *70190520085340
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: &70190520084880 !ruby/object:Gem::Requirement
|
110
72
|
none: false
|
111
|
-
requirements:
|
112
|
-
- -
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
|
115
|
-
segments:
|
116
|
-
- 0
|
117
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
118
77
|
type: :runtime
|
119
|
-
version_requirements: *id007
|
120
|
-
- !ruby/object:Gem::Dependency
|
121
|
-
name: fog
|
122
78
|
prerelease: false
|
123
|
-
|
79
|
+
version_requirements: *70190520084880
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: fog
|
82
|
+
requirement: &70190520084460 !ruby/object:Gem::Requirement
|
124
83
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
129
|
-
segments:
|
130
|
-
- 0
|
131
|
-
version: "0"
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
132
88
|
type: :runtime
|
133
|
-
version_requirements: *id008
|
134
|
-
- !ruby/object:Gem::Dependency
|
135
|
-
name: hashie
|
136
89
|
prerelease: false
|
137
|
-
|
90
|
+
version_requirements: *70190520084460
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: hashie
|
93
|
+
requirement: &70190520084040 !ruby/object:Gem::Requirement
|
138
94
|
none: false
|
139
|
-
requirements:
|
140
|
-
- -
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
|
143
|
-
segments:
|
144
|
-
- 0
|
145
|
-
version: "0"
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
146
99
|
type: :runtime
|
147
|
-
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70190520084040
|
148
102
|
description: Easy chef deployment
|
149
|
-
email:
|
103
|
+
email:
|
150
104
|
- pair+gwoodward+rdy@pivotallabs.com
|
151
105
|
executables: []
|
152
|
-
|
153
106
|
extensions: []
|
154
|
-
|
155
107
|
extra_rdoc_files: []
|
156
|
-
|
157
|
-
files:
|
108
|
+
files:
|
158
109
|
- .gitignore
|
110
|
+
- .rdebugrc
|
159
111
|
- .rspec
|
160
112
|
- .rvmrc
|
161
113
|
- Gemfile
|
@@ -170,9 +122,12 @@ files:
|
|
170
122
|
- lib/remy.rb
|
171
123
|
- lib/remy/bootstrap.rb
|
172
124
|
- lib/remy/chef.rb
|
173
|
-
- lib/remy/
|
125
|
+
- lib/remy/config.rb
|
126
|
+
- lib/remy/config/chef.rb
|
127
|
+
- lib/remy/config/node.rb
|
174
128
|
- lib/remy/server.rb
|
175
129
|
- lib/remy/shell.rb
|
130
|
+
- lib/remy/utility.rb
|
176
131
|
- lib/remy/version.rb
|
177
132
|
- lib/tasks/remy.rake
|
178
133
|
- remy.gemspec
|
@@ -180,51 +135,50 @@ files:
|
|
180
135
|
- spec/fixtures/chef.yml
|
181
136
|
- spec/fixtures/foo.yml
|
182
137
|
- spec/fixtures/hello_world_chef.yml
|
138
|
+
- spec/fixtures/node.json
|
183
139
|
- spec/remy/bootstrap_spec.rb
|
184
|
-
- spec/remy/chef_spec.rb
|
140
|
+
- spec/remy/config/chef_spec.rb
|
141
|
+
- spec/remy/config/node_spec.rb
|
185
142
|
- spec/remy/integration/chef_spec.rb
|
143
|
+
- spec/remy/utility_spec.rb
|
186
144
|
- spec/remy_spec.rb
|
187
145
|
- spec/spec_helper.rb
|
146
|
+
- spec/tasks/remy_spec.rb
|
188
147
|
homepage: http://sharespost.com
|
189
148
|
licenses: []
|
190
|
-
|
191
149
|
post_install_message:
|
192
150
|
rdoc_options: []
|
193
|
-
|
194
|
-
require_paths:
|
151
|
+
require_paths:
|
195
152
|
- lib
|
196
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
197
154
|
none: false
|
198
|
-
requirements:
|
199
|
-
- -
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
|
202
|
-
|
203
|
-
- 0
|
204
|
-
version: "0"
|
205
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ! '>='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
160
|
none: false
|
207
|
-
requirements:
|
208
|
-
- -
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
|
211
|
-
segments:
|
212
|
-
- 0
|
213
|
-
version: "0"
|
161
|
+
requirements:
|
162
|
+
- - ! '>='
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
214
165
|
requirements: []
|
215
|
-
|
216
166
|
rubyforge_project: remy
|
217
|
-
rubygems_version: 1.8.
|
167
|
+
rubygems_version: 1.8.15
|
218
168
|
signing_key:
|
219
169
|
specification_version: 3
|
220
170
|
summary: Remy gem
|
221
|
-
test_files:
|
171
|
+
test_files:
|
222
172
|
- spec/fixtures/bar.yml
|
223
173
|
- spec/fixtures/chef.yml
|
224
174
|
- spec/fixtures/foo.yml
|
225
175
|
- spec/fixtures/hello_world_chef.yml
|
176
|
+
- spec/fixtures/node.json
|
226
177
|
- spec/remy/bootstrap_spec.rb
|
227
|
-
- spec/remy/chef_spec.rb
|
178
|
+
- spec/remy/config/chef_spec.rb
|
179
|
+
- spec/remy/config/node_spec.rb
|
228
180
|
- spec/remy/integration/chef_spec.rb
|
181
|
+
- spec/remy/utility_spec.rb
|
229
182
|
- spec/remy_spec.rb
|
230
183
|
- spec/spec_helper.rb
|
184
|
+
- spec/tasks/remy_spec.rb
|
data/spec/remy/chef_spec.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Remy::Chef do
|
4
|
-
def node_configuration(chef)
|
5
|
-
chef.instance_variable_get(:@node_configuration)
|
6
|
-
end
|
7
|
-
|
8
|
-
describe "#initialize and the node configuration" do
|
9
|
-
it 'should use the top-level IP address in the yml files, if one is present, and an ip address is not passed in as an argument' do
|
10
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/hello_world_chef.yml') }
|
11
|
-
chef = Remy::Chef.new
|
12
|
-
node_configuration(chef).ip_address.should == IP_ADDRESS
|
13
|
-
node_configuration(chef).color.should == 'blue'
|
14
|
-
node_configuration(chef).recipes.should == ['recipe[hello_world]']
|
15
|
-
end
|
16
|
-
|
17
|
-
it 'should allow the top-level values in the yml files (including the ip address) to be overridden' do
|
18
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/hello_world_chef.yml') }
|
19
|
-
chef = Remy::Chef.new(:ip_address => '1.2.3.4', :color => 'green')
|
20
|
-
node_configuration(chef).ip_address.should == '1.2.3.4'
|
21
|
-
node_configuration(chef).color.should == 'green'
|
22
|
-
node_configuration(chef).recipes.should == ['recipe[hello_world]']
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'should return properties from the :servers section of the yml file if the ip address is found in there' do
|
26
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/chef.yml') }
|
27
|
-
chef = Remy::Chef.new(:ip_address => '51.51.51.51')
|
28
|
-
node_configuration(chef).ip_address.should == '51.51.51.51'
|
29
|
-
node_configuration(chef).rails_env.should == 'production'
|
30
|
-
node_configuration(chef).color.should == 'yellow'
|
31
|
-
node_configuration(chef).adapter.should == 'mysql2'
|
32
|
-
node_configuration(chef).encoding.should == 'utf8'
|
33
|
-
end
|
34
|
-
|
35
|
-
it 'should allow properties from the servers section of the yml file to be overridden plus additional options added' do
|
36
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/chef.yml') }
|
37
|
-
chef = Remy::Chef.new(:ip_address => '51.51.51.51', :color => 'purple', :temperature => 'warm')
|
38
|
-
node_configuration(chef).color.should == 'purple' # Overrides 'yellow' from the yml files
|
39
|
-
node_configuration(chef).temperature.should == 'warm' # A new node attribute which is not present in the yml files
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'should allow the chef args to be specified (and not merge this chef_args value into the node configuration)' do
|
43
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/chef.yml') }
|
44
|
-
chef = Remy::Chef.new(:chef_args => '-l debug')
|
45
|
-
node_configuration(chef).chef_args.should be_nil
|
46
|
-
chef.instance_variable_get(:@chef_args).should == '-l debug'
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'should allow the quiet option to be specified (and not merge this option into the node configuration)' do
|
50
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/chef.yml') }
|
51
|
-
chef = Remy::Chef.new(:quiet => true)
|
52
|
-
node_configuration(chef).quiet.should be_nil
|
53
|
-
chef.instance_variable_get(:@quiet).should be_true
|
54
|
-
end
|
55
|
-
|
56
|
-
it 'should not modify the global Remy configuration, but rather only the node configuration for this particular Chef node' do
|
57
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/bar.yml') }
|
58
|
-
Remy.configuration.another_node_attribute.should == 'hot'
|
59
|
-
chef = Remy::Chef.new(:another_node_attribute => 'cold')
|
60
|
-
node_configuration(chef).another_node_attribute.should == 'cold'
|
61
|
-
Remy.configuration.another_node_attribute.should == 'hot' # Unchanged from its original value # do some checks
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
describe '#run' do
|
66
|
-
before do
|
67
|
-
Remy.configure { |config| config.yml_files = File.join(File.dirname(__FILE__), '../fixtures/chef.yml') }
|
68
|
-
end
|
69
|
-
|
70
|
-
it 'should work with a hash as its argument' do
|
71
|
-
chef = Remy::Chef.new(:ip_address => IP_ADDRESS)
|
72
|
-
node_configuration(chef).ip_address.should == IP_ADDRESS
|
73
|
-
node_configuration(chef).recipes.should == ['recipe[hello_world]']
|
74
|
-
end
|
75
|
-
|
76
|
-
it 'should work with JSON as its argument' do
|
77
|
-
chef = Remy::Chef.new("{\"ip_address\":\"#{IP_ADDRESS}\"}")
|
78
|
-
node_configuration(chef).ip_address.should == IP_ADDRESS
|
79
|
-
node_configuration(chef).recipes.should == ['recipe[hello_world]']
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|