aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/bin/rails2
-rw-r--r--railties/lib/rails/engine.rb12
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb1
-rw-r--r--railties/lib/rails/info.rb4
-rw-r--r--railties/railties.gemspec3
-rw-r--r--railties/test/generators/app_generator_test.rb3
6 files changed, 15 insertions, 10 deletions
diff --git a/railties/bin/rails b/railties/bin/rails
new file mode 100644
index 0000000000..a7d6938e0d
--- /dev/null
+++ b/railties/bin/rails
@@ -0,0 +1,2 @@
+#!/usr/bin/env ruby
+require "rails/cli" \ No newline at end of file
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 52c89274e7..bf57a034b2 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -538,15 +538,9 @@ module Rails
end
initializer :append_assets_path do |app|
- if app.config.assets.respond_to?(:prepend_path)
- app.config.assets.prepend_path(*paths["vendor/assets"].existent)
- app.config.assets.prepend_path(*paths["lib/assets"].existent)
- app.config.assets.prepend_path(*paths["app/assets"].existent)
- else
- app.config.assets.paths.unshift(*paths["vendor/assets"].existent)
- app.config.assets.paths.unshift(*paths["lib/assets"].existent)
- app.config.assets.paths.unshift(*paths["app/assets"].existent)
- end
+ app.config.assets.paths.unshift(*paths["vendor/assets"].existent)
+ app.config.assets.paths.unshift(*paths["lib/assets"].existent)
+ app.config.assets.paths.unshift(*paths["app/assets"].existent)
end
initializer :prepend_helpers_path do |app|
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 242677cc65..6af9d299aa 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -88,6 +88,7 @@ module Rails
def lib
empty_directory "lib"
empty_directory_with_gitkeep "lib/tasks"
+ empty_directory_with_gitkeep "lib/assets"
end
def log
diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb
index d05e031f56..a1e15092b2 100644
--- a/railties/lib/rails/info.rb
+++ b/railties/lib/rails/info.rb
@@ -78,6 +78,10 @@ module Rails
Rails::VERSION::STRING
end
+ property 'JavaScript Runtime' do
+ ExecJS.runtime.name
+ end
+
# Versions of each Rails framework (Active Record, Action Pack,
# Active Resource, Action Mailer, and Active Support).
frameworks.each do |framework|
diff --git a/railties/railties.gemspec b/railties/railties.gemspec
index 9c535f4f90..b917128885 100644
--- a/railties/railties.gemspec
+++ b/railties/railties.gemspec
@@ -15,6 +15,9 @@ Gem::Specification.new do |s|
s.files = Dir['CHANGELOG', 'README.rdoc', 'bin/**/*', 'guides/**/*', 'lib/**/{*,.[a-z]*}']
s.require_path = 'lib'
+ s.bindir = 'bin'
+ s.executables = ['rails']
+
s.rdoc_options << '--exclude' << '.'
s.add_dependency('rake', '>= 0.8.7')
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 03d185165f..86217f4ab9 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -10,6 +10,7 @@ DEFAULT_APP_FILES = %w(
config.ru
app/assets/javascripts
app/assets/stylesheets
+ app/assets/images
app/controllers
app/helpers
app/mailers
@@ -22,8 +23,8 @@ DEFAULT_APP_FILES = %w(
doc
lib
lib/tasks
+ lib/assets
log
- app/assets/images
script/rails
test/fixtures
test/functional