sprinkle 0.4.2 → 0.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/.gitignore +8 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +54 -0
  4. data/README.markdown +178 -166
  5. data/Rakefile +4 -28
  6. data/bin/sprinkle +14 -1
  7. data/lib/sprinkle.rb +5 -1
  8. data/lib/sprinkle/actors/actors.rb +20 -5
  9. data/lib/sprinkle/actors/capistrano.rb +62 -36
  10. data/lib/sprinkle/actors/dummy.rb +127 -0
  11. data/lib/sprinkle/actors/local.rb +59 -17
  12. data/lib/sprinkle/actors/ssh.rb +189 -107
  13. data/lib/sprinkle/actors/vlad.rb +51 -32
  14. data/lib/sprinkle/configurable.rb +2 -1
  15. data/lib/sprinkle/deployment.rb +22 -2
  16. data/lib/sprinkle/errors/pretty_failure.rb +41 -0
  17. data/lib/sprinkle/errors/remote_command_failure.rb +24 -0
  18. data/lib/sprinkle/errors/transfer_failure.rb +28 -0
  19. data/lib/sprinkle/installers/apt.rb +17 -16
  20. data/lib/sprinkle/installers/binary.rb +23 -8
  21. data/lib/sprinkle/installers/brew.rb +17 -10
  22. data/lib/sprinkle/installers/bsd_port.rb +10 -6
  23. data/lib/sprinkle/installers/deb.rb +3 -10
  24. data/lib/sprinkle/installers/freebsd_pkg.rb +5 -11
  25. data/lib/sprinkle/installers/freebsd_portinstall.rb +8 -2
  26. data/lib/sprinkle/installers/gem.rb +9 -3
  27. data/lib/sprinkle/installers/group.rb +28 -4
  28. data/lib/sprinkle/installers/installer.rb +58 -7
  29. data/lib/sprinkle/installers/mac_port.rb +13 -6
  30. data/lib/sprinkle/installers/npm.rb +42 -0
  31. data/lib/sprinkle/installers/openbsd_pkg.rb +4 -11
  32. data/lib/sprinkle/installers/opensolaris_pkg.rb +7 -13
  33. data/lib/sprinkle/installers/package_installer.rb +33 -0
  34. data/lib/sprinkle/installers/pacman.rb +5 -13
  35. data/lib/sprinkle/installers/pear.rb +40 -0
  36. data/lib/sprinkle/installers/push_text.rb +18 -5
  37. data/lib/sprinkle/installers/rake.rb +7 -2
  38. data/lib/sprinkle/installers/reconnect.rb +29 -0
  39. data/lib/sprinkle/installers/replace_text.rb +11 -2
  40. data/lib/sprinkle/installers/rpm.rb +8 -6
  41. data/lib/sprinkle/installers/runner.rb +41 -16
  42. data/lib/sprinkle/installers/smart.rb +6 -17
  43. data/lib/sprinkle/installers/source.rb +22 -10
  44. data/lib/sprinkle/installers/thor.rb +7 -0
  45. data/lib/sprinkle/installers/transfer.rb +62 -41
  46. data/lib/sprinkle/installers/user.rb +34 -4
  47. data/lib/sprinkle/installers/yum.rb +10 -10
  48. data/lib/sprinkle/installers/zypper.rb +4 -15
  49. data/lib/sprinkle/package.rb +81 -98
  50. data/lib/sprinkle/policy.rb +11 -4
  51. data/lib/sprinkle/utility/log_recorder.rb +33 -0
  52. data/lib/sprinkle/verifiers/directory.rb +1 -1
  53. data/lib/sprinkle/verifiers/executable.rb +1 -1
  54. data/lib/sprinkle/verifiers/file.rb +11 -2
  55. data/lib/sprinkle/verifiers/package.rb +2 -14
  56. data/lib/sprinkle/verifiers/permission.rb +40 -0
  57. data/lib/sprinkle/verifiers/symlink.rb +2 -2
  58. data/lib/sprinkle/verifiers/test.rb +21 -0
  59. data/lib/sprinkle/verify.rb +3 -3
  60. data/lib/sprinkle/version.rb +3 -0
  61. data/spec/fixtures/my_file.txt +1 -0
  62. data/spec/sprinkle/actors/capistrano_spec.rb +16 -3
  63. data/spec/sprinkle/actors/local_spec.rb +24 -6
  64. data/spec/sprinkle/actors/ssh_spec.rb +38 -0
  65. data/spec/sprinkle/installers/apt_spec.rb +23 -2
  66. data/spec/sprinkle/installers/binary_spec.rb +22 -14
  67. data/spec/sprinkle/installers/brew_spec.rb +4 -4
  68. data/spec/sprinkle/installers/installer_spec.rb +36 -7
  69. data/spec/sprinkle/installers/npm_spec.rb +16 -0
  70. data/spec/sprinkle/installers/pear_spec.rb +16 -0
  71. data/spec/sprinkle/installers/push_text_spec.rb +23 -1
  72. data/spec/sprinkle/installers/rpm_spec.rb +5 -0
  73. data/spec/sprinkle/installers/runner_spec.rb +27 -11
  74. data/spec/sprinkle/installers/smart_spec.rb +60 -0
  75. data/spec/sprinkle/installers/source_spec.rb +4 -4
  76. data/spec/sprinkle/installers/transfer_spec.rb +31 -16
  77. data/spec/sprinkle/package_spec.rb +10 -2
  78. data/spec/sprinkle/policy_spec.rb +6 -0
  79. data/spec/sprinkle/verify_spec.rb +18 -4
  80. data/sprinkle.gemspec +22 -158
  81. metadata +178 -96
  82. data/TODO +0 -56
  83. data/VERSION +0 -1
  84. data/lib/sprinkle/verifiers/apt.rb +0 -21
  85. data/lib/sprinkle/verifiers/brew.rb +0 -21
  86. data/lib/sprinkle/verifiers/rpm.rb +0 -21
  87. data/lib/sprinkle/verifiers/users_groups.rb +0 -33
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *.gem
2
+ pkg
3
+ .DS_Store
4
+ .idea
5
+ .*.swp
6
+ coverage/*
7
+ rdoc
8
+ .ruby-version
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # to make travis CI happy
2
+ #source :rubygems
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,54 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ sprinkle (0.5)
5
+ activesupport (>= 2.0.2)
6
+ capistrano (>= 2.5.5)
7
+ highline (>= 1.4.0)
8
+ open4 (>= 1.1.0)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ activesupport (3.2.13)
14
+ i18n (= 0.6.1)
15
+ multi_json (~> 1.0)
16
+ capistrano (2.14.2)
17
+ highline
18
+ net-scp (>= 1.0.0)
19
+ net-sftp (>= 2.0.0)
20
+ net-ssh (>= 2.0.14)
21
+ net-ssh-gateway (>= 1.1.0)
22
+ diff-lcs (1.1.3)
23
+ highline (1.6.16)
24
+ i18n (0.6.1)
25
+ json (1.7.5)
26
+ multi_json (1.7.2)
27
+ net-scp (1.1.0)
28
+ net-ssh (>= 2.6.5)
29
+ net-sftp (2.1.1)
30
+ net-ssh (>= 2.6.5)
31
+ net-ssh (2.6.6)
32
+ net-ssh-gateway (1.2.0)
33
+ net-ssh (>= 2.6.5)
34
+ open4 (1.1.0)
35
+ rake (10.0.4)
36
+ rdoc (3.12)
37
+ json (~> 1.4)
38
+ rspec (2.12.0)
39
+ rspec-core (~> 2.12.0)
40
+ rspec-expectations (~> 2.12.0)
41
+ rspec-mocks (~> 2.12.0)
42
+ rspec-core (2.12.0)
43
+ rspec-expectations (2.12.0)
44
+ diff-lcs (~> 1.1.3)
45
+ rspec-mocks (2.12.0)
46
+
47
+ PLATFORMS
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ rake (>= 0.8.7)
52
+ rdoc (>= 3.12)
53
+ rspec (>= 2.5)
54
+ sprinkle!
data/README.markdown CHANGED
@@ -1,12 +1,16 @@
1
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://github.com/trevorturk/sprinkle-packages>
7
- * <http://www.vimeo.com/2888665>
8
- * <http://redartisan.lighthouseapp.com/projects/25275-sprinkle/tickets>
9
- * <http://maxim.github.com/sprinkle-cheatsheet>
3
+ * <http://redartisan.com/2008/5/27/sprinkle-intro>
4
+ * <http://github.com/crafterm/sprinkle>
5
+ * <http://github.com/benschwarz/passenger-stack>
6
+ * <http://github.com/trevorturk/sprinkle-packages>
7
+ * <http://www.vimeo.com/2888665>
8
+ * <http://maxim.github.com/sprinkle-cheatsheet>
9
+ * <http://github.com/mingalar/sprinkle-packages>
10
+ * <http://github.com/stuartellis/spritz>
11
+ * <http://engineering.gomiso.com/2011/08/26/forget-chef-or-puppet-automate-with-sprinkle/>
12
+
13
+ [![Build Status](https://travis-ci.org/crafterm/sprinkle.png?branch=master)](https://travis-ci.org/crafterm/sprinkle)
10
14
 
11
15
  ## DESCRIPTION:
12
16
 
@@ -20,20 +24,22 @@ define as concisely as possible a language for installing software).
20
24
 
21
25
  An example package description follows:
22
26
 
23
- package :ruby do
24
- description 'Ruby Virtual Machine'
25
- version '1.8.6'
26
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p111.tar.gz"
27
- requires :ruby_dependencies
28
-
29
- verify do
30
- has_file '/usr/bin/ruby'
31
- end
32
- end
33
-
34
- This defines a package called 'ruby', that uses the source based installer to build Ruby 1.8.6 from source,
35
- installing the package 'ruby_dependencies' beforehand. Additionally, the package verifies it was installed
36
- correctly by verifying the file '/usr/bin/ruby' exists after installation. If this verification fails, the
27
+ ``` ruby
28
+ package :ruby do
29
+ description 'Ruby Virtual Machine'
30
+ version '1.8.6'
31
+ source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p111.tar.gz"
32
+ requires :ruby_dependencies
33
+
34
+ verify do
35
+ has_file '/usr/bin/ruby'
36
+ end
37
+ end
38
+ ```
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
37
43
  sprinkle script will gracefully stop.
38
44
 
39
45
  Reasonable defaults are set by sprinkle, such as the install prefix, download area, etc, but can be customized
@@ -53,14 +59,16 @@ Packages can be grouped into polices to define several packages that should be i
53
59
 
54
60
  An example policy:
55
61
 
56
- policy :rails, :roles => :app do
57
- requires :rails, :version => '2.1.0'
58
- requires :appserver
59
- requires :database
60
- requires :webserver
61
- end
62
+ ``` ruby
63
+ policy :rails, :roles => :app do
64
+ requires :rails, :version => '2.1.0'
65
+ requires :appserver
66
+ requires :database
67
+ requires :webserver
68
+ end
69
+ ```
62
70
 
63
- This defines a policy called Rails, that applies to machines of role :app. The policy includes the packages
71
+ This defines a policy called Rails, that applies to machines of role `:app`. The policy includes the packages
64
72
  rails (version 2.1.0), appserver, database and webserver.
65
73
 
66
74
  appserver, database and webserver can be virtual packages, where the user will be prompted for selection if
@@ -74,143 +82,147 @@ desired. Sprinkle can also be configured to simply issue installation commands t
74
82
  An full example Sprinkle deployment script for deploying Rails (via gems), MySQL (via APT), Apache (via source)
75
83
  and Git (via source with dependencies from APT):
76
84
 
77
- # Sprinkle Rails deployment script
78
- #
79
- # This is an example Sprinkle script, configured to install Rails from gems, Apache, Ruby and Git from source,
80
- # and mysql and Git dependencies from apt on an Ubuntu system. Installation is configured to run via
81
- # Capistrano (and an accompanying deploy.rb recipe script). Source based packages are downloaded and built into
82
- # /usr/local on the remote system.
83
- #
84
- # A sprinkle script is separated into 3 different sections. Packages, policies and deployment.
85
- #
86
- # Packages
87
- #
88
- # Defines the world of packages as we know it. Each package has a name and
89
- # set of metadata including its installer type (eg. apt, source, gem, etc). Packages can have
90
- # relationships to each other via dependencies
91
- #
92
- # Policies
93
- #
94
- # Names a group of packages (optionally with versions) that apply to a particular set of roles.
95
- #
96
- # Deployment
97
- #
98
- # Defines script wide settings such as a delivery mechanism for executing commands on the target
99
- # system (eg. capistrano), and installer defaults (eg. build locations, etc).
100
-
101
- # Packages
102
-
103
- package :ruby do
104
- description 'Ruby Virtual Machine'
105
- version '1.8.6'
106
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p111.tar.gz"
107
- requires :ruby_dependencies
108
- end
109
-
110
- package :ruby_dependencies do
111
- description 'Ruby Virtual Machine Build Dependencies'
112
- apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
113
- end
114
-
115
- package :mysql, :provides => :database do
116
- description 'MySQL Database'
117
- apt %w( mysql-server mysql-client )
118
- end
119
-
120
- package :apache, :provides => :webserver do
121
- description 'Apache 2 HTTP Server'
122
- version '2.2.9'
123
- source "http://apache.wildit.net.au/httpd/httpd-#{version}.tar.bz2" do
124
- enable %w( mods-shared=all proxy proxy-balancer proxy-http rewrite cache headers ssl deflate so )
125
- prefix "/opt/local/apache2-#{version}"
126
- post :install, 'install -m 755 support/apachectl /etc/init.d/apache2', 'update-rc.d -f apache2 defaults'
127
- end
128
- requires :apache_dependencies
129
- end
130
-
131
- package :apache_dependencies do
132
- description 'Apache 2 HTTP Server Build Dependencies'
133
- apt %w( openssl libtool mawk zlib1g-dev libssl-dev )
134
- end
135
-
136
- package :rubygems do
137
- description 'Ruby Gems Package Management System'
138
- version '1.2.0'
139
- source "http://rubyforge.org/frs/download.php/38646/rubygems-#{version}.tgz" do
140
- custom_install 'ruby setup.rb'
141
- end
142
- requires :ruby
143
- end
144
-
145
- package :rails do
146
- description 'Ruby on Rails'
147
- gem 'rails'
148
- version '2.1.0'
149
- end
150
-
151
- package :mongrel do
152
- description 'Mongrel Application Server'
153
- gem 'mongrel'
154
- version '1.1.5'
155
- end
156
-
157
- package :mongrel_cluster, :provides => :appserver do
158
- description 'Cluster Management for Mongrel'
159
- gem 'mongrel_cluster' # :source => 'http://gems.github.com/' for alternate gem server
160
- version '1.0.5'
161
- requires :mongrel
162
- end
163
-
164
- package :git, :provides => :scm do
165
- description 'Git Distributed Version Control'
166
- version '1.5.6.3'
167
- source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
168
- requires :git_dependencies
169
- end
170
-
171
- package :git_dependencies do
172
- description 'Git Build Dependencies'
173
- apt 'git', :dependencies_only => true
174
- end
175
-
176
- # Policies
177
-
178
- # Associates the rails policy to the application servers. Contains rails, and surrounding
179
- # packages. Note, appserver, database and webserver are all virtual packages defined above. If
180
- # there's only one implementation of a virtual package, it's selected automatically, otherwise
181
- # the user is requested to select which one to use.
182
-
183
- policy :rails, :roles => :app do
184
- requires :rails, :version => '2.1.0'
185
- requires :appserver
186
- requires :database
187
- requires :webserver
188
- requires :scm
189
- end
190
-
191
- # Deployment
192
-
193
- # Configures sprinkle to use capistrano for delivery of commands to the remote machines (via
194
- # the named 'deploy' recipe). Also configures 'source' installer defaults to put package gear
195
- # in /usr/local
196
-
197
- deployment do
198
-
199
- # mechanism for deployment
200
- delivery :capistrano do
201
- recipes 'deploy'
202
- end
203
-
204
- # source based package installer defaults
205
- source do
206
- prefix '/usr/local' # where all source packages will be configured to install
207
- archives '/usr/local/sources' # where all source packages will be downloaded to
208
- builds '/usr/local/build' # where all source packages will be built
209
- end
210
-
211
- end
212
-
213
- 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).
85
+ ``` ruby
86
+ # Sprinkle Rails deployment script
87
+ #
88
+ # This is an example Sprinkle script, configured to install Rails from gems, Apache, Ruby and Git from source,
89
+ # and mysql and Git dependencies from apt on an Ubuntu system. Installation is configured to run via
90
+ # Capistrano (and an accompanying deploy.rb recipe script). Source based packages are downloaded and built into
91
+ # /usr/local on the remote system.
92
+ #
93
+ # A sprinkle script is separated into 3 different sections. Packages, policies and deployment.
94
+ #
95
+ # Packages
96
+ #
97
+ # Defines the world of packages as we know it. Each package has a name and
98
+ # set of metadata including its installer type (eg. apt, source, gem, etc). Packages can have
99
+ # relationships to each other via dependencies
100
+ #
101
+ # Policies
102
+ #
103
+ # Names a group of packages (optionally with versions) that apply to a particular set of roles.
104
+ #
105
+ # Deployment
106
+ #
107
+ # Defines script wide settings such as a delivery mechanism for executing commands on the target
108
+ # system (eg. capistrano), and installer defaults (eg. build locations, etc).
109
+
110
+ # Packages
111
+
112
+ package :ruby do
113
+ description 'Ruby Virtual Machine'
114
+ version '1.8.6'
115
+ source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p111.tar.gz"
116
+ requires :ruby_dependencies
117
+ end
118
+
119
+ package :ruby_dependencies do
120
+ description 'Ruby Virtual Machine Build Dependencies'
121
+ apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
122
+ end
123
+
124
+ package :mysql, :provides => :database do
125
+ description 'MySQL Database'
126
+ apt %w( mysql-server mysql-client )
127
+ end
128
+
129
+ package :apache, :provides => :webserver do
130
+ description 'Apache 2 HTTP Server'
131
+ version '2.2.9'
132
+ source "http://apache.wildit.net.au/httpd/httpd-#{version}.tar.bz2" do
133
+ enable %w( mods-shared=all proxy proxy-balancer proxy-http rewrite cache headers ssl deflate so )
134
+ prefix "/opt/local/apache2-#{version}"
135
+ post :install, 'install -m 755 support/apachectl /etc/init.d/apache2', 'update-rc.d -f apache2 defaults'
136
+ end
137
+ requires :apache_dependencies
138
+ end
139
+
140
+ package :apache_dependencies do
141
+ description 'Apache 2 HTTP Server Build Dependencies'
142
+ apt %w( openssl libtool mawk zlib1g-dev libssl-dev )
143
+ end
144
+
145
+ package :rubygems do
146
+ description 'Ruby Gems Package Management System'
147
+ version '1.2.0'
148
+ source "http://rubyforge.org/frs/download.php/38646/rubygems-#{version}.tgz" do
149
+ custom_install 'ruby setup.rb'
150
+ end
151
+ requires :ruby
152
+ end
153
+
154
+ package :rails do
155
+ description 'Ruby on Rails'
156
+ gem 'rails'
157
+ version '2.1.0'
158
+ end
159
+
160
+ package :mongrel do
161
+ description 'Mongrel Application Server'
162
+ gem 'mongrel'
163
+ version '1.1.5'
164
+ end
165
+
166
+ package :mongrel_cluster, :provides => :appserver do
167
+ description 'Cluster Management for Mongrel'
168
+ gem 'mongrel_cluster' # :source => 'http://gems.github.com/' for alternate gem server
169
+ version '1.0.5'
170
+ requires :mongrel
171
+ end
172
+
173
+ package :git, :provides => :scm do
174
+ description 'Git Distributed Version Control'
175
+ version '1.5.6.3'
176
+ source "http://kernel.org/pub/software/scm/git/git-#{version}.tar.gz"
177
+ requires :git_dependencies
178
+ end
179
+
180
+ package :git_dependencies do
181
+ description 'Git Build Dependencies'
182
+ apt 'git', :dependencies_only => true
183
+ end
184
+
185
+ # Policies
186
+
187
+ # Associates the rails policy to the application servers. Contains rails, and surrounding
188
+ # packages. Note, appserver, database and webserver are all virtual packages defined above. If
189
+ # there's only one implementation of a virtual package, it's selected automatically, otherwise
190
+ # the user is requested to select which one to use.
191
+
192
+ policy :rails, :roles => :app do
193
+ requires :rails, :version => '2.1.0'
194
+ requires :appserver
195
+ requires :database
196
+ requires :webserver
197
+ requires :scm
198
+ end
199
+
200
+ # Deployment
201
+
202
+ # Configures sprinkle to use capistrano for delivery of commands to the remote machines (via
203
+ # the named 'deploy' recipe). Also configures 'source' installer defaults to put package gear
204
+ # in /usr/local
205
+
206
+ deployment do
207
+
208
+ # mechanism for deployment
209
+ delivery :capistrano do
210
+ recipes 'deploy'
211
+ end
212
+
213
+ # source based package installer defaults
214
+ source do
215
+ prefix '/usr/local' # where all source packages will be configured to install
216
+ archives '/usr/local/sources' # where all source packages will be downloaded to
217
+ builds '/usr/local/build' # where all source packages will be built
218
+ end
219
+
220
+ end
221
+ ```
222
+
223
+ 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].
214
226
 
215
227
  Sprinkle is a work in progress and I'm excited to hear if anyone finds it useful - please feel free to
216
228
  comment, ask any questions, or send in any ideas, patches, bugs. All most welcome.
@@ -221,7 +233,7 @@ Marcus Crafter <crafterm@redartisan.com>
221
233
 
222
234
  (The MIT License)
223
235
 
224
- Copyright (c) 2008-2009 Marcus Crafter <crafterm@redartisan.com>
236
+ Copyright (c) 2008-2013 Marcus Crafter <crafterm@redartisan.com>
225
237
 
226
238
  Permission is hereby granted, free of charge, to any person obtaining
227
239
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,35 +1,13 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
3
  require 'rspec/core/rake_task'
4
-
5
- begin
6
- require 'jeweler'
7
- Jeweler::Tasks.new do |gem|
8
- gem.name = "sprinkle"
9
- gem.summary = "Ruby DSL based software provisioning tool"
10
- gem.description = "Ruby DSL based software provisioning tool"
11
- gem.email = "crafterm@redartisan.com"
12
- gem.rubyforge_project = 'sprinkle'
13
- gem.homepage = "http://github.com/crafterm/sprinkle"
14
- gem.authors = ["Marcus Crafter"]
15
- gem.add_development_dependency("rspec", ">= 2.5")
16
- gem.add_dependency('activesupport', '>= 2.0.2')
17
- gem.add_dependency('highline', '>= 1.4.0')
18
- gem.add_dependency('capistrano', '>= 2.5.5')
19
-
20
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
21
- end
22
- Jeweler::GemcutterTasks.new
23
- rescue LoadError
24
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
25
- end
4
+ require 'rdoc/task'
5
+ require './lib/sprinkle/version'
26
6
 
27
7
  task "inst" => [:clobber, :build] do
28
8
  puts `gem install pkg/sprinkle-*.gem`
29
9
  end
30
10
 
31
- task :spec => :check_dependencies
32
-
33
11
  desc 'Default: run specs.'
34
12
  task :default => :spec
35
13
 
@@ -46,10 +24,8 @@ RSpec::Core::RakeTask.new(:coverage) do |t|
46
24
  t.rcov_opts = ['--exclude', 'spec']
47
25
  end
48
26
 
49
-
50
- require 'rake/rdoctask'
51
- Rake::RDocTask.new do |rdoc|
52
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
27
+ RDoc::Task.new do |rdoc|
28
+ version = Sprinkle::Version
53
29
 
54
30
  rdoc.rdoc_dir = 'rdoc'
55
31
  rdoc.title = "sprinkle #{version}"