sprinkle 0.5.0.rc1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/{README.markdown → README.md} +34 -56
  3. data/bin/sprinkle +1 -0
  4. data/examples/packages/build_essential.rb +1 -0
  5. data/examples/packages/databases/mysql.rb +2 -0
  6. data/examples/packages/databases/sqlite3.rb +2 -2
  7. data/examples/packages/phusion.rb +7 -7
  8. data/examples/packages/ruby/rails.rb +2 -1
  9. data/examples/packages/ruby/ruby.rb +1 -0
  10. data/examples/packages/ruby/rubygems.rb +3 -3
  11. data/examples/packages/scm/git.rb +3 -1
  12. data/examples/packages/scm/subversion.rb +1 -0
  13. data/examples/packages/servers/apache.rb +2 -0
  14. data/examples/rails/packages/database.rb +5 -2
  15. data/examples/rails/packages/essential.rb +1 -0
  16. data/examples/rails/packages/rails.rb +13 -11
  17. data/examples/rails/packages/scm.rb +9 -7
  18. data/examples/rails/packages/search.rb +3 -1
  19. data/examples/rails/packages/server.rb +7 -3
  20. data/examples/rails/rails.rb +1 -1
  21. data/lib/sprinkle/installers/binary.rb +1 -1
  22. data/lib/sprinkle/installers/bsd_port.rb +1 -1
  23. data/lib/sprinkle/installers/freebsd_portinstall.rb +1 -1
  24. data/lib/sprinkle/installers/gem.rb +1 -1
  25. data/lib/sprinkle/installers/group.rb +1 -1
  26. data/lib/sprinkle/installers/mac_port.rb +1 -1
  27. data/lib/sprinkle/installers/npm.rb +1 -1
  28. data/lib/sprinkle/installers/pear.rb +1 -1
  29. data/lib/sprinkle/installers/push_text.rb +1 -1
  30. data/lib/sprinkle/installers/rake.rb +4 -10
  31. data/lib/sprinkle/installers/replace_text.rb +1 -1
  32. data/lib/sprinkle/installers/runner.rb +1 -1
  33. data/lib/sprinkle/installers/smart.rb +1 -1
  34. data/lib/sprinkle/installers/source.rb +1 -1
  35. data/lib/sprinkle/installers/thor.rb +1 -1
  36. data/lib/sprinkle/installers/transfer.rb +1 -1
  37. data/lib/sprinkle/installers/user.rb +1 -1
  38. data/lib/sprinkle/policy.rb +2 -2
  39. data/sprinkle.gemspec +4 -4
  40. metadata +6 -5
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008 Marcus Crafter
1
+ Copyright (c) 2008-2013 Marcus Crafter <crafterm@redartisan.com>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,7 +1,13 @@
1
- # SPRINKLE
1
+ # Sprinkle
2
+
3
+ Sprinkle is a software provisioning tool you can use to build remote servers with, after the base operating
4
+ system has been installed. For example, to install a Rails or Merb stack on a brand new slice directly after
5
+ its been created.
6
+
7
+ [![Build Status](https://travis-ci.org/sprinkle-tool/sprinkle.png?branch=master)](https://travis-ci.org/sprinkle-tool/sprinkle)
2
8
 
3
9
  * <http://redartisan.com/2008/5/27/sprinkle-intro>
4
- * <http://github.com/crafterm/sprinkle>
10
+ * <http://github.com/sprinkle-tool/sprinkle>
5
11
  * <http://github.com/benschwarz/passenger-stack>
6
12
  * <http://github.com/trevorturk/sprinkle-packages>
7
13
  * <http://www.vimeo.com/2888665>
@@ -10,19 +16,13 @@
10
16
  * <http://github.com/stuartellis/spritz>
11
17
  * <http://engineering.gomiso.com/2011/08/26/forget-chef-or-puppet-automate-with-sprinkle/>
12
18
 
13
- [![Build Status](https://travis-ci.org/crafterm/sprinkle.png?branch=master)](https://travis-ci.org/crafterm/sprinkle)
14
-
15
- ## DESCRIPTION:
16
-
17
- Sprinkle is a software provisioning tool you can use to build remote servers with, after the base operating
18
- system has been installed. For example, to install a Rails or Merb stack on a brand new slice directly after
19
- its been created.
19
+ ### Packages
20
20
 
21
21
  Properties of packages such as their name, type, dependencies, etc, and what packages apply to what machines
22
22
  is described via a domain specific language that Sprinkle executes (in fact one of the aims of Sprinkle is to
23
23
  define as concisely as possible a language for installing software).
24
24
 
25
- An example package description follows:
25
+ An example:
26
26
 
27
27
  ``` ruby
28
28
  package :ruby do
@@ -37,10 +37,8 @@ package :ruby do
37
37
  end
38
38
  ```
39
39
 
40
- This defines a package called `'ruby'`, that uses the source based installer to build Ruby 1.8.6 from source,
41
- installing the package `'ruby_dependencies'` beforehand. Additionally, the package verifies it was installed
42
- correctly by verifying the file `'/usr/bin/ruby'` exists after installation. If this verification fails, the
43
- sprinkle script will gracefully stop.
40
+ This defines a package called `ruby`, that uses the source based installer to build Ruby 1.8.6 from source,
41
+ installing the package `ruby_dependencies` beforehand. The package verifies it was installed correctly by verifying the file `/usr/bin/ruby` exists after installation. If this verification fails, the sprinkle script will gracefully stop.
44
42
 
45
43
  Reasonable defaults are set by sprinkle, such as the install prefix, download area, etc, but can be customized
46
44
  globally or per package (see below for an example).
@@ -55,13 +53,13 @@ of changing installer types as software is updated upstream.
55
53
  Sprinkle also supports dependencies between packages, allowing you specify pre-requisites that need to be
56
54
  installed in order.
57
55
 
58
- Packages can be grouped into polices to define several packages that should be installed together.
56
+ ### Policies
59
57
 
60
- An example policy:
58
+ Packages can be grouped into polices to define several packages that should be installed together. An example:
61
59
 
62
60
  ``` ruby
63
61
  policy :rails, :roles => :app do
64
- requires :rails, :version => '2.1.0'
62
+ requires :rails_32
65
63
  requires :appserver
66
64
  requires :database
67
65
  requires :webserver
@@ -69,17 +67,27 @@ end
69
67
  ```
70
68
 
71
69
  This defines a policy called Rails, that applies to machines of role `:app`. The policy includes the packages
72
- rails (version 2.1.0), appserver, database and webserver.
70
+ rails (version 3.2), appserver, database and webserver.
73
71
 
74
- appserver, database and webserver can be virtual packages, where the user will be prompted for selection if
75
- multiple choices for the virtual package exist.
72
+ The appserver, database and webserver packages can also be virtual, prompting the user for selection if multiple choices for the virtual package exist.
76
73
 
77
74
  Sprinkle is architected to be extendable in many ways, one of those areas is in its deployment of commands to
78
75
  remote hosts. Currently Sprinkle supports the use of Capistrano, Vlad, or a direct net/ssh connection to
79
76
  issue commands on remote hosts via ssh, but could also be extended to use any other command transport mechanism
80
77
  desired. Sprinkle can also be configured to simply issue installation commands to provision the local system.
81
78
 
82
- An full example Sprinkle deployment script for deploying Rails (via gems), MySQL (via APT), Apache (via source)
79
+ Sprinkle is a work in progress and I'm excited to hear if anyone finds it useful - please feel free to
80
+ comment, ask any questions, or send in any ideas, patches, bugs. All most welcome.
81
+
82
+ Marcus Crafter - <crafterm@redartisan.com>
83
+
84
+ ----
85
+
86
+ ## APPENDIX
87
+
88
+ ### A full example deployment
89
+
90
+ A full example Sprinkle deployment script for deploying Rails (via gems), MySQL (via APT), Apache (via source)
83
91
  and Git (via source with dependencies from APT):
84
92
 
85
93
  ``` ruby
@@ -151,10 +159,10 @@ package :rubygems do
151
159
  requires :ruby
152
160
  end
153
161
 
154
- package :rails do
162
+ package :rails_32 do
155
163
  description 'Ruby on Rails'
156
164
  gem 'rails'
157
- version '2.1.0'
165
+ version '3.2'
158
166
  end
159
167
 
160
168
  package :mongrel do
@@ -190,7 +198,7 @@ end
190
198
  # the user is requested to select which one to use.
191
199
 
192
200
  policy :rails, :roles => :app do
193
- requires :rails, :version => '2.1.0'
201
+ requires :rails
194
202
  requires :appserver
195
203
  requires :database
196
204
  requires :webserver
@@ -221,35 +229,5 @@ end
221
229
  ```
222
230
 
223
231
  Please see the examples directory for more complete examples of Sprinkle deployment scripts, and
224
- also the [Passenger Stack github page](http://github.com/benschwarz/passenger-stack) and video by
225
- (Ben Schwarz)[http://www.vimeo.com/2888665].
226
-
227
- Sprinkle is a work in progress and I'm excited to hear if anyone finds it useful - please feel free to
228
- comment, ask any questions, or send in any ideas, patches, bugs. All most welcome.
229
-
230
- Marcus Crafter <crafterm@redartisan.com>
231
-
232
- ## LICENSE:
233
-
234
- (The MIT License)
235
-
236
- Copyright (c) 2008-2013 Marcus Crafter <crafterm@redartisan.com>
237
-
238
- Permission is hereby granted, free of charge, to any person obtaining
239
- a copy of this software and associated documentation files (the
240
- 'Software'), to deal in the Software without restriction, including
241
- without limitation the rights to use, copy, modify, merge, publish,
242
- distribute, sublicense, and/or sell copies of the Software, and to
243
- permit persons to whom the Software is furnished to do so, subject to
244
- the following conditions:
245
-
246
- The above copyright notice and this permission notice shall be
247
- included in all copies or substantial portions of the Software.
248
-
249
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
250
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
251
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
252
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
253
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
254
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
255
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
232
+ also the [Passenger Stack github page](http://github.com/benschwarz/passenger-stack) and [video by
233
+ Ben Schwarz](http://www.vimeo.com/2888665).
data/bin/sprinkle CHANGED
@@ -68,6 +68,7 @@ end
68
68
 
69
69
  def only_role(options)
70
70
  role=OPTIONS[:only_role]
71
+ return if role.blank?
71
72
  Sprinkle::OPTIONS[:only_role] = role
72
73
  puts "Only running policies for :#{role}"
73
74
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  package :build_essential do
4
4
  description 'Build tools'
5
+
5
6
  apt 'build-essential' do
6
7
  # Update the sources and upgrade the lists before we build essentials
7
8
  pre :install, ['aptitude update', 'aptitude safe-upgrade', 'aptitude full-upgrade']
@@ -1,10 +1,12 @@
1
1
  package :mysql, :provides => :database do
2
2
  description 'MySQL Database'
3
+
3
4
  apt %w( mysql-server mysql-client libmysqlclient15-dev )
4
5
  end
5
6
 
6
7
  package :mysql_ruby_driver do
7
8
  description 'Ruby MySQL database driver'
9
+
8
10
  gem 'mysql' # :build_flags => "—with-mysql-config=/usr/local/mysql/bin/mysql_config"
9
11
 
10
12
  verify do
@@ -1,15 +1,15 @@
1
1
  # Packages to install sqlite3 and the sqlite3 ruby driver.
2
2
  package :sqlite3, :provides => :database do
3
3
  description 'SQLite3 database'
4
+
4
5
  apt 'sqlite3'
5
6
  end
6
7
 
7
8
  package :sqlite3_ruby_driver do
8
9
  description 'Ruby SQLite3 library.'
9
- apt 'libsqlite3-dev libsqlite3-ruby1.8'
10
-
11
10
  requires :rubygems
12
11
 
12
+ apt 'libsqlite3-dev libsqlite3-ruby1.8'
13
13
  verify do
14
14
  ruby_can_load 'sqlite3'
15
15
  end
@@ -4,6 +4,9 @@
4
4
  package :ruby_enterprise do
5
5
  description 'Ruby Enterprise Edition'
6
6
  version '1.8.6-20080810'
7
+ requires :apache
8
+ requires :passenger
9
+
7
10
  source 'http://rubyforge.org/frs/download.php/41040/ruby-enterprise-1.8.6-20080810.tar.gz' do
8
11
  custom_install 'echo -en "\n\n\n\n" | ./installer'
9
12
 
@@ -18,13 +21,13 @@ package :ruby_enterprise do
18
21
  has_directory '/opt/ruby-enterprise-1.8.6-20080810'
19
22
  has_executable '/opt/ruby-enterprise-1.8.6-20080810/bin/ruby'
20
23
  end
21
-
22
- requires :apache
23
- requires :passenger
24
24
  end
25
25
 
26
26
  package :passenger, :provides => :appserver do
27
27
  description 'Phusion Passenger (mod_rails)'
28
+ requires :apache
29
+ requires :apache2_prefork_dev
30
+
28
31
  gem 'passenger' do
29
32
  post :install, 'echo -en "\n\n\n\n" | passenger-install-apache2-module'
30
33
 
@@ -48,8 +51,5 @@ package :passenger, :provides => :appserver do
48
51
  has_file '/etc/apache2/extras/passenger.conf'
49
52
  has_file '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so'
50
53
  has_directory '/usr/lib/ruby/gems/1.8/gems/passenger-2.0.3'
51
- end
52
-
53
- requires :apache
54
- requires :apache2_prefork_dev
54
+ end
55
55
  end
@@ -1,7 +1,8 @@
1
1
  package :rails do
2
2
  description 'Ruby on Rails'
3
+ version '3.2'
4
+
3
5
  gem 'rails'
4
- version '2.1.0'
5
6
 
6
7
  verify do
7
8
  has_executable 'rails'
@@ -1,6 +1,7 @@
1
1
  package :ruby do
2
2
  description 'Ruby Virtual Machine'
3
3
  version '1.8.6'
4
+
4
5
  apt %q(ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby) do
5
6
  post :install, [%q(ln -s /usr/bin/ruby1.8 /usr/bin/ruby),
6
7
  %q(ln -s /usr/bin/ri1.8 /usr/bin/ri),
@@ -1,6 +1,8 @@
1
1
  package :rubygems do
2
2
  description 'Ruby Gems Package Management System'
3
- version '1.2.0'
3
+ version '1.8.23'
4
+ requires :ruby
5
+
4
6
  source "http://rubyforge.org/frs/download.php/38646/rubygems-#{version}.tgz" do
5
7
  custom_install 'ruby setup.rb'
6
8
  post :install, 'ln -s /usr/bin/gem1.8 /usr/bin/gem'
@@ -12,6 +14,4 @@ package :rubygems do
12
14
  has_file '/usr/bin/gem1.8'
13
15
  has_symlink '/usr/bin/gem', '/usr/bin/gem1.8'
14
16
  end
15
-
16
- requires :ruby
17
17
  end
@@ -1,11 +1,13 @@
1
1
  package :git, :provides => :scm do
2
2
  description 'Git Distributed Version Control'
3
3
  version '1.5.6.3'
4
- source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
5
4
  requires :git_dependencies
5
+
6
+ source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
6
7
  end
7
8
 
8
9
  package :git_dependencies do
9
10
  description 'Git Build Dependencies'
11
+
10
12
  apt 'git', :dependencies_only => true
11
13
  end
@@ -1,4 +1,5 @@
1
1
  package :subversion, :provides => :scm do
2
2
  description 'Subversion Version Control'
3
+
3
4
  apt 'subversion'
4
5
  end
@@ -1,5 +1,6 @@
1
1
  package :apache, :provides => :webserver do
2
2
  description 'Apache2 web server.'
3
+
3
4
  apt 'apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-cert' do
4
5
  post :install, 'a2enmod rewrite'
5
6
  end
@@ -11,5 +12,6 @@ end
11
12
 
12
13
  package :apache2_prefork_dev do
13
14
  description 'A dependency required by some packages.'
15
+
14
16
  apt 'apache2-prefork-dev'
15
17
  end
@@ -1,9 +1,12 @@
1
1
  package :mysql, :provides => :database do
2
2
  description 'MySQL Database'
3
+
3
4
  apt %w( mysql-server mysql-client )
4
5
  end
5
6
 
6
- package :mysql_driver do
7
+ package :ruby_mysql_driver do
7
8
  description 'Ruby MySQL database driver'
8
- gem 'mysql'
9
+ requires :mysql
10
+
11
+ gem 'mysql2'
9
12
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  package :build_essential do
4
4
  description 'Build tools'
5
+
5
6
  apt 'build-essential' do
6
7
  # Update the sources and upgrade the lists before we build essentials
7
8
  pre :install, 'apt-get update'
@@ -1,29 +1,31 @@
1
- ## Defines available packages
1
+ package :ruby_dependencies do
2
+ description 'Ruby Virtual Machine Build Dependencies'
3
+
4
+ apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
5
+ end
2
6
 
3
7
  package :ruby do
4
8
  description 'Ruby Virtual Machine'
5
9
  version '1.8.6'
6
- patchlevel '369'
7
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz" # implicit :style => :gnu
10
+ patchlevel = '369'
8
11
  requires :ruby_dependencies
9
- end
10
-
11
- package :ruby_dependencies do
12
- description 'Ruby Virtual Machine Build Dependencies'
13
- apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
12
+
13
+ source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p#{patchlevel}.tar.gz" # implicit :style => :gnu
14
14
  end
15
15
 
16
16
  package :rubygems do
17
17
  description 'Ruby Gems Package Management System'
18
- version '1.3.5'
18
+ version '1.8.23'
19
+ requires :ruby
20
+
19
21
  source "http://rubyforge.org/frs/download.php/60718/rubygems-#{version}.tgz" do
20
22
  custom_install 'ruby setup.rb'
21
23
  end
22
- requires :ruby
23
24
  end
24
25
 
25
26
  package :rails do
26
27
  description 'Ruby on Rails'
28
+ version '3.2'
29
+
27
30
  gem 'rails'
28
- version '2.3.3'
29
31
  end
@@ -1,11 +1,13 @@
1
- package :git, :provides => :scm do
2
- description 'Git Distributed Version Control'
3
- version '1.6.3.3'
4
- source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
5
- requires :git_dependencies
6
- end
7
-
8
1
  package :git_dependencies do
9
2
  description 'Git Build Dependencies'
3
+
10
4
  apt 'git', :dependencies_only => true
11
5
  end
6
+
7
+ package :git, :provides => :scm do
8
+ description 'Git Distributed Version Control'
9
+ version '1.6.3.3'
10
+ requires :git_dependencies
11
+
12
+ source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
13
+ end
@@ -1,11 +1,13 @@
1
1
  package :sphinx, :provides => :search do
2
2
  description 'MySQL full text search engine'
3
3
  version '0.9.8.1'
4
- source "http://www.sphinxsearch.com/downloads/sphinx-#{version}.tar.gz"
5
4
  requires :mysql_dev
5
+
6
+ source "http://www.sphinxsearch.com/downloads/sphinx-#{version}.tar.gz"
6
7
  end
7
8
 
8
9
  package :mysql_dev do
9
10
  description 'MySQL Database development package'
11
+
10
12
  apt %w( libmysqlclient15-dev )
11
13
  end
@@ -1,28 +1,32 @@
1
1
  package :mongrel do
2
2
  description 'Mongrel Application Server'
3
- gem 'mongrel'
4
3
  version '1.1.5'
4
+
5
+ gem 'mongrel'
5
6
  end
6
7
 
7
8
  package :mongrel_cluster, :provides => :appserver do
8
9
  description 'Cluster Management for Mongrel'
9
- gem 'mongrel_cluster'
10
10
  version '1.0.5'
11
11
  requires :mongrel
12
+
13
+ gem 'mongrel_cluster'
12
14
  end
13
15
 
14
16
  package :apache, :provides => :webserver do
15
17
  description 'Apache 2 HTTP Server'
16
18
  version '2.2.11'
19
+ requires :apache_dependencies
20
+
17
21
  source "http://www.apache.org/dist/httpd/httpd-#{version}.tar.bz2" do
18
22
  enable %w( mods-shared=all proxy proxy-balancer proxy-http rewrite cache headers ssl deflate so )
19
23
  prefix "/opt/local/apache2-#{version}"
20
24
  post :install, 'install -m 755 support/apachectl /etc/init.d/apache2', 'update-rc.d -f apache2 defaults'
21
25
  end
22
- requires :apache_dependencies
23
26
  end
24
27
 
25
28
  package :apache_dependencies do
26
29
  description 'Apache 2 HTTP Server Build Dependencies'
30
+
27
31
  apt %w( openssl libtool mawk zlib1g-dev libssl-dev )
28
32
  end
@@ -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.3.3'
38
+ requires :rails
39
39
  requires :appserver
40
40
  requires :database
41
41
  requires :webserver
@@ -16,7 +16,7 @@ module Sprinkle
16
16
 
17
17
  api do
18
18
  def binary(source, options = {}, &block)
19
- install Sprinkle::Installers::Binary.new(self, source, options, &block)
19
+ install Binary.new(self, source, options, &block)
20
20
  end
21
21
  end
22
22
 
@@ -17,7 +17,7 @@ module Sprinkle
17
17
 
18
18
  api do
19
19
  def bsd_port(port, options ={}, &block)
20
- install Sprinkle::Installers::BsdPort.new(self, port, options, &block)
20
+ install BsdPort.new(self, port, options, &block)
21
21
  end
22
22
  end
23
23
 
@@ -22,7 +22,7 @@ module Sprinkle
22
22
 
23
23
  api do
24
24
  def freebsd_portinstall(port, options={}, &block)
25
- install Sprinkle::Installers::FreebsdPortinstall.new(self, port, options, &block)
25
+ install FreebsdPortinstall.new(self, port, options, &block)
26
26
  end
27
27
  end
28
28
 
@@ -31,7 +31,7 @@ module Sprinkle
31
31
  api do
32
32
  def gem(name, options = {}, &block)
33
33
  @recommends << :rubygems
34
- install Sprinkle::Installers::Gem.new(self, name, options, &block)
34
+ install Gem.new(self, name, options, &block)
35
35
  end
36
36
  end
37
37
 
@@ -15,7 +15,7 @@ module Sprinkle
15
15
 
16
16
  api do
17
17
  def add_group(group, options={}, &block)
18
- install Sprinkle::Installers::Group.new(self, group, options, &block)
18
+ install Group.new(self, group, options, &block)
19
19
  end
20
20
  end
21
21
 
@@ -23,7 +23,7 @@ module Sprinkle
23
23
 
24
24
  api do
25
25
  def mac_port(port, options={}, &block)
26
- install Sprinkle::Installers::MacPort.new(self, port, options, &block)
26
+ install MacPort.new(self, port, options, &block)
27
27
  end
28
28
  end
29
29
 
@@ -17,7 +17,7 @@ module Sprinkle
17
17
 
18
18
  api do
19
19
  def npm(package, &block)
20
- install Sprinkle::Installers::Npm.new(self, package, &block)
20
+ install Npm.new(self, package, &block)
21
21
  end
22
22
  end
23
23
 
@@ -15,7 +15,7 @@ module Sprinkle
15
15
 
16
16
  api do
17
17
  def pear(package, &block)
18
- install Sprinkle::Installers::Pear.new(self, package, &block)
18
+ install Pear.new(self, package, &block)
19
19
  end
20
20
  end
21
21
 
@@ -35,7 +35,7 @@ module Sprinkle
35
35
 
36
36
  api do
37
37
  def push_text(text, path, options = {}, &block)
38
- install Sprinkle::Installers::PushText.new(self, text, path, options, &block)
38
+ install PushText.new(self, text, path, options, &block)
39
39
  end
40
40
  end
41
41
 
@@ -5,23 +5,17 @@ module Sprinkle
5
5
  # == Example Usage
6
6
  #
7
7
  # The following example runs the command "rake spec" on
8
- # the remote server.
8
+ # the remote server. Specify an optional Rakefile with
9
+ # the :rakefile option.
9
10
  #
10
11
  # package :spec do
11
- # rake 'spec'
12
+ # rake 'spec', :rakefile => "/var/setup/Rakefile"
12
13
  # end
13
- #
14
- # Specify a Rakefile with the :rakefile option.
15
- #
16
- # package :spec, :rakefile => "/var/setup/Rakefile" do
17
- # rake 'spec'
18
- # end
19
-
20
14
  class Rake < Installer
21
15
 
22
16
  api do
23
17
  def rake(name, options = {}, &block)
24
- install Sprinkle::Installers::Rake.new(self, name, options, &block)
18
+ install Rake.new(self, name, options, &block)
25
19
  end
26
20
  end
27
21
 
@@ -28,7 +28,7 @@ module Sprinkle
28
28
 
29
29
  api do
30
30
  def replace_text(regex, text, path, options={}, &block)
31
- install Sprinkle::Installers::ReplaceText.new(self, regex, text, path, options, &block)
31
+ install ReplaceText.new(self, regex, text, path, options, &block)
32
32
  end
33
33
  end
34
34
 
@@ -20,7 +20,7 @@ module Sprinkle
20
20
  api do
21
21
  def runner(*cmds, &block)
22
22
  options = cmds.extract_options!
23
- install Sprinkle::Installers::Runner.new(self, cmds, options, &block)
23
+ install Runner.new(self, cmds, options, &block)
24
24
  end
25
25
  end
26
26
 
@@ -4,7 +4,7 @@ module Sprinkle
4
4
 
5
5
  api do
6
6
  def smart(*names, &block)
7
- install Sprinkle::Installers::Smart.new(self, *names, &block)
7
+ install Smart.new(self, *names, &block)
8
8
  end
9
9
  end
10
10
 
@@ -81,7 +81,7 @@ module Sprinkle
81
81
  api do
82
82
  def source(source, options = {}, &block)
83
83
  @recommends << :build_essential # Ubuntu/Debian
84
- install Sprinkle::Installers::Source.new(self, source, options, &block)
84
+ install Source.new(self, source, options, &block)
85
85
  end
86
86
  end
87
87
 
@@ -23,7 +23,7 @@ module Sprinkle
23
23
 
24
24
  api do
25
25
  def thor(name, options = {}, &block)
26
- install Sprinkle::Installers::Thor.new(self, name, options, &block)
26
+ install Thor.new(self, name, options, &block)
27
27
  end
28
28
  end
29
29
 
@@ -89,7 +89,7 @@ module Sprinkle
89
89
  api do
90
90
  def transfer(source, destination, options = {}, &block)
91
91
  options.merge!(:binding => binding())
92
- install Sprinkle::Installers::Transfer.new(self, source, destination, options, &block)
92
+ install Transfer.new(self, source, destination, options, &block)
93
93
  end
94
94
  end
95
95
 
@@ -16,7 +16,7 @@ module Sprinkle
16
16
 
17
17
  api do
18
18
  def add_user(username, options={}, &block)
19
- install Sprinkle::Installers::User.new(self, username, options, &block)
19
+ install User.new(self, username, options, &block)
20
20
  end
21
21
  end
22
22
 
@@ -80,7 +80,7 @@ module Sprinkle
80
80
  cloud_info "--> Cloud hierarchy for policy #{@name}"
81
81
 
82
82
  @packages.each do |p, args|
83
- cloud_info "\nPolicy #{@name} requires package #{p}"
83
+ cloud_info " * requires package #{p}"
84
84
 
85
85
  package = Sprinkle::Package::PACKAGES[p]
86
86
  raise "Package definition not found for key: #{p}" unless package
@@ -124,7 +124,7 @@ module Sprinkle
124
124
 
125
125
  def normalize(all, &block)
126
126
  all = all.flatten.uniq
127
- cloud_info "\n--> Normalized installation order for all packages: #{all.collect(&:name).join(', ')}"
127
+ cloud_info "--> Normalized installation order for all packages: #{all.collect(&:name).join(', ')}\n"
128
128
  all.each &block
129
129
  end
130
130
  end
data/sprinkle.gemspec CHANGED
@@ -1,22 +1,22 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sprinkle"
3
- s.version = "0.5.0.rc1"
3
+ s.version = "0.5.0"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
- s.authors = ["Marcus Crafter"]
6
+ s.authors = ["Marcus Crafter", "Josh Goebel"]
7
7
  s.date = "2012-05-05"
8
8
  s.description = "Ruby DSL based software provisioning tool"
9
9
  s.email = "crafterm@redartisan.com"
10
10
  s.executables = ["sprinkle"]
11
11
  s.extra_rdoc_files = [
12
- "README.markdown"
12
+ "README.md"
13
13
  ]
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
 
19
- s.homepage = "http://github.com/crafterm/sprinkle"
19
+ s.homepage = "https://github.com/sprinkle-tool/sprinkle"
20
20
  s.require_paths = ["lib"]
21
21
  s.rubyforge_project = "sprinkle"
22
22
  s.rubygems_version = "1.8.15"
metadata CHANGED
@@ -1,11 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprinkle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.rc1
5
- prerelease: 6
4
+ version: 0.5.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marcus Crafter
9
+ - Josh Goebel
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
@@ -129,14 +130,14 @@ executables:
129
130
  - sprinkle
130
131
  extensions: []
131
132
  extra_rdoc_files:
132
- - README.markdown
133
+ - README.md
133
134
  files:
134
135
  - .gitignore
135
136
  - CREDITS
136
137
  - Gemfile
137
138
  - Gemfile.lock
138
139
  - MIT-LICENSE
139
- - README.markdown
140
+ - README.md
140
141
  - Rakefile
141
142
  - bin/sprinkle
142
143
  - examples/packages/build_essential.rb
@@ -266,7 +267,7 @@ files:
266
267
  - spec/sprinkle/sprinkle_spec.rb
267
268
  - spec/sprinkle/verify_spec.rb
268
269
  - sprinkle.gemspec
269
- homepage: http://github.com/crafterm/sprinkle
270
+ homepage: https://github.com/sprinkle-tool/sprinkle
270
271
  licenses: []
271
272
  post_install_message:
272
273
  rdoc_options: []