lachlan-sprinkle 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
data/CREDITS CHANGED
@@ -1,7 +1,7 @@
1
1
  = CREDITS
2
2
 
3
3
  Many thanks to the following people who have submitted ideas, patches, helped with testing
4
- and/or generally provided support to Sprinke, I really appreciate your help:
4
+ and/or generally provided support to Sprinkle, I really appreciate your help:
5
5
 
6
6
  Kristin Baumann (http://crafterm.net/kristin/blog/)
7
7
  Ben Schwarz (http://germanforblack.com/)
@@ -20,3 +20,10 @@ Joshua Sierles (http://diluvia.net)
20
20
  Julian Russell (http://github.com/plusplus)
21
21
  Dave (Gassto) (http://github.com/gassto)
22
22
  Bodaniel Jeanes (http://bjeanes.github.com)
23
+ Jacob Harris (http://open.nytimes.com)
24
+ Justin Pease (http://jit.nuance9.com)
25
+ Tobias Lütke (http://blog.leetsoft.com)
26
+ Josh Reynolds (http://github.com/jreynolds)
27
+ Jan Ulbrich (http://www.ulbrich.net)
28
+
29
+ The transfer installer contains a piece of exception reporting code copied from the Chef library (http://wiki.opscode.com/display/chef/Home)
data/Manifest.txt CHANGED
@@ -2,7 +2,7 @@ CREDITS
2
2
  History.txt
3
3
  MIT-LICENSE
4
4
  Manifest.txt
5
- README.txt
5
+ README.markdown
6
6
  Rakefile
7
7
  bin/sprinkle
8
8
  config/hoe.rb
@@ -43,6 +43,7 @@ lib/sprinkle/extensions/dsl_accessor.rb
43
43
  lib/sprinkle/extensions/string.rb
44
44
  lib/sprinkle/extensions/symbol.rb
45
45
  lib/sprinkle/installers/apt.rb
46
+ lib/sprinkle/installers/noop.rb
46
47
  lib/sprinkle/installers/bsd_port.rb
47
48
  lib/sprinkle/installers/deb.rb
48
49
  lib/sprinkle/installers/freebsd_pkg.rb
@@ -56,7 +57,13 @@ lib/sprinkle/installers/rake.rb
56
57
  lib/sprinkle/installers/rpm.rb
57
58
  lib/sprinkle/installers/script.rb
58
59
  lib/sprinkle/installers/source.rb
60
+ lib/sprinkle/installers/transfer.rb
59
61
  lib/sprinkle/installers/yum.rb
62
+ lib/sprinkle/installers/freebsd_pkg.rb
63
+ lib/sprinkle/installers/openbsd_pkg.rb
64
+ lib/sprinkle/installers/opensolaris_pkg.rb
65
+ lib/sprinkle/installers/bsd_port.rb
66
+ lib/sprinkle/installers/mac_port.rb
60
67
  lib/sprinkle/package.rb
61
68
  lib/sprinkle/policy.rb
62
69
  lib/sprinkle/script.rb
@@ -93,6 +100,10 @@ spec/sprinkle/installers/rake_spec.rb
93
100
  spec/sprinkle/installers/rpm_spec.rb
94
101
  spec/sprinkle/installers/source_spec.rb
95
102
  spec/sprinkle/installers/yum_spec.rb
103
+ spec/sprinkle/installers/openbsd_pkg_spec.rb
104
+ spec/sprinkle/installers/freebsd_pkg_spec.rb
105
+ spec/sprinkle/installers/bsd_port_spec.rb
106
+ spec/sprinkle/installers/mac_port_spec.rb
96
107
  spec/sprinkle/package_spec.rb
97
108
  spec/sprinkle/policy_spec.rb
98
109
  spec/sprinkle/script_spec.rb
@@ -1,12 +1,12 @@
1
- = SPRINKLE
1
+ # SPRINKLE
2
2
 
3
- http://redartisan.com/2008/5/27/sprinkle-intro
4
- http://github.com/crafterm/sprinkle
5
- http://github.com/benschwarz/passenger-stack
6
- http://www.vimeo.com/2888665
7
- http://redartisan.lighthouseapp.com/projects/25275-sprinkle/tickets
3
+ * <http://redartisan.com/2008/5/27/sprinkle-intro>
4
+ * <http://github.com/crafterm/sprinkle>
5
+ * <http://github.com/benschwarz/passenger-stack>
6
+ * <http://www.vimeo.com/2888665>
7
+ * <http://redartisan.lighthouseapp.com/projects/25275-sprinkle/tickets>
8
8
 
9
- == DESCRIPTION:
9
+ ## DESCRIPTION:
10
10
 
11
11
  Sprinkle is a software provisioning tool you can use to build remote servers with, after the base operating
12
12
  system has been installed. For example, to install a Rails or Merb stack on a brand new slice directly after
@@ -208,18 +208,18 @@ and Git (via source with dependencies from APT):
208
208
 
209
209
  end
210
210
 
211
- Please see the examples directory for more complete examples of Sprinkle deployment scripts, and also the Passenger Stack github page and video by Ben Schwarz (http://github.com/benschwarz/passenger-stack and http://www.vimeo.com/2888665 respectively).
211
+ Please see the examples directory for more complete examples of Sprinkle deployment scripts, and also the Passenger Stack github page and video by Ben Schwarz (<http://github.com/benschwarz/passenger-stack> and <http://www.vimeo.com/2888665> respectively).
212
212
 
213
213
  Sprinkle is a work in progress and I'm excited to hear if anyone finds it useful - please feel free to
214
214
  comment, ask any questions, or send in any ideas, patches, bugs. All most welcome.
215
215
 
216
216
  Marcus Crafter <crafterm@redartisan.com>
217
217
 
218
- == LICENSE:
218
+ ## LICENSE:
219
219
 
220
220
  (The MIT License)
221
221
 
222
- Copyright (c) 2008 Marcus Crafter <crafterm@redartisan.com>
222
+ Copyright (c) 2008-2009 Marcus Crafter <crafterm@redartisan.com>
223
223
 
224
224
  Permission is hereby granted, free of charge, to any person obtaining
225
225
  a copy of this software and associated documentation files (the
data/bin/sprinkle CHANGED
@@ -73,7 +73,7 @@ def log_level(options)
73
73
  Object.logger.level = ActiveSupport::BufferedLogger::Severity::DEBUG if options[:verbose]
74
74
  end
75
75
 
76
- require 'sprinkle'
76
+ require File.dirname(__FILE__) + '/../lib/sprinkle'
77
77
 
78
78
  powder = OPTIONS[:path]
79
79
  raise "Sprinkle script is not readable: #{powder}" unless File.readable?(powder)
data/config/hoe.rb CHANGED
@@ -35,7 +35,7 @@ VERS = Sprinkle::VERSION::STRING + (REV ? ".#{REV}" : "")
35
35
  RDOC_OPTS = ['--quiet', '--title', 'sprinkle documentation',
36
36
  "--opname", "index.html",
37
37
  "--line-numbers",
38
- "--main", "README.txt",
38
+ "--main", "README.markdown",
39
39
  "--inline-source"]
40
40
 
41
41
  class Hoe
@@ -1,4 +1,4 @@
1
- = Example Rails Spinkle Deployment Script
1
+ = Example Rails Sprinkle Deployment Script
2
2
 
3
3
  The following example shows how you can provision Rails and associated packages onto a remote server (or set of servers).
4
4
 
@@ -12,4 +12,4 @@ $> sprinkle -t -s rails.rb
12
12
 
13
13
  == Information
14
14
 
15
- For more information, please see: http://github.com/crafterm/sprinkle/tree/master/README.txt
15
+ For more information, please see: http://github.com/crafterm/sprinkle/tree/master/README.markdown
@@ -3,7 +3,8 @@
3
3
  package :ruby do
4
4
  description 'Ruby Virtual Machine'
5
5
  version '1.8.6'
6
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p111.tar.gz" # implicit :style => :gnu
6
+ patchlevel '369'
7
+ source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz" # implicit :style => :gnu
7
8
  requires :ruby_dependencies
8
9
  end
9
10
 
@@ -14,8 +15,8 @@ end
14
15
 
15
16
  package :rubygems do
16
17
  description 'Ruby Gems Package Management System'
17
- version '1.2.0'
18
- source "http://rubyforge.org/frs/download.php/38646/rubygems-#{version}.tgz" do
18
+ version '1.3.5'
19
+ source "http://rubyforge.org/frs/download.php/60718/rubygems-#{version}.tgz" do
19
20
  custom_install 'ruby setup.rb'
20
21
  end
21
22
  requires :ruby
@@ -24,5 +25,5 @@ end
24
25
  package :rails do
25
26
  description 'Ruby on Rails'
26
27
  gem 'rails'
27
- version '2.1.0'
28
+ version '2.3.3'
28
29
  end
@@ -1,6 +1,6 @@
1
1
  package :git, :provides => :scm do
2
2
  description 'Git Distributed Version Control'
3
- version '1.5.6.3'
3
+ version '1.6.3.3'
4
4
  source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
5
5
  requires :git_dependencies
6
6
  end
@@ -1,6 +1,6 @@
1
1
  package :sphinx, :provides => :search do
2
2
  description 'MySQL full text search engine'
3
- version '0.9.8-rc2'
3
+ version '0.9.8.1'
4
4
  source "http://www.sphinxsearch.com/downloads/sphinx-#{version}.tar.gz"
5
5
  requires :mysql_dev
6
6
  end
@@ -1,7 +1,7 @@
1
1
  package :mongrel do
2
2
  description 'Mongrel Application Server'
3
3
  gem 'mongrel'
4
- version '1.1.4'
4
+ version '1.1.5'
5
5
  end
6
6
 
7
7
  package :mongrel_cluster, :provides => :appserver do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  package :apache, :provides => :webserver do
15
15
  description 'Apache 2 HTTP Server'
16
- version '2.2.9'
16
+ version '2.2.11'
17
17
  source "http://www.apache.org/dist/httpd/httpd-#{version}.tar.bz2" do
18
18
  enable %w( mods-shared=all proxy proxy-balancer proxy-http rewrite cache headers ssl deflate so )
19
19
  prefix "/opt/local/apache2-#{version}"
@@ -35,7 +35,7 @@ require 'packages/scm'
35
35
  # the user is requested to select which one to use.
36
36
 
37
37
  policy :rails, :roles => :app do
38
- requires :rails, :version => '2.1.0'
38
+ requires :rails, :version => '2.3.3'
39
39
  requires :appserver
40
40
  requires :database
41
41
  requires :webserver
@@ -76,6 +76,22 @@ module Sprinkle
76
76
  end
77
77
  end
78
78
 
79
+ def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false)
80
+ define_task(name, roles) do
81
+ upload source, destination, :via => :scp, :recursive => recursive
82
+ end
83
+
84
+ begin
85
+ run(name)
86
+ return true
87
+ rescue ::Capistrano::CommandError => e
88
+ return false if suppress_and_return_failures
89
+
90
+ # Reraise error if we're not suppressing it
91
+ raise
92
+ end
93
+ end
94
+
79
95
  private
80
96
 
81
97
  # REVISIT: can we set the description somehow?
@@ -26,6 +26,13 @@ module Sprinkle
26
26
  return true
27
27
  end
28
28
 
29
+ def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false)
30
+ if recursive
31
+ flags = "-R "
32
+ end
33
+
34
+ system "cp #{flags}#{source} #{destination}"
35
+ end
29
36
  end
30
37
  end
31
38
  end
@@ -0,0 +1,85 @@
1
+ module Sprinkle
2
+ module Actors
3
+ # = Psexec Delivery Method
4
+ #
5
+ # Windows specific remote delivery method, using the psexec.exe tool
6
+ # (which must be on the path of your local machine):
7
+ # http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx.
8
+ #
9
+ # A minimal configuration for this delivery method would specify the
10
+ # role to be applied to some host:
11
+ #
12
+ # deployment do
13
+ # delivery :psexec do
14
+ # role :app, 'app.example.com'
15
+ # end
16
+ # end
17
+ #
18
+ # A more complex example could define multiple roles and a specific user:
19
+ #
20
+ # deployment do
21
+ # delivery :psexec do
22
+ # role :app, 'app.example.com'
23
+ # role :web, 'web.example.com'
24
+ # # you can also specify a password, but if
25
+ # # not provided you will be prompted for it
26
+ # user 'domain\\administrator', 'opensesame'
27
+ # end
28
+ # end
29
+ class Psexec
30
+ attr_accessor :options
31
+
32
+ def initialize(options = {}, &block) #:nodoc:
33
+ @options = {:roles => {}}.merge options
34
+ self.instance_eval &block if block
35
+ end
36
+
37
+ def role(name, *host)
38
+ @options[:roles][name] = host
39
+ end
40
+
41
+ def roles(roles)
42
+ @options[:roles] = roles
43
+ end
44
+
45
+ def user(name, pass = nil)
46
+ @options[:user], @options[:password] = name, pass
47
+ end
48
+
49
+ def process(name, commands, roles, suppress_and_return_failures = false)
50
+ Array(roles).each do |role|
51
+ Array(@options[:roles][role]).each do |host|
52
+ Array(commands).each do |command|
53
+ begin
54
+ psexec(host, command)
55
+ rescue RuntimeError => e
56
+ return false if suppress_and_return_failures
57
+ raise
58
+ end
59
+ end
60
+ end
61
+ end
62
+ return true
63
+ end
64
+
65
+ protected
66
+
67
+ # execute a command against a remote windows machine using psexec
68
+ def psexec(host, command)
69
+ exec = "psexec \\\\#{Array(host).join ','}"
70
+ if @options[:user]
71
+ exec << " -u \"#{@options[:user]}\""
72
+ @options[:password] = ask("--> Enter password for #{@options[:user]}@#{host}: ") {|q| q.echo = '*'} unless @options[:password]
73
+ exec << " -p \"#{@options[:password]}\""
74
+ end
75
+ exec << " /accepteula"
76
+ exec << " cmd /c \"#{command}\""
77
+ exec << ' > NUL 2>&1' unless logger.debug?
78
+ logger.debug "--> #{exec}"
79
+ system exec
80
+ raise "Failed to execute command \"#{command}\" on host: #{host}" if $?.to_i != 0
81
+ end
82
+
83
+ end
84
+ end
85
+ end
@@ -1,4 +1,5 @@
1
1
  require 'net/ssh/gateway'
2
+ require 'net/scp'
2
3
 
3
4
  module Sprinkle
4
5
  module Actors
@@ -26,7 +27,12 @@ module Sprinkle
26
27
  return process_with_gateway(name, commands, roles) if gateway_defined?
27
28
  process_direct(name, commands, roles)
28
29
  end
29
-
30
+
31
+ def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false)
32
+ return transfer_with_gateway(name, source, destination, roles, recursive) if gateway_defined?
33
+ transfer_direct(name, source, destination, roles, recursive)
34
+ end
35
+
30
36
  protected
31
37
 
32
38
  def process_with_gateway(name, commands, roles)
@@ -39,10 +45,25 @@ module Sprinkle
39
45
  Array(roles).each { |role| execute_on_role(commands, role) }
40
46
  end
41
47
 
48
+ def transfer_with_gateway(name, source, destination, roles, recursive)
49
+ on_gateway do |gateway|
50
+ Array(roles).each { |role| transfer_to_role(source, destination, role, recursive, gateway) }
51
+ end
52
+ end
53
+
54
+ def transfer_direct(name, source, destination, roles, recursive)
55
+ Array(roles).each { |role| transfer_to_role(source, destination, role, recursive) }
56
+ end
57
+
42
58
  def execute_on_role(commands, role, gateway = nil)
43
59
  hosts = @options[:roles][role]
44
60
  Array(hosts).each { |host| execute_on_host(commands, host, gateway) }
45
61
  end
62
+
63
+ def transfer_to_role(source, destination, role, gateway = nil)
64
+ hosts = @options[:roles][role]
65
+ Array(hosts).each { |host| transfer_to_host(source, destination, host, gateway) }
66
+ end
46
67
 
47
68
  def execute_on_host(commands, host, gateway = nil)
48
69
  if gateway # SSH connection via gateway
@@ -64,6 +85,23 @@ module Sprinkle
64
85
  end
65
86
  end
66
87
 
88
+ def transfer_to_host(source, destination, host, recursive, gateway = nil)
89
+ if gateway # SSH connection via gateway
90
+ gateway.ssh(host, @options[:user]) do |ssh|
91
+ transfer_on_connection(source, destination, recursive, ssh)
92
+ end
93
+ else # direct SSH connection
94
+ Net::SSH.start(host, @options[:user]) do |ssh|
95
+ transfer_on_connection(source, destination, recursive, ssh)
96
+ end
97
+ end
98
+ end
99
+
100
+ def transfer_on_connection(source, destination, recursive, connection)
101
+ scp = Net::SCP.new(connection)
102
+ scp.upload! source, destination, :recursive => recursive
103
+ end
104
+
67
105
  private
68
106
 
69
107
  def gateway_defined?
@@ -50,6 +50,19 @@ module Sprinkle
50
50
  rescue ::Vlad::CommandFailedError => e
51
51
  return false if suppress_and_return_failures
52
52
 
53
+ # Reraise error if we're not suppressing it
54
+ raise
55
+ end
56
+ end
57
+
58
+ # Sorry, all transfers are recursive
59
+ def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false) #:nodoc:
60
+ begin
61
+ rsync source, destination
62
+ return true
63
+ rescue ::Vlad::CommandFailedError => e
64
+ return false if suppress_and_return_failures
65
+
53
66
  # Reraise error if we're not suppressing it
54
67
  raise
55
68
  end
@@ -52,7 +52,7 @@ module Sprinkle
52
52
  # the actor. For more information on what configuration options are
53
53
  # available, view the corresponding Sprinkle::Actors page.
54
54
  def delivery(type, &block) #:doc:
55
- @style = Actors.const_get(type.to_s.titleize).new &block
55
+ @style = ("Sprinkle::Actors::" + type.to_s.titleize).constantize.new &block
56
56
  end
57
57
 
58
58
  def method_missing(sym, *args, &block) #:nodoc:
@@ -44,7 +44,7 @@ module Sprinkle
44
44
 
45
45
  def install_commands #:nodoc:
46
46
  command = @options[:dependencies_only] ? 'build-dep' : 'install'
47
- "DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get -qyu #{command} #{@packages.join(' ')}"
47
+ "env DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get --force-yes -qyu #{command} #{@packages.join(' ')}"
48
48
  end
49
49
 
50
50
  end
@@ -54,6 +54,7 @@ module Sprinkle
54
54
  cmd << " --source #{source}" if source
55
55
  cmd << " --install-dir #{repository}" if option?(:repository)
56
56
  cmd << " --no-rdoc --no-ri" unless option?(:build_docs)
57
+ cmd << " --http-proxy #{http_proxy}" if option?(:http_proxy)
57
58
  cmd << " -- #{build_flags}" if option?(:build_flags)
58
59
  cmd
59
60
  end
@@ -0,0 +1,20 @@
1
+ module Sprinkle
2
+ module Installers
3
+ # = Noop Installer
4
+ #
5
+ # This installer does nothing, it's simply useful for running pre / post hooks by themselves.
6
+ #
7
+ class Noop < Installer
8
+ def initialize(parent, name, options = {}, &block) #:nodoc:
9
+ super parent, options, &block
10
+ end
11
+
12
+ protected
13
+
14
+ def install_commands #:nodoc:
15
+ 'echo noop'
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -37,7 +37,7 @@ module Sprinkle
37
37
  protected
38
38
 
39
39
  def install_commands #:nodoc:
40
- "echo '#{@text}' |#{'sudo' if option?(:sudo)} tee -a #{@path}"
40
+ "echo -e '#{@text.gsub("\n", '\n')}' |#{'sudo' if option?(:sudo)} tee -a #{@path}"
41
41
  end
42
42
 
43
43
  end
@@ -46,16 +46,26 @@ module Sprinkle
46
46
  # package :magic_beans do
47
47
  # source 'http://magicbeansland.com/latest-1.1.1.tar.gz' do
48
48
  # prefix '/usr/local'
49
- #
49
+ #
50
50
  # pre :prepare { 'echo "Here we go folks."' }
51
51
  # post :extract { 'echo "I believe..."' }
52
52
  # pre :build { 'echo "Cross your fingers!"' }
53
53
  # end
54
54
  # end
55
55
  #
56
+ # Fourth, specifying a custom archive name because the downloaded file name
57
+ # differs from the source URL:
58
+ #
59
+ # package :gitosis do
60
+ # source 'http://github.com/crafterm/sprinkle/tarball/master' do
61
+ # custom_archive 'crafterm-sprinkle-518e33c835986c03ec7ae8ea88c657443b006f28.tar.gz'
62
+ # end
63
+ # end
64
+ #
56
65
  # As you can see, setting options is as simple as creating a
57
66
  # block and calling the option as a method with the value as
58
67
  # its parameter.
68
+
59
69
  class Source < Installer
60
70
  attr_accessor :source #:nodoc:
61
71
 
@@ -143,7 +153,7 @@ module Sprinkle
143
153
  end
144
154
 
145
155
  def extract_command #:nodoc:
146
- case @source
156
+ case archive_name
147
157
  when /(tar.gz)|(tgz)$/
148
158
  'tar xzf'
149
159
  when /(tar.bz2)|(tb2)$/
@@ -158,7 +168,7 @@ module Sprinkle
158
168
  end
159
169
 
160
170
  def archive_name #:nodoc:
161
- name = @source.split('/').last
171
+ name = @options[:custom_archive] || @source.split('/').last
162
172
  raise "Unable to determine archive name for source: #{source}, please update code knowledge" unless name
163
173
  name
164
174
  end
@@ -168,12 +178,12 @@ module Sprinkle
168
178
  end
169
179
 
170
180
  def base_dir #:nodoc:
171
- if @source.split('/').last =~ /(.*)\.(tar\.gz|tgz|tar\.bz2|tb2)/
181
+ if archive_name.split('/').last =~ /(.*)\.(tar\.gz|tgz|tar\.bz2|tar|tb2)/
172
182
  return $1
173
183
  end
174
184
  raise "Unknown base path for source archive: #{@source}, please update code knowledge"
175
185
  end
176
-
186
+
177
187
  end
178
188
  end
179
189
  end
@@ -139,6 +139,7 @@ module Sprinkle
139
139
  @provides = metadata[:provides]
140
140
  @dependencies = []
141
141
  @recommends = []
142
+ @optional = []
142
143
  @verifications = []
143
144
  self.instance_eval &block
144
145
  end
@@ -191,6 +192,10 @@ module Sprinkle
191
192
 
192
193
  def rake(name, options = {}, &block)
193
194
  @installer = Sprinkle::Installers::Rake.new(self, name, options, &block)
195
+ end
196
+
197
+ def noop(&block)
198
+ @installer = Sprinkle::Installers::Noop.new(self, name, options, &block)
194
199
  end
195
200
 
196
201
  def push_text(text, path, options = {}, &block)
@@ -201,10 +206,14 @@ module Sprinkle
201
206
  @installer = Sprinkle::Installers::Script.new(self, name, options, &block)
202
207
  end
203
208
 
204
- def verify(description = '', &block)
205
- @verifications << Sprinkle::Verify.new(self, description, &block)
209
+ def transfer(source, destination, options = {}, &block)
210
+ @installer = Sprinkle::Installers::Transfer.new(self, source, destination, options, &block)
206
211
  end
207
212
 
213
+ def verify(description = '', &block)
214
+ @verifications << Sprinkle::Verify.new(self, description, &block)
215
+ end
216
+
208
217
  def process(deployment, roles)
209
218
  return if meta_package?
210
219
 
@@ -253,6 +262,11 @@ module Sprinkle
253
262
  @recommends.flatten!
254
263
  end
255
264
 
265
+ def optional(*packages)
266
+ @optional << packages
267
+ @optional.flatten!
268
+ end
269
+
256
270
  def tree(depth = 1, &block)
257
271
  packages = []
258
272
 
@@ -275,6 +289,15 @@ module Sprinkle
275
289
  end
276
290
 
277
291
  packages << self
292
+
293
+ @optional.each do |dep|
294
+ package = PACKAGES[dep]
295
+ next unless package # skip missing optional packages as they're allow to not exist
296
+ block.call(self, package, depth) if block
297
+ packages << package.tree(depth + 1, &block)
298
+ end
299
+
300
+ packages
278
301
  end
279
302
 
280
303
  def to_s
@@ -0,0 +1,44 @@
1
+ module Sprinkle
2
+ module Verifiers
3
+ # = Environment Verifier
4
+ #
5
+ # Contains a verifier to check environment variables
6
+ #
7
+ # == Example Usage
8
+ #
9
+ # verify { has_environment_variable "PATH" }
10
+ # verify { has_environment_variable "ProgramFiles", "C:\\Program Files" }
11
+ #
12
+ module Environment
13
+ Sprinkle::Verify.register(Sprinkle::Verifiers::Environment)
14
+
15
+ # Checks to make sure the <tt>environment variable</tt> exists or has a specific value
16
+ def has_environment_variable(name, value = nil)
17
+ name, value = name.to_s, value.to_s
18
+ if RUBY_PLATFORM =~ /win32/
19
+ # use set | findstr to avoid shell substitution, which does not appear to work reliably with Kernel.system
20
+ command = "set #{name} | findstr /c:\"#{name}=\""
21
+ command << " | findstr /r /c:\"^.*=#{Regexp.quote value}$\"" unless value.empty?
22
+ command << ' > NUL 2>&1' unless logger.debug?
23
+ else
24
+ command = value.nil? ? "test -n $#{name}" : "test $#{name} == \"#{value}\""
25
+ end
26
+ @commands << command
27
+ end
28
+
29
+ # Checks to make sure the <tt>environment variable</tt> contains the given text
30
+ def environment_variable_contains(name, text)
31
+ name, text = name.to_s, text.to_s
32
+ if RUBY_PLATFORM =~ /win32/
33
+ # use set | findstr to avoid shell substitution, which does not appear to work reliably with Kernel.system
34
+ command = "set #{name} | findstr /c:\"#{text}\""
35
+ command << ' > NUL 2>&1' unless logger.debug?
36
+ else
37
+ command = "echo $#{name} | grep '#{text}'"
38
+ end
39
+ @commands << command
40
+ end
41
+
42
+ end
43
+ end
44
+ end
@@ -36,6 +36,23 @@ module Sprinkle
36
36
  end
37
37
  end
38
38
  end
39
+
40
+ # Same as has_executable but with checking for e certain version number.
41
+ # Last option is the parameter to append for getting the version (which
42
+ # defaults to "-v").
43
+ def has_executable_with_version(path, version, get_version = '-v')
44
+ if path.include?('/')
45
+ @commands << "[ -x #{path} -a -n \"`#{path} #{get_version} 2> /dev/null | egrep -e \\\"#{version}\\\"`\" ]"
46
+ else
47
+ @commands << "[ -n \"`echo \\`which #{path}\\``\" -a -n \"`\\`which #{path}\\` #{get_version} 2>&1 | egrep -e \\\"#{version}\\\"`\" ]"
48
+ end
49
+ end
50
+
51
+ # Same as has_executable but checking output of a certain command
52
+ # with grep.
53
+ def has_version_in_grep(cmd, version)
54
+ @commands << "[ -n \"`#{cmd} 2> /dev/null | egrep -e \\\"#{version}\\\"`\" ]"
55
+ end
39
56
  end
40
57
  end
41
58
  end
@@ -0,0 +1,46 @@
1
+ module Sprinkle
2
+ module Verifiers
3
+ # = Registry Verifier
4
+ #
5
+ # Contains a verifier to check a Win32 registry setting.
6
+ #
7
+ # == Example Usage
8
+ #
9
+ # verify { has_registry_key "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" }
10
+ #
11
+ module Registry
12
+ Sprinkle::Verify.register(Sprinkle::Verifiers::Registry)
13
+
14
+ # Checks to make sure the <tt>registry</tt> key exists
15
+ def has_registry_key(key)
16
+ key = key.to_s
17
+ if RUBY_PLATFORM =~ /win32/
18
+ command = "reg query \"#{key}\" 2>&1 | findstr /i /c:\"#{key}\""
19
+ command << ' > NUL 2>&1' unless logger.debug?
20
+ else
21
+ raise NotImplementedError, "Non-win32 platforms do not support checking for registry settings"
22
+ end
23
+ @commands << command
24
+ end
25
+
26
+ # Checks to make sure the <tt>registry</tt> value exists
27
+ def has_registry_value(key, name, value)
28
+ key, name, value = key.to_s, name.to_s, value.to_s
29
+ if RUBY_PLATFORM =~ /win32/
30
+ if value.empty?
31
+ # The regular expression includes a [\t ], which is a tab character and a space.
32
+ # XP delimits the output with 1 tab, Win2003 trails with 4 spaces!
33
+ # Note: Checking for blank and a value of space(s) will report a false positive.
34
+ command = "reg query \"#{key}\" /v \"#{name}\" | findstr /r /c:\"^.*#{Regexp.quote name}.*REG_[A-Z]*[\t ]*$"
35
+ else
36
+ command = "reg query \"#{key}\" /v \"#{name}\" | findstr /r /c:\"^.*#{Regexp.quote name}.*REG_[A-Z]*[\t ]*#{Regexp.quote value}$"
37
+ end
38
+ command << ' > NUL 2>&1' unless logger.debug?
39
+ else
40
+ raise NotImplementedError, "Non-win32 platforms do not support checking for registry settings"
41
+ end
42
+ @commands << command
43
+ end
44
+ end
45
+ end
46
+ end
@@ -2,7 +2,7 @@ module Sprinkle #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 14
5
+ TINY = 15
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -135,6 +135,51 @@ describe Sprinkle::Actors::Capistrano do
135
135
 
136
136
  end
137
137
 
138
+ describe 'transferring files' do
139
+
140
+ before do
141
+ @source = 'source'
142
+ @dest = 'dest'
143
+ @roles = %w( app )
144
+ @name = 'name'
145
+
146
+ @cap = create_cap do; recipes 'deploy'; end
147
+ @cap.stub!(:run).and_return
148
+
149
+ @testing_errors = false
150
+ end
151
+
152
+ it 'should dynamically create a capistrano task containing calling upload' do
153
+ @cap.config.should_receive(:task).and_return
154
+ end
155
+
156
+ it 'should invoke capistrano task after creation' do
157
+ @cap.should_receive(:run).with(@name).and_return
158
+ end
159
+
160
+ it 'should raise capistrano errors when suppressing parameter is not set' do
161
+ @testing_errors = true
162
+
163
+ @cap.should_receive(:run).and_raise(::Capistrano::CommandError)
164
+ lambda { @cap.process @name, @commands, @roles }.should raise_error(::Capistrano::CommandError)
165
+ end
166
+
167
+ it 'should not raise errors and instead return false when suppressing parameter is set' do
168
+ @testing_errors = true
169
+
170
+ @cap.should_receive(:run).and_raise(::Capistrano::CommandError)
171
+
172
+ value = nil
173
+ lambda { value = @cap.process(@name, @commands, @roles, true) }.should_not raise_error(::Capistrano::CommandError)
174
+
175
+ value.should_not be
176
+ end
177
+
178
+ after do
179
+ @cap.transfer @name, @source, @dest, @roles unless @testing_errors
180
+ end
181
+ end
182
+
138
183
  describe 'generated task' do
139
184
 
140
185
  before do
@@ -167,4 +212,54 @@ describe Sprinkle::Actors::Capistrano do
167
212
 
168
213
  end
169
214
 
215
+ describe 'generated transfer' do
216
+ before do
217
+ @source = 'source'
218
+ @dest = 'dest'
219
+ @roles = %w( app )
220
+ @name = 'name'
221
+
222
+ @cap = create_cap do; recipes 'deploy'; end
223
+ @cap.config.stub!(:upload).and_return
224
+ end
225
+
226
+ it 'should call upload with the source and destination via :scp' do
227
+ @cap.config.should_receive(:upload).with(@source, @dest, :via => :scp, :recursive => true).and_return
228
+ end
229
+
230
+ it 'should be applicable for the supplied roles' do
231
+ @cap.stub!(:run).and_return
232
+ @cap.config.should_receive(:task).with(:install_name, :roles => @roles).and_return
233
+ end
234
+
235
+ after do
236
+ @cap.transfer @name, @source, @dest, @roles
237
+ end
238
+ end
239
+
240
+ describe 'generated transfer when recursive is false' do
241
+ before do
242
+ @source = 'source'
243
+ @dest = 'dest'
244
+ @roles = %w( app )
245
+ @name = 'name'
246
+
247
+ @cap = create_cap do; recipes 'deploy'; end
248
+ @cap.config.stub!(:upload).and_return
249
+ end
250
+
251
+ it 'should call upload with the source and destination via :scp' do
252
+ @cap.config.should_receive(:upload).with(@source, @dest, :via => :scp, :recursive => false).and_return
253
+ end
254
+
255
+ it 'should be applicable for the supplied roles' do
256
+ @cap.stub!(:run).and_return
257
+ @cap.config.should_receive(:task).with(:install_name, :roles => @roles).and_return
258
+ end
259
+
260
+ after do
261
+ @cap.transfer @name, @source, @dest, @roles, false
262
+ end
263
+ end
264
+
170
265
  end
@@ -40,15 +40,15 @@ describe Sprinkle::Installers::Apt do
40
40
  end
41
41
 
42
42
  it 'should invoke the apt installer for all specified packages' do
43
- @install_commands.should =~ /apt-get -qyu install ruby/
43
+ @install_commands.should =~ /apt-get --force-yes -qyu install ruby/
44
44
  end
45
45
 
46
46
  it 'should specify a non interactive mode to the apt installer' do
47
- @install_commands.should =~ /DEBIAN_FRONTEND=noninteractive/
47
+ @install_commands.should =~ /env DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive/
48
48
  end
49
49
 
50
50
  it 'should automatically insert pre/post commands for the specified package' do
51
- @installer.send(:install_sequence).should == [ 'op1', %(DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get -qyu install ruby), 'op2' ]
51
+ @installer.send(:install_sequence).should == [ 'op1', %(env DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get --force-yes -qyu install ruby), 'op2' ]
52
52
  end
53
53
 
54
54
  it 'should install a specific version if defined'
@@ -63,7 +63,7 @@ describe Sprinkle::Installers::Apt do
63
63
  end
64
64
 
65
65
  it 'should invoke the apt installer with build-dep command for all specified packages' do
66
- @install_commands.should =~ /apt-get -qyu build-dep ruby/
66
+ @install_commands.should =~ /apt-get --force-yes -qyu build-dep ruby/
67
67
  end
68
68
 
69
69
  end
@@ -5,7 +5,7 @@ describe Sprinkle::Installers::Gem do
5
5
  before do
6
6
  @gem = 'rails'
7
7
  @version = '2.0.2'
8
- @options = { :source => 'http://gems.github.com/', :repository => '/tmp/gems', :build_flags => '--build_flag=foo' }
8
+ @options = { :source => 'http://gems.github.com/', :repository => '/tmp/gems', :build_flags => '--build_flag=foo', :http_proxy => 'http://proxy:8080' }
9
9
  end
10
10
 
11
11
  def create_gem(gem, version = nil, options = {}, &block)
@@ -39,6 +39,10 @@ describe Sprinkle::Installers::Gem do
39
39
  @installer.build_flags.should == @options[:build_flags]
40
40
  end
41
41
 
42
+ it 'should optionally store the http proxy' do
43
+ @installer.http_proxy.should == @options[:http_proxy]
44
+ end
45
+
42
46
  end
43
47
 
44
48
  describe 'during installation' do
@@ -86,6 +90,18 @@ describe Sprinkle::Installers::Gem do
86
90
 
87
91
  end
88
92
 
93
+ describe 'with http proxy' do
94
+
95
+ before do
96
+ @installer = create_gem @gem, nil, :http_proxy => 'http://proxy:8080'
97
+ end
98
+
99
+ it 'should install with defined build flags' do
100
+ @installer.send(:install_commands).should == "gem install #{@gem} --no-rdoc --no-ri --http-proxy http://proxy:8080"
101
+ end
102
+
103
+ end
104
+
89
105
  end
90
106
 
91
107
  end
@@ -36,7 +36,7 @@ describe Sprinkle::Installers::PushText do
36
36
  end
37
37
 
38
38
  it 'should automatically insert pre/post commands for the specified package' do
39
- @installer.send(:install_sequence).should == [ 'op1', "echo 'another-hair-brained-idea' | tee -a /dev/mind/late-night", 'op2' ]
39
+ @installer.send(:install_sequence).should == [ 'op1', "echo -e 'another-hair-brained-idea' | tee -a /dev/mind/late-night", 'op2' ]
40
40
  end
41
41
 
42
42
  end
@@ -48,7 +48,7 @@ describe Sprinkle::Installers::PushText do
48
48
  end
49
49
 
50
50
  it "should invoke the push installer with sudo" do
51
- @install_commands.should =~ /echo 'I\'m a special user' | sudo tee -a \/dev\/mind\/the-day-after/
51
+ @install_commands.should =~ /echo -e 'I\'m a special user' | sudo tee -a \/dev\/mind\/the-day-after/
52
52
  end
53
53
  end
54
54
 
@@ -161,6 +161,20 @@ describe Sprinkle::Installers::Source do
161
161
  )
162
162
  end
163
163
 
164
+ describe 'with a custom archive definition' do
165
+ before do
166
+ @installer.options[:custom_archive] = 'super-foo.tar'
167
+ end
168
+
169
+ it 'should install the source from the custom archive' do
170
+ @installer.send(:extract_commands).first.should =~ /super-foo/
171
+ @installer.send(:configure_commands).first.should =~ /super-foo/
172
+ @installer.send(:build_commands).first.should =~ /super-foo/
173
+ @installer.send(:install_commands).first.should =~ /super-foo/
174
+ end
175
+
176
+ end
177
+
164
178
  describe 'during a customized install' do
165
179
 
166
180
  before do
@@ -174,7 +188,7 @@ describe Sprinkle::Installers::Source do
174
188
  it 'should store the custom install commands' do
175
189
  @installer.options[:custom_install].should == 'ruby setup.rb'
176
190
  end
177
-
191
+
178
192
  it 'should identify as having a custom install command' do
179
193
  @installer.should be_custom_install
180
194
  end
@@ -190,25 +204,25 @@ describe Sprinkle::Installers::Source do
190
204
  it 'should install the source using a custom installation command' do
191
205
  @installer.send(:custom_install_commands).first.should =~ /ruby setup.rb/
192
206
  end
193
-
207
+
194
208
  it 'should be run relative to the source build area' do
195
209
  @installer.send(:custom_install_commands).first.should =~ %r{cd /usr/builds/ruby-1.8.6-p111}
196
210
  end
197
-
211
+
198
212
  describe 'with a customized directory' do
199
-
213
+
200
214
  before do
201
215
  @installer.options[:custom_dir] = 'test'
202
216
  end
203
-
217
+
204
218
  it 'should install the source from the custom dir path' do
205
219
  @installer.send(:custom_install_commands).first.should =~ /test/
206
220
  end
207
-
221
+
208
222
  it 'should store the custom build dir path' do
209
223
  @installer.options[:custom_dir].should == 'test'
210
224
  end
211
-
225
+
212
226
  end
213
227
 
214
228
  end
data/sprinkle.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{sprinkle}
3
- s.version = "0.0.14"
3
+ s.version = "0.0.15"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Marcus Crafter", "Mitchell Hashimoto"]
@@ -9,40 +9,123 @@ Gem::Specification.new do |s|
9
9
  s.description = %q{Ruby DSL based software provisioning tool}
10
10
  s.email = ["crafterm@redartisan.com", "mitchell.hashimoto@citrusbyte.com"]
11
11
  s.executables = ["sprinkle"]
12
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
13
- s.files = ["CREDITS", "History.txt", "MIT-LICENSE", "Manifest.txt", "README.txt", "Rakefile", "bin/sprinkle",
14
- "config/hoe.rb", "config/requirements.rb", "examples/packages/build_essential.rb",
15
- "examples/packages/databases/mysql.rb", "examples/packages/databases/sqlite3.rb",
16
- "examples/packages/phusion.rb", "examples/packages/ruby/rails.rb", "examples/packages/ruby/ruby.rb",
17
- "examples/packages/ruby/rubygems.rb", "examples/packages/scm/git.rb", "examples/packages/scm/subversion.rb",
18
- "examples/packages/servers/apache.rb", "examples/rails/README", "examples/rails/deploy.rb",
19
- "examples/rails/packages/database.rb", "examples/rails/packages/essential.rb", "examples/rails/packages/rails.rb",
20
- "examples/rails/packages/scm.rb", "examples/rails/packages/search.rb", "examples/rails/packages/server.rb",
21
- "examples/rails/rails.rb", "examples/sprinkle/sprinkle.rb", "lib/sprinkle.rb", "lib/sprinkle/actors/actors.rb",
22
- "lib/sprinkle/actors/capistrano.rb", "lib/sprinkle/actors/local.rb", "lib/sprinkle/actors/ssh.rb", "lib/sprinkle/actors/vlad.rb",
23
- "lib/sprinkle/configurable.rb", "lib/sprinkle/deployment.rb", "lib/sprinkle/extensions/arbitrary_options.rb",
24
- "lib/sprinkle/extensions/array.rb", "lib/sprinkle/extensions/blank_slate.rb", "lib/sprinkle/extensions/dsl_accessor.rb",
25
- "lib/sprinkle/extensions/string.rb", "lib/sprinkle/extensions/symbol.rb", "lib/sprinkle/installers/apt.rb",
26
- "lib/sprinkle/installers/deb.rb", "lib/sprinkle/installers/gem.rb", "lib/sprinkle/installers/installer.rb",
27
- "lib/sprinkle/installers/rake.rb", "lib/sprinkle/installers/rpm.rb", "lib/sprinkle/installers/script.rb","lib/sprinkle/installers/source.rb",
28
- "lib/sprinkle/installers/yum.rb", "lib/sprinkle/installers/freebsd_pkg.rb", "lib/sprinkle/installers/openbsd_pkg.rb",
29
- "lib/sprinkle/installers/opensolaris_pkg.rb", "lib/sprinkle/installers/bsd_port.rb", "lib/sprinkle/installers/mac_port.rb", "lib/sprinkle/installers/push_text.rb",
30
- "lib/sprinkle/package.rb", "lib/sprinkle/policy.rb", "lib/sprinkle/script.rb", "lib/sprinkle/verifiers/directory.rb",
31
- "lib/sprinkle/verifiers/executable.rb", "lib/sprinkle/verifiers/file.rb", "lib/sprinkle/verifiers/process.rb",
32
- "lib/sprinkle/verifiers/ruby.rb", "lib/sprinkle/verifiers/symlink.rb", "lib/sprinkle/verify.rb", "lib/sprinkle/version.rb",
33
- "script/destroy", "script/generate", "sprinkle.gemspec", "tasks/deployment.rake", "tasks/environment.rake", "tasks/rspec.rake"]
12
+ s.extra_rdoc_files = [
13
+ "History.txt",
14
+ "Manifest.txt",
15
+ "README.markdown"
16
+ ]
17
+ s.files = [
18
+ "CREDITS",
19
+ "History.txt",
20
+ "MIT-LICENSE",
21
+ "Manifest.txt",
22
+ "README.markdown",
23
+ "Rakefile",
24
+ "bin/sprinkle",
25
+ "config/hoe.rb",
26
+ "config/requirements.rb",
27
+ "examples/packages/build_essential.rb",
28
+ "examples/packages/databases/mysql.rb",
29
+ "examples/packages/databases/sqlite3.rb",
30
+ "examples/packages/phusion.rb",
31
+ "examples/packages/ruby/rails.rb",
32
+ "examples/packages/ruby/ruby.rb",
33
+ "examples/packages/ruby/rubygems.rb",
34
+ "examples/packages/scm/git.rb",
35
+ "examples/packages/scm/subversion.rb",
36
+ "examples/packages/servers/apache.rb",
37
+ "examples/rails/README",
38
+ "examples/rails/deploy.rb",
39
+ "examples/rails/packages/database.rb",
40
+ "examples/rails/packages/essential.rb",
41
+ "examples/rails/packages/rails.rb",
42
+ "examples/rails/packages/scm.rb",
43
+ "examples/rails/packages/search.rb",
44
+ "examples/rails/packages/server.rb",
45
+ "examples/rails/rails.rb",
46
+ "examples/sprinkle/sprinkle.rb",
47
+ "lib/sprinkle.rb",
48
+ "lib/sprinkle/actors/actors.rb",
49
+ "lib/sprinkle/actors/capistrano.rb",
50
+ "lib/sprinkle/actors/local.rb",
51
+ "lib/sprinkle/actors/psexec.rb",
52
+ "lib/sprinkle/actors/ssh.rb",
53
+ "lib/sprinkle/actors/vlad.rb",
54
+ "lib/sprinkle/configurable.rb",
55
+ "lib/sprinkle/deployment.rb",
56
+ "lib/sprinkle/extensions/arbitrary_options.rb",
57
+ "lib/sprinkle/extensions/array.rb",
58
+ "lib/sprinkle/extensions/blank_slate.rb",
59
+ "lib/sprinkle/extensions/dsl_accessor.rb",
60
+ "lib/sprinkle/extensions/string.rb",
61
+ "lib/sprinkle/extensions/symbol.rb",
62
+ "lib/sprinkle/installers/apt.rb",
63
+ "lib/sprinkle/installers/deb.rb",
64
+ "lib/sprinkle/installers/gem.rb",
65
+ "lib/sprinkle/installers/installer.rb",
66
+ "lib/sprinkle/installers/rake.rb",
67
+ "lib/sprinkle/installers/rpm.rb",
68
+ "lib/sprinkle/installers/script.rb",
69
+ "lib/sprinkle/installers/source.rb",
70
+ "lib/sprinkle/installers/yum.rb",
71
+ "lib/sprinkle/installers/freebsd_pkg.rb",
72
+ "lib/sprinkle/installers/openbsd_pkg.rb",
73
+ "lib/sprinkle/installers/noop.rb",
74
+ "lib/sprinkle/installers/opensolaris_pkg.rb",
75
+ "lib/sprinkle/installers/bsd_port.rb",
76
+ "lib/sprinkle/installers/mac_port.rb",
77
+ "lib/sprinkle/installers/push_text.rb",
78
+ "lib/sprinkle/package.rb",
79
+ "lib/sprinkle/policy.rb",
80
+ "lib/sprinkle/script.rb",
81
+ "lib/sprinkle/verifiers/directory.rb",
82
+ "lib/sprinkle/verifiers/environment.rb",
83
+ "lib/sprinkle/verifiers/executable.rb",
84
+ "lib/sprinkle/verifiers/file.rb",
85
+ "lib/sprinkle/verifiers/process.rb",
86
+ "lib/sprinkle/verifiers/registry.rb",
87
+ "lib/sprinkle/verifiers/ruby.rb",
88
+ "lib/sprinkle/verifiers/symlink.rb",
89
+ "lib/sprinkle/verify.rb",
90
+ "lib/sprinkle/version.rb",
91
+ "script/destroy",
92
+ "script/generate",
93
+ "sprinkle.gemspec",
94
+ "tasks/deployment.rake",
95
+ "tasks/environment.rake",
96
+ "tasks/rspec.rake"
97
+ ]
34
98
 
35
- s.test_files = ["spec/spec.opts", "spec/spec_helper.rb", "spec/sprinkle/actors/capistrano_spec.rb",
36
- "spec/sprinkle/actors/local_spec.rb", "spec/sprinkle/configurable_spec.rb", "spec/sprinkle/deployment_spec.rb",
37
- "spec/sprinkle/extensions/array_spec.rb", "spec/sprinkle/extensions/string_spec.rb", "spec/sprinkle/installers/apt_spec.rb",
38
- "spec/sprinkle/installers/gem_spec.rb", "spec/sprinkle/installers/installer_spec.rb", "spec/sprinkle/installers/rpm_spec.rb",
39
- "spec/sprinkle/installers/yum_spec.rb", "spec/sprinkle/installers/source_spec.rb", "spec/sprinkle/installers/freebsd_pkg_spec.rb",
40
- "spec/sprinkle/installers/openbsd_pkg_spec.rb", "spec/sprinkle/installers/opensolaris_pkg_spec.rb",
41
- "spec/sprinkle/installers/mac_port_spec.rb", "spec/sprinkle/installers/push_text_spec.rb", "spec/sprinkle/installers/bsd_port_spec.rb", "spec/sprinkle/policy_spec.rb",
42
- "spec/sprinkle/script_spec.rb", "spec/sprinkle/sprinkle_spec.rb", "spec/sprinkle/installers/rake_spec.rb", "spec/sprinkle/verify_spec.rb"]
99
+ s.test_files = [
100
+ "spec/spec.opts",
101
+ "spec/spec_helper.rb",
102
+ "spec/sprinkle/actors/capistrano_spec.rb",
103
+ "spec/sprinkle/actors/local_spec.rb",
104
+ "spec/sprinkle/configurable_spec.rb",
105
+ "spec/sprinkle/deployment_spec.rb",
106
+ "spec/sprinkle/extensions/array_spec.rb",
107
+ "spec/sprinkle/extensions/string_spec.rb",
108
+ "spec/sprinkle/installers/apt_spec.rb",
109
+ "spec/sprinkle/installers/gem_spec.rb",
110
+ "spec/sprinkle/installers/installer_spec.rb",
111
+ "spec/sprinkle/installers/rpm_spec.rb",
112
+ "spec/sprinkle/installers/yum_spec.rb",
113
+ "spec/sprinkle/installers/source_spec.rb",
114
+ "spec/sprinkle/installers/freebsd_pkg_spec.rb",
115
+ "spec/sprinkle/installers/openbsd_pkg_spec.rb",
116
+ "spec/sprinkle/installers/opensolaris_pkg_spec.rb",
117
+ "spec/sprinkle/installers/mac_port_spec.rb",
118
+ "spec/sprinkle/installers/push_text_spec.rb",
119
+ "spec/sprinkle/installers/bsd_port_spec.rb",
120
+ "spec/sprinkle/policy_spec.rb",
121
+ "spec/sprinkle/script_spec.rb",
122
+ "spec/sprinkle/sprinkle_spec.rb",
123
+ "spec/sprinkle/installers/rake_spec.rb",
124
+ "spec/sprinkle/verify_spec.rb"
125
+ ]
43
126
  s.has_rdoc = true
44
127
  s.homepage = %q{http://sprinkle.rubyforge.org}
45
- s.rdoc_options = ["--main", "README.txt"]
128
+ s.rdoc_options = ["--main", "README.markdown"]
46
129
  s.require_paths = ["lib"]
47
130
  s.rubyforge_project = %q{sprinkle}
48
131
  s.rubygems_version = %q{1.3.0}
@@ -21,6 +21,9 @@ task :check_version do
21
21
  end
22
22
  end
23
23
 
24
+ task :clobber_rcov do
25
+ end
26
+
24
27
  desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
28
  task :install_gem_no_doc => [:clean, :package] do
26
29
  sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lachlan-sprinkle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Crafter
@@ -64,13 +64,13 @@ extensions: []
64
64
  extra_rdoc_files:
65
65
  - History.txt
66
66
  - Manifest.txt
67
- - README.txt
67
+ - README.markdown
68
68
  files:
69
69
  - CREDITS
70
70
  - History.txt
71
71
  - MIT-LICENSE
72
72
  - Manifest.txt
73
- - README.txt
73
+ - README.markdown
74
74
  - Rakefile
75
75
  - bin/sprinkle
76
76
  - config/hoe.rb
@@ -99,6 +99,7 @@ files:
99
99
  - lib/sprinkle/actors/actors.rb
100
100
  - lib/sprinkle/actors/capistrano.rb
101
101
  - lib/sprinkle/actors/local.rb
102
+ - lib/sprinkle/actors/psexec.rb
102
103
  - lib/sprinkle/actors/ssh.rb
103
104
  - lib/sprinkle/actors/vlad.rb
104
105
  - lib/sprinkle/configurable.rb
@@ -120,6 +121,7 @@ files:
120
121
  - lib/sprinkle/installers/yum.rb
121
122
  - lib/sprinkle/installers/freebsd_pkg.rb
122
123
  - lib/sprinkle/installers/openbsd_pkg.rb
124
+ - lib/sprinkle/installers/noop.rb
123
125
  - lib/sprinkle/installers/opensolaris_pkg.rb
124
126
  - lib/sprinkle/installers/bsd_port.rb
125
127
  - lib/sprinkle/installers/mac_port.rb
@@ -128,9 +130,11 @@ files:
128
130
  - lib/sprinkle/policy.rb
129
131
  - lib/sprinkle/script.rb
130
132
  - lib/sprinkle/verifiers/directory.rb
133
+ - lib/sprinkle/verifiers/environment.rb
131
134
  - lib/sprinkle/verifiers/executable.rb
132
135
  - lib/sprinkle/verifiers/file.rb
133
136
  - lib/sprinkle/verifiers/process.rb
137
+ - lib/sprinkle/verifiers/registry.rb
134
138
  - lib/sprinkle/verifiers/ruby.rb
135
139
  - lib/sprinkle/verifiers/symlink.rb
136
140
  - lib/sprinkle/verify.rb
@@ -143,10 +147,11 @@ files:
143
147
  - tasks/rspec.rake
144
148
  has_rdoc: true
145
149
  homepage: http://sprinkle.rubyforge.org
150
+ licenses:
146
151
  post_install_message:
147
152
  rdoc_options:
148
153
  - --main
149
- - README.txt
154
+ - README.markdown
150
155
  require_paths:
151
156
  - lib
152
157
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -164,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
169
  requirements: []
165
170
 
166
171
  rubyforge_project: sprinkle
167
- rubygems_version: 1.2.0
172
+ rubygems_version: 1.3.5
168
173
  signing_key:
169
174
  specification_version: 2
170
175
  summary: Ruby DSL based software provisioning tool