rails-uploader 0.5.7 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -7
  3. data/lib/generators/uploader/install/templates/20130905144515_create_assets.rb +1 -1
  4. data/lib/uploader/fileupload_glue.rb +22 -0
  5. data/lib/uploader/fileuploads.rb +2 -1
  6. data/lib/uploader/helpers/field_tag.rb +4 -8
  7. data/lib/uploader/version.rb +1 -1
  8. data/spec/dummy/Rakefile +2 -3
  9. data/spec/dummy/app/assets/config/manifest.js +1 -1
  10. data/spec/dummy/app/assets/stylesheets/application.css +7 -5
  11. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  12. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  13. data/spec/dummy/app/controllers/application_controller.rb +2 -1
  14. data/spec/dummy/app/jobs/application_job.rb +7 -0
  15. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  16. data/spec/dummy/app/models/application_record.rb +3 -0
  17. data/spec/dummy/app/models/article.rb +1 -1
  18. data/spec/dummy/app/models/asset.rb +1 -1
  19. data/spec/dummy/app/views/layouts/application.html.erb +18 -9
  20. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  21. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  22. data/spec/dummy/app/views/pwa/manifest.json.erb +22 -0
  23. data/spec/dummy/app/views/pwa/service-worker.js +26 -0
  24. data/spec/dummy/bin/rails +4 -0
  25. data/spec/dummy/bin/rake +4 -0
  26. data/spec/dummy/bin/setup +37 -0
  27. data/spec/dummy/config/application.rb +39 -47
  28. data/spec/dummy/config/boot.rb +4 -9
  29. data/spec/dummy/config/cable.yml +10 -0
  30. data/spec/dummy/config/database.yml +20 -13
  31. data/spec/dummy/config/environment.rb +4 -4
  32. data/spec/dummy/config/environments/development.rb +64 -22
  33. data/spec/dummy/config/environments/production.rb +74 -41
  34. data/spec/dummy/config/environments/test.rb +51 -20
  35. data/spec/dummy/config/initializers/assets.rb +12 -0
  36. data/spec/dummy/config/initializers/content_security_policy.rb +25 -0
  37. data/spec/dummy/config/initializers/filter_parameter_logging.rb +8 -0
  38. data/spec/dummy/config/initializers/inflections.rb +10 -9
  39. data/spec/dummy/config/initializers/permissions_policy.rb +13 -0
  40. data/spec/dummy/config/locales/en.yml +28 -2
  41. data/spec/dummy/config/puma.rb +34 -0
  42. data/spec/dummy/config/storage.yml +34 -0
  43. data/spec/dummy/config.ru +4 -2
  44. data/spec/dummy/db/migrate/20120508093830_create_articles.rb +1 -1
  45. data/spec/dummy/db/migrate/20130905144515_create_assets.rb +34 -0
  46. data/spec/dummy/log/test.log +1677 -0
  47. data/spec/dummy/public/404.html +55 -14
  48. data/spec/dummy/public/406-unsupported-browser.html +66 -0
  49. data/spec/dummy/public/422.html +55 -14
  50. data/spec/dummy/public/500.html +54 -13
  51. data/spec/dummy/public/icon.png +0 -0
  52. data/spec/dummy/public/icon.svg +3 -0
  53. data/spec/dummy/public/uploads/picture/data/1/rails.png +0 -0
  54. data/spec/dummy/public/uploads/picture/data/1/thumb_rails.png +0 -0
  55. data/spec/dummy/storage/test.sqlite3 +0 -0
  56. data/spec/dummy/tmp/local_secret.txt +1 -0
  57. data/spec/factories/factories.rb +16 -0
  58. data/spec/fileuploads_spec.rb +30 -30
  59. data/spec/mongoid_spec.rb +5 -3
  60. data/spec/rails_helper.rb +80 -0
  61. data/spec/requests/attachments_controller_spec.rb +4 -4
  62. data/spec/spec_helper.rb +84 -45
  63. data/spec/uploader_spec.rb +5 -3
  64. metadata +88 -91
  65. data/spec/dummy/README.rdoc +0 -261
  66. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  67. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  68. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  69. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  70. data/spec/dummy/config/initializers/session_store.rb +0 -8
  71. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  72. data/spec/dummy/script/rails +0 -6
  73. data/spec/factories/articles.rb +0 -9
  74. data/spec/factories/assets.rb +0 -11
  75. /data/spec/dummy/{public/favicon.ico → log/development.log} +0 -0
@@ -1,15 +0,0 @@
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 .
@@ -1,7 +0,0 @@
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!
@@ -1,5 +0,0 @@
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
@@ -1,7 +0,0 @@
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 = '42c54cf2c95774db504d00b648adec5ef0cec9a0087f65fbcc05408169beb542342f1a313eab1d6f6ca32a82daaee7c0c81889118e32b79632499cfda9c4aca2'
@@ -1,8 +0,0 @@
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
@@ -1,14 +0,0 @@
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,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
-
4
- APP_PATH = File.expand_path('../../config/application', __FILE__)
5
- require File.expand_path('../../config/boot', __FILE__)
6
- require 'rails/commands'
@@ -1,9 +0,0 @@
1
- # Read about factories at https://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :article do
5
- title "MyString"
6
- content "MyText"
7
- end
8
- end
9
-
@@ -1,11 +0,0 @@
1
- # Read about factories at https://github.com/thoughtbot/factory_girl
2
-
3
- FactoryGirl.define do
4
- factory :picture, class: Picture do
5
- data File.open('spec/factories/files/rails.png')
6
- data_content_type 'image/png'
7
- data_file_name 'rails.png'
8
-
9
- association :assetable, factory: :article
10
- end
11
- end