public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
rails / railties / Rakefile
db045dbb » dhh 2004-11-23 Initial 1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4 require 'rake/gempackagetask'
5 require 'rake/contrib/rubyforgepublisher'
6
7 require 'date'
07989b64 » dhh 2005-01-01 Added automated rewriting o... 8 require 'rbconfig'
db045dbb » dhh 2004-11-23 Initial 9
584bec96 » dhh 2006-04-01 railties Rakefile refers to... 10 require File.join(File.dirname(__FILE__), 'lib/rails', 'version')
68a32200 » Marcel Molina 2005-10-09 Add versioning convention f... 11
db045dbb » dhh 2004-11-23 Initial 12 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
13 PKG_NAME = 'rails'
5cb2aa72 » Marcel Molina 2005-11-16 Rename Version constant to ... 14 PKG_VERSION = Rails::VERSION::STRING + PKG_BUILD
db045dbb » dhh 2004-11-23 Initial 15 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
16 PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
17
065cb2a0 » dhh 2005-03-27 Made ready for better relea... 18 RELEASE_NAME = "REL #{PKG_VERSION}"
19
20 RUBY_FORGE_PROJECT = "rails"
21 RUBY_FORGE_USER = "webster132"
22
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 23
f08da31a » jeremy 2007-09-25 Move Railties' Dispatcher t... 24 task :default => :test
25
e7eae2bd » NZKoz 2006-11-01 Interim test task for railt... 26 ## This is required until the regular test task
27 ## below passes. It's not ideal, but at least
28 ## we can see the failures
29 task :test do
30 Dir['test/**/*_test.rb'].all? do |file|
f732c168 » jeremy 2009-02-27 Invoke tests with the same ... 31 ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
32 system(ruby, '-Itest', file)
e7eae2bd » NZKoz 2006-11-01 Interim test task for railt... 33 end or raise "Failures"
34 end
35
36 Rake::TestTask.new("regular_test") do |t|
dafd5c14 » jeremy 2006-08-29 make the railties test task... 37 t.libs << 'test'
38 t.pattern = 'test/**/*_test.rb'
39 t.warning = true
40 t.verbose = true
41 end
f29ce1f3 » jeremy 2005-07-12 r3023@asus: jeremy | 2005... 42
43
c6d60825 » dhh 2007-02-22 Added config/initializers w... 44 BASE_DIRS = %w(
45 app
46 config/environments
47 config/initializers
d9b92ee1 » dhh 2008-11-18 Added config.i18n settings ... 48 config/locales
c6d60825 » dhh 2007-02-22 Added config/initializers w... 49 db
50 doc
51 log
52 lib
53 lib/tasks
54 public
55 script
56 script/performance
57 test
58 vendor
59 vendor/plugins
60 tmp/sessions
61 tmp/cache
62 tmp/sockets
63 tmp/pids
1aea4704 » dhh 2006-02-25 Added tmp/sessions, tmp/cac... 64 )
65
7376da4a » dhh 2005-10-28 Removed app/apis as a defau... 66 APP_DIRS = %w( models controllers helpers views views/layouts )
614e14d8 » dhh 2005-02-24 Drop the _doc nonsense and ... 67 PUBLIC_DIRS = %w( images javascripts stylesheets )
38ea84aa » dhh 2005-02-27 Fixed test/mocks/testing to... 68 TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 69
82455881 » dhh 2005-02-20 Added lighttpd config examp... 70 LOG_FILES = %w( server.log development.log test.log production.log )
959a1fc2 » dhh 2007-09-24 Added a default 422.html pa... 71 HTML_FILES = %w( 422.html 404.html 500.html index.html robots.txt favicon.ico images/rails.png
045f5fd0 » dhh 2006-03-04 Added public/javascripts/ap... 72 javascripts/prototype.js javascripts/application.js
d47f3bcb » madrobby 2005-10-31 Change javascript_include_t... 73 javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
3b3c0507 » dhh 2008-11-30 Extracted the process scrip... 74 BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler runner server plugin )
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 75
3397d971 » jeremy 2007-10-15 Complete AWS -> ARes change... 76 VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport activeresource railties )
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 77
78
db045dbb » dhh 2004-11-23 Initial 79 desc "Generates a fresh Rails package with documentation"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 80 task :fresh_rails => [ :clean, :make_dir_structure, :initialize_file_stubs, :copy_vendor_libraries, :copy_ties_content, :generate_documentation ]
db045dbb » dhh 2004-11-23 Initial 81
82 desc "Generates a fresh Rails package using GEMs with documentation"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 83 task :fresh_gem_rails => [ :clean, :make_dir_structure, :initialize_file_stubs, :copy_ties_content, :copy_gem_environment ]
db045dbb » dhh 2004-11-23 Initial 84
85 desc "Generates a fresh Rails package without documentation (faster)"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 86 task :fresh_rails_without_docs => [ :clean, :make_dir_structure, :initialize_file_stubs, :copy_vendor_libraries, :copy_ties_content ]
db045dbb » dhh 2004-11-23 Initial 87
52251baa » dhh 2005-01-13 Added the option to specify... 88 desc "Generates a fresh Rails package without documentation (faster)"
89 task :fresh_rails_without_docs_using_links => [ :clean, :make_dir_structure, :initialize_file_stubs, :link_vendor_libraries, :copy_ties_content ]
90
dc3d6eb9 » dhh 2005-02-15 Moved Active Support into i... 91 desc "Generates minimal Rails package using symlinks"
92 task :dev => [ :clean, :make_dir_structure, :initialize_file_stubs, :link_vendor_libraries, :copy_ties_content ]
93
db045dbb » dhh 2004-11-23 Initial 94 desc "Packages the fresh Rails package with documentation"
95 task :package => [ :clean, :fresh_rails ] do
96 system %{cd ..; tar -czvf #{PKG_NAME}-#{PKG_VERSION}.tgz #{PKG_NAME}}
97 system %{cd ..; zip -r #{PKG_NAME}-#{PKG_VERSION}.zip #{PKG_NAME}}
98 end
99
100 task :clean do
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 101 rm_rf PKG_DESTINATION
db045dbb » dhh 2004-11-23 Initial 102 end
103
12ff2f76 » dhh 2005-07-01 Rake task to update spin of... 104 # Get external spinoffs -------------------------------------------------------------------
105
106 desc "Updates railties to the latest version of the javascript spinoffs"
bd11ca37 » dhh 2005-07-06 Keep JS files locally 107 task :update_js do
e3bfd08c » dhh 2006-03-04 Fixed Effect.Appear in effe... 108 for js in %w( prototype controls dragdrop effects )
bd11ca37 » dhh 2005-07-06 Keep JS files locally 109 rm "html/javascripts/#{js}.js"
110 cp "./../actionpack/lib/action_view/helpers/javascripts/#{js}.js", "html/javascripts"
111 end
112 end
db045dbb » dhh 2004-11-23 Initial 113
114 # Make directory structure ----------------------------------------------------------------
115
91317ad6 » jeremy 2006-07-07 make_dest_dirs rake task us... 116 def make_dest_dirs(dirs, path = '.')
3e734490 » dhh 2006-03-27 Make release rake work on 1... 117 mkdir_p dirs.map { |dir| File.join(PKG_DESTINATION, path.to_s, dir) }
db045dbb » dhh 2004-11-23 Initial 118 end
119
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 120 desc "Make the directory structure for the new Rails application"
121 task :make_dir_structure => [ :make_base_dirs, :make_app_dirs, :make_public_dirs, :make_test_dirs ]
db045dbb » dhh 2004-11-23 Initial 122
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 123 task(:make_base_dirs) { make_dest_dirs BASE_DIRS }
124 task(:make_app_dirs) { make_dest_dirs APP_DIRS, 'app' }
125 task(:make_public_dirs) { make_dest_dirs PUBLIC_DIRS, 'public' }
126 task(:make_test_dirs) { make_dest_dirs TEST_DIRS, 'test' }
db045dbb » dhh 2004-11-23 Initial 127
128
129 # Initialize file stubs -------------------------------------------------------------------
130
131 desc "Initialize empty file stubs (such as for logging)"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 132 task :initialize_file_stubs => [ :initialize_log_files ]
db045dbb » dhh 2004-11-23 Initial 133
134 task :initialize_log_files do
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 135 log_dir = File.join(PKG_DESTINATION, 'log')
136 chmod 0777, log_dir
137 LOG_FILES.each do |log_file|
138 log_path = File.join(log_dir, log_file)
139 touch log_path
62f0512e » dhh 2005-01-15 Fixed log file permissions ... 140 chmod 0666, log_path
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 141 end
db045dbb » dhh 2004-11-23 Initial 142 end
143
144
145 # Copy Vendors ----------------------------------------------------------------------------
146
147 desc "Copy in all the Rails packages to vendor"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 148 task :copy_vendor_libraries do
20e3cfe5 » dhh 2005-03-20 Combined the script/environ... 149 mkdir File.join(PKG_DESTINATION, 'vendor', 'rails')
eb73846f » dhh 2005-03-20 Fixed stuff for vendor/rails 150 VENDOR_LIBS.each { |dir| cp_r File.join('..', dir), File.join(PKG_DESTINATION, 'vendor', 'rails', dir) }
fddd33b8 » dhh 2006-03-18 Do not include .svn files i... 151 FileUtils.rm_r(Dir.glob(File.join(PKG_DESTINATION, 'vendor', 'rails', "**", ".svn")))
db045dbb » dhh 2004-11-23 Initial 152 end
153
52251baa » dhh 2005-01-13 Added the option to specify... 154 desc "Link in all the Rails packages to vendor"
155 task :link_vendor_libraries do
eb73846f » dhh 2005-03-20 Fixed stuff for vendor/rails 156 mkdir File.join(PKG_DESTINATION, 'vendor', 'rails')
157 VENDOR_LIBS.each { |dir| ln_s File.join('..', '..', '..', dir), File.join(PKG_DESTINATION, 'vendor', 'rails', dir) }
52251baa » dhh 2005-01-13 Added the option to specify... 158 end
159
db045dbb » dhh 2004-11-23 Initial 160
161 # Copy Ties Content -----------------------------------------------------------------------
162
163 desc "Make copies of all the default content of ties"
164 task :copy_ties_content => [
4d9cda57 » dhh 2004-12-15 Renamed AbstractApplication... 165 :copy_rootfiles, :copy_dispatches, :copy_html_files, :copy_application,
847436a4 » dhh 2005-02-24 Drop the _doc nonsense and ... 166 :copy_configs, :copy_binfiles, :copy_test_helpers, :copy_app_doc_readme ]
db045dbb » dhh 2004-11-23 Initial 167
168 task :copy_dispatches do
07989b64 » dhh 2005-01-01 Added automated rewriting o... 169 copy_with_rewritten_ruby_path("dispatches/dispatch.rb", "#{PKG_DESTINATION}/public/dispatch.rb")
db045dbb » dhh 2004-11-23 Initial 170 chmod 0755, "#{PKG_DESTINATION}/public/dispatch.rb"
171
07989b64 » dhh 2005-01-01 Added automated rewriting o... 172 copy_with_rewritten_ruby_path("dispatches/dispatch.rb", "#{PKG_DESTINATION}/public/dispatch.cgi")
db045dbb » dhh 2004-11-23 Initial 173 chmod 0755, "#{PKG_DESTINATION}/public/dispatch.cgi"
174
07989b64 » dhh 2005-01-01 Added automated rewriting o... 175 copy_with_rewritten_ruby_path("dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi")
db045dbb » dhh 2004-11-23 Initial 176 chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi"
177 end
178
179 task :copy_html_files do
eb27b744 » dhh 2005-03-26 Copy prototype.js to public... 180 HTML_FILES.each { |file| cp File.join('html', file), File.join(PKG_DESTINATION, 'public', file) }
db045dbb » dhh 2004-11-23 Initial 181 end
182
4d9cda57 » dhh 2004-12-15 Renamed AbstractApplication... 183 task :copy_application do
fcce1f17 » dhh 2008-11-17 BACKWARDS INCOMPATIBLE: Ren... Comment 184 cp "helpers/application_controller.rb", "#{PKG_DESTINATION}/app/controllers/application_controller.rb"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 185 cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb"
db045dbb » dhh 2004-11-23 Initial 186 end
187
188 task :copy_configs do
98c1735f » seckar 2005-10-16 Fix rake dev and related co... 189 app_name = "rails"
190 socket = nil
191 require 'erb'
f8f22dac » christophercurrie 2008-10-25 Update non-gems distributio... 192 File.open("#{PKG_DESTINATION}/config/database.yml", 'w') {|f| f.write ERB.new(IO.read("configs/databases/sqlite3.yml"), nil, '-').result(binding)}
98c1735f » seckar 2005-10-16 Fix rake dev and related co... 193
b1999be5 » dhh 2005-02-14 A hopefully more successful... 194 cp "configs/routes.rb", "#{PKG_DESTINATION}/config/routes.rb"
db045dbb » dhh 2004-11-23 Initial 195
f42c77f9 » dhh 2008-11-22 Added ActiveSupport::Backtr... Comment 196 cp "configs/initializers/backtrace_silencers.rb", "#{PKG_DESTINATION}/config/initializers/backtrace_silencers.rb"
197 cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/config/initializers/inflections.rb"
198 cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/config/initializers/mime_types.rb"
199 cp "configs/initializers/new_rails_defaults.rb", "#{PKG_DESTINATION}/config/initializers/new_rails_defaults.rb"
7bf757d8 » dhh 2007-02-22 Include two default initial... 200
d9b92ee1 » dhh 2008-11-18 Added config.i18n settings ... 201 cp "configs/locales/en.yml", "#{PKG_DESTINATION}/config/locales/en.yml"
202
7bf757d8 » dhh 2007-02-22 Include two default initial... 203 cp "environments/boot.rb", "#{PKG_DESTINATION}/config/boot.rb"
20e3cfe5 » dhh 2005-03-20 Combined the script/environ... 204 cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb"
7bf757d8 » dhh 2007-02-22 Include two default initial... 205 cp "environments/production.rb", "#{PKG_DESTINATION}/config/environments/production.rb"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 206 cp "environments/development.rb", "#{PKG_DESTINATION}/config/environments/development.rb"
7bf757d8 » dhh 2007-02-22 Include two default initial... 207 cp "environments/test.rb", "#{PKG_DESTINATION}/config/environments/test.rb"
db045dbb » dhh 2004-11-23 Initial 208 end
209
bf0e37b3 » dhh 2004-12-09 Added preliminary remote br... 210 task :copy_binfiles do
211 BIN_FILES.each do |file|
212 dest_file = File.join(PKG_DESTINATION, 'script', file)
07989b64 » dhh 2005-01-01 Added automated rewriting o... 213 copy_with_rewritten_ruby_path(File.join('bin', file), dest_file)
bf0e37b3 » dhh 2004-12-09 Added preliminary remote br... 214 chmod 0755, dest_file
215 end
216 end
217
db045dbb » dhh 2004-11-23 Initial 218 task :copy_rootfiles do
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 219 cp "fresh_rakefile", "#{PKG_DESTINATION}/Rakefile"
220 cp "README", "#{PKG_DESTINATION}/README"
cf78e736 » dhh 2004-12-17 git-svn-id: http://svn-comm... 221 cp "CHANGELOG", "#{PKG_DESTINATION}/CHANGELOG"
db045dbb » dhh 2004-11-23 Initial 222 end
223
224 task :copy_test_helpers do
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 225 cp "helpers/test_helper.rb", "#{PKG_DESTINATION}/test/test_helper.rb"
db045dbb » dhh 2004-11-23 Initial 226 end
227
228 task :copy_app_doc_readme do
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 229 cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP"
db045dbb » dhh 2004-11-23 Initial 230 end
231
07989b64 » dhh 2005-01-01 Added automated rewriting o... 232 def copy_with_rewritten_ruby_path(src_file, dest_file)
233 ruby = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
234
235 File.open(dest_file, 'w') do |df|
236 File.open(src_file) do |sf|
237 line = sf.gets
238 if (line =~ /#!.+ruby\s*/) != nil
239 df.puts("#!#{ruby}")
240 else
241 df.puts(line)
242 end
243 df.write(sf.read)
244 end
245 end
246 end
247
96d61055 » lifo 2009-02-05 Merge docrails along with t... 248 desc 'Generate guides (for authors), use ONLY=foo to process just "foo.textile"'
249 task :guides do
250 ruby "guides/rails_guides.rb"
251 end
252
db045dbb » dhh 2004-11-23 Initial 253
254 # Generate documentation ------------------------------------------------------------------
255
256 desc "Generate documentation for the framework and for the empty application"
14b80d0f » dhh 2004-11-25 Cleaned up the Rakefile 257 task :generate_documentation => [ :generate_app_doc, :generate_rails_framework_doc ]
db045dbb » dhh 2004-11-23 Initial 258
259 task :generate_rails_framework_doc do
0068a8a1 » dhh 2007-10-04 Remember these for the next... 260 system %{cd #{PKG_DESTINATION}; rake doc:rails}
db045dbb » dhh 2004-11-23 Initial 261 end
262
263 task :generate_app_doc do
7013d9e5 » dhh 2008-05-11 Fix generate_app_doc task (... 264 cp "doc/README_FOR_APP", "#{PKG_DESTINATION}/doc/README_FOR_APP"
0068a8a1 » dhh 2007-10-04 Remember these for the next... 265 system %{cd #{PKG_DESTINATION}; rake doc:app}
db045dbb » dhh 2004-11-23 Initial 266 end
267
ae294afa » jamis 2005-10-15 Documentation updates/fixes... 268 Rake::RDocTask.new { |rdoc|
269 rdoc.rdoc_dir = 'doc'
270 rdoc.title = "Railties -- Gluing the Engine to the Rails"
1e216b1d » dhh 2006-02-18 Updated RDocTask to receive... 271 rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=object'
d8b67f7f » jeremy 2007-05-28 Generate rdoc with utf-8 ch... 272 rdoc.options << '--charset' << 'utf-8'
a02d672c » jeremy 2008-06-22 Horo rdoc template 273 rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : '../doc/template/horo'
ae294afa » jamis 2005-10-15 Documentation updates/fixes... 274 rdoc.rdoc_files.include('README', 'CHANGELOG')
275 rdoc.rdoc_files.include('lib/*.rb')
803f41e9 » jeremy 2008-06-18 Add lib/rails/*.rb to rdoc 276 rdoc.rdoc_files.include('lib/rails/*.rb')
ae294afa » jamis 2005-10-15 Documentation updates/fixes... 277 rdoc.rdoc_files.include('lib/rails_generator/*.rb')
278 rdoc.rdoc_files.include('lib/commands/**/*.rb')
279 }
db045dbb » dhh 2004-11-23 Initial 280
281 # Generate GEM ----------------------------------------------------------------------------
282
283 task :copy_gem_environment do
20e3cfe5 » dhh 2005-03-20 Combined the script/environ... 284 cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb"
6d7175d6 » dhh 2005-01-24 Fixed that script/breakpoin... 285 chmod 0755, dest_file
db045dbb » dhh 2004-11-23 Initial 286 end
287
288
289 PKG_FILES = FileList[
290 '[a-zA-Z]*',
291 'bin/**/*',
60936c5c » sstephenson 2005-12-05 Add builtin/ to the gemspec... 292 'builtin/**/*',
db045dbb » dhh 2004-11-23 Initial 293 'configs/**/*',
294 'doc/**/*',
295 'dispatches/**/*',
296 'environments/**/*',
297 'helpers/**/*',
cf718eb7 » dhh 2004-12-16 Shouldnt have removed gener... 298 'generators/**/*',
db045dbb » dhh 2004-11-23 Initial 299 'html/**/*',
300 'lib/**/*'
4ece57cf » dhh 2006-09-15 Dont run tests on gem creation 301 ] - [ 'test' ]
db045dbb » dhh 2004-11-23 Initial 302
303 spec = Gem::Specification.new do |s|
7f53d048 » jeremy 2007-12-18 RubyGems 0.9.5 compat: alwa... 304 s.platform = Gem::Platform::RUBY
db045dbb » dhh 2004-11-23 Initial 305 s.name = 'rails'
306 s.version = PKG_VERSION
307 s.summary = "Web-application framework with template engine, control-flow layer, and ORM."
308 s.description = <<-EOF
309 Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick
4259199c » dhh 2005-07-11 Made ready for release of 0... 310 on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates.
db045dbb » dhh 2004-11-23 Initial 311 EOF
312
57c31a38 » dhh 2008-10-23 Prepare for Rails 2.2.0 [RC1] Comment 313 s.add_dependency('rake', '>= 0.8.3')
73fc42cc » dhh 2009-03-15 Prepare for final 2.3 release Comment 314 s.add_dependency('activesupport', '= 2.3.2' + PKG_BUILD)
315 s.add_dependency('activerecord', '= 2.3.2' + PKG_BUILD)
316 s.add_dependency('actionpack', '= 2.3.2' + PKG_BUILD)
317 s.add_dependency('actionmailer', '= 2.3.2' + PKG_BUILD)
318 s.add_dependency('activeresource', '= 2.3.2' + PKG_BUILD)
db045dbb » dhh 2004-11-23 Initial 319
575ad6d4 » dhh 2005-02-15 Dont generate rdoc for rail... 320 s.rdoc_options << '--exclude' << '.'
b64c26ad » dhh 2004-12-16 Updated documentation 321 s.has_rdoc = false
322
83c668f3 » dhh 2004-12-15 Make Railties *not* include... 323 s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')}
db045dbb » dhh 2004-11-23 Initial 324 s.require_path = 'lib'
325 s.bindir = "bin" # Use these for applications.
326 s.executables = ["rails"]
327 s.default_executable = "rails"
328
329 s.author = "David Heinemeier Hansson"
330 s.email = "david@loudthinking.com"
331 s.homepage = "http://www.rubyonrails.org"
332 s.rubyforge_project = "rails"
333 end
334
335 Rake::GemPackageTask.new(spec) do |pkg|
4ece57cf » dhh 2006-09-15 Dont run tests on gem creation 336 pkg.gem_spec = spec
db045dbb » dhh 2004-11-23 Initial 337 end
338
065cb2a0 » dhh 2005-03-27 Made ready for better relea... 339
340 # Publishing -------------------------------------------------------
15c3fc8d » jeremy 2008-06-18 Add dummy pdoc task to rail... 341 desc "Publish the rails gem"
db045dbb » dhh 2004-11-23 Initial 342 task :pgem => [:gem] do
eec6e0cb » dhh 2008-10-23 Push to new gem server 343 Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
5366e614 » dhh 2008-10-23 Proper update call for gem ... 344 `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
065cb2a0 » dhh 2005-03-27 Made ready for better relea... 345 end
346
713b9c6a » dhh 2009-03-05 Push the guides 347 desc "Publish the guides"
348 task :pguides => :guides do
349 mkdir_p 'pkg'
350 `tar -czf pkg/guides.gz guides/output`
351 Rake::SshFilePublisher.new("web.rubyonrails.org", "/u/sites/guides.rubyonrails.org/public", "pkg", "guides.gz").upload
352 `ssh web.rubyonrails.org 'cd /u/sites/guides.rubyonrails.org/public/ && tar -xvzf guides.gz && mv guides/output/* . && rm -rf guides*'`
15c3fc8d » jeremy 2008-06-18 Add dummy pdoc task to rail... 353 end
354
065cb2a0 » dhh 2005-03-27 Made ready for better relea... 355 desc "Publish the release files to RubyForge."
635c7f43 » dhh 2007-04-21 Run with the latest version... 356 task :release => [ :package ] do
357 require 'rubyforge'
358
359 packages = %w( gem ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
360
361 rubyforge = RubyForge.new
362 rubyforge.login
363 rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
f08da31a » jeremy 2007-09-25 Move Railties' Dispatcher t... 364 end