rails 1.2.4 → 1.2.5

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.2.5* (October 12th, 2007)
2
+
3
+ * Correct RAILS_GEM_VERSION regexp. Use =version gem requirement instead of ~>version so you don't get surprised by a beta gem in production. This change means upgrading to 1.2.5 will require a boot.rb upgrade. [Jeremy Kemper]
4
+
5
+ * Move custom inflections example so available before route generation. #6829 [dcmanges, Nate, piotrb]
6
+
7
+
1
8
  *1.2.4* (October 4th, 2007)
2
9
 
3
10
  * Add a new rake task to aid debugging of named routes.
data/README CHANGED
@@ -64,9 +64,38 @@ please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
64
64
 
65
65
  == Debugging Rails
66
66
 
67
- Have "tail -f" commands running on the server.log and development.log. Rails will
68
- automatically display debugging and runtime information to these files. Debugging
69
- info will also be shown in the browser on requests from 127.0.0.1.
67
+ Sometimes your application goes wrong. Fortunately there are a lot of tools that
68
+ will help you debug it and get it back on the rails.
69
+
70
+ First area to check is the application log files. Have "tail -f" commands running
71
+ on the server.log and development.log. Rails will automatically display debugging
72
+ and runtime information to these files. Debugging info will also be shown in the
73
+ browser on requests from 127.0.0.1.
74
+
75
+ You can also log your own messages directly into the log file from your code using
76
+ the Ruby logger class from inside your controllers. Example:
77
+
78
+ class WeblogController < ActionController::Base
79
+ def destroy
80
+ @weblog = Weblog.find(params[:id])
81
+ @weblog.destroy
82
+ logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
83
+ end
84
+ end
85
+
86
+ The result will be a message in your log file along the lines of:
87
+
88
+ Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
89
+
90
+ More information on how to use the logger is at http://www.ruby-doc.org/core/
91
+
92
+ Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
93
+
94
+ * The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
95
+ * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
96
+
97
+ These two online (and free) books will bring you up to speed on the Ruby language
98
+ and also on programming in general.
70
99
 
71
100
 
72
101
  == Breakpoints
data/Rakefile CHANGED
@@ -288,11 +288,11 @@ spec = Gem::Specification.new do |s|
288
288
  EOF
289
289
 
290
290
  s.add_dependency('rake', '>= 0.7.2')
291
- s.add_dependency('activesupport', '= 1.4.3' + PKG_BUILD)
292
- s.add_dependency('activerecord', '= 1.15.4' + PKG_BUILD)
293
- s.add_dependency('actionpack', '= 1.13.4' + PKG_BUILD)
294
- s.add_dependency('actionmailer', '= 1.3.4' + PKG_BUILD)
295
- s.add_dependency('actionwebservice', '= 1.2.4' + PKG_BUILD)
291
+ s.add_dependency('activesupport', '= 1.4.4' + PKG_BUILD)
292
+ s.add_dependency('activerecord', '= 1.15.5' + PKG_BUILD)
293
+ s.add_dependency('actionpack', '= 1.13.5' + PKG_BUILD)
294
+ s.add_dependency('actionmailer', '= 1.3.5' + PKG_BUILD)
295
+ s.add_dependency('actionwebservice', '= 1.2.5' + PKG_BUILD)
296
296
 
297
297
  s.rdoc_options << '--exclude' << '.'
298
298
  s.has_rdoc = false
@@ -8,20 +8,23 @@ unless defined?(Rails::Initializer)
8
8
  else
9
9
  require 'rubygems'
10
10
 
11
- environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
12
- environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
13
- rails_gem_version = $1
11
+ rails_gem_version =
12
+ if defined? RAILS_GEM_VERSION
13
+ RAILS_GEM_VERSION
14
+ else
15
+ File.read("#{File.dirname(__FILE__)}/environment.rb") =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/
16
+ $1
17
+ end
14
18
 
15
- if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
16
- # Asking for 1.1.6 will give you 1.1.6.5206, if available -- makes it easier to use beta gems
17
- rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |g| g.version.version }.last
19
+ if rails_gem_version
20
+ rails_gem = Gem.cache.search('rails', "=#{rails_gem_version}.0").sort_by { |g| g.version.version }.last
18
21
 
19
22
  if rails_gem
20
23
  gem "rails", "=#{rails_gem.version.version}"
21
24
  require rails_gem.full_gem_path + '/lib/initializer'
22
25
  else
23
- STDERR.puts %(Cannot find gem for Rails ~>#{version}.0:
24
- Install the missing gem with 'gem install -v=#{version} rails', or
26
+ STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0:
27
+ Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or
25
28
  change environment.rb to define RAILS_GEM_VERSION with your desired version.
26
29
  )
27
30
  exit 1
@@ -1,6 +1,6 @@
1
1
  # Be sure to restart your web server when you modify this file.
2
2
 
3
- # Uncomment below to force Rails into production mode when
3
+ # Uncomment below to force Rails into production mode when
4
4
  # you don't control web/app server and can't set it the proper way
5
5
  # ENV['RAILS_ENV'] ||= 'production'
6
6
 
@@ -12,7 +12,7 @@ require File.join(File.dirname(__FILE__), 'boot')
12
12
 
13
13
  Rails::Initializer.run do |config|
14
14
  # Settings in config/environments/* take precedence over those specified here
15
-
15
+
16
16
  # Skip frameworks you're not going to use (only works if using vendor/rails)
17
17
  # config.frameworks -= [ :action_web_service, :action_mailer ]
18
18
 
@@ -22,7 +22,7 @@ Rails::Initializer.run do |config|
22
22
  # Add additional load paths for your own custom dirs
23
23
  # config.load_paths += %W( #{RAILS_ROOT}/extras )
24
24
 
25
- # Force all environments to use the same logger level
25
+ # Force all environments to use the same logger level
26
26
  # (by default production uses :info, the others :debug)
27
27
  # config.log_level = :debug
28
28
 
@@ -31,7 +31,7 @@ Rails::Initializer.run do |config|
31
31
  # config.action_controller.session_store = :active_record_store
32
32
 
33
33
  # Use SQL instead of Active Record's schema dumper when creating the test database.
34
- # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
35
35
  # like if you have constraints or database-specific column types
36
36
  # config.active_record.schema_format = :sql
37
37
 
@@ -40,21 +40,21 @@ Rails::Initializer.run do |config|
40
40
 
41
41
  # Make Active Record use UTC-base instead of local time
42
42
  # config.active_record.default_timezone = :utc
43
-
43
+
44
+ # Add new inflection rules using the following format
45
+ # (all these examples are active by default):
46
+ # Inflector.inflections do |inflect|
47
+ # inflect.plural /^(ox)$/i, '\1en'
48
+ # inflect.singular /^(ox)en/i, '\1'
49
+ # inflect.irregular 'person', 'people'
50
+ # inflect.uncountable %w( fish sheep )
51
+ # end
52
+
44
53
  # See Rails::Configuration for more options
45
54
  end
46
55
 
47
- # Add new inflection rules using the following format
48
- # (all these examples are active by default):
49
- # Inflector.inflections do |inflect|
50
- # inflect.plural /^(ox)$/i, '\1en'
51
- # inflect.singular /^(ox)en/i, '\1'
52
- # inflect.irregular 'person', 'people'
53
- # inflect.uncountable %w( fish sheep )
54
- # end
55
-
56
56
  # Add new mime types for use in respond_to blocks:
57
57
  # Mime::Type.register "text/richtext", :rtf
58
58
  # Mime::Type.register "application/x-mobile", :mobile
59
59
 
60
- # Include your application configuration below
60
+ # Include your application configuration below
@@ -2,7 +2,7 @@ module Rails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -36,6 +36,7 @@ class ScaffoldResourceGenerator < Rails::Generator::NamedBase
36
36
  m.directory(File.join('app/controllers', controller_class_path))
37
37
  m.directory(File.join('app/helpers', controller_class_path))
38
38
  m.directory(File.join('app/views', controller_class_path, controller_file_name))
39
+ m.directory(File.join('app/views/layouts', controller_class_path))
39
40
  m.directory(File.join('test/functional', controller_class_path))
40
41
  m.directory(File.join('test/unit', class_path))
41
42
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rails
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.4
7
- date: 2007-10-04 00:00:00 -05:00
6
+ version: 1.2.5
7
+ date: 2007-10-12 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
@@ -317,7 +317,7 @@ dependencies:
317
317
  requirements:
318
318
  - - "="
319
319
  - !ruby/object:Gem::Version
320
- version: 1.4.3
320
+ version: 1.4.4
321
321
  version:
322
322
  - !ruby/object:Gem::Dependency
323
323
  name: activerecord
@@ -326,7 +326,7 @@ dependencies:
326
326
  requirements:
327
327
  - - "="
328
328
  - !ruby/object:Gem::Version
329
- version: 1.15.4
329
+ version: 1.15.5
330
330
  version:
331
331
  - !ruby/object:Gem::Dependency
332
332
  name: actionpack
@@ -335,7 +335,7 @@ dependencies:
335
335
  requirements:
336
336
  - - "="
337
337
  - !ruby/object:Gem::Version
338
- version: 1.13.4
338
+ version: 1.13.5
339
339
  version:
340
340
  - !ruby/object:Gem::Dependency
341
341
  name: actionmailer
@@ -344,7 +344,7 @@ dependencies:
344
344
  requirements:
345
345
  - - "="
346
346
  - !ruby/object:Gem::Version
347
- version: 1.3.4
347
+ version: 1.3.5
348
348
  version:
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: actionwebservice
@@ -353,5 +353,5 @@ dependencies:
353
353
  requirements:
354
354
  - - "="
355
355
  - !ruby/object:Gem::Version
356
- version: 1.2.4
356
+ version: 1.2.5
357
357
  version: