shadow_puppet 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -8,9 +8,9 @@ Jeweler::Tasks.new do |gem|
8
8
  gem.email = "jesse@railsmachine.com"
9
9
  gem.homepage = "http://railsmachine.github.com/shadow_puppet"
10
10
  gem.rubyforge_project = "moonshine"
11
- gem.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein"]
11
+ gem.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein", "Will Farrington"]
12
12
 
13
- gem.version = "0.4.0"
13
+ gem.version = "0.4.1"
14
14
 
15
15
  gem.add_dependency('puppet', ["= 0.24.8"])
16
16
  gem.add_dependency('facter', [">= 1.5.4"])
@@ -93,6 +93,7 @@ module ShadowPuppet
93
93
  Puppet[:user] = Process.uid
94
94
  Puppet[:group] = Process.gid
95
95
  Puppet::Util::Log.newdestination(:console)
96
+ Puppet[:diff_args] = "-u"
96
97
 
97
98
  configure(config)
98
99
  @executed = false
@@ -1,61 +1,51 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{shadow_puppet}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein"]
12
- s.date = %q{2010-09-23}
11
+ s.authors = ["Jesse Newland", "Josh Nichols", "Eric Lindvall", "Lee Jones", "dreamcat4", "Patrick Schless", "Ches Martin", "Rob Lingle", "Scott Fleckenstein", "Will Farrington"]
12
+ s.date = %q{2011-08-12}
13
13
  s.default_executable = %q{shadow_puppet}
14
14
  s.description = %q{A Ruby Puppet DSL}
15
15
  s.email = %q{jesse@railsmachine.com}
16
16
  s.executables = ["shadow_puppet"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.rdoc"
19
+ "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
- ".gitignore",
23
- ".gitmodules",
24
- "IsolateScenarios",
25
- "LICENSE",
26
- "README.rdoc",
27
- "Rakefile",
28
- "bin/shadow_puppet",
29
- "examples/foo.rb",
30
- "lib/shadow_puppet.rb",
31
- "lib/shadow_puppet/core_ext.rb",
32
- "lib/shadow_puppet/manifest.rb",
33
- "lib/shadow_puppet/test.rb",
34
- "shadow_puppet.gemspec",
35
- "spec/fixtures/manifests.rb",
36
- "spec/manifest_spec.rb",
37
- "spec/spec.opts",
38
- "spec/spec_helper.rb",
39
- "spec/test_spec.rb",
40
- "spec/type_spec.rb"
22
+ ".gitmodules",
23
+ "IsolateScenarios",
24
+ "LICENSE",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "bin/shadow_puppet",
28
+ "examples/foo.rb",
29
+ "lib/shadow_puppet.rb",
30
+ "lib/shadow_puppet/core_ext.rb",
31
+ "lib/shadow_puppet/manifest.rb",
32
+ "lib/shadow_puppet/test.rb",
33
+ "shadow_puppet.gemspec",
34
+ "spec/fixtures/manifests.rb",
35
+ "spec/manifest_spec.rb",
36
+ "spec/spec.opts",
37
+ "spec/spec_helper.rb",
38
+ "spec/test_spec.rb",
39
+ "spec/type_spec.rb"
41
40
  ]
42
41
  s.homepage = %q{http://railsmachine.github.com/shadow_puppet}
43
- s.rdoc_options = ["--charset=UTF-8", "--inline-source", "--webcvs=http://github.com/railsmachine/shadow_puppet/tree/master/"]
42
+ s.rdoc_options = ["--inline-source", "--webcvs=http://github.com/railsmachine/shadow_puppet/tree/master/"]
44
43
  s.require_paths = ["lib"]
45
44
  s.rubyforge_project = %q{moonshine}
46
- s.rubygems_version = %q{1.3.7}
45
+ s.rubygems_version = %q{1.6.2}
47
46
  s.summary = %q{A Ruby Puppet DSL}
48
- s.test_files = [
49
- "spec/fixtures/manifests.rb",
50
- "spec/manifest_spec.rb",
51
- "spec/spec_helper.rb",
52
- "spec/test_spec.rb",
53
- "spec/type_spec.rb",
54
- "examples/foo.rb"
55
- ]
56
47
 
57
48
  if s.respond_to? :specification_version then
58
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
59
49
  s.specification_version = 3
60
50
 
61
51
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -95,6 +95,40 @@ class ConfigurationWithConvention < ShadowPuppet::Manifest
95
95
  recipe :foo
96
96
  end
97
97
 
98
+ # Test MoonshienSetupManifest
99
+ class MoonshineSetupManifest < ShadowPuppet::Manifest
100
+
101
+ configure(
102
+ :deploy_to => "#{ENV['PWD']}/.shadow_puppet_test",
103
+ :user => ENV['USER'],
104
+ :group => (`uname -a`.match(/Darwin/) ? 'everyone' : ENV['USER'])
105
+ )
106
+
107
+ def directories
108
+ deploy_to_array = configuration[:deploy_to].split('/')
109
+ deploy_to_array.each_with_index do |dir, index|
110
+ next if index == 0 || index >= (deploy_to_array.size-1)
111
+ file '/'+deploy_to_array[1..index].join('/'), :ensure => :directory
112
+ end
113
+
114
+ dirs = [
115
+ "#{configuration[:deploy_to]}",
116
+ "#{configuration[:deploy_to]}/shared",
117
+ "#{configuration[:deploy_to]}/shared/config",
118
+ "#{configuration[:deploy_to]}/releases"
119
+ ]
120
+
121
+ dirs.each do |dir|
122
+ file dir,
123
+ :ensure => :directory,
124
+ :owner => configuration[:user],
125
+ :group => configuration[:group] || configuration[:user],
126
+ :mode => '775'
127
+ end
128
+ end
129
+ recipe :directories
130
+ end
131
+
98
132
  # setting up a few different resource types to test the test helpers
99
133
  class TestHelpers < ShadowPuppet::Manifest
100
134
 
@@ -218,4 +218,25 @@ describe "A manifest" do
218
218
  @manifest.execute.should be_true
219
219
  end
220
220
  end
221
+
222
+ describe "when moonshine setup" do
223
+
224
+ before(:each) do
225
+ @manifest = MoonshineSetupManifest.new
226
+ end
227
+
228
+ it "include directories recipe" do
229
+ @manifest.class.recipes.map(&:first).should include(:directories)
230
+ end
231
+
232
+ it "calls specified methods" do
233
+ @manifest.should_receive(:directories)
234
+ @manifest.send(:evaluate_recipes)
235
+ end
236
+
237
+ it "returns true when executed" do
238
+ @manifest.execute.should be_true
239
+ end
240
+
241
+ end
221
242
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shadow_puppet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 13
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jesse Newland
@@ -19,11 +19,12 @@ authors:
19
19
  - Ches Martin
20
20
  - Rob Lingle
21
21
  - Scott Fleckenstein
22
+ - Will Farrington
22
23
  autorequire:
23
24
  bindir: bin
24
25
  cert_chain: []
25
26
 
26
- date: 2010-09-23 00:00:00 -04:00
27
+ date: 2011-08-12 00:00:00 -04:00
27
28
  default_executable: shadow_puppet
28
29
  dependencies:
29
30
  - !ruby/object:Gem::Dependency
@@ -144,7 +145,6 @@ extra_rdoc_files:
144
145
  - LICENSE
145
146
  - README.rdoc
146
147
  files:
147
- - .gitignore
148
148
  - .gitmodules
149
149
  - IsolateScenarios
150
150
  - LICENSE
@@ -169,7 +169,6 @@ licenses: []
169
169
 
170
170
  post_install_message:
171
171
  rdoc_options:
172
- - --charset=UTF-8
173
172
  - --inline-source
174
173
  - --webcvs=http://github.com/railsmachine/shadow_puppet/tree/master/
175
174
  require_paths:
@@ -195,14 +194,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
194
  requirements: []
196
195
 
197
196
  rubyforge_project: moonshine
198
- rubygems_version: 1.3.7
197
+ rubygems_version: 1.6.2
199
198
  signing_key:
200
199
  specification_version: 3
201
200
  summary: A Ruby Puppet DSL
202
- test_files:
203
- - spec/fixtures/manifests.rb
204
- - spec/manifest_spec.rb
205
- - spec/spec_helper.rb
206
- - spec/test_spec.rb
207
- - spec/type_spec.rb
208
- - examples/foo.rb
201
+ test_files: []
202
+
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- *.gem
2
- doc