lentil 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -6
  3. data/app/assets/javascripts/active_admin.js +11 -0
  4. data/app/assets/javascripts/active_admin.js.coffee +1 -0
  5. data/app/assets/javascripts/lentil/addfancybox.js +5 -4
  6. data/app/assets/javascripts/lentil/buttonhandler.js +8 -0
  7. data/app/assets/javascripts/lentil/imageerrors.js +2 -0
  8. data/app/assets/javascripts/lentil/images.js +0 -1
  9. data/app/assets/javascripts/lentil.js +3 -0
  10. data/app/assets/stylesheets/{active_admin.css.scss → active_admin.scss} +0 -0
  11. data/app/assets/stylesheets/admin/{moderation.css.scss → moderation.scss} +0 -0
  12. data/app/assets/stylesheets/lentil/breakpoint/sass/_components.scss +0 -0
  13. data/app/assets/stylesheets/lentil/breakpoint/sass/_config.scss +0 -0
  14. data/app/assets/stylesheets/lentil/breakpoint/sass/_framework.scss +0 -0
  15. data/app/assets/stylesheets/lentil/breakpoint/sass/_structure.scss +0 -0
  16. data/app/assets/stylesheets/lentil/breakpoint/sass/config.rb +0 -0
  17. data/app/assets/stylesheets/lentil/breakpoint/sass/style.scss +0 -0
  18. data/app/assets/stylesheets/lentil/{iframe.css.scss → iframe.scss} +0 -0
  19. data/app/assets/stylesheets/lentil/{image_animation.css.scss → image_animation.scss} +0 -0
  20. data/app/assets/stylesheets/lentil/{images.css.scss → images.scss} +0 -0
  21. data/app/assets/stylesheets/lentil/{thisorthat.css.scss → thisorthat.scss} +0 -0
  22. data/app/assets/stylesheets/{lentil.css.scss → lentil.scss} +2 -1
  23. data/app/controllers/lentil/application_controller.rb +6 -1
  24. data/app/controllers/lentil/images_controller.rb +1 -0
  25. data/app/controllers/lentil/photographers_controller.rb +2 -2
  26. data/app/controllers/lentil/thisorthat_controller.rb +2 -2
  27. data/app/models/lentil/admin_user.rb +0 -4
  28. data/app/models/lentil/battle.rb +0 -2
  29. data/app/models/lentil/flag.rb +0 -1
  30. data/app/models/lentil/image.rb +7 -7
  31. data/app/models/lentil/license.rb +0 -2
  32. data/app/models/lentil/licensing.rb +0 -1
  33. data/app/models/lentil/like_vote.rb +0 -1
  34. data/app/models/lentil/service.rb +0 -2
  35. data/app/models/lentil/tag.rb +6 -7
  36. data/app/models/lentil/tagging.rb +0 -2
  37. data/app/models/lentil/tagset.rb +0 -3
  38. data/app/models/lentil/tagset_assignment.rb +0 -2
  39. data/app/models/lentil/user.rb +0 -2
  40. data/app/views/lentil/images/_flagging_modal.html.erb +2 -2
  41. data/app/views/lentil/thisorthat/_battle_form.html.erb +6 -6
  42. data/lib/generators/lentil/install_generator.rb +33 -4
  43. data/lib/generators/lentil/templates/README.md +7 -11
  44. data/lib/generators/lentil/upgrade_v1_generator.rb +54 -0
  45. data/lib/lentil/admin/admin_user.rb +27 -17
  46. data/lib/lentil/admin/images.rb +30 -9
  47. data/lib/lentil/admin/tags.rb +4 -0
  48. data/lib/lentil/admin/tagsets.rb +16 -1
  49. data/lib/lentil/version.rb +1 -1
  50. data/lib/lentil.rb +5 -2
  51. data/test/dummy/README.rdoc +15 -248
  52. data/test/dummy/Rakefile +0 -1
  53. data/test/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
  54. data/test/dummy/app/assets/javascripts/application.js +4 -6
  55. data/test/dummy/app/controllers/application_controller.rb +3 -1
  56. data/test/dummy/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
  57. data/test/dummy/app/{views/layouts/.gitkeep → mailers/.keep} +0 -0
  58. data/test/dummy/{lib/assets/.gitkeep → app/models/.keep} +0 -0
  59. data/test/dummy/{log/.gitkeep → app/models/concerns/.keep} +0 -0
  60. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  61. data/test/dummy/config/application.rb +9 -39
  62. data/test/dummy/config/boot.rb +4 -9
  63. data/test/dummy/config/database.yml +3 -1
  64. data/test/dummy/config/environment.rb +2 -2
  65. data/test/dummy/config/environments/development.rb +21 -17
  66. data/test/dummy/config/environments/production.rb +45 -33
  67. data/test/dummy/config/environments/test.rb +20 -12
  68. data/test/dummy/config/initializers/assets.rb +11 -0
  69. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  70. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  71. data/test/dummy/config/initializers/formtastic.rb +2 -0
  72. data/test/dummy/config/initializers/inflections.rb +6 -5
  73. data/test/dummy/config/initializers/mime_types.rb +0 -1
  74. data/test/dummy/config/initializers/session_store.rb +0 -5
  75. data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
  76. data/test/dummy/config/locales/devise.en.yml +60 -0
  77. data/test/dummy/config/locales/en.yml +20 -2
  78. data/test/dummy/config/routes.rb +2 -2
  79. data/test/dummy/config/secrets.yml +22 -0
  80. data/test/dummy/db/schema.rb +120 -120
  81. data/test/dummy/db/seeds.rb +2 -1
  82. data/test/dummy/lib/assets/.keep +0 -0
  83. data/test/dummy/log/.keep +0 -0
  84. data/test/dummy/public/404.html +54 -13
  85. data/test/dummy/public/422.html +54 -13
  86. data/test/dummy/public/500.html +53 -12
  87. data/test/dummy/test/fixtures +1 -0
  88. data/test/functional/admin/flags_controller_test.rb +2 -2
  89. data/test/functional/admin/images_controller_test.rb +8 -8
  90. data/test/functional/admin/tags_controller_test.rb +2 -2
  91. data/test/functional/admin/tagsets_controller_test.rb +3 -3
  92. data/test/functional/admin/users_controller_test.rb +2 -2
  93. data/test/functional/lentil/flags_controller_test.rb +3 -2
  94. data/test/functional/lentil/images_controller_test.rb +14 -10
  95. data/test/functional/lentil/like_votes_controller_test.rb +3 -2
  96. data/test/functional/lentil/photographers_controller_test.rb +6 -2
  97. data/test/functional/lentil/thisorthat_controller_test.rb +5 -1
  98. data/test/integration/lentil/javascript/event_tracking_test.rb +3 -2
  99. data/test/integration/lentil/thisorthat_test.rb +1 -1
  100. data/test/test_helper.rb +30 -17
  101. data/test/unit/lentil/user_test.rb +1 -1
  102. data/test/vcr_cassettes/instagram_bad_image_check.yml +0 -0
  103. data/test/vcr_cassettes/instagram_by_tag.yml +0 -0
  104. data/test/vcr_cassettes/instagram_by_tag_damaged.yml +0 -0
  105. data/test/vcr_cassettes/instagram_good_image_check.yml +0 -0
  106. data/test/vcr_cassettes/instagram_image_harvest.yml +0 -0
  107. data/test/vcr_cassettes/instagram_image_id.yml +0 -0
  108. data/test/vcr_cassettes/instagram_oembed.yml +0 -0
  109. data/vendor/assets/javascripts/animatedimages/css/demo.css +177 -177
  110. data/vendor/assets/javascripts/animatedimages/css/fallback.css +0 -0
  111. data/vendor/assets/javascripts/animatedimages/css/style.css +0 -0
  112. data/vendor/assets/javascripts/animatedimages/images/bg.jpg +0 -0
  113. data/vendor/assets/javascripts/animatedimages/images/light.png +0 -0
  114. data/vendor/assets/javascripts/animatedimages/images/loading.gif +0 -0
  115. data/vendor/assets/javascripts/html5historyapi/README.md +0 -0
  116. data/vendor/assets/javascripts/html5historyapi/component.json +0 -0
  117. data/vendor/assets/javascripts/html5historyapi/history.iegte8.js +0 -0
  118. data/vendor/assets/javascripts/html5historyapi/history.iegte8.min.js +0 -0
  119. data/vendor/assets/javascripts/html5historyapi/history.js +0 -0
  120. data/vendor/assets/javascripts/html5historyapi/history.min.js +0 -0
  121. data/vendor/assets/javascripts/html5historyapi/readme.en.txt +0 -0
  122. data/vendor/assets/javascripts/html5historyapi/readme.ru.txt +0 -0
  123. data/vendor/assets/javascripts/infinitescroll/Readme.md +0 -0
  124. data/vendor/assets/javascripts/infinitescroll/ajax-loader.gif +0 -0
  125. data/vendor/assets/javascripts/infinitescroll/behaviors/cufon.js +0 -0
  126. data/vendor/assets/javascripts/infinitescroll/behaviors/local.js +0 -0
  127. data/vendor/assets/javascripts/infinitescroll/behaviors/manual-trigger.js +0 -0
  128. data/vendor/assets/javascripts/infinitescroll/behaviors/masonry-isotope.js +0 -0
  129. data/vendor/assets/javascripts/infinitescroll/behaviors/sausage.js +0 -0
  130. data/vendor/assets/javascripts/infinitescroll/jquery.infinitescroll.js +0 -0
  131. data/vendor/assets/javascripts/infinitescroll/package.json +0 -0
  132. data/vendor/assets/javascripts/infinitescroll/site/assets/anivers_regular.otf +0 -0
  133. data/vendor/assets/javascripts/infinitescroll/site/assets/buttons.psd +0 -0
  134. data/vendor/assets/javascripts/infinitescroll/site/assets/logo.psd +0 -0
  135. data/vendor/assets/javascripts/infinitescroll/site/assets/mobius-strip2.ai +0 -0
  136. data/vendor/assets/javascripts/infinitescroll/site/assets/pattern.psd +0 -0
  137. data/vendor/assets/javascripts/infinitescroll/site/assets/selector spots.psd +0 -0
  138. data/vendor/assets/javascripts/infinitescroll/site/assets/sites.psd +0 -0
  139. data/vendor/assets/javascripts/infinitescroll/site/buttons.png +0 -0
  140. data/vendor/assets/javascripts/infinitescroll/site/infinite-scroll-pattern.gif +0 -0
  141. data/vendor/assets/javascripts/infinitescroll/site/logo.jpg +0 -0
  142. data/vendor/assets/javascripts/infinitescroll/site/screens.jpg +0 -0
  143. data/vendor/assets/javascripts/infinitescroll/site/selectors.jpg +0 -0
  144. data/vendor/assets/javascripts/infinitescroll/test/debug.js +0 -0
  145. data/vendor/assets/javascripts/infinitescroll/test/index.html +0 -0
  146. data/vendor/assets/javascripts/infinitescroll/test/index2.html +0 -0
  147. data/vendor/assets/javascripts/infinitescroll/test/index3.html +0 -0
  148. data/vendor/assets/javascripts/infinitescroll/test/jquery-1.6.1.js +0 -0
  149. data/vendor/assets/javascripts/infinitescroll/test/mobile.html +0 -0
  150. data/vendor/assets/javascripts/infinitescroll/test/mobile2.json +0 -0
  151. data/vendor/assets/javascripts/infinitescroll/test/mobile3.json +0 -0
  152. data/vendor/assets/javascripts/infinitescroll/test/mobile4.json +0 -0
  153. data/vendor/assets/javascripts/infinitescroll/test/style.css +0 -0
  154. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/img/ajax-loader.gif +0 -0
  155. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/includes/admin.php +0 -0
  156. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/includes/options.php +0 -0
  157. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/includes/presets.php +0 -0
  158. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/includes/submit.php +0 -0
  159. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/infinite-scroll.php +0 -0
  160. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/js/admin/infinite-scoll.js +0 -0
  161. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/js/admin/infinite-scroll.dev.js +0 -0
  162. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/js/front-end/jquery.infinitescroll.js +0 -0
  163. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/languages/infinite-scroll.pot +0 -0
  164. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/license.html +0 -0
  165. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/readme.md +0 -0
  166. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/readme.txt +0 -0
  167. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/screenshot-1.png +0 -0
  168. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/screenshot-2.png +0 -0
  169. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/screenshot-3.png +0 -0
  170. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/footer.php +0 -0
  171. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/manage-presets.php +0 -0
  172. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/options.php +0 -0
  173. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/preset-prompt.php +0 -0
  174. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/submit-prompt.php +0 -0
  175. data/vendor/assets/javascripts/infinitescroll/wordpress-plugin/templates/submit.php +0 -0
  176. data/vendor/assets/javascripts/touchswipe/README.md +0 -0
  177. data/vendor/assets/javascripts/touchswipe/jquery.touchSwipe.js +0 -0
  178. metadata +85 -96
  179. data/test/dummy/config/initializers/secret_token.rb +0 -7
  180. data/test/dummy/script/rails +0 -6
@@ -1,37 +1,41 @@
1
1
  Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.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
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
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
11
 
12
- # Show full error reports and disable caching
12
+ # Show full error reports and disable caching.
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
16
+ # Don't care if the mailer can't send.
17
17
  config.action_mailer.raise_delivery_errors = false
18
18
 
19
- # Print deprecation notices to the Rails logger
19
+ # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Only use best-standards-support built into browsers
23
- config.action_dispatch.best_standards_support = :builtin
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
27
29
 
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
30
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
31
33
 
32
- # Do not compress assets
33
- config.assets.compress = false
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
34
38
 
35
- # Expands the lines which load the assets
36
- config.assets.debug = true
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
37
41
  end
@@ -1,67 +1,79 @@
1
1
  Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
- # Code is not reloaded between requests
4
+ # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
- # Full error reports are disabled and caching is turned on
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
8
14
  config.consider_all_requests_local = false
9
15
  config.action_controller.perform_caching = true
10
16
 
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like
20
+ # NGINX, varnish or squid.
21
+ # config.action_dispatch.rack_cache = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
13
26
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
16
30
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
18
32
  config.assets.compile = false
19
33
 
20
- # Generate digests for assets URLs
34
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
+ # yet still be able to expire them through the digest params.
21
36
  config.assets.digest = true
22
37
 
23
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
38
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
25
39
 
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
40
+ # Specifies the header that your server uses for sending files.
41
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
29
43
 
30
44
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31
45
  # config.force_ssl = true
32
46
 
33
- # See everything in the log (default is :info)
34
- # config.log_level = :debug
47
+ # Use the lowest log level to ensure availability of diagnostic information
48
+ # when problems arise.
49
+ config.log_level = :debug
35
50
 
36
- # Prepend all log lines with the following tags
51
+ # Prepend all log lines with the following tags.
37
52
  # config.log_tags = [ :subdomain, :uuid ]
38
53
 
39
- # Use a different logger for distributed setups
54
+ # Use a different logger for distributed setups.
40
55
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41
56
 
42
- # Use a different cache store in production
57
+ # Use a different cache store in production.
43
58
  # config.cache_store = :mem_cache_store
44
59
 
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 )
60
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
+ # config.action_controller.asset_host = 'http://assets.example.com'
50
62
 
51
- # Disable delivery errors, bad email addresses will be ignored
63
+ # Ignore bad email addresses and do not raise email delivery errors.
64
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
65
  # config.action_mailer.raise_delivery_errors = false
53
66
 
54
- # Enable threaded mode
55
- # config.threadsafe!
56
-
57
67
  # 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)
68
+ # the I18n.default_locale when a translation cannot be found).
59
69
  config.i18n.fallbacks = true
60
70
 
61
- # Send deprecation notices to registered listeners
71
+ # Send deprecation notices to registered listeners.
62
72
  config.active_support.deprecation = :notify
63
73
 
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
74
+ # Use default logging formatter so that PID and timestamp are not suppressed.
75
+ config.log_formatter = ::Logger::Formatter.new
76
+
77
+ # Do not dump schema after migrations.
78
+ config.active_record.dump_schema_after_migration = false
67
79
  end
@@ -1,15 +1,20 @@
1
1
  Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+ config.allow_concurrency = false
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
6
6
  # your test database is "scratch space" for the test suite and is wiped
7
7
  # and recreated between test runs. Don't rely on the data there!
8
8
  config.cache_classes = true
9
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"
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static file server for tests with Cache-Control for performance.
16
+ config.serve_static_files = true
17
+ config.static_cache_control = 'public, max-age=3600'
13
18
 
14
19
  # Don't fallback to assets pipeline if a precompiled asset is missed
15
20
  #config.assets.compile = false
@@ -20,24 +25,27 @@ Dummy::Application.configure do
20
25
  # Log error messages when you accidentally call methods on nil
21
26
  config.whiny_nils = true
22
27
 
23
- # Show full error reports and disable caching
28
+ # Show full error reports and disable caching.
24
29
  config.consider_all_requests_local = true
25
30
  config.action_controller.perform_caching = false
26
31
 
27
- # Raise exceptions instead of rendering exception templates
32
+ # Raise exceptions instead of rendering exception templates.
28
33
  config.action_dispatch.show_exceptions = false
29
34
 
30
- # Disable request forgery protection in test environment
31
- config.action_controller.allow_forgery_protection = false
35
+ # Disable request forgery protection in test environment.
36
+ config.action_controller.allow_forgery_protection = false
32
37
 
33
38
  # Tell Action Mailer not to deliver emails to the real world.
34
39
  # The :test delivery method accumulates sent emails in the
35
40
  # ActionMailer::Base.deliveries array.
36
41
  config.action_mailer.delivery_method = :test
37
42
 
38
- # Raise exception on mass assignment protection for Active Record models
39
- config.active_record.mass_assignment_sanitizer = :strict
43
+ # Randomize the order test cases are executed.
44
+ config.active_support.test_order = :random
40
45
 
41
- # Print deprecation notices to the stderr
46
+ # Print deprecation notices to the stderr.
42
47
  config.active_support.deprecation = :stderr
48
+
49
+ # Raises error for missing translations
50
+ # config.action_view.raise_on_missing_translations = true
43
51
  end
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Dummy::Application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Dummy::Application.config.filter_parameters += [:password]
@@ -0,0 +1,2 @@
1
+ Formtastic::FormBuilder.action_class_finder = Formtastic::ActionClassFinder
2
+ Formtastic::FormBuilder.input_class_finder = Formtastic::InputClassFinder
@@ -1,15 +1,16 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
6
7
  # inflect.plural /^(ox)$/i, '\1en'
7
8
  # inflect.singular /^(ox)en/i, '\1'
8
9
  # inflect.irregular 'person', 'people'
9
10
  # inflect.uncountable %w( fish sheep )
10
11
  # end
11
- #
12
+
12
13
  # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
14
15
  # inflect.acronym 'RESTful'
15
16
  # end
@@ -2,4 +2,3 @@
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
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
@@ -1,14 +1,14 @@
1
1
  # Be sure to restart your server when you modify this file.
2
- #
2
+
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
9
  end
10
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
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,60 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ omniauth_callbacks:
27
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
+ success: "Successfully authenticated from %{kind} account."
29
+ passwords:
30
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
32
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33
+ updated: "Your password has been changed successfully. You are now signed in."
34
+ updated_not_active: "Your password has been changed successfully."
35
+ registrations:
36
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
37
+ signed_up: "Welcome! You have signed up successfully."
38
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
41
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
42
+ updated: "Your account has been updated successfully."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ already_signed_out: "Signed out successfully."
47
+ unlocks:
48
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
49
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
50
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
51
+ errors:
52
+ messages:
53
+ already_confirmed: "was already confirmed, please try signing in"
54
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
55
+ expired: "has expired, please request a new one"
56
+ not_found: "not found"
57
+ not_locked: "was not locked"
58
+ not_saved:
59
+ one: "1 error prohibited this %{resource} from being saved:"
60
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -1,5 +1,23 @@
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.
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
3
21
 
4
22
  en:
5
23
  hello: "Hello world"
@@ -1,9 +1,9 @@
1
- Rails.application.routes.draw do
1
+ Dummy::Application.routes.draw do
2
2
 
3
3
  root :to => 'lentil/images#index'
4
4
 
5
5
  ActiveAdmin.routes(self)
6
- devise_for :admin_users, :class_name => 'Lentil::AdminUser'
6
+ devise_for :admin_users, ActiveAdmin::Devise.config.merge(:class_name => 'Lentil::AdminUser')
7
7
  mount Lentil::Engine => "/lentil"
8
8
  end
9
9
 
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: 18c08ff4054a52e57ba10c9a0c58bf1a4a50162278381019610606cd2b5d952bfde1b6487cc1145d28b724c404c2d374c3eb32392b7c23d02566e609bec4bffb
15
+
16
+ test:
17
+ secret_key_base: 2edfedc40b876566ce7627a6d12517f3065f470bda034b42a3702458ea7d8f17a60bb2e70c66bd89abfcce5826ff2ac311bc2af9e8d16584589633a82b45d114
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>