carrierwave-dropbox 1.2.1 → 2.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.credentials.yml +1 -0
  3. data/.travis.yml +19 -0
  4. data/CHANGELOG.md +14 -0
  5. data/README.md +38 -28
  6. data/Rakefile +23 -3
  7. data/carrierwave-dropbox.gemspec +8 -10
  8. data/lib/carrierwave/dropbox.rb +0 -6
  9. data/lib/carrierwave/dropbox/version.rb +1 -1
  10. data/lib/carrierwave/storage/dropbox.rb +23 -21
  11. data/test/carrierwave_uploader_base_test.rb +17 -0
  12. data/test/dummy_app.rb +43 -0
  13. data/test/file_upload_test.rb +29 -0
  14. data/{spec → test}/fixtures/rails.png +0 -0
  15. data/{spec → test}/fixtures/ruby.png +0 -0
  16. data/test/test_helper.rb +30 -0
  17. metadata +43 -173
  18. data/.rspec +0 -1
  19. data/lib/carrierwave/dropbox/authorize.rake +0 -13
  20. data/lib/carrierwave/dropbox/railtie.rb +0 -9
  21. data/lib/carrierwave/dropbox/rake.rb +0 -41
  22. data/spec/carrierwave-uploader-base_spec.rb +0 -18
  23. data/spec/dummy/.gitignore +0 -16
  24. data/spec/dummy/Gemfile +0 -10
  25. data/spec/dummy/Rakefile +0 -6
  26. data/spec/dummy/app/controllers/application_controller.rb +0 -5
  27. data/spec/dummy/app/controllers/articles_controller.rb +0 -58
  28. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  30. data/spec/dummy/app/helpers/articles_helper.rb +0 -2
  31. data/spec/dummy/app/mailers/.keep +0 -0
  32. data/spec/dummy/app/models/.keep +0 -0
  33. data/spec/dummy/app/models/article.rb +0 -3
  34. data/spec/dummy/app/models/concerns/.keep +0 -0
  35. data/spec/dummy/app/uploaders/image_uploader.rb +0 -19
  36. data/spec/dummy/app/views/articles/_form.html.erb +0 -29
  37. data/spec/dummy/app/views/articles/edit.html.erb +0 -6
  38. data/spec/dummy/app/views/articles/index.html.erb +0 -31
  39. data/spec/dummy/app/views/articles/new.html.erb +0 -5
  40. data/spec/dummy/app/views/articles/show.html.erb +0 -1
  41. data/spec/dummy/app/views/layouts/application.html.erb +0 -12
  42. data/spec/dummy/bin/bundle +0 -3
  43. data/spec/dummy/bin/rails +0 -4
  44. data/spec/dummy/bin/rake +0 -4
  45. data/spec/dummy/config.ru +0 -4
  46. data/spec/dummy/config/application.rb +0 -23
  47. data/spec/dummy/config/boot.rb +0 -4
  48. data/spec/dummy/config/database.yml +0 -25
  49. data/spec/dummy/config/environment.rb +0 -5
  50. data/spec/dummy/config/environments/development.rb +0 -29
  51. data/spec/dummy/config/environments/production.rb +0 -80
  52. data/spec/dummy/config/environments/test.rb +0 -36
  53. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  54. data/spec/dummy/config/initializers/carrierwave.rb +0 -8
  55. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  56. data/spec/dummy/config/initializers/inflections.rb +0 -16
  57. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  58. data/spec/dummy/config/initializers/secret_token.rb +0 -12
  59. data/spec/dummy/config/initializers/session_store.rb +0 -3
  60. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  61. data/spec/dummy/config/locales/en.yml +0 -23
  62. data/spec/dummy/config/routes.rb +0 -58
  63. data/spec/dummy/db/migrate/20140224111953_create_articles.rb +0 -11
  64. data/spec/dummy/db/schema.rb +0 -24
  65. data/spec/dummy/db/seeds.rb +0 -7
  66. data/spec/dummy/public/404.html +0 -58
  67. data/spec/dummy/public/422.html +0 -58
  68. data/spec/dummy/public/500.html +0 -57
  69. data/spec/dummy/public/favicon.ico +0 -0
  70. data/spec/dummy/public/robots.txt +0 -5
  71. data/spec/features/upload_file_spec.rb +0 -46
  72. data/spec/spec_helper.rb +0 -16
@@ -1,57 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>We're sorry, but something went wrong (500)</title>
5
- <style>
6
- body {
7
- background-color: #EFEFEF;
8
- color: #2E2F30;
9
- text-align: center;
10
- font-family: arial, sans-serif;
11
- }
12
-
13
- div.dialog {
14
- width: 25em;
15
- margin: 4em auto 0 auto;
16
- border: 1px solid #CCC;
17
- border-right-color: #999;
18
- border-left-color: #999;
19
- border-bottom-color: #BBB;
20
- border-top: #B00100 solid 4px;
21
- border-top-left-radius: 9px;
22
- border-top-right-radius: 9px;
23
- background-color: white;
24
- padding: 7px 4em 0 4em;
25
- }
26
-
27
- h1 {
28
- font-size: 100%;
29
- color: #730E15;
30
- line-height: 1.5em;
31
- }
32
-
33
- body > p {
34
- width: 33em;
35
- margin: 0 auto 1em;
36
- padding: 1em 0;
37
- background-color: #F7F7F7;
38
- border: 1px solid #CCC;
39
- border-right-color: #999;
40
- border-bottom-color: #999;
41
- border-bottom-left-radius: 4px;
42
- border-bottom-right-radius: 4px;
43
- border-top-color: #DADADA;
44
- color: #666;
45
- box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
- }
47
- </style>
48
- </head>
49
-
50
- <body>
51
- <!-- This file lives in public/500.html -->
52
- <div class="dialog">
53
- <h1>We're sorry, but something went wrong.</h1>
54
- </div>
55
- <p>If you are the application owner check the logs for more information.</p>
56
- </body>
57
- </html>
File without changes
@@ -1,5 +0,0 @@
1
- # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
- #
3
- # To ban all spiders from the entire site uncomment the next two lines:
4
- # User-agent: *
5
- # Disallow: /
@@ -1,46 +0,0 @@
1
- feature "Upload a file to Dropbox" do
2
-
3
- scenario "Uploading a simple file then edit it" do
4
- Article.delete_all
5
- Article.count.should eq(0)
6
-
7
- visit "/articles/new"
8
-
9
- within("form") do
10
- fill_in "Title", with: "Hello world!"
11
- fill_in "Body", with: "Foo bar baz"
12
- attach_file "Image", File.expand_path('spec/fixtures/ruby.png')
13
-
14
- find("input[type='submit']").click
15
- end
16
-
17
- page.should have_content("Article was successfully created")
18
- Article.count.should eq(1)
19
-
20
- article = Article.last
21
-
22
- image_path = article.image.url
23
- thumb_path = article.image.url(:thumbnail)
24
-
25
- visit image_path
26
- image_path.should match(/foo/)
27
- page.should have_css("img[src='#{image_path}']")
28
-
29
- visit thumb_path
30
- thumb_path.should match(/foo/)
31
- page.should have_css("img[src='#{thumb_path}']")
32
-
33
- visit "/articles/#{article.id}/edit"
34
-
35
- within("form") do
36
- attach_file "Image", File.expand_path('spec/fixtures/rails.png')
37
- find("input[type='submit']").click
38
- end
39
-
40
- page.should have_content("Article was successfully updated")
41
- new_image_path = Article.last.image.url
42
-
43
- visit new_image_path
44
- page.should have_css("img[src='#{new_image_path}']")
45
- end
46
- end
@@ -1,16 +0,0 @@
1
- ENV["RAILS_ENV"] = "test"
2
- require 'rspec'
3
-
4
- require 'dummy/config/environment'
5
-
6
- require 'carrierwave'
7
- require 'carrierwave/dropbox'
8
-
9
- require 'capybara-webkit'
10
- require 'capybara/rspec'
11
-
12
- RSpec.configure do |config|
13
- Capybara.app = Dummy::Application
14
- Capybara.current_driver = :webkit
15
- config.order = 'random'
16
- end