carrierwave-dropbox 1.2.1 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.credentials.yml +1 -0
- data/.travis.yml +19 -0
- data/CHANGELOG.md +14 -0
- data/README.md +38 -28
- data/Rakefile +23 -3
- data/carrierwave-dropbox.gemspec +8 -10
- data/lib/carrierwave/dropbox.rb +0 -6
- data/lib/carrierwave/dropbox/version.rb +1 -1
- data/lib/carrierwave/storage/dropbox.rb +23 -21
- data/test/carrierwave_uploader_base_test.rb +17 -0
- data/test/dummy_app.rb +43 -0
- data/test/file_upload_test.rb +29 -0
- data/{spec → test}/fixtures/rails.png +0 -0
- data/{spec → test}/fixtures/ruby.png +0 -0
- data/test/test_helper.rb +30 -0
- metadata +43 -173
- data/.rspec +0 -1
- data/lib/carrierwave/dropbox/authorize.rake +0 -13
- data/lib/carrierwave/dropbox/railtie.rb +0 -9
- data/lib/carrierwave/dropbox/rake.rb +0 -41
- data/spec/carrierwave-uploader-base_spec.rb +0 -18
- data/spec/dummy/.gitignore +0 -16
- data/spec/dummy/Gemfile +0 -10
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/app/controllers/articles_controller.rb +0 -58
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/helpers/articles_helper.rb +0 -2
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/article.rb +0 -3
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/uploaders/image_uploader.rb +0 -19
- data/spec/dummy/app/views/articles/_form.html.erb +0 -29
- data/spec/dummy/app/views/articles/edit.html.erb +0 -6
- data/spec/dummy/app/views/articles/index.html.erb +0 -31
- data/spec/dummy/app/views/articles/new.html.erb +0 -5
- data/spec/dummy/app/views/articles/show.html.erb +0 -1
- data/spec/dummy/app/views/layouts/application.html.erb +0 -12
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -23
- data/spec/dummy/config/boot.rb +0 -4
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/carrierwave.rb +0 -8
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -58
- data/spec/dummy/db/migrate/20140224111953_create_articles.rb +0 -11
- data/spec/dummy/db/schema.rb +0 -24
- data/spec/dummy/db/seeds.rb +0 -7
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/robots.txt +0 -5
- data/spec/features/upload_file_spec.rb +0 -46
- data/spec/spec_helper.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc4b846c16c771138463642ee278c3805410f523
|
4
|
+
data.tar.gz: 309d167289d24c0b70ddfffbb8b0a9a16eedf08f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cc6baaf8f09b8005e9436ab7f0bba6be6a1ea3ef0bbb74b81dbba0a0640cd6182c862dd048f5b2e1ec91987c3c454f3648c88f5d26ad09a14d61ffe0d986e72
|
7
|
+
data.tar.gz: 07b3c1b93dc14dbafaeca324ace22025af8f896cba6418ee60dd0eb2819ca4bfb1bc51f7a2e1077a70516765a09f16632f683f23410b355e6220f6c64308684c
|
data/.credentials.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
access_token: ""
|
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
rvm:
|
4
|
+
- 2.2
|
5
|
+
- 2.3
|
6
|
+
- 2.4
|
7
|
+
- 2.5
|
8
|
+
- rbx-3.91
|
9
|
+
|
10
|
+
before_install:
|
11
|
+
- gem install bundler
|
12
|
+
|
13
|
+
matrix:
|
14
|
+
allow_failures:
|
15
|
+
- rvm: rbx-3.91
|
16
|
+
|
17
|
+
env:
|
18
|
+
global:
|
19
|
+
secure: "KZEG8GjN1P3pHyK8QjOfNF4jZk+GfUonGIJdVplSTJJGE/RywtTCWtPGRmjB3BnLvCrlfLkrhNXwM5ZWN07iDELDJhh4Xlg8mSZ+snsGsezUM7lSHsyHebl2uN2tcRrJQD2Eh55tQDa/BGABRwva6mc6E1gEzgy9UHXVFhT8d30="
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.0.0
|
4
|
+
|
5
|
+
* Only test against Ruby 2.2+ and Rails 5.1+. This gem might work
|
6
|
+
with previous versions of Ruby and Rails but it's not guaranteed.
|
7
|
+
|
8
|
+
* Use file IDs instead of file name to retrieve files.
|
9
|
+
|
10
|
+
This allows people to move files around and still get these files
|
11
|
+
without changing the URL.
|
12
|
+
|
13
|
+
*mful*
|
14
|
+
|
15
|
+
* Use version 2 of the Dropbox API (*Steve Bell*)
|
16
|
+
|
3
17
|
## 1.2.1 (February 24, 2014)
|
4
18
|
|
5
19
|
* Use the uploader's store_path instead of the root
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Carrierwave uploads on Dropbox
|
2
2
|
|
3
3
|
This gem allows you to easily upload your medias on Dropbox using the awesome
|
4
|
-
[
|
4
|
+
[CarrierWave](https://github.com/carrierwaveuploader/carrierwave) gem.
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -16,41 +16,21 @@ Then, add this line to your application's Gemfile:
|
|
16
16
|
gem 'carrierwave-dropbox'
|
17
17
|
~~~
|
18
18
|
|
19
|
-
|
20
|
-
to run the `rake authorize` command to authorize your application to access to
|
21
|
-
your Dropbox.
|
19
|
+
Then run `bundle` to install the gem.
|
22
20
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
~~~ruby
|
27
|
-
load "carrierwave/dropbox/authorize.rake"
|
28
|
-
~~~
|
29
|
-
|
30
|
-
Then you have to run this task:
|
31
|
-
|
32
|
-
~~~bash
|
33
|
-
rake dropbox:authorize APP_KEY=app_key APP_SECRET=app_secret ACCESS_TYPE=dropbox|app_folder
|
34
|
-
~~~
|
35
|
-
|
36
|
-
Finally, you will get your credentials. Config CarrierWave to make it work with
|
37
|
-
your Dropbox:
|
21
|
+
To make a Dropbox app and generate a token, go [here](https://www.dropbox.com/developers/apps).
|
22
|
+
Then, specify the token in your configuration (in an initializer for instance)
|
23
|
+
like this:
|
38
24
|
|
39
25
|
~~~ruby
|
40
26
|
CarrierWave.configure do |config|
|
41
|
-
config.
|
42
|
-
config.dropbox_app_secret = ENV["APP_SECRET"]
|
43
|
-
config.dropbox_access_token = ENV["ACCESS_TOKEN"]
|
44
|
-
config.dropbox_access_token_secret = ENV["ACCESS_TOKEN_SECRET"]
|
45
|
-
config.dropbox_user_id = ENV["USER_ID"]
|
46
|
-
config.dropbox_access_type = "dropbox"
|
27
|
+
config.dropbox_access_token = Rails.application.dropbox_access_token
|
47
28
|
end
|
48
29
|
~~~
|
49
30
|
|
50
31
|
**Note**: It's advisable not to directly store the credentials in your files
|
51
|
-
especially if you are using a SCM (e.g.
|
52
|
-
|
53
|
-
like in the above example.
|
32
|
+
especially if you are using a SCM (e.g. Git). You should rather rely on Rails'
|
33
|
+
`secrets` feature.
|
54
34
|
|
55
35
|
Then you can either specify in your uploader files the storage or define it
|
56
36
|
globally through `CarrierWave.configure`:
|
@@ -61,6 +41,36 @@ class ImageUploader < CarrierWave::Uploader::Base
|
|
61
41
|
end
|
62
42
|
~~~
|
63
43
|
|
44
|
+
## Notable differences from other storage engines
|
45
|
+
|
46
|
+
Unlike typical CarrierWave storage engines, we do not assume an uploaded file
|
47
|
+
will always be at the same path, as Dropbox UI users may move files around. As
|
48
|
+
such, this gem relies on the file id. There are two significant implications to
|
49
|
+
this approach:
|
50
|
+
|
51
|
+
1. The `#store_path` and `#store_dir` methods are not guaranteed to be accurate
|
52
|
+
after the initial file upload. We do not overwrite these methods as the end user
|
53
|
+
will often overwrite these methods to specify where the file should initially
|
54
|
+
be stored.
|
55
|
+
2. The default `#filename` method is not accurate, as we are storing the Dropbox
|
56
|
+
id, rather than the name of the file. It's recommended that end users overwrite
|
57
|
+
the `#filename` method to delegate to the `CarrierWave::Storage::Dropbox::File`
|
58
|
+
interface. For example:
|
59
|
+
|
60
|
+
~~~ruby
|
61
|
+
class MyUploader < CarrierWave::Uploader::Base
|
62
|
+
storage :dropbox
|
63
|
+
|
64
|
+
def filename
|
65
|
+
if original_filename
|
66
|
+
# Perform any file name manipulation on initial upload
|
67
|
+
elsif file
|
68
|
+
file.filename
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
~~~
|
73
|
+
|
64
74
|
## Special thanks
|
65
75
|
|
66
76
|
This project is highly based on these two gems:
|
data/Rakefile
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require "
|
2
|
+
require "rake/testtask"
|
3
3
|
|
4
|
-
|
4
|
+
Rake::TestTask.new("test_unit") do |t|
|
5
|
+
t.libs << "test"
|
6
|
+
t.pattern = 'test/**/*_test.rb'
|
7
|
+
t.verbose = true
|
8
|
+
t.warning = false
|
9
|
+
t.description = "Run the unit tests without loading .credentials.yml"
|
10
|
+
end
|
5
11
|
|
6
|
-
task :
|
12
|
+
task :load_credentials do
|
13
|
+
require 'yaml'
|
14
|
+
|
15
|
+
path = File.expand_path("../.credentials.yml", __FILE__)
|
16
|
+
hash = YAML.load(File.read(path))
|
17
|
+
|
18
|
+
hash.each do |key, value|
|
19
|
+
ENV[key.upcase] ||= value
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Run the unit tests"
|
24
|
+
task test: [:load_credentials, :test_unit]
|
25
|
+
|
26
|
+
task default: :test
|
data/carrierwave-dropbox.gemspec
CHANGED
@@ -18,15 +18,13 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "carrierwave", "~>
|
22
|
-
spec.add_dependency "dropbox-sdk", "~>
|
21
|
+
spec.add_dependency "carrierwave", "~> 1.2"
|
22
|
+
spec.add_dependency "dropbox-sdk-v2", "~> 0.0.3"
|
23
23
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 1.
|
25
|
-
spec.add_development_dependency "rake"
|
26
|
-
spec.add_development_dependency "
|
27
|
-
spec.add_development_dependency "
|
28
|
-
spec.add_development_dependency "
|
29
|
-
spec.add_development_dependency "
|
30
|
-
spec.add_development_dependency "capybara-webkit", "~> 1.0"
|
31
|
-
spec.add_development_dependency "rails", ">= 3.2.14", "< 5.0"
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
25
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
26
|
+
spec.add_development_dependency "rack-test", "~> 0.8"
|
27
|
+
spec.add_development_dependency "sqlite3", "~> 1.3"
|
28
|
+
spec.add_development_dependency "sinatra", "~> 2.0"
|
29
|
+
spec.add_development_dependency "activerecord", "~> 5.1"
|
32
30
|
end
|
data/lib/carrierwave/dropbox.rb
CHANGED
@@ -2,15 +2,9 @@ require 'carrierwave'
|
|
2
2
|
require 'carrierwave/storage/dropbox'
|
3
3
|
|
4
4
|
require 'carrierwave/dropbox/version'
|
5
|
-
require 'carrierwave/dropbox/railtie' if defined?(Rails)
|
6
5
|
|
7
6
|
class CarrierWave::Uploader::Base
|
8
|
-
add_config :dropbox_app_key
|
9
|
-
add_config :dropbox_app_secret
|
10
7
|
add_config :dropbox_access_token
|
11
|
-
add_config :dropbox_access_token_secret
|
12
|
-
add_config :dropbox_user_id
|
13
|
-
add_config :dropbox_access_type
|
14
8
|
|
15
9
|
configure do |config|
|
16
10
|
config.storage_engines[:dropbox] = 'CarrierWave::Storage::Dropbox'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require '
|
2
|
+
require 'dropbox'
|
3
3
|
|
4
4
|
module CarrierWave
|
5
5
|
module Storage
|
@@ -10,20 +10,21 @@ module CarrierWave
|
|
10
10
|
|
11
11
|
# Store a single file
|
12
12
|
def store!(file)
|
13
|
-
location =
|
14
|
-
dropbox_client.
|
13
|
+
location = "/#{uploader.store_path}"
|
14
|
+
res = dropbox_client.upload(location, file.to_file)
|
15
|
+
uploader.model.update_column uploader.mounted_as, res.id
|
15
16
|
end
|
16
17
|
|
17
18
|
# Retrieve a single file
|
18
|
-
def retrieve!(
|
19
|
-
|
19
|
+
def retrieve!(file_id)
|
20
|
+
# allow for use of either path or ID as the file identifier
|
21
|
+
id = file_id.match(/^id:/) ? file_id : "/#{uploader.store_path file_id}"
|
22
|
+
CarrierWave::Storage::Dropbox::File.new(uploader, config, id, dropbox_client)
|
20
23
|
end
|
21
24
|
|
22
25
|
def dropbox_client
|
23
26
|
@dropbox_client ||= begin
|
24
|
-
|
25
|
-
session.set_access_token(config[:access_token], config[:access_token_secret])
|
26
|
-
DropboxClient.new(session, config[:access_type])
|
27
|
+
::Dropbox::Client.new(config[:access_token])
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
@@ -32,34 +33,35 @@ module CarrierWave
|
|
32
33
|
def config
|
33
34
|
@config ||= {}
|
34
35
|
|
35
|
-
@config[:app_key] ||= uploader.dropbox_app_key
|
36
|
-
@config[:app_secret] ||= uploader.dropbox_app_secret
|
37
36
|
@config[:access_token] ||= uploader.dropbox_access_token
|
38
|
-
@config[:access_token_secret] ||= uploader.dropbox_access_token_secret
|
39
|
-
@config[:access_type] ||= uploader.dropbox_access_type || "dropbox"
|
40
|
-
@config[:user_id] ||= uploader.dropbox_user_id
|
41
37
|
|
42
38
|
@config
|
43
39
|
end
|
44
40
|
|
45
41
|
class File
|
46
42
|
include CarrierWave::Utilities::Uri
|
47
|
-
attr_reader :
|
43
|
+
attr_reader :file_id
|
48
44
|
|
49
|
-
def initialize(uploader, config,
|
50
|
-
@uploader, @config, @
|
45
|
+
def initialize(uploader, config, file_id, client)
|
46
|
+
@uploader, @config, @file_id, @client = uploader, config, file_id, client
|
47
|
+
end
|
48
|
+
|
49
|
+
def file_data
|
50
|
+
@file_data ||= @client.get_temporary_link(@file_id)
|
51
|
+
end
|
52
|
+
|
53
|
+
def filename
|
54
|
+
file_data[0].name
|
51
55
|
end
|
52
56
|
|
53
57
|
def url
|
54
|
-
|
58
|
+
file_data[1]
|
55
59
|
end
|
56
60
|
|
57
61
|
def delete
|
58
|
-
path = @path
|
59
|
-
path = "/#{path}" if @config[:access_type] == "dropbox"
|
60
62
|
begin
|
61
|
-
@client.
|
62
|
-
rescue
|
63
|
+
@client.delete @file_id
|
64
|
+
rescue ::Dropbox::ApiError
|
63
65
|
end
|
64
66
|
end
|
65
67
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CarrierWaveUploaderBaseTest < Minitest::Test
|
4
|
+
def setup
|
5
|
+
@object = CarrierWave::Uploader::Base
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_dropbox_storage
|
9
|
+
@object.configure do |c|
|
10
|
+
assert c.storage_engines.key?(:dropbox)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_respond_to_configuration_methods
|
15
|
+
assert @object.respond_to?(:dropbox_access_token)
|
16
|
+
end
|
17
|
+
end
|
data/test/dummy_app.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
|
3
|
+
require 'active_record'
|
4
|
+
require 'carrierwave'
|
5
|
+
require 'carrierwave/dropbox'
|
6
|
+
require 'carrierwave/orm/activerecord'
|
7
|
+
|
8
|
+
ActiveRecord::Base.establish_connection(
|
9
|
+
adapter: 'sqlite3',
|
10
|
+
database: ':memory:'
|
11
|
+
)
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define do
|
14
|
+
create_table :images do |t|
|
15
|
+
t.string :attachment
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
CarrierWave.configure do |config|
|
20
|
+
config.dropbox_access_token = ENV["ACCESS_TOKEN"]
|
21
|
+
end
|
22
|
+
|
23
|
+
class ImageUploader < CarrierWave::Uploader::Base
|
24
|
+
storage :dropbox
|
25
|
+
|
26
|
+
def store_dir
|
27
|
+
"test/images/#{model.id}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class Image < ActiveRecord::Base
|
32
|
+
mount_uploader :attachment, ImageUploader
|
33
|
+
end
|
34
|
+
|
35
|
+
class DummyApplication < Sinatra::Application
|
36
|
+
post '/image/upload' do
|
37
|
+
Image.create!(attachment: params[:attachment])
|
38
|
+
end
|
39
|
+
|
40
|
+
put '/image/edit/:id' do |id|
|
41
|
+
Image.find(id).update(attachment: params[:attachment])
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
class FileUploadTest < Minitest::Test
|
5
|
+
def test_uploading_a_simple_file
|
6
|
+
original_count = Image.count
|
7
|
+
|
8
|
+
post "/image/upload", attachment: file_upload('rails.png')
|
9
|
+
|
10
|
+
assert last_response.ok?
|
11
|
+
assert_equal 1, (Image.count - original_count)
|
12
|
+
refute Image.last.attachment.url.empty?
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def test_upload_image_editing
|
17
|
+
post "/image/upload", attachment: file_upload('ruby.png')
|
18
|
+
image = Image.last
|
19
|
+
|
20
|
+
uploaded_image = Net::HTTP.get(URI image.attachment.url)
|
21
|
+
assert_match md5_data(File.read(File.expand_path("../fixtures/ruby.png", __FILE__))), md5_data(uploaded_image)
|
22
|
+
|
23
|
+
put "/image/edit/#{image.id}", attachment: file_upload('rails.png')
|
24
|
+
|
25
|
+
new_image = Net::HTTP.get(URI Image.last.attachment.url)
|
26
|
+
assert last_response.ok?
|
27
|
+
assert_match md5_data(File.read(File.expand_path("../fixtures/rails.png", __FILE__))), md5_data(new_image)
|
28
|
+
end
|
29
|
+
end
|
File without changes
|
File without changes
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
ENV["RACK_ENV"] = "test"
|
2
|
+
|
3
|
+
require 'rack/test'
|
4
|
+
|
5
|
+
require 'dummy_app'
|
6
|
+
require 'minitest/autorun'
|
7
|
+
require 'fileutils'
|
8
|
+
|
9
|
+
class Minitest::Test
|
10
|
+
include Rack::Test::Methods
|
11
|
+
|
12
|
+
def teardown
|
13
|
+
FileUtils.rm_rf(File.expand_path("../public", __FILE__))
|
14
|
+
end
|
15
|
+
|
16
|
+
def app
|
17
|
+
DummyApplication
|
18
|
+
end
|
19
|
+
|
20
|
+
def file_upload(image)
|
21
|
+
path = File.expand_path("../fixtures/#{image}", __FILE__)
|
22
|
+
Rack::Test::UploadedFile.new(path, "image/png")
|
23
|
+
end
|
24
|
+
|
25
|
+
def md5_data(data)
|
26
|
+
md5 = Digest::MD5.new
|
27
|
+
md5 << data
|
28
|
+
md5.to_s
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-dropbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Dupret
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|
@@ -16,146 +16,112 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: dropbox-sdk
|
28
|
+
name: dropbox-sdk-v2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.16'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.16'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: capybara
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
61
|
+
version: '12.3'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
68
|
+
version: '12.3'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: rack-test
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
75
|
+
version: '0.8'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
80
|
- - "~>"
|
95
81
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
82
|
+
version: '0.8'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
84
|
name: sqlite3
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
|
-
- - "
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: mini_magick
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
87
|
+
- - "~>"
|
116
88
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
89
|
+
version: '1.3'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
93
|
requirements:
|
122
|
-
- - "
|
94
|
+
- - "~>"
|
123
95
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
96
|
+
version: '1.3'
|
125
97
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
98
|
+
name: sinatra
|
127
99
|
requirement: !ruby/object:Gem::Requirement
|
128
100
|
requirements:
|
129
101
|
- - "~>"
|
130
102
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
103
|
+
version: '2.0'
|
132
104
|
type: :development
|
133
105
|
prerelease: false
|
134
106
|
version_requirements: !ruby/object:Gem::Requirement
|
135
107
|
requirements:
|
136
108
|
- - "~>"
|
137
109
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
110
|
+
version: '2.0'
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
112
|
+
name: activerecord
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
142
114
|
requirements:
|
143
|
-
- - "
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 3.2.14
|
146
|
-
- - "<"
|
115
|
+
- - "~>"
|
147
116
|
- !ruby/object:Gem::Version
|
148
|
-
version: '5.
|
117
|
+
version: '5.1'
|
149
118
|
type: :development
|
150
119
|
prerelease: false
|
151
120
|
version_requirements: !ruby/object:Gem::Requirement
|
152
121
|
requirements:
|
153
|
-
- - "
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version: 3.2.14
|
156
|
-
- - "<"
|
122
|
+
- - "~>"
|
157
123
|
- !ruby/object:Gem::Version
|
158
|
-
version: '5.
|
124
|
+
version: '5.1'
|
159
125
|
description: CarrierWave storage for Dropbox
|
160
126
|
email:
|
161
127
|
- robin.dupret@gmail.com
|
@@ -163,8 +129,9 @@ executables: []
|
|
163
129
|
extensions: []
|
164
130
|
extra_rdoc_files: []
|
165
131
|
files:
|
132
|
+
- ".credentials.yml"
|
166
133
|
- ".gitignore"
|
167
|
-
- ".
|
134
|
+
- ".travis.yml"
|
168
135
|
- CHANGELOG.md
|
169
136
|
- Gemfile
|
170
137
|
- LICENSE
|
@@ -172,64 +139,14 @@ files:
|
|
172
139
|
- Rakefile
|
173
140
|
- carrierwave-dropbox.gemspec
|
174
141
|
- lib/carrierwave/dropbox.rb
|
175
|
-
- lib/carrierwave/dropbox/authorize.rake
|
176
|
-
- lib/carrierwave/dropbox/railtie.rb
|
177
|
-
- lib/carrierwave/dropbox/rake.rb
|
178
142
|
- lib/carrierwave/dropbox/version.rb
|
179
143
|
- lib/carrierwave/storage/dropbox.rb
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
- spec/dummy/app/controllers/concerns/.keep
|
187
|
-
- spec/dummy/app/helpers/application_helper.rb
|
188
|
-
- spec/dummy/app/helpers/articles_helper.rb
|
189
|
-
- spec/dummy/app/mailers/.keep
|
190
|
-
- spec/dummy/app/models/.keep
|
191
|
-
- spec/dummy/app/models/article.rb
|
192
|
-
- spec/dummy/app/models/concerns/.keep
|
193
|
-
- spec/dummy/app/uploaders/image_uploader.rb
|
194
|
-
- spec/dummy/app/views/articles/_form.html.erb
|
195
|
-
- spec/dummy/app/views/articles/edit.html.erb
|
196
|
-
- spec/dummy/app/views/articles/index.html.erb
|
197
|
-
- spec/dummy/app/views/articles/new.html.erb
|
198
|
-
- spec/dummy/app/views/articles/show.html.erb
|
199
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
200
|
-
- spec/dummy/bin/bundle
|
201
|
-
- spec/dummy/bin/rails
|
202
|
-
- spec/dummy/bin/rake
|
203
|
-
- spec/dummy/config.ru
|
204
|
-
- spec/dummy/config/application.rb
|
205
|
-
- spec/dummy/config/boot.rb
|
206
|
-
- spec/dummy/config/database.yml
|
207
|
-
- spec/dummy/config/environment.rb
|
208
|
-
- spec/dummy/config/environments/development.rb
|
209
|
-
- spec/dummy/config/environments/production.rb
|
210
|
-
- spec/dummy/config/environments/test.rb
|
211
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
212
|
-
- spec/dummy/config/initializers/carrierwave.rb
|
213
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
214
|
-
- spec/dummy/config/initializers/inflections.rb
|
215
|
-
- spec/dummy/config/initializers/mime_types.rb
|
216
|
-
- spec/dummy/config/initializers/secret_token.rb
|
217
|
-
- spec/dummy/config/initializers/session_store.rb
|
218
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
219
|
-
- spec/dummy/config/locales/en.yml
|
220
|
-
- spec/dummy/config/routes.rb
|
221
|
-
- spec/dummy/db/migrate/20140224111953_create_articles.rb
|
222
|
-
- spec/dummy/db/schema.rb
|
223
|
-
- spec/dummy/db/seeds.rb
|
224
|
-
- spec/dummy/public/404.html
|
225
|
-
- spec/dummy/public/422.html
|
226
|
-
- spec/dummy/public/500.html
|
227
|
-
- spec/dummy/public/favicon.ico
|
228
|
-
- spec/dummy/public/robots.txt
|
229
|
-
- spec/features/upload_file_spec.rb
|
230
|
-
- spec/fixtures/rails.png
|
231
|
-
- spec/fixtures/ruby.png
|
232
|
-
- spec/spec_helper.rb
|
144
|
+
- test/carrierwave_uploader_base_test.rb
|
145
|
+
- test/dummy_app.rb
|
146
|
+
- test/file_upload_test.rb
|
147
|
+
- test/fixtures/rails.png
|
148
|
+
- test/fixtures/ruby.png
|
149
|
+
- test/test_helper.rb
|
233
150
|
homepage: https://github.com/robin850/carrierwave-dropbox
|
234
151
|
licenses:
|
235
152
|
- MIT
|
@@ -245,66 +162,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
245
162
|
version: '0'
|
246
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
247
164
|
requirements:
|
248
|
-
- - "
|
165
|
+
- - ">"
|
249
166
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
167
|
+
version: 1.3.1
|
251
168
|
requirements: []
|
252
169
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.
|
170
|
+
rubygems_version: 2.6.12
|
254
171
|
signing_key:
|
255
172
|
specification_version: 4
|
256
173
|
summary: Dropbox integration for CarrierWave
|
257
174
|
test_files:
|
258
|
-
-
|
259
|
-
-
|
260
|
-
-
|
261
|
-
-
|
262
|
-
-
|
263
|
-
-
|
264
|
-
- spec/dummy/app/controllers/concerns/.keep
|
265
|
-
- spec/dummy/app/helpers/application_helper.rb
|
266
|
-
- spec/dummy/app/helpers/articles_helper.rb
|
267
|
-
- spec/dummy/app/mailers/.keep
|
268
|
-
- spec/dummy/app/models/.keep
|
269
|
-
- spec/dummy/app/models/article.rb
|
270
|
-
- spec/dummy/app/models/concerns/.keep
|
271
|
-
- spec/dummy/app/uploaders/image_uploader.rb
|
272
|
-
- spec/dummy/app/views/articles/_form.html.erb
|
273
|
-
- spec/dummy/app/views/articles/edit.html.erb
|
274
|
-
- spec/dummy/app/views/articles/index.html.erb
|
275
|
-
- spec/dummy/app/views/articles/new.html.erb
|
276
|
-
- spec/dummy/app/views/articles/show.html.erb
|
277
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
278
|
-
- spec/dummy/bin/bundle
|
279
|
-
- spec/dummy/bin/rails
|
280
|
-
- spec/dummy/bin/rake
|
281
|
-
- spec/dummy/config.ru
|
282
|
-
- spec/dummy/config/application.rb
|
283
|
-
- spec/dummy/config/boot.rb
|
284
|
-
- spec/dummy/config/database.yml
|
285
|
-
- spec/dummy/config/environment.rb
|
286
|
-
- spec/dummy/config/environments/development.rb
|
287
|
-
- spec/dummy/config/environments/production.rb
|
288
|
-
- spec/dummy/config/environments/test.rb
|
289
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
290
|
-
- spec/dummy/config/initializers/carrierwave.rb
|
291
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
292
|
-
- spec/dummy/config/initializers/inflections.rb
|
293
|
-
- spec/dummy/config/initializers/mime_types.rb
|
294
|
-
- spec/dummy/config/initializers/secret_token.rb
|
295
|
-
- spec/dummy/config/initializers/session_store.rb
|
296
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
297
|
-
- spec/dummy/config/locales/en.yml
|
298
|
-
- spec/dummy/config/routes.rb
|
299
|
-
- spec/dummy/db/migrate/20140224111953_create_articles.rb
|
300
|
-
- spec/dummy/db/schema.rb
|
301
|
-
- spec/dummy/db/seeds.rb
|
302
|
-
- spec/dummy/public/404.html
|
303
|
-
- spec/dummy/public/422.html
|
304
|
-
- spec/dummy/public/500.html
|
305
|
-
- spec/dummy/public/favicon.ico
|
306
|
-
- spec/dummy/public/robots.txt
|
307
|
-
- spec/features/upload_file_spec.rb
|
308
|
-
- spec/fixtures/rails.png
|
309
|
-
- spec/fixtures/ruby.png
|
310
|
-
- spec/spec_helper.rb
|
175
|
+
- test/carrierwave_uploader_base_test.rb
|
176
|
+
- test/dummy_app.rb
|
177
|
+
- test/file_upload_test.rb
|
178
|
+
- test/fixtures/rails.png
|
179
|
+
- test/fixtures/ruby.png
|
180
|
+
- test/test_helper.rb
|