themes_for_rails 0.5.1 → 1.0.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/.rvmrc +1 -0
  2. data/Gemfile.lock +82 -60
  3. data/README.textile +235 -11
  4. data/Rakefile +31 -11
  5. data/init.rb +1 -0
  6. data/lib/generators/themes_for_rails/install_generator.rb +21 -6
  7. data/lib/generators/themes_for_rails/templates/README +11 -0
  8. data/lib/generators/themes_for_rails/templates/theme/{images → assets/images}/.gitkeep +0 -0
  9. data/lib/generators/themes_for_rails/templates/theme/{javascripts → assets/javascripts}/.gitkeep +0 -0
  10. data/lib/generators/themes_for_rails/templates/theme/assets/javascripts/application.js +9 -0
  11. data/lib/generators/themes_for_rails/templates/theme/{stylesheets → assets/stylesheets}/.gitkeep +0 -0
  12. data/lib/generators/themes_for_rails/templates/theme/assets/stylesheets/application.css +7 -0
  13. data/lib/generators/themes_for_rails/theme_generator.rb +2 -3
  14. data/lib/themes_for_rails.rb +15 -40
  15. data/lib/themes_for_rails/assets_finder.rb +44 -0
  16. data/lib/themes_for_rails/common_methods.rb +26 -34
  17. data/lib/themes_for_rails/config.rb +8 -59
  18. data/lib/themes_for_rails/{action_controller.rb → controller_methods.rb} +7 -13
  19. data/lib/themes_for_rails/logging.rb +14 -0
  20. data/lib/themes_for_rails/mailer_methods.rb +22 -0
  21. data/lib/themes_for_rails/railtie.rb +10 -21
  22. data/lib/themes_for_rails/routes.rb +3 -15
  23. data/lib/themes_for_rails/version.rb +1 -2
  24. data/lib/themes_for_rails/view_helpers.rb +52 -0
  25. data/spec/controllers/my_controller_spec.rb +99 -0
  26. data/{test/dummy_app → spec/dummy}/.gitignore +2 -1
  27. data/spec/dummy/Gemfile +35 -0
  28. data/spec/dummy/Gemfile.lock +127 -0
  29. data/spec/dummy/README +261 -0
  30. data/{test/dummy_app → spec/dummy}/Rakefile +1 -1
  31. data/{test/dummy_app/public → spec/dummy/app/assets}/images/rails.png +0 -0
  32. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  33. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  34. data/{test/dummy_app → spec/dummy}/app/controllers/application_controller.rb +0 -0
  35. data/{test/dummy_app → spec/dummy}/app/helpers/application_helper.rb +0 -0
  36. data/{test/dummy_app/empty_themes → spec/dummy/app/mailers}/.gitkeep +0 -0
  37. data/{test/dummy_app/lib/tasks → spec/dummy/app/models}/.gitkeep +0 -0
  38. data/spec/dummy/app/themes/default/assets/images/rails.png +0 -0
  39. data/spec/dummy/app/themes/default/assets/javascripts/application.js +9 -0
  40. data/spec/dummy/app/themes/default/assets/stylesheets/application.css +7 -0
  41. data/spec/dummy/app/themes/default/views/layouts/application.html.erb +14 -0
  42. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  43. data/{test/dummy_app → spec/dummy}/config.ru +0 -0
  44. data/{test/dummy_app → spec/dummy}/config/application.rb +12 -6
  45. data/spec/dummy/config/boot.rb +6 -0
  46. data/{test/dummy_app → spec/dummy}/config/database.yml +10 -3
  47. data/{test/dummy_app → spec/dummy}/config/environment.rb +0 -0
  48. data/{test/dummy_app → spec/dummy}/config/environments/development.rb +8 -4
  49. data/{test/dummy_app → spec/dummy}/config/environments/production.rb +24 -13
  50. data/{test/dummy_app → spec/dummy}/config/environments/test.rb +9 -2
  51. data/{test/dummy_app → spec/dummy}/config/initializers/backtrace_silencers.rb +0 -0
  52. data/{test/dummy_app → spec/dummy}/config/initializers/inflections.rb +0 -0
  53. data/{test/dummy_app → spec/dummy}/config/initializers/mime_types.rb +0 -0
  54. data/{test/dummy_app → spec/dummy}/config/initializers/secret_token.rb +1 -1
  55. data/{test/dummy_app → spec/dummy}/config/initializers/session_store.rb +2 -2
  56. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  57. data/{test/dummy_app → spec/dummy}/config/locales/en.yml +1 -1
  58. data/spec/dummy/config/routes.rb +3 -0
  59. data/{test/dummy_app → spec/dummy}/db/seeds.rb +2 -2
  60. data/spec/dummy/doc/README_FOR_APP +2 -0
  61. data/{test/dummy_app/public/stylesheets → spec/dummy/lib/assets}/.gitkeep +0 -0
  62. data/{doc/REVIEW_NOTES → spec/dummy/lib/tasks/.gitkeep} +0 -0
  63. data/{test/dummy_app/another_themes/another_default/images/logo.png → spec/dummy/log/.gitkeep} +0 -0
  64. data/{test/dummy_app → spec/dummy}/public/404.html +0 -0
  65. data/{test/dummy_app → spec/dummy}/public/422.html +0 -0
  66. data/{test/dummy_app → spec/dummy}/public/500.html +0 -0
  67. data/{test/dummy_app → spec/dummy}/public/favicon.ico +0 -0
  68. data/{test/dummy_app → spec/dummy}/public/index.html +10 -8
  69. data/{test/dummy_app → spec/dummy}/public/robots.txt +0 -0
  70. data/{test/dummy_app → spec/dummy}/script/rails +0 -0
  71. data/{test/dummy_app/another_themes/another_default/images/nested/logo.png → spec/dummy/test/fixtures/.gitkeep} +0 -0
  72. data/{test/dummy_app/another_themes/another_default/stylesheets/style.css → spec/dummy/test/functional/.gitkeep} +0 -0
  73. data/{test/dummy_app/another_themes/another_default/views/products/index.html.erb → spec/dummy/test/integration/.gitkeep} +0 -0
  74. data/spec/dummy/test/performance/browsing_test.rb +12 -0
  75. data/spec/dummy/test/test_helper.rb +13 -0
  76. data/{test/dummy_app/themes/default/images/logo.png → spec/dummy/test/unit/.gitkeep} +0 -0
  77. data/{test/dummy_app/themes/default/images/nested/logo.png → spec/dummy/vendor/assets/stylesheets/.gitkeep} +0 -0
  78. data/{test/dummy_app/themes/default/javascripts/app.min.js → spec/dummy/vendor/plugins/.gitkeep} +0 -0
  79. data/spec/lib/assets_finder_spec.rb +10 -0
  80. data/spec/lib/common_methods_spec.rb +30 -0
  81. data/spec/lib/config_spec.rb +19 -0
  82. data/spec/lib/controller_methods_spec.rb +19 -0
  83. data/spec/lib/view_helpers_spec.rb +38 -0
  84. data/spec/mailers/mailer_methods_spec.rb +39 -0
  85. data/spec/spec_helper.rb +15 -0
  86. data/test/dummy_app/Gemfile.lock +91 -0
  87. data/test/dummy_app/{themes/default/stylesheets/images/logo.png → log/development.log} +0 -0
  88. data/test/dummy_app/log/test.log +6 -0
  89. data/themes_for_rails.gemspec +140 -20
  90. metadata +112 -183
  91. data/.gitignore +0 -7
  92. data/.travis.yml +0 -2
  93. data/LICENSE +0 -21
  94. data/doc/README.textile +0 -363
  95. data/doc/RMU_REVIEW +0 -26
  96. data/doc/TODO.textile +0 -3
  97. data/lib/themes_for_rails/action_mailer.rb +0 -22
  98. data/lib/themes_for_rails/action_view.rb +0 -62
  99. data/lib/themes_for_rails/assets_controller.rb +0 -66
  100. data/lib/themes_for_rails/interpolation.rb +0 -11
  101. data/lib/themes_for_rails/url_helpers.rb +0 -27
  102. data/test/dummy_app/Gemfile +0 -30
  103. data/test/dummy_app/another_themes/another_default/javascripts/app.js +0 -1
  104. data/test/dummy_app/another_themes/another_default/stylesheets/style2.css +0 -3
  105. data/test/dummy_app/another_themes/another_default/views/layouts/default.html.erb +0 -10
  106. data/test/dummy_app/app/views/layouts/application.html.erb +0 -14
  107. data/test/dummy_app/config/boot.rb +0 -13
  108. data/test/dummy_app/config/routes.rb +0 -4
  109. data/test/dummy_app/public/javascripts/application.js +0 -2
  110. data/test/dummy_app/public/javascripts/controls.js +0 -965
  111. data/test/dummy_app/public/javascripts/dragdrop.js +0 -974
  112. data/test/dummy_app/public/javascripts/effects.js +0 -1123
  113. data/test/dummy_app/public/javascripts/prototype.js +0 -6001
  114. data/test/dummy_app/public/javascripts/rails.js +0 -175
  115. data/test/dummy_app/themes/default/javascripts/app.js +0 -1
  116. data/test/dummy_app/themes/default/stylesheets/style.css +0 -0
  117. data/test/dummy_app/themes/default/stylesheets/style2.css +0 -3
  118. data/test/dummy_app/themes/default/views/layouts/default.html.erb +0 -10
  119. data/test/dummy_app/themes/default/views/products/index.html.erb +0 -0
  120. data/test/lib/action_controller_test.rb +0 -170
  121. data/test/lib/action_mailer_test.rb +0 -35
  122. data/test/lib/action_view_test.rb +0 -54
  123. data/test/lib/assets_controller_test.rb +0 -73
  124. data/test/lib/common_methods_test.rb +0 -28
  125. data/test/lib/config_test.rb +0 -26
  126. data/test/lib/integration_test.rb +0 -12
  127. data/test/lib/routes_test.rb +0 -40
  128. data/test/lib/themes_for_rails_test.rb +0 -18
  129. data/test/support/extensions.rb +0 -19
  130. data/test/test_helper.rb +0 -12
@@ -1,7 +1,7 @@
1
+ #!/usr/bin/env rake
1
2
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
3
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
4
 
4
5
  require File.expand_path('../config/application', __FILE__)
5
- require 'rake'
6
6
 
7
7
  DummyApp::Application.load_tasks
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>DummyApp</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>DummyApp</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
File without changes
@@ -2,9 +2,12 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- # If you have a Gemfile, require the gems listed there, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(:default, Rails.env) if defined?(Bundler)
5
+ if defined?(Bundler)
6
+ # If you precompile assets before deploying to production, use this line
7
+ Bundler.require *Rails.groups(:assets => %w(development test))
8
+ # If you want your assets lazily compiled in production, use this line
9
+ # Bundler.require(:default, :assets, Rails.env)
10
+ end
8
11
 
9
12
  module DummyApp
10
13
  class Application < Rails::Application
@@ -30,13 +33,16 @@ module DummyApp
30
33
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31
34
  # config.i18n.default_locale = :de
32
35
 
33
- # JavaScript files you want as :defaults (application.js is always included).
34
- # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
35
-
36
36
  # Configure the default encoding used in templates for Ruby 1.9.
37
37
  config.encoding = "utf-8"
38
38
 
39
39
  # Configure sensitive parameters which will be filtered from the log file.
40
40
  config.filter_parameters += [:password]
41
+
42
+ # Enable the asset pipeline
43
+ config.assets.enabled = true
44
+
45
+ # Version of your assets, change this if you want to expire all your assets
46
+ config.assets.version = '1.0'
41
47
  end
42
48
  end
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -1,5 +1,8 @@
1
1
  # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
3
6
  development:
4
7
  adapter: sqlite3
5
8
  database: db/development.sqlite3
@@ -11,8 +14,12 @@ development:
11
14
  # Do not set this db to the same as development or production.
12
15
  test:
13
16
  adapter: sqlite3
14
- database: ":memory:"
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
15
20
 
16
21
  production:
17
22
  adapter: sqlite3
18
- database: ":memory:"
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -1,9 +1,9 @@
1
1
  DummyApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
2
+ # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # In the development environment your application's code is reloaded on
5
5
  # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the webserver when you make code changes.
6
+ # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
9
  # Log error messages when you accidentally call methods on nil.
@@ -11,7 +11,6 @@ DummyApp::Application.configure do
11
11
 
12
12
  # Show full error reports and disable caching
13
13
  config.consider_all_requests_local = true
14
- config.action_view.debug_rjs = true
15
14
  config.action_controller.perform_caching = false
16
15
 
17
16
  # Don't care if the mailer can't send
@@ -22,5 +21,10 @@ DummyApp::Application.configure do
22
21
 
23
22
  # Only use best-standards-support built into browsers
24
23
  config.action_dispatch.best_standards_support = :builtin
25
- end
26
24
 
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+
28
+ # Expands the lines which load the assets
29
+ config.assets.debug = true
30
+ end
@@ -1,7 +1,6 @@
1
1
  DummyApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
2
+ # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
- # The production environment is meant for finished, "live" apps.
5
4
  # Code is not reloaded between requests
6
5
  config.cache_classes = true
7
6
 
@@ -9,14 +8,27 @@ DummyApp::Application.configure do
9
8
  config.consider_all_requests_local = false
10
9
  config.action_controller.perform_caching = true
11
10
 
12
- # Specifies the header that your server uses for sending files
13
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
11
+ # Disable Rails's static asset server (Apache or nginx will already do this)
12
+ config.serve_static_assets = false
13
+
14
+ # Compress JavaScripts and CSS
15
+ config.assets.compress = true
16
+
17
+ # Don't fallback to assets pipeline if a precompiled asset is missed
18
+ config.assets.compile = false
19
+
20
+ # Generate digests for assets URLs
21
+ config.assets.digest = true
14
22
 
15
- # For nginx:
16
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
23
+ # Defaults to Rails.root.join("public/assets")
24
+ # config.assets.manifest = YOUR_PATH
17
25
 
18
- # If you have no front-end server that supports something like X-Sendfile,
19
- # just comment this out and Rails will serve the files
26
+ # Specifies the header that your server uses for sending files
27
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29
+
30
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
+ # config.force_ssl = true
20
32
 
21
33
  # See everything in the log (default is :info)
22
34
  # config.log_level = :debug
@@ -27,13 +39,12 @@ DummyApp::Application.configure do
27
39
  # Use a different cache store in production
28
40
  # config.cache_store = :mem_cache_store
29
41
 
30
- # Disable Rails's static asset server
31
- # In production, Apache or nginx will already do this
32
- config.serve_static_assets = false
33
-
34
- # Enable serving of images, stylesheets, and javascripts from an asset server
42
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
35
43
  # config.action_controller.asset_host = "http://assets.example.com"
36
44
 
45
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
46
+ # config.assets.precompile += %w( search.js )
47
+
37
48
  # Disable delivery errors, bad email addresses will be ignored
38
49
  # config.action_mailer.raise_delivery_errors = false
39
50
 
@@ -1,5 +1,5 @@
1
1
  DummyApp::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
2
+ # Settings specified here will take precedence over those in config/application.rb
3
3
 
4
4
  # The test environment is used exclusively to run your application's
5
5
  # test suite. You never need to work with it otherwise. Remember that
@@ -7,7 +7,11 @@ DummyApp::Application.configure do
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
9
 
10
- # Log error messages when you accidentally call methods on nil.
10
+ # Configure static asset server for tests with Cache-Control for performance
11
+ config.serve_static_assets = true
12
+ config.static_cache_control = "public, max-age=3600"
13
+
14
+ # Log error messages when you accidentally call methods on nil
11
15
  config.whiny_nils = true
12
16
 
13
17
  # Show full error reports and disable caching
@@ -32,4 +36,7 @@ DummyApp::Application.configure do
32
36
 
33
37
  # Print deprecation notices to the stderr
34
38
  config.active_support.deprecation = :stderr
39
+
40
+ # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
41
+ config.assets.allow_debugging = true
35
42
  end
@@ -4,4 +4,4 @@
4
4
  # If you change this key, all old signed cookies will become invalid!
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
- DummyApp::Application.config.secret_token = 'fe1e6969935f2760a3c8f752c4d39c2e66b89f51ca0e78d9ae55d3b06cb804ccceeb6ee5a5c8c953fe887cba1b4f850090d092283d6f31ce2ac83a56f70d9518'
7
+ DummyApp::Application.config.secret_token = '1d2f341f919d49ac7ba5e9720a60dd4baaccca84e537b5b60a6b5faa3a38b532f59afe070ada2ac23109ddbabb77bfbfd73dc441340e655fc63b8d5358a66877'
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- DummyApp::Application.config.session_store :cookie_store, :key => '_dummy_app_session'
3
+ DummyApp::Application.config.session_store :cookie_store, key: '_dummy_app_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rake db:sessions:create")
7
+ # (create the session table with "rails generate session_migration")
8
8
  # DummyApp::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -1,5 +1,5 @@
1
1
  # Sample localization file for English. Add more files in this directory for other locales.
2
- # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
3
 
4
4
  en:
5
5
  hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ DummyApp::Application.routes.draw do
2
+ match '/my/hello' => 'my#hello', :as => :hello
3
+ end
@@ -3,5 +3,5 @@
3
3
  #
4
4
  # Examples:
5
5
  #
6
- # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
- # Mayor.create(:name => 'Daley', :city => cities.first)
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -52,7 +52,6 @@
52
52
  clear: both;
53
53
  }
54
54
 
55
-
56
55
  #header, #about, #getting-started {
57
56
  padding-left: 75px;
58
57
  padding-right: 30px;
@@ -60,7 +59,7 @@
60
59
 
61
60
 
62
61
  #header {
63
- background-image: url("images/rails.png");
62
+ background-image: url("/assets/rails.png");
64
63
  background-repeat: no-repeat;
65
64
  background-position: top left;
66
65
  height: 64px;
@@ -168,6 +167,9 @@
168
167
  margin-bottom: 5px;
169
168
  }
170
169
 
170
+ .filename {
171
+ font-style: italic;
172
+ }
171
173
  </style>
172
174
  <script type="text/javascript">
173
175
  function about() {
@@ -190,10 +192,10 @@
190
192
  <li>
191
193
  <h3>Browse the documentation</h3>
192
194
  <ul class="links">
193
- <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
194
- <li><a href="http://stdlib.rubyonrails.org/">Ruby standard library</a></li>
195
- <li><a href="http://corelib.rubyonrails.org/">Ruby core</a></li>
196
195
  <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
196
+ <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
197
+ <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
198
+ <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
197
199
  </ul>
198
200
  </li>
199
201
  </ul>
@@ -221,13 +223,13 @@
221
223
  </li>
222
224
 
223
225
  <li>
224
- <h2>Set up a default route and remove or rename this file</h2>
225
- <p>Routes are set up in config/routes.rb.</p>
226
+ <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
227
+ <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
226
228
  </li>
227
229
 
228
230
  <li>
229
231
  <h2>Create your database</h2>
230
- <p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
232
+ <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
231
233
  </li>
232
234
  </ol>
233
235
  </div>
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ class BrowsingTest < ActionDispatch::PerformanceTest
5
+ # Refer to the documentation for all available options
6
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
+ # :output => 'tmp/performance', :formats => [:flat] }
8
+
9
+ def test_homepage
10
+ get '/'
11
+ end
12
+ end