rails 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ *1.1.2* (April 9th, 2005)
2
+
3
+ * Added rake rails:update:configs to update config/boot.rb from the latest (also included in rake rails:update) [DHH]
4
+
5
+ * Fixed that boot.rb would set RAILS_GEM_VERSION twice, not respect an uncommented RAILS_GEM_VERSION line, and not use require_gem [DHH]
6
+
7
+
1
8
  *1.1.1* (April 6th, 2005)
2
9
 
3
10
  * Enhances plugin#discover allowing it to discover svn:// like URIs (closes #4565) [ruben.nine@gmail.com]
data/Rakefile CHANGED
@@ -279,10 +279,10 @@ spec = Gem::Specification.new do |s|
279
279
 
280
280
  s.add_dependency('rake', '>= 0.7.1')
281
281
  s.add_dependency('activesupport', '= 1.3.1' + PKG_BUILD)
282
- s.add_dependency('activerecord', '= 1.14.1' + PKG_BUILD)
282
+ s.add_dependency('activerecord', '= 1.14.2' + PKG_BUILD)
283
283
  s.add_dependency('actionpack', '= 1.12.1' + PKG_BUILD)
284
284
  s.add_dependency('actionmailer', '= 1.2.1' + PKG_BUILD)
285
- s.add_dependency('actionwebservice', '= 1.1.1' + PKG_BUILD)
285
+ s.add_dependency('actionwebservice', '= 1.1.2' + PKG_BUILD)
286
286
 
287
287
  s.rdoc_options << '--exclude' << '.'
288
288
  s.has_rdoc = false
@@ -312,116 +312,9 @@ task :pgem => [:gem] do
312
312
  end
313
313
 
314
314
  desc "Publish the release files to RubyForge."
315
- task :release => [:gem] do
316
- files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
317
-
318
- if RUBY_FORGE_PROJECT then
319
- require 'net/http'
320
- require 'open-uri'
321
-
322
- project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
323
- project_data = open(project_uri) { |data| data.read }
324
- group_id = project_data[/[?&]group_id=(\d+)/, 1]
325
- raise "Couldn't get group id" unless group_id
326
-
327
- # This echos password to shell which is a bit sucky
328
- if ENV["RUBY_FORGE_PASSWORD"]
329
- password = ENV["RUBY_FORGE_PASSWORD"]
330
- else
331
- print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
332
- password = STDIN.gets.chomp
333
- end
334
-
335
- login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
336
- data = [
337
- "login=1",
338
- "form_loginname=#{RUBY_FORGE_USER}",
339
- "form_pw=#{password}"
340
- ].join("&")
341
- http.post("/account/login.php", data)
342
- end
343
-
344
- cookie = login_response["set-cookie"]
345
- raise "Login failed" unless cookie
346
- headers = { "Cookie" => cookie }
347
-
348
- release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
349
- release_data = open(release_uri, headers) { |data| data.read }
350
- package_id = release_data[/[?&]package_id=(\d+)/, 1]
351
- raise "Couldn't get package id" unless package_id
352
-
353
- first_file = true
354
- release_id = ""
355
-
356
- files.each do |filename|
357
- basename = File.basename(filename)
358
- file_ext = File.extname(filename)
359
- file_data = File.open(filename, "rb") { |file| file.read }
360
-
361
- puts "Releasing #{basename}..."
362
-
363
- release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
364
- release_date = Time.now.strftime("%Y-%m-%d %H:%M")
365
- type_map = {
366
- ".zip" => "3000",
367
- ".tgz" => "3110",
368
- ".gz" => "3110",
369
- ".gem" => "1400"
370
- }; type_map.default = "9999"
371
- type = type_map[file_ext]
372
- boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
373
-
374
- query_hash = if first_file then
375
- {
376
- "group_id" => group_id,
377
- "package_id" => package_id,
378
- "release_name" => RELEASE_NAME,
379
- "release_date" => release_date,
380
- "type_id" => type,
381
- "processor_id" => "8000", # Any
382
- "release_notes" => "",
383
- "release_changes" => "",
384
- "preformatted" => "1",
385
- "submit" => "1"
386
- }
387
- else
388
- {
389
- "group_id" => group_id,
390
- "release_id" => release_id,
391
- "package_id" => package_id,
392
- "step2" => "1",
393
- "type_id" => type,
394
- "processor_id" => "8000", # Any
395
- "submit" => "Add This File"
396
- }
397
- end
398
-
399
- query = "?" + query_hash.map do |(name, value)|
400
- [name, URI.encode(value)].join("=")
401
- end.join("&")
402
-
403
- data = [
404
- "--" + boundary,
405
- "Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
406
- "Content-Type: application/octet-stream",
407
- "Content-Transfer-Encoding: binary",
408
- "", file_data, ""
409
- ].join("\x0D\x0A")
410
-
411
- release_headers = headers.merge(
412
- "Content-Type" => "multipart/form-data; boundary=#{boundary}"
413
- )
414
-
415
- target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
416
- http.post(target + query, data, release_headers)
417
- end
418
-
419
- if first_file then
420
- release_id = release_response.body[/release_id=(\d+)/, 1]
421
- raise("Couldn't get release id") unless release_id
422
- end
423
-
424
- first_file = false
425
- end
426
- end
427
- end
315
+ task :release => [ :gem ] do
316
+ `rubyforge login`
317
+ release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.gem"
318
+ puts release_command
319
+ system(release_command)
320
+ end
@@ -2,37 +2,43 @@
2
2
 
3
3
  unless defined?(RAILS_ROOT)
4
4
  root_path = File.join(File.dirname(__FILE__), '..')
5
+
5
6
  unless RUBY_PLATFORM =~ /mswin32/
6
7
  require 'pathname'
7
8
  root_path = Pathname.new(root_path).cleanpath(true).to_s
8
9
  end
10
+
9
11
  RAILS_ROOT = root_path
10
12
  end
11
13
 
12
- if File.directory?("#{RAILS_ROOT}/vendor/rails")
13
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
14
- else
15
- require 'rubygems'
14
+ unless defined?(Rails::Initializer)
15
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
16
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
17
+ else
18
+ require 'rubygems'
16
19
 
17
- if !defined?(RAILS_GEM_VERSION) && File.read(File.dirname(__FILE__) + '/environment.rb') =~ /RAILS_GEM_VERSION = '([\d.]+)'/
18
- RAILS_GEM_VERSION = $1
19
- end
20
+ environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
21
+ environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
22
+ rails_gem_version = $1
20
23
 
21
- if defined?(RAILS_GEM_VERSION)
22
- rails_gem = Gem.cache.search('rails', "=#{RAILS_GEM_VERSION}").first
24
+ if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
25
+ rails_gem = Gem.cache.search('rails', "=#{version}").first
23
26
 
24
- if rails_gem
25
- require rails_gem.full_gem_path + '/lib/initializer'
27
+ if rails_gem
28
+ require_gem "rails", "=#{version}"
29
+ require rails_gem.full_gem_path + '/lib/initializer'
30
+ else
31
+ STDERR.puts %(Cannot find gem for Rails =#{version}:
32
+ Install the missing gem with 'gem install -v=#{version} rails', or
33
+ change environment.rb to define RAILS_GEM_VERSION with your desired version.
34
+ )
35
+ exit 1
36
+ end
26
37
  else
27
- STDERR.puts %(Cannot find gem for Rails =#{RAILS_GEM_VERSION}:
28
- Install the missing gem with 'gem install -v=#{RAILS_GEM_VERSION} rails', or
29
- change environment.rb to define RAILS_GEM_VERSION with your desired version.
30
- )
31
- exit 1
38
+ require_gem "rails"
39
+ require 'initializer'
32
40
  end
33
- else
34
- require 'initializer'
35
41
  end
36
- end
37
42
 
38
- Rails::Initializer.run(:set_load_path)
43
+ Rails::Initializer.run(:set_load_path)
44
+ end
@@ -2,7 +2,7 @@ module Rails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -71,8 +71,8 @@ namespace :rails do
71
71
  rm_rf "vendor/rails"
72
72
  end
73
73
 
74
- desc "Update both scripts and public/javascripts from Rails"
75
- task :update => [ "update:scripts", "update:javascripts" ]
74
+ desc "Update both configs, scripts and public/javascripts from Rails"
75
+ task :update => [ "update:scripts", "update:javascripts", "update:configs" ]
76
76
 
77
77
  namespace :update do
78
78
  desc "Add new scripts to the application script/ directory"
@@ -102,5 +102,13 @@ namespace :rails do
102
102
  scripts.reject!{|s| File.basename(s) == 'application.js'} if File.exists?(project_dir + 'application.js')
103
103
  FileUtils.cp(scripts, project_dir)
104
104
  end
105
+
106
+ desc "Update boot/config.rb from your current rails install"
107
+ task :configs do
108
+ require 'railties_path'
109
+ project_dir = RAILS_ROOT + '/public/javascripts/'
110
+ scripts = Dir[RAILTIES_PATH + '/html/javascripts/*.js']
111
+ FileUtils.cp(RAILTIES_PATH + '/environments/boot.rb', RAILS_ROOT + '/config/boot.rb')
112
+ end
105
113
  end
106
114
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rails
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.1
7
- date: 2006-04-06 00:00:00 -05:00
6
+ version: 1.1.2
7
+ date: 2006-04-09 00:00:00 -05:00
8
8
  summary: Web-application framework with template engine, control-flow layer, and ORM.
9
9
  require_paths:
10
10
  - lib
@@ -284,7 +284,7 @@ dependencies:
284
284
  requirements:
285
285
  - - "="
286
286
  - !ruby/object:Gem::Version
287
- version: 1.14.1
287
+ version: 1.14.2
288
288
  version:
289
289
  - !ruby/object:Gem::Dependency
290
290
  name: actionpack
@@ -311,5 +311,5 @@ dependencies:
311
311
  requirements:
312
312
  - - "="
313
313
  - !ruby/object:Gem::Version
314
- version: 1.1.1
314
+ version: 1.1.2
315
315
  version: