browse-everything 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +5 -1
- data/lib/browse_everything/driver/base.rb +12 -0
- data/lib/browse_everything/driver/box.rb +0 -1
- data/lib/browse_everything/driver/dropbox.rb +1 -1
- data/lib/browse_everything/driver/google_drive.rb +0 -1
- data/lib/browse_everything/driver/sky_drive.rb +0 -1
- data/lib/browse_everything/retriever.rb +1 -1
- data/lib/browse_everything/version.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- data/spec/unit/dropbox_spec.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b80f8d512e26f52fa7db6b7cc584178537de275
|
4
|
+
data.tar.gz: 614a8d420386d4a7f59bf971a352680736b5582c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0abcc2a669041471a8e0f7d17005855b1f29004052a1f3c8fe41b6e2273b6a63524a7836dee19bb605b7a973430c8de93dc18953a4dd73e9d404771ff4af679
|
7
|
+
data.tar.gz: 88e549d92c6a39746ea92ffb7bcf3c4ad5d79124ee5bbc078c7e3ead113c41cb15469eff166d3fdb6345ae81ad82324b5f5f1667899b3dc0484850afce9f4705
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
### 0.8.3 (2015-09-30)
|
2
|
+
- Improve compatibility with Rails 4.2.x
|
3
|
+
- Minor bug fixes
|
4
|
+
|
1
5
|
### 0.8.2 (2015-04-15)
|
2
6
|
- Add support for latest 4.1 and 4.2 Rails versions
|
3
|
-
- Add support for %20 encoded URLs
|
7
|
+
- Add support for %20 encoded URLs
|
4
8
|
- Use Dropbox name consistently
|
5
9
|
|
6
10
|
### 0.8.1 (2015-03-03)
|
@@ -50,6 +50,18 @@ module BrowseEverything
|
|
50
50
|
nil
|
51
51
|
end
|
52
52
|
|
53
|
+
private
|
54
|
+
|
55
|
+
def callback
|
56
|
+
connector_response_url(callback_options)
|
57
|
+
end
|
58
|
+
|
59
|
+
# remove the script_name parameter from the url_options since that is causing issues
|
60
|
+
# with the route not containing the engine path in rails 4.2.0
|
61
|
+
def callback_options
|
62
|
+
config[:url_options].reject {|k,v| k == :script_name}
|
63
|
+
end
|
64
|
+
|
53
65
|
end
|
54
66
|
end
|
55
67
|
end
|
@@ -62,7 +62,7 @@ module BrowseEverything
|
|
62
62
|
private
|
63
63
|
def auth_flow
|
64
64
|
@csrf ||= {}
|
65
|
-
DropboxOAuth2Flow.new(config[:app_key], config[:app_secret],
|
65
|
+
DropboxOAuth2Flow.new(config[:app_key], config[:app_secret], callback.to_s,@csrf,'token')
|
66
66
|
end
|
67
67
|
|
68
68
|
def client
|
@@ -110,7 +110,6 @@ module BrowseEverything
|
|
110
110
|
|
111
111
|
def oauth_client
|
112
112
|
if @client.nil?
|
113
|
-
callback = connector_response_url(config[:url_options])
|
114
113
|
@client = Google::APIClient.new
|
115
114
|
@client.authorization.client_id = config[:client_id]
|
116
115
|
@client.authorization.client_secret = config[:client_secret]
|
@@ -107,7 +107,6 @@ module BrowseEverything
|
|
107
107
|
|
108
108
|
private
|
109
109
|
def oauth_client
|
110
|
-
callback = connector_response_url(config[:url_options])
|
111
110
|
Skydrive::Oauth::Client.new(config[:client_id], config[:client_secret], callback.to_s,"wl.skydrive")
|
112
111
|
#todo error checking here
|
113
112
|
end
|
@@ -27,7 +27,7 @@ module BrowseEverything
|
|
27
27
|
|
28
28
|
def retrieve(spec, &block)
|
29
29
|
if spec.has_key?('expires') and Time.parse(spec['expires']) < Time.now
|
30
|
-
raise
|
30
|
+
raise ArgumentError, "Download spec expired at #{spec['expires']}"
|
31
31
|
end
|
32
32
|
|
33
33
|
url = Addressable::URI.parse(spec['url'])
|
data/spec/spec_helper.rb
CHANGED
data/spec/unit/dropbox_spec.rb
CHANGED
@@ -32,6 +32,7 @@ describe BrowseEverything::Driver::Dropbox, vcr: { cassette_name: 'dropbox', rec
|
|
32
32
|
|
33
33
|
context "#auth_link" do
|
34
34
|
specify { subject.auth_link[0].should start_with('https://www.dropbox.com/1/oauth2/authorize') }
|
35
|
+
specify { subject.auth_link[0].should include('browse%2Fconnect') }
|
35
36
|
end
|
36
37
|
|
37
38
|
it "should authorize" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browse-everything
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carolyn Cole
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2015-
|
16
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rails
|
@@ -439,7 +439,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
439
439
|
version: '0'
|
440
440
|
requirements: []
|
441
441
|
rubyforge_project:
|
442
|
-
rubygems_version: 2.
|
442
|
+
rubygems_version: 2.2.2
|
443
443
|
signing_key:
|
444
444
|
specification_version: 4
|
445
445
|
summary: AJAX/Rails engine file browser for cloud storage services
|