clog 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. data/README.rdoc +4 -0
  2. data/Rakefile +0 -17
  3. data/clog.gemspec +16 -199
  4. data/lib/clog.rb +2 -5
  5. data/test/rails_root/Gemfile +42 -0
  6. data/test/rails_root/Gemfile.lock +120 -0
  7. data/test/{rails3x_root/README → rails_root/README.rdoc} +13 -8
  8. data/test/{rails3x_root → rails_root}/Rakefile +2 -2
  9. data/test/{rails2x_root/public → rails_root/app/assets}/images/rails.png +0 -0
  10. data/test/rails_root/app/assets/javascripts/application.js +15 -0
  11. data/test/rails_root/app/assets/javascripts/welcome.js.coffee +3 -0
  12. data/test/rails_root/app/assets/stylesheets/application.css +13 -0
  13. data/test/rails_root/app/assets/stylesheets/welcome.css.scss +3 -0
  14. data/test/{rails3x_root → rails_root}/app/controllers/application_controller.rb +0 -0
  15. data/test/{rails3x_root/app/controllers/public_controller.rb → rails_root/app/controllers/welcome_controller.rb} +4 -2
  16. data/test/{rails3x_root → rails_root}/app/helpers/application_helper.rb +0 -0
  17. data/test/rails_root/app/helpers/welcome_helper.rb +2 -0
  18. data/test/rails_root/app/views/layouts/application.html.erb +14 -0
  19. data/test/{rails3x_root → rails_root}/config.ru +1 -1
  20. data/test/{rails3x_root → rails_root}/config/application.rb +27 -7
  21. data/test/rails_root/config/boot.rb +6 -0
  22. data/test/{rails2x_root → rails_root}/config/database.yml +4 -1
  23. data/test/{rails3x_root → rails_root}/config/environment.rb +1 -1
  24. data/test/rails_root/config/environments/development.rb +37 -0
  25. data/test/rails_root/config/environments/production.rb +67 -0
  26. data/test/{rails3x_root → rails_root}/config/environments/test.rb +11 -9
  27. data/test/{rails3x_root → rails_root}/config/initializers/backtrace_silencers.rb +0 -0
  28. data/test/{rails3x_root → rails_root}/config/initializers/inflections.rb +5 -0
  29. data/test/{rails2x_root → rails_root}/config/initializers/mime_types.rb +0 -0
  30. data/test/{rails3x_root → rails_root}/config/initializers/secret_token.rb +1 -1
  31. data/test/rails_root/config/initializers/session_store.rb +8 -0
  32. data/test/rails_root/config/initializers/wrap_parameters.rb +14 -0
  33. data/test/{rails3x_root → rails_root}/config/locales/en.yml +1 -1
  34. data/test/{rails3x_root → rails_root}/config/routes.rb +7 -7
  35. data/test/{rails2x_root/public/favicon.ico → rails_root/db/development.sqlite3} +0 -0
  36. data/test/{rails3x_root → rails_root}/db/seeds.rb +2 -2
  37. data/test/rails_root/doc/README_FOR_APP +2 -0
  38. data/test/rails_root/log/development.log +212 -0
  39. data/test/{rails3x_root → rails_root}/public/404.html +0 -0
  40. data/test/{rails3x_root → rails_root}/public/422.html +0 -0
  41. data/test/{rails3x_root → rails_root}/public/500.html +0 -1
  42. data/test/{rails3x_root → rails_root}/public/favicon.ico +0 -0
  43. data/test/{rails2x_root → rails_root}/public/robots.txt +0 -0
  44. data/test/{rails3x_root → rails_root}/script/rails +0 -0
  45. data/test/rails_root/test/functional/welcome_controller_test.rb +7 -0
  46. data/test/rails_root/test/performance/browsing_test.rb +12 -0
  47. data/test/{rails3x_root → rails_root}/test/test_helper.rb +0 -0
  48. data/test/rails_root/test/unit/helpers/welcome_helper_test.rb +4 -0
  49. data/test/rails_root/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
  50. data/test/rails_root/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
  51. data/test/rails_root/tmp/pids/server.pid +1 -0
  52. data/test/test_clog.rb +16 -6
  53. metadata +86 -212
  54. data/.document +0 -5
  55. data/.gitignore +0 -23
  56. data/VERSION +0 -1
  57. data/created.rid +0 -1
  58. data/init.rb +0 -5
  59. data/test/common/functional/public_controller_test.rb +0 -11
  60. data/test/common/migrate/20100821014956_create_users.rb +0 -13
  61. data/test/common/public_controller.rb +0 -11
  62. data/test/common/unit/helpers/public_helper_test.rb +0 -4
  63. data/test/common/unit/user_test.rb +0 -17
  64. data/test/common/user.rb +0 -2
  65. data/test/helper.rb +0 -9
  66. data/test/rails2x_root.tar.gz +0 -0
  67. data/test/rails2x_root/README +0 -243
  68. data/test/rails2x_root/Rakefile +0 -10
  69. data/test/rails2x_root/app/controllers/application_controller.rb +0 -10
  70. data/test/rails2x_root/app/controllers/public_controller.rb +0 -11
  71. data/test/rails2x_root/app/helpers/application_helper.rb +0 -3
  72. data/test/rails2x_root/app/helpers/public_helper.rb +0 -2
  73. data/test/rails2x_root/app/models/user.rb +0 -2
  74. data/test/rails2x_root/config/boot.rb +0 -110
  75. data/test/rails2x_root/config/environment.rb +0 -23
  76. data/test/rails2x_root/config/environments/development.rb +0 -17
  77. data/test/rails2x_root/config/environments/production.rb +0 -28
  78. data/test/rails2x_root/config/environments/test.rb +0 -28
  79. data/test/rails2x_root/config/initializers/backtrace_silencers.rb +0 -7
  80. data/test/rails2x_root/config/initializers/cookie_verification_secret.rb +0 -7
  81. data/test/rails2x_root/config/initializers/inflections.rb +0 -10
  82. data/test/rails2x_root/config/initializers/new_rails_defaults.rb +0 -21
  83. data/test/rails2x_root/config/initializers/session_store.rb +0 -15
  84. data/test/rails2x_root/config/locales/en.yml +0 -5
  85. data/test/rails2x_root/config/routes.rb +0 -43
  86. data/test/rails2x_root/db/schema.rb +0 -21
  87. data/test/rails2x_root/db/seeds.rb +0 -7
  88. data/test/rails2x_root/public/404.html +0 -30
  89. data/test/rails2x_root/public/422.html +0 -30
  90. data/test/rails2x_root/public/500.html +0 -30
  91. data/test/rails2x_root/public/javascripts/application.js +0 -2
  92. data/test/rails2x_root/public/javascripts/controls.js +0 -963
  93. data/test/rails2x_root/public/javascripts/dragdrop.js +0 -973
  94. data/test/rails2x_root/public/javascripts/effects.js +0 -1128
  95. data/test/rails2x_root/public/javascripts/prototype.js +0 -4320
  96. data/test/rails2x_root/script/about +0 -4
  97. data/test/rails2x_root/script/console +0 -3
  98. data/test/rails2x_root/script/dbconsole +0 -3
  99. data/test/rails2x_root/script/destroy +0 -3
  100. data/test/rails2x_root/script/generate +0 -3
  101. data/test/rails2x_root/script/performance/benchmarker +0 -3
  102. data/test/rails2x_root/script/performance/profiler +0 -3
  103. data/test/rails2x_root/script/plugin +0 -3
  104. data/test/rails2x_root/script/runner +0 -3
  105. data/test/rails2x_root/script/server +0 -3
  106. data/test/rails2x_root/test/fixtures/users.yml +0 -11
  107. data/test/rails2x_root/test/performance/browsing_test.rb +0 -9
  108. data/test/rails2x_root/test/test_helper.rb +0 -39
  109. data/test/rails3x_root/.gitignore +0 -4
  110. data/test/rails3x_root/Gemfile +0 -32
  111. data/test/rails3x_root/Gemfile.lock +0 -81
  112. data/test/rails3x_root/app/helpers/public_helper.rb +0 -2
  113. data/test/rails3x_root/app/models/user.rb +0 -2
  114. data/test/rails3x_root/app/views/layouts/application.html.erb +0 -14
  115. data/test/rails3x_root/config/boot.rb +0 -13
  116. data/test/rails3x_root/config/database.yml +0 -22
  117. data/test/rails3x_root/config/environments/development.rb +0 -22
  118. data/test/rails3x_root/config/environments/production.rb +0 -49
  119. data/test/rails3x_root/config/initializers/mime_types.rb +0 -5
  120. data/test/rails3x_root/config/initializers/session_store.rb +0 -8
  121. data/test/rails3x_root/db/schema.rb +0 -22
  122. data/test/rails3x_root/lib/tasks/.gitkeep +0 -0
  123. data/test/rails3x_root/public/images/rails.png +0 -0
  124. data/test/rails3x_root/public/javascripts/application.js +0 -2
  125. data/test/rails3x_root/public/javascripts/controls.js +0 -965
  126. data/test/rails3x_root/public/javascripts/dragdrop.js +0 -974
  127. data/test/rails3x_root/public/javascripts/effects.js +0 -1123
  128. data/test/rails3x_root/public/javascripts/prototype.js +0 -6001
  129. data/test/rails3x_root/public/javascripts/rails.js +0 -175
  130. data/test/rails3x_root/public/robots.txt +0 -5
  131. data/test/rails3x_root/public/stylesheets/.gitkeep +0 -0
  132. data/test/rails3x_root/test/fixtures/users.yml +0 -11
  133. data/test/rails3x_root/test/functional.tar.gz +0 -0
  134. data/test/rails3x_root/test/performance/browsing_test.rb +0 -9
  135. data/test/rails3x_root/test/unit.tar.gz +0 -0
@@ -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
- Rails3xRoot::Application.load_tasks
7
+ RailsRoot::Application.load_tasks
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the welcome controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,11 +1,13 @@
1
- class PublicController < ApplicationController
1
+ class WelcomeController < ApplicationController
2
+
2
3
 
3
4
  def index
4
- render :text => "Hello, just doing some logging"
5
+ render :text => "What's up, just doing some loggin"
5
6
  clog "Hello log!"
6
7
  clog "Hello log! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
7
8
  clog :message, "hello log!"
8
9
  clog Rails.root, Object.new, Kernel, RUBY_VERSION, :a_symbol
9
10
  end
10
11
 
12
+
11
13
  end
@@ -0,0 +1,2 @@
1
+ module WelcomeHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RailsRoot</title>
5
+ <%= stylesheet_link_tag "application", :media => "all" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails3xRoot::Application
4
+ run RailsRoot::Application
@@ -2,11 +2,14 @@ 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
- module Rails3xRoot
12
+ module RailsRoot
10
13
  class Application < Rails::Application
11
14
  # Settings in config/environments/* take precedence over those specified here.
12
15
  # Application configuration should go into files in config/initializers
@@ -30,13 +33,30 @@ module Rails3xRoot
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 escaping HTML in JSON.
43
+ config.active_support.escape_html_entities_in_json = true
44
+
45
+ # Use SQL instead of Active Record's schema dumper when creating the database.
46
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
47
+ # like if you have constraints or database-specific column types
48
+ # config.active_record.schema_format = :sql
49
+
50
+ # Enforce whitelist mode for mass assignment.
51
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
52
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
53
+ # parameters by using an attr_accessible or attr_protected declaration.
54
+ config.active_record.whitelist_attributes = true
55
+
56
+ # Enable the asset pipeline
57
+ config.assets.enabled = true
58
+
59
+ # Version of your assets, change this if you want to expire all your assets
60
+ config.assets.version = '1.0'
41
61
  end
42
62
  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
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the rails application
5
- Rails3xRoot::Application.initialize!
5
+ RailsRoot::Application.initialize!
@@ -0,0 +1,37 @@
1
+ RailsRoot::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Raise exception on mass assignment protection for Active Record models
26
+ config.active_record.mass_assignment_sanitizer = :strict
27
+
28
+ # Log the query plan for queries taking more than this (works
29
+ # with SQLite, MySQL, and PostgreSQL)
30
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
31
+
32
+ # Do not compress assets
33
+ config.assets.compress = false
34
+
35
+ # Expands the lines which load the assets
36
+ config.assets.debug = true
37
+ end
@@ -0,0 +1,67 @@
1
+ RailsRoot::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # Code is not reloaded between requests
5
+ config.cache_classes = true
6
+
7
+ # Full error reports are disabled and caching is turned on
8
+ config.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+
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
22
+
23
+ # Defaults to nil and saved in location specified by config.assets.prefix
24
+ # config.assets.manifest = YOUR_PATH
25
+
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
32
+
33
+ # See everything in the log (default is :info)
34
+ # config.log_level = :debug
35
+
36
+ # Prepend all log lines with the following tags
37
+ # config.log_tags = [ :subdomain, :uuid ]
38
+
39
+ # Use a different logger for distributed setups
40
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
+
42
+ # Use a different cache store in production
43
+ # config.cache_store = :mem_cache_store
44
+
45
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
46
+ # config.action_controller.asset_host = "http://assets.example.com"
47
+
48
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49
+ # config.assets.precompile += %w( search.js )
50
+
51
+ # Disable delivery errors, bad email addresses will be ignored
52
+ # config.action_mailer.raise_delivery_errors = false
53
+
54
+ # Enable threaded mode
55
+ # config.threadsafe!
56
+
57
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58
+ # the I18n.default_locale when a translation can not be found)
59
+ config.i18n.fallbacks = true
60
+
61
+ # Send deprecation notices to registered listeners
62
+ config.active_support.deprecation = :notify
63
+
64
+ # Log the query plan for queries taking more than this (works
65
+ # with SQLite, MySQL, and PostgreSQL)
66
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ end
@@ -1,13 +1,17 @@
1
- Rails3xRoot::Application.configure do
2
- # Settings specified here will take precedence over those in config/environment.rb
1
+ RailsRoot::Application.configure do
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
- # test suite. You never need to work with it otherwise. Remember that
5
+ # test suite. You never need to work with it otherwise. Remember that
6
6
  # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
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
@@ -25,10 +29,8 @@ Rails3xRoot::Application.configure do
25
29
  # ActionMailer::Base.deliveries array.
26
30
  config.action_mailer.delivery_method = :test
27
31
 
28
- # Use SQL instead of Active Record's schema dumper when creating the test database.
29
- # This is necessary if your schema can't be completely dumped by the schema dumper,
30
- # like if you have constraints or database-specific column types
31
- # config.active_record.schema_format = :sql
32
+ # Raise exception on mass assignment protection for Active Record models
33
+ config.active_record.mass_assignment_sanitizer = :strict
32
34
 
33
35
  # Print deprecation notices to the stderr
34
36
  config.active_support.deprecation = :stderr
@@ -8,3 +8,8 @@
8
8
  # inflect.irregular 'person', 'people'
9
9
  # inflect.uncountable %w( fish sheep )
10
10
  # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # 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
- Rails3xRoot::Application.config.secret_token = '582bbac9d066b5722dd131e45f07347d88d113a2e13a570efdba761aeb91cbdfb12d7e5e4e2343e5911dd94b5a304b5ac2ad6da3bf184c77d9bdad57415fee0e'
7
+ RailsRoot::Application.config.secret_token = 'bc39325dd57be24f919be2165bd871a66c7c0c94bc74d7959f0c1df1f3ba05e53e786b645fb5a4ce7fc8ffb53ec2f99001d2aed8d58edc030642f922c735f158'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ RailsRoot::Application.config.session_store :cookie_store, key: '_rails_root_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # RailsRoot::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"
@@ -1,4 +1,4 @@
1
- Rails3xRoot::Application.routes.draw do
1
+ RailsRoot::Application.routes.draw do
2
2
  # The priority is based upon order of creation:
3
3
  # first created -> highest priority.
4
4
 
@@ -16,12 +16,12 @@ Rails3xRoot::Application.routes.draw do
16
16
  # Sample resource route with options:
17
17
  # resources :products do
18
18
  # member do
19
- # get :short
20
- # post :toggle
19
+ # get 'short'
20
+ # post 'toggle'
21
21
  # end
22
22
  #
23
23
  # collection do
24
- # get :sold
24
+ # get 'sold'
25
25
  # end
26
26
  # end
27
27
 
@@ -35,7 +35,7 @@ Rails3xRoot::Application.routes.draw do
35
35
  # resources :products do
36
36
  # resources :comments
37
37
  # resources :sales do
38
- # get :recent, :on => :collection
38
+ # get 'recent', :on => :collection
39
39
  # end
40
40
  # end
41
41
 
@@ -48,11 +48,11 @@ Rails3xRoot::Application.routes.draw do
48
48
 
49
49
  # You can have the root of your site routed with "root"
50
50
  # just remember to delete public/index.html.
51
- root :to => "public#index"
51
+ root :to => 'welcome#index'
52
52
 
53
53
  # See how all your routes lay out with "rake routes"
54
54
 
55
55
  # This is a legacy wild controller route that's not recommended for RESTful applications.
56
56
  # Note: This route will make all actions in every controller accessible via GET requests.
57
- # match ':controller(/:action(/:id(.:format)))'
57
+ # match ':controller(/:action(/:id))(.:format)'
58
58
  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.