Update various files to match current rails versions
authorTom Hughes <tom@compton.nu>
Thu, 13 May 2010 09:54:16 +0000 (10:54 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 13 May 2010 09:54:16 +0000 (10:54 +0100)
15 files changed:
config/boot.rb
config/initializers/inflections.rb
script/about
script/breakpointer [deleted file]
script/console
script/dbconsole
script/destroy
script/generate
script/performance/benchmarker
script/performance/profiler
script/performance/request [deleted file]
script/plugin
script/runner
script/server
script/yaml_to_spec [deleted file]

index 0ad0f787f865effe8a6bf3d922f3fa4730606bdd..dd5e3b69164003253fb4e7ddd153d210584ec2da 100644 (file)
@@ -82,8 +82,8 @@ module Rails
       end
 
       def load_rubygems
+        min_version = '1.3.2'
         require 'rubygems'
-        min_version = '1.3.1'
         unless rubygems_version >= min_version
           $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
           exit 1
index 09158b865ce15cc92ee0c5f54ddd6ce9612ff39e..d531b8bb8258b0f75e5b7c367b1988233e28c724 100644 (file)
@@ -2,7 +2,7 @@
 
 # Add new inflection rules using the following format 
 # (all these examples are active by default):
-# Inflector.inflections do |inflect|
+# ActiveSupport::Inflector.inflections do |inflect|
 #   inflect.plural /^(ox)$/i, '\1en'
 #   inflect.singular /^(ox)en/i, '\1'
 #   inflect.irregular 'person', 'people'
index 7b07d46a30131ad938be2400261b722ed82ef3cc..1eeb6eb915930bd1a133d746b7c21b6332309803 100755 (executable)
@@ -1,3 +1,4 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/about'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+$LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
+require 'commands/about'
diff --git a/script/breakpointer b/script/breakpointer
deleted file mode 100755 (executable)
index 64af76e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/breakpointer'
\ No newline at end of file
index 42f28f7d6d3d6510cb88436de2742ca323c51b07..235a1f2780496cc73fcb0f86702ab0b6e895fced 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/console'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/console'
index caa60ce829ad83a80a218144898a758a615611b1..83c8436a9d9003e3030beb0d8af6bd8264c29dfb 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
+require File.expand_path('../../config/boot',  __FILE__)
 require 'commands/dbconsole'
index fa0e6fcd0b2b2b4514f9042103e30d9613e64ae5..88d295f7aa0450ce4e43981c277a0697cbf06aba 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/destroy'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/destroy'
index ef976e09f35cee42521f7c4715550cddd5342bc3..62a8a4c0c533bc691bbefcb2bac15132c04a6a58 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/generate'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/generate'
index c842d35d339c45800583a252dc2dbe280d967ad9..3bff809fb39768822da7ebfc3ae8ffd9a8c05722 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot',  __FILE__)
 require 'commands/performance/benchmarker'
index d855ac8b1383a4a320fef98b75f33774e69207f8..07640575cd6fad5543f590e80a827cab50fd68d6 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
+require File.expand_path('../../../config/boot',  __FILE__)
 require 'commands/performance/profiler'
diff --git a/script/performance/request b/script/performance/request
deleted file mode 100755 (executable)
index ae3f38c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../../config/boot'
-require 'commands/performance/request'
index 26ca64c06b26fc7825788af9da56a50abeea0f60..b82201fa83385c3f0867baaacf9790b1069dcac4 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/plugin'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/plugin'
index ccc30f9d2436b5370ab9d28f15df94694f389a2c..be4c5d4572e9f5f4e01ecf3a038bc26540bd1a50 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/runner'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/runner'
index dfabcb88128f41f0fdab1711b696274e166f8bc0..b9fcb71793539daffc7f8a9587e8f3fa3026dd48 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../config/boot'
-require 'commands/server'
\ No newline at end of file
+require File.expand_path('../../config/boot',  __FILE__)
+require 'commands/server'
diff --git a/script/yaml_to_spec b/script/yaml_to_spec
deleted file mode 100755 (executable)
index 4577d91..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-require "yaml"
-
-buffer = []
-STDIN.each_line { |l| buffer << l }
-
-contexts = YAML::load(buffer.join("\n"))
-
-contexts.each do |context,specifications|
-  puts ""
-  puts "context \"#{context}\" do"
-  puts ""
-  specifications.each do |specification|
-    puts "  specify \"#{specification}\" do"
-    puts "    violated \"no assertions performed\""
-    puts "  end"
-    puts ""
-  end
-  puts "end"
-end
-