s3_cors_fileupload 0.1.5 → 0.2.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/.document +4 -3
  3. data/.gitignore +3 -7
  4. data/CHANGELOG.md +9 -1
  5. data/Gemfile +11 -11
  6. data/Gemfile.lock +66 -74
  7. data/README.md +4 -3
  8. data/Rakefile +7 -9
  9. data/lib/generators/s3_cors_fileupload/install/templates/s3_uploads.js +16 -22
  10. data/lib/generators/s3_cors_fileupload/install/templates/s3_uploads_controller.rb +1 -1
  11. data/lib/generators/s3_cors_fileupload/install/templates/source_file.rb +2 -2
  12. data/lib/generators/s3_cors_fileupload/install/templates/views/erb/_template_download.html.erb +2 -2
  13. data/lib/generators/s3_cors_fileupload/install/templates/views/erb/_template_upload.html.erb +4 -4
  14. data/lib/generators/s3_cors_fileupload/install/templates/views/erb/_template_uploaded.html.erb +1 -1
  15. data/lib/generators/s3_cors_fileupload/install/templates/views/erb/index.html.erb +2 -2
  16. data/lib/generators/s3_cors_fileupload/install/templates/views/haml/_template_download.html.haml +2 -2
  17. data/lib/generators/s3_cors_fileupload/install/templates/views/haml/_template_upload.html.haml +4 -4
  18. data/lib/generators/s3_cors_fileupload/install/templates/views/haml/_template_uploaded.html.haml +2 -2
  19. data/lib/generators/s3_cors_fileupload/install/templates/views/haml/index.html.haml +2 -2
  20. data/lib/s3_cors_fileupload/rails/config.rb +0 -1
  21. data/lib/s3_cors_fileupload/rails/form_helper.rb +2 -4
  22. data/lib/s3_cors_fileupload/rails/policy_helper.rb +2 -2
  23. data/lib/s3_cors_fileupload/version.rb +3 -3
  24. data/s3_cors_fileupload.gemspec +12 -15
  25. data/spec/dummy/Rakefile +7 -0
  26. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  27. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  28. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/models/.gitkeep +0 -0
  31. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  32. data/spec/dummy/config.ru +4 -0
  33. data/spec/dummy/config/amazon_s3.yml +17 -0
  34. data/spec/dummy/config/application.rb +64 -0
  35. data/spec/dummy/config/boot.rb +10 -0
  36. data/spec/dummy/config/database.yml +25 -0
  37. data/spec/dummy/config/environment.rb +5 -0
  38. data/spec/dummy/config/environments/development.rb +37 -0
  39. data/spec/dummy/config/environments/production.rb +67 -0
  40. data/spec/dummy/config/environments/test.rb +37 -0
  41. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/spec/dummy/config/initializers/inflections.rb +15 -0
  43. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  44. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  45. data/spec/dummy/config/initializers/session_store.rb +8 -0
  46. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/spec/dummy/config/locales/en.yml +5 -0
  48. data/spec/dummy/config/routes.rb +58 -0
  49. data/spec/dummy/db/.gitkeep +0 -0
  50. data/spec/dummy/lib/assets/.gitkeep +0 -0
  51. data/spec/dummy/log/.gitkeep +0 -0
  52. data/spec/dummy/public/404.html +26 -0
  53. data/spec/dummy/public/422.html +26 -0
  54. data/spec/dummy/public/500.html +25 -0
  55. data/spec/dummy/public/favicon.ico +0 -0
  56. data/spec/dummy/script/rails +6 -0
  57. data/spec/lib/generators/install/install_generator_spec.rb +160 -0
  58. data/spec/lib/s3_cors_fileupload/rails/config_spec.rb +43 -0
  59. data/spec/{s3_cors_fileupload → lib/s3_cors_fileupload}/version_spec.rb +0 -0
  60. data/spec/spec_helper.rb +11 -2
  61. data/vendor/assets/javascripts/s3_cors_fileupload/jquery.fileupload-ui.js +117 -43
  62. data/vendor/assets/javascripts/s3_cors_fileupload/jquery.fileupload.js +187 -92
  63. data/vendor/assets/javascripts/s3_cors_fileupload/jquery.iframe-transport.js +20 -7
  64. data/vendor/assets/javascripts/s3_cors_fileupload/vendor/jquery.ui.widget.js +72 -53
  65. data/vendor/assets/javascripts/s3_cors_fileupload/vendor/load-image.js +225 -37
  66. data/vendor/assets/stylesheets/jquery.fileupload-ui.css.erb +6 -8
  67. metadata +78 -21
@@ -17,8 +17,8 @@
17
17
  <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
18
18
  <td colspan="2"></td>
19
19
  {% } %}
20
- <td class="delete">
21
- <button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}" data-confirmation="Are you sure?">
20
+ <td>
21
+ <button class="btn btn-danger delete" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}" data-confirmation="Are you sure?" {% if (file.delete_with_credentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
22
22
  <i class="icon-trash icon-white"></i>
23
23
  <span>Delete</span>
24
24
  </button>
@@ -11,8 +11,8 @@
11
11
  <td>
12
12
  <div class="progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>
13
13
  </td>
14
- <td class="start">{% if (!o.options.autoUpload) { %}
15
- <button class="btn btn-primary">
14
+ <td>{% if (!o.options.autoUpload) { %}
15
+ <button class="btn btn-primary start">
16
16
  <i class="icon-upload icon-white"></i>
17
17
  <span>Start</span>
18
18
  </button>
@@ -20,8 +20,8 @@
20
20
  {% } else { %}
21
21
  <td colspan="2"></td>
22
22
  {% } %}
23
- <td class="cancel">{% if (!i) { %}
24
- <button class="btn btn-warning">
23
+ <td>{% if (!i) { %}
24
+ <button class="btn btn-warning cancel">
25
25
  <i class="icon-ban-circle icon-white"></i>
26
26
  <span>Cancel</span>
27
27
  </button>
@@ -15,7 +15,7 @@
15
15
  <td class="size"><span>{%=formatFileSize(o.size)%}</span></td>
16
16
  <td colspan="2"></td>
17
17
  <td class="delete">
18
- <button class="btn btn-danger" data-type="DELETE" data-url="{%=o.delete_url%}" data-confirmation="Are you sure?">
18
+ <button class="btn btn-danger delete" data-type="DELETE" data-url="{%=o.delete_url%}" data-confirmation="Are you sure?" {% if (file.delete_with_credentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
19
19
  <i class="icon-trash icon-white"></i>
20
20
  <span>Delete</span>
21
21
  </button>
@@ -1,7 +1,7 @@
1
- <%= stylesheet_link_tag '//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css' %>
1
+ <%= stylesheet_link_tag '//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css' %>
2
2
 
3
3
  <div style="padding: 10px;">
4
- <h2>Upload file</h2>
4
+ <h2>Upload file(s)</h2>
5
5
  <%= s3_cors_fileupload_form_tag :id => 'fileupload' %>
6
6
 
7
7
  <div class="javascript-templates">
@@ -24,8 +24,8 @@
24
24
  %span {%=$('#fileupload').formatFileSize(file.size)%}
25
25
  %td{:colspan => "2"}
26
26
  {% } %}
27
- %td.delete
28
- %button.btn.btn-danger{"data-type" => "{%=file.delete_type%}", "data-url" => "{%=file.delete_url%}", "data-confirmation" => "Are you sure?"}
27
+ %td
28
+ %button.btn.btn-danger.delete{"data-type" => "{%=file.delete_type%}", "data-url" => "{%=file.delete_url%}", "data-confirmation" => "Are you sure?", "data-xhr-fields" => !"{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}".blank? && "{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}"}
29
29
  %i.icon-trash.icon-white
30
30
  %span Delete
31
31
  %input{:name => "delete", :type => "checkbox", :value => "1"}
@@ -17,18 +17,18 @@
17
17
  %td
18
18
  .progress.progress-success.progress-striped.active
19
19
  .bar{:style => "width:0%;"}
20
- %td.start
20
+ %td
21
21
  {% if (!o.options.autoUpload) { %}
22
- %button.btn.btn-primary
22
+ %button.btn.btn-primary.start
23
23
  %i.icon-upload.icon-white
24
24
  %span Start
25
25
  {% } %}
26
26
  {% } else { %}
27
27
  %td{:colspan => "2"}
28
28
  {% } %}
29
- %td.cancel
29
+ %td
30
30
  {% if (!i) { %}
31
- %button.btn.btn-warning
31
+ %button.btn.btn-warning.cancel
32
32
  %i.icon-ban-circle.icon-white
33
33
  %span Cancel
34
34
  {% } %}
@@ -14,8 +14,8 @@
14
14
  %td.size
15
15
  %span {%=formatFileSize(o.size)%}
16
16
  %td{:colspan => "2"}
17
- %td.delete
18
- %button.btn.btn-danger{"data-type" => "DELETE", "data-url" => "{%=o.delete_url%}", "data-confirmation" => "Are you sure?"}
17
+ %td
18
+ %button.btn.btn-danger.delete{"data-type" => "DELETE", "data-url" => "{%=o.delete_url%}", "data-confirmation" => "Are you sure?", "data-xhr-fields" => !"{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}".blank? && "{% if (file.delete_with_credentials) { %} {'withCredentials': true} {% } %}"}
19
19
  %i.icon-trash.icon-white
20
20
  %span Delete
21
21
  %input{:name => "delete", :type => "checkbox", :value => "1"}
@@ -1,7 +1,7 @@
1
- = stylesheet_link_tag '//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css'
1
+ = stylesheet_link_tag '//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css'
2
2
 
3
3
  %div{:style => 'padding: 10px;'}
4
- %h2 Upload file
4
+ %h2 Upload file(s)
5
5
  = s3_cors_fileupload_form_tag :id => 'fileupload'
6
6
 
7
7
  .javascript-templates
@@ -2,7 +2,6 @@ require 'yaml'
2
2
 
3
3
  module S3CorsFileupload
4
4
  module Config
5
-
6
5
  # this allows us to lazily instantiate the configuration by reading it in when it needs to be accessed
7
6
  class << self
8
7
  # if a method is called on the class, attempt to look it up in the config array
@@ -44,7 +44,7 @@ module S3CorsFileupload
44
44
  # hidden fields argument should be a hash of key value pairs (values may be blank if desired)
45
45
  def construct_form_html(hidden_fields, bucket, html_options = {}, &block)
46
46
  # now build the html for the form
47
- form_text = form_tag("https://#{bucket}.s3.amazonaws.com", build_form_options(html_options)) do
47
+ form_tag("https://#{bucket}.s3.amazonaws.com", build_form_options(html_options)) do
48
48
  hidden_fields.map do |name, value|
49
49
  hidden_field_tag(name, value)
50
50
  end.join.html_safe + "
@@ -84,10 +84,8 @@ module S3CorsFileupload
84
84
  <!-- The table listing the files available for upload/download -->
85
85
  <table class='table table-striped' id='upload_files'>
86
86
  <tbody class='files' data-target='#modal-gallery' data-toggle='modal-gallery'></tbody>
87
- </table>".html_safe
87
+ </table>".html_safe + (block ? capture(&block) : '')
88
88
  end
89
- form_text += capture(&block) if block
90
- form_text
91
89
  end
92
90
  end
93
91
  end
@@ -20,7 +20,7 @@ module S3CorsFileupload
20
20
  def policy_document
21
21
  Base64.encode64(
22
22
  {
23
- expiration: 1.hour.from_now.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z'),
23
+ expiration: 10.hours.from_now.utc.iso8601(3),
24
24
  conditions: [
25
25
  { bucket: options[:bucket] },
26
26
  { acl: options[:acl] },
@@ -38,7 +38,7 @@ module S3CorsFileupload
38
38
  def upload_signature
39
39
  Base64.encode64(
40
40
  OpenSSL::HMAC.digest(
41
- OpenSSL::Digest::Digest.new('sha1'),
41
+ OpenSSL::Digest::SHA1.new,
42
42
  options[:secret_access_key],
43
43
  self.policy_document
44
44
  )
@@ -1,5 +1,5 @@
1
1
  module S3CorsFileupload
2
- VERSION = '0.1.5'
3
- JQUERY_FILEUPLOAD_VERSION = '5.19'
4
- JQUERY_FILEUPLOAD_UI_VERSION = '6.10'
2
+ VERSION = '0.2.0.pre1'
3
+ JQUERY_FILEUPLOAD_VERSION = '5.26'
4
+ JQUERY_FILEUPLOAD_UI_VERSION = '7.4.1'
5
5
  end
@@ -11,25 +11,22 @@ Gem::Specification.new do |s|
11
11
  s.summary = "File uploads for Rails ~> 3.1 to AWS-S3 via CORS using the jQuery-File-Upload script"
12
12
  s.description = "Provides file uploads for Rails ~> 3.1 to AWS-S3 via CORS using the jQuery-File-Upload javascript"
13
13
  s.licenses = ["MIT"]
14
-
14
+
15
15
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
16
16
  s.rubygems_version = "1.8.24"
17
-
18
- s.add_dependency('rails', ['~> 3.1'])
19
- s.add_dependency('jquery-rails', ['>= 2.0'])
20
- s.add_dependency('aws-s3', ['~> 0.6']) # :require => 'aws/s3'
21
-
22
- s.add_development_dependency('rake', [">= 0.8.7"])
23
- s.add_development_dependency('bundler', [">= 0"])
24
-
25
-
17
+
26
18
  s.files = `git ls-files`.split("\n")
27
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
20
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
29
21
  s.require_paths = ['lib']
30
- s.extra_rdoc_files = [
31
- "LICENSE.txt",
32
- "README.md",
33
- "CHANGELOG.md"
34
- ]
22
+
23
+ s.extra_rdoc_files = %w(README.md CHANGELOG.md LICENSE.txt)
24
+ s.rdoc_options = %w(--charset=UTF-8)
25
+
26
+ s.add_dependency('rails', ['~> 3.1'])
27
+ s.add_dependency('jquery-rails', ['>= 2.0'])
28
+ s.add_dependency('aws-s3', ['~> 0.6']) # :require => 'aws/s3'
29
+
30
+ s.add_development_dependency('rake', ['>= 0.8.7'])
31
+ s.add_development_dependency('bundler', ['>= 0'])
35
32
  end
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::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,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
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</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>
@@ -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,17 @@
1
+ defaults: &defaults
2
+ access_key_id: your_access_key_id
3
+ secret_access_key: your_secret_access_key
4
+ acl: public-read # options: private, public-read, public-read-write, authenticated-read
5
+ max_file_size: 524288000 # 500 megabytes
6
+
7
+ development:
8
+ <<: *defaults
9
+ bucket: your_development_bucket_name
10
+
11
+ test:
12
+ <<: *defaults
13
+ bucket: your_development_bucket_name
14
+
15
+ production:
16
+ <<: *defaults
17
+ bucket: <%= ENV['S3_BUCKET'] || 'your_production_bucket_name_here' %>
@@ -0,0 +1,64 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ # require "action_mailer/railtie" # comment out since we aren't testing the mailers
7
+ require "active_resource/railtie"
8
+ require "sprockets/railtie"
9
+
10
+ Bundler.require(:default, Rails.env) if defined?(Bundler)
11
+ require 's3_cors_fileupload'
12
+
13
+ module Dummy
14
+ class Application < Rails::Application
15
+ # Settings in config/environments/* take precedence over those specified here.
16
+ # Application configuration should go into files in config/initializers
17
+ # -- all .rb files in that directory are automatically loaded.
18
+
19
+ # Custom directories with classes and modules you want to be autoloadable.
20
+ # config.autoload_paths += %W(#{config.root}/extras)
21
+
22
+ # Only load the plugins named here, in the order given (default is alphabetical).
23
+ # :all can be used as a placeholder for all plugins not explicitly named.
24
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
25
+
26
+ # Activate observers that should always be running.
27
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
28
+
29
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
30
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
31
+ # config.time_zone = 'Central Time (US & Canada)'
32
+
33
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
34
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
35
+ # config.i18n.default_locale = :de
36
+
37
+ # Configure the default encoding used in templates for Ruby 1.9.
38
+ config.encoding = "utf-8"
39
+
40
+ # Configure sensitive parameters which will be filtered from the log file.
41
+ config.filter_parameters += [:password]
42
+
43
+ # Enable escaping HTML in JSON.
44
+ config.active_support.escape_html_entities_in_json = true
45
+
46
+ # Use SQL instead of Active Record's schema dumper when creating the database.
47
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
48
+ # like if you have constraints or database-specific column types
49
+ # config.active_record.schema_format = :sql
50
+
51
+ # Enforce whitelist mode for mass assignment.
52
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
53
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
54
+ # parameters by using an attr_accessible or attr_protected declaration.
55
+ config.active_record.whitelist_attributes = true
56
+
57
+ # Enable the asset pipeline
58
+ config.assets.enabled = false
59
+
60
+ # Version of your assets, change this if you want to expire all your assets
61
+ config.assets.version = '1.0'
62
+ end
63
+ end
64
+
@@ -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,37 @@
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
+ # 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