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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 894c8d28a00f0474da1f807768bb9cccc8add97e
4
- data.tar.gz: dcaed8f54b8a79085536dd6a4b0c8743a9e370e6
3
+ metadata.gz: 4b80f8d512e26f52fa7db6b7cc584178537de275
4
+ data.tar.gz: 614a8d420386d4a7f59bf971a352680736b5582c
5
5
  SHA512:
6
- metadata.gz: dad070cc647aece52eff80592a4ccaa702d195c87c37641f8b352c6b705db6c91c3b80b4c8132f3d461e22f4336b247e7d3a2594262cc9618bf5d8450bf38024
7
- data.tar.gz: 1b8d2de4bc7415b2c504f5df2a979499d7f5142492d67b5e2b2e932395b35298cbd7adc3dcf42185211cad130f38502435424001e3074f3bda5c33c2f049f3c2
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
@@ -51,7 +51,6 @@ module BrowseEverything
51
51
  end
52
52
 
53
53
  def auth_link
54
- callback = connector_response_url(config[:url_options])
55
54
  oauth_client.authorize_url(callback.to_s)
56
55
  end
57
56
 
@@ -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], connector_response_url(config[:url_options]).to_s,@csrf,'token')
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 ArugumentError, "Download spec expired at #{spec['expires']}"
30
+ raise ArgumentError, "Download spec expired at #{spec['expires']}"
31
31
  end
32
32
 
33
33
  url = Addressable::URI.parse(spec['url'])
@@ -1,3 +1,3 @@
1
1
  module BrowseEverything
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -31,7 +31,8 @@ module BrowserConfigHelper
31
31
  def url_options
32
32
  {
33
33
  protocol: 'http://',
34
- host: 'browse-everything.example.edu'
34
+ host: 'browse-everything.example.edu',
35
+ script_name: ''
35
36
  }
36
37
  end
37
38
 
@@ -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.2
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-04-15 00:00:00.000000000 Z
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.4.6
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