web-app-theme 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. data/{LICENSE → MIT-LICENSE} +0 -0
  2. data/README.md +17 -1
  3. data/Rakefile +21 -23
  4. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/arrow.png +0 -0
  5. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/boxbar-background.png +0 -0
  6. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/button-background-active.png +0 -0
  7. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/button-background.png +0 -0
  8. data/{stylesheets → app/assets/images/web-app-theme}/themes/activo/images/menubar-background.png +0 -0
  9. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/arrow.png +0 -0
  10. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/bgd.jpg +0 -0
  11. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/boxbar-background.png +0 -0
  12. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/button-background-active.png +0 -0
  13. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/button-background.png +0 -0
  14. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/error.png +0 -0
  15. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/notice.png +0 -0
  16. data/{stylesheets → app/assets/images/web-app-theme}/themes/default/images/messages/warning.png +0 -0
  17. data/{stylesheets → app/assets/stylesheets/web-app-theme}/base.css +0 -0
  18. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/activo/style.css +0 -0
  19. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/amro/style.css +0 -0
  20. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/bec-green/style.css +0 -0
  21. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/bec/style.css +0 -0
  22. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/blue/style.css +0 -0
  23. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.eot +0 -0
  24. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.svg +0 -0
  25. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.ttf +0 -0
  26. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museo700-regular-webfont.woff +0 -0
  27. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.eot +0 -0
  28. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.svg +0 -0
  29. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.ttf +0 -0
  30. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500-webfont.woff +0 -0
  31. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.eot +0 -0
  32. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.svg +0 -0
  33. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.ttf +0 -0
  34. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.woff +0 -0
  35. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/default/style.css +0 -0
  36. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/djime-cerulean/style.css +0 -0
  37. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/drastic-dark/style.css +0 -0
  38. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/kathleene/style.css +0 -0
  39. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/olive/style.css +0 -0
  40. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/orange/style.css +0 -0
  41. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/red/style.css +0 -0
  42. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/reidb-greenish/style.css +0 -0
  43. data/{stylesheets → app/assets/stylesheets/web-app-theme}/themes/warehouse/style.css +0 -0
  44. data/features/assets_generator.feature +18 -0
  45. data/features/step_definitions/assets_step.rb +11 -0
  46. data/features/step_definitions/common_steps.rb +82 -0
  47. data/features/step_definitions/theme_steps.rb +35 -0
  48. data/features/step_definitions/themed_steps.rb +12 -14
  49. data/features/support/env.rb +7 -80
  50. data/features/theme_generator.feature +15 -18
  51. data/features/themed_generator.feature +10 -10
  52. data/lib/generators/web_app_theme/assets/assets_generator.rb +17 -0
  53. data/lib/generators/web_app_theme/theme/templates/layout_admin.html.erb +1 -1
  54. data/lib/generators/web_app_theme/theme/templates/layout_sign.html.erb +1 -1
  55. data/lib/generators/web_app_theme/theme/templates/web_app_theme.css.erb +9 -0
  56. data/lib/generators/web_app_theme/theme/theme_generator.rb +3 -19
  57. data/lib/web-app-theme.rb +5 -0
  58. data/lib/web-app-theme/version.rb +3 -0
  59. data/spec/dummy/Rakefile +7 -0
  60. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  61. data/spec/dummy/app/assets/javascripts/testing.js +2 -0
  62. data/spec/dummy/app/assets/stylesheets/web_app_theme.css +7 -0
  63. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  64. data/spec/dummy/app/controllers/testing_controller.rb +5 -0
  65. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  66. data/spec/dummy/app/helpers/testing_helper.rb +2 -0
  67. data/spec/dummy/app/models/post.rb +2 -0
  68. data/spec/dummy/app/views/articles/_form.html.erb +8 -0
  69. data/spec/dummy/app/views/articles/_sidebar.html.erb +13 -0
  70. data/spec/dummy/app/views/articles/edit.html.erb +19 -0
  71. data/spec/dummy/app/views/articles/index.html.erb +42 -0
  72. data/spec/dummy/app/views/articles/new.html.erb +18 -0
  73. data/spec/dummy/app/views/articles/show.html.erb +19 -0
  74. data/spec/dummy/app/views/layouts/application.html.erb +46 -0
  75. data/spec/dummy/app/views/posts/_form.html.erb +8 -0
  76. data/spec/dummy/app/views/posts/_sidebar.html.erb +13 -0
  77. data/spec/dummy/app/views/posts/edit.html.erb +19 -0
  78. data/spec/dummy/app/views/posts/index.html.erb +42 -0
  79. data/spec/dummy/app/views/posts/new.html.erb +18 -0
  80. data/spec/dummy/app/views/posts/show.html.erb +19 -0
  81. data/spec/dummy/app/views/testing/index.html.erb +2 -0
  82. data/spec/dummy/config.ru +4 -0
  83. data/spec/dummy/config/application.rb +42 -0
  84. data/spec/dummy/config/boot.rb +10 -0
  85. data/spec/dummy/config/database.yml +25 -0
  86. data/spec/dummy/config/environment.rb +5 -0
  87. data/spec/dummy/config/environments/development.rb +27 -0
  88. data/spec/dummy/config/environments/production.rb +51 -0
  89. data/spec/dummy/config/environments/test.rb +39 -0
  90. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/spec/dummy/config/initializers/inflections.rb +10 -0
  92. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  93. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  94. data/spec/dummy/config/initializers/session_store.rb +8 -0
  95. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  96. data/spec/dummy/config/locales/en.yml +5 -0
  97. data/spec/dummy/config/routes.rb +58 -0
  98. data/spec/dummy/db/development.sqlite3 +0 -0
  99. data/spec/dummy/db/migrate/20110827160301_create_posts.rb +8 -0
  100. data/spec/dummy/db/schema.rb +21 -0
  101. data/spec/dummy/db/test.sqlite3 +0 -0
  102. data/spec/dummy/public/404.html +26 -0
  103. data/spec/dummy/public/422.html +26 -0
  104. data/spec/dummy/public/500.html +26 -0
  105. data/spec/dummy/public/favicon.ico +0 -0
  106. data/{images → spec/dummy/public/images}/avatar.png +0 -0
  107. data/{images → spec/dummy/public/images}/icons/application_edit.png +0 -0
  108. data/{images → spec/dummy/public/images}/icons/cross.png +0 -0
  109. data/{images → spec/dummy/public/images}/icons/key.png +0 -0
  110. data/{images → spec/dummy/public/images}/icons/tick.png +0 -0
  111. data/{index.html → spec/dummy/public/index.html} +3 -3
  112. data/{javascripts → spec/dummy/public/javascripts}/jquery-1.3.min.js +0 -0
  113. data/{javascripts → spec/dummy/public/javascripts}/jquery.localscroll.js +0 -0
  114. data/{javascripts → spec/dummy/public/javascripts}/jquery.scrollTo.js +0 -0
  115. data/spec/dummy/script/rails +6 -0
  116. data/spec/dummy/spec/models/post_spec.rb +5 -0
  117. data/spec/dummy/test/functional/testing_controller_test.rb +9 -0
  118. data/spec/dummy/test/unit/helpers/testing_helper_test.rb +4 -0
  119. data/spec/spec_helper.rb +30 -0
  120. metadata +226 -71
  121. data/VERSION +0 -1
  122. data/features/step_definitions/layout_steps.rb +0 -59
  123. data/lib/web_app_theme.rb +0 -2
  124. data/stylesheets/override.css +0 -1
  125. data/test/spec_helper.rb +0 -5
  126. data/test/themed_generator_spec.rb +0 -115
  127. data/web-app-theme.gemspec +0 -117
@@ -0,0 +1,8 @@
1
+
2
+ <div class="group navform wat-cf">
3
+ <button class="button" type="submit">
4
+ <%= image_tag("web-app-theme/icons/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%= t("web-app-theme.save", :default => "Save") %>
5
+ </button>
6
+ <span class="text_button_padding"><%= t("web-app-theme.or", :default => "or") %></span>
7
+ <%= link_to t("web-app-theme.cancel", :default => "Cancel"), posts_path, :class => "text_button_padding link_button" %>
8
+ </div>
@@ -0,0 +1,13 @@
1
+ <div class="block notice">
2
+ <h3>Simple Block</h3>
3
+ <div class="content">
4
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
5
+ </div>
6
+ </div>
7
+ <div class="block">
8
+ <h3>Links</h3>
9
+ <ul class="navigation">
10
+ <li><a href="#">Link 1</a></li>
11
+ <li><a href="#">Link 2</a></li>
12
+ </ul>
13
+ </div>
@@ -0,0 +1,19 @@
1
+ <div class="block">
2
+ <div class="secondary-navigation">
3
+ <ul class="wat-cf">
4
+ <li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", posts_path %></li>
5
+ <li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_post_path %></li>
6
+ <li class="active"><%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_post_path %></li>
7
+ </ul>
8
+ </div>
9
+ <div class="content">
10
+ <h2 class="title"><%= t("web-app-theme.edit", :default => "Edit") %> Post</h2>
11
+ <div class="inner">
12
+ <%= form_for @post, :url => post_path(@post), :html => { :class => :form } do |f| -%>
13
+ <%= render :partial => "form", :locals => {:f => f} %>
14
+ <% end -%>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <% content_for :sidebar, render(:partial => 'sidebar') -%>
@@ -0,0 +1,42 @@
1
+ <div class="block">
2
+ <div class="secondary-navigation">
3
+ <ul class="wat-cf">
4
+ <li class="first active"><%= link_to "#{t("web-app-theme.list", :default => "List")}", posts_path %></li>
5
+ <li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_post_path %></li>
6
+ </ul>
7
+ </div>
8
+ <div class="content">
9
+ <h2 class="title"><%= t("web-app-theme.all", :default => "All") %> Posts</h2>
10
+ <div class="inner">
11
+ <table class="table">
12
+ <tr>
13
+ <th class="first">ID</th>
14
+ <th><%= t("web-app-theme.created_at", :default => "Created at") %></th>
15
+ <th class="last">&nbsp;</th>
16
+ </tr>
17
+ <% @posts.each do |post| -%>
18
+ <tr class="<%= cycle("odd", "even") %>">
19
+ <td>
20
+ <%= post.id %>
21
+ </td>
22
+ <td>
23
+ <%= post.created_at %>
24
+ </td>
25
+ <td class="last">
26
+ <%= link_to "#{t("web-app-theme.show", :default => "Show")}", post_path(post) %> |
27
+ <%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_post_path(post) %> |
28
+ <%= link_to "#{t("web-app-theme.delete", :default => "Delete")}", post_path(post), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
29
+ </td>
30
+ </tr>
31
+ <% end -%>
32
+ </table>
33
+ <div class="actions-bar wat-cf">
34
+ <div class="actions">
35
+ </div>
36
+
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+
42
+ <% content_for :sidebar, render(:partial => 'sidebar') -%>
@@ -0,0 +1,18 @@
1
+ <div class="block">
2
+ <div class="secondary-navigation">
3
+ <ul class="wat-cf">
4
+ <li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", posts_path %></li>
5
+ <li class="active"><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_post_path %></li>
6
+ </ul>
7
+ </div>
8
+ <div class="content">
9
+ <h2 class="title"><%= t("web-app-theme.new", :default => "New")%> Post</h2>
10
+ <div class="inner">
11
+ <%= form_for :post, :url => posts_path, :html => { :class => :form } do |f| -%>
12
+ <%= render :partial => "form", :locals => {:f => f} %>
13
+ <% end -%>
14
+ </div>
15
+ </div>
16
+ </div>
17
+
18
+ <% content_for :sidebar, render(:partial => 'sidebar') -%>
@@ -0,0 +1,19 @@
1
+ <div class="block">
2
+ <div class="secondary-navigation">
3
+ <ul class="wat-cf">
4
+ <li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", posts_path %></li>
5
+ <li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_post_path %></li>
6
+ <li class="active"><%= link_to "#{t("web-app-theme.show", :default => "Show")}", post_path %></li>
7
+ </ul>
8
+ </div>
9
+ <div class="content">
10
+ <div class="inner">
11
+ <div class="wat-cf">
12
+ <%= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => "#{t("web-app-theme.edit", :default=> "Edit")}") + " " + t("web-app-theme.edit", :default=> "Edit"), edit_post_path(@post), :class => "button" %>
13
+ <%= link_to image_tag("web-app-theme/icons/cross.png", :alt => "#{t("web-app-theme.delete", :default=> "Delete")}") + " " + t("web-app-theme.delete", :default => "Delete"), post_path(@post), :method => "delete", :class => "button", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </div>
18
+
19
+ <% content_for :sidebar, render(:partial => 'sidebar') -%>
@@ -0,0 +1,2 @@
1
+ <h1>Testing#index</h1>
2
+ <p>Find me in app/views/testing/index.html.erb</p>
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,42 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "web-app-theme"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Custom directories with classes and modules you want to be autoloadable.
15
+ # config.autoload_paths += %W(#{config.root}/extras)
16
+
17
+ # Only load the plugins named here, in the order given (default is alphabetical).
18
+ # :all can be used as a placeholder for all plugins not explicitly named.
19
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
+
21
+ # Activate observers that should always be running.
22
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
23
+
24
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
+ # config.time_zone = 'Central Time (US & Canada)'
27
+
28
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
+ # config.i18n.default_locale = :de
31
+
32
+ # Configure the default encoding used in templates for Ruby 1.9.
33
+ config.encoding = "utf-8"
34
+
35
+ # Configure sensitive parameters which will be filtered from the log file.
36
+ config.filter_parameters += [:password]
37
+
38
+ # Enable the asset pipeline
39
+ config.assets.enabled = true
40
+ end
41
+ end
42
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,27 @@
1
+ Dummy::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
+ # Do not compress assets
26
+ config.assets.compress = false
27
+ end
@@ -0,0 +1,51 @@
1
+ Dummy::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
+ # Specifies the header that your server uses for sending files
18
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
19
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
20
+
21
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
22
+ # config.force_ssl = true
23
+
24
+ # See everything in the log (default is :info)
25
+ # config.log_level = :debug
26
+
27
+ # Use a different logger for distributed setups
28
+ # config.logger = SyslogLogger.new
29
+
30
+ # Use a different cache store in production
31
+ # config.cache_store = :mem_cache_store
32
+
33
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server
34
+ # config.action_controller.asset_host = "http://assets.example.com"
35
+
36
+ # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
37
+ # config.assets.precompile += %w( search.js )
38
+
39
+ # Disable delivery errors, bad email addresses will be ignored
40
+ # config.action_mailer.raise_delivery_errors = false
41
+
42
+ # Enable threaded mode
43
+ # config.threadsafe!
44
+
45
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
46
+ # the I18n.default_locale when a translation can not be found)
47
+ config.i18n.fallbacks = true
48
+
49
+ # Send deprecation notices to registered listeners
50
+ config.active_support.deprecation = :notify
51
+ end
@@ -0,0 +1,39 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
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
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!
8
+ config.cache_classes = true
9
+
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
15
+ config.whiny_nils = true
16
+
17
+ # Show full error reports and disable caching
18
+ config.consider_all_requests_local = true
19
+ config.action_controller.perform_caching = false
20
+
21
+ # Raise exceptions instead of rendering exception templates
22
+ config.action_dispatch.show_exceptions = false
23
+
24
+ # Disable request forgery protection in test environment
25
+ config.action_controller.allow_forgery_protection = false
26
+
27
+ # Tell Action Mailer not to deliver emails to the real world.
28
+ # The :test delivery method accumulates sent emails in the
29
+ # ActionMailer::Base.deliveries array.
30
+ config.action_mailer.delivery_method = :test
31
+
32
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
33
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # like if you have constraints or database-specific column types
35
+ # config.active_record.schema_format = :sql
36
+
37
+ # Print deprecation notices to the stderr
38
+ config.active_support.deprecation = :stderr
39
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'a30ca79b6acc718f4bb47ef99814ed83a2cbc423932d6f99dc6c27478432adc7bab9ed35a830e00e139cac68c2064a6bde06a5836092eb66a3475077175279af'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_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
+ # Dummy::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
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id(.:format)))'
58
+ end