browse-everything 0.10.2 → 0.10.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: 222b12a098d0f02385f1350427947103e702dff4
4
- data.tar.gz: 81dd1d9016baab293cb4b6b1de790871ce4adc7d
3
+ metadata.gz: 17898bd0a5bbb1f53e279e8a8800347de7086476
4
+ data.tar.gz: 5cda6b2a4ab400602ab576673052e1a82ff6938d
5
5
  SHA512:
6
- metadata.gz: 02a9f46b1f33282fab6288021ca79d0eaff7c0374b56ccedb814be39acf303c8349bcb21cae1635351052a498c1034a659c9c3b29cf784e2a66fc2d9bb2a2afb
7
- data.tar.gz: 1e7d15e46ab18d9cb403f747bd8687f08c6767bfc5581ae2a98d7038fc0a9e30a9596a6cf3d6757c5d5e71a63c46dea428336cdd9ee74ba45d5ea36d85962911
6
+ metadata.gz: c2a9dd39ad44df1821369af47a20828065672878578ffe0a1e274b13f011b54560f58f930d2b0f51316a16b9d58d6ac90edeb54890eb783f7f32111daa372637
7
+ data.tar.gz: e3c7fbc429e2bc49c3834bc8ed43bb5111ad7e8a6a3472e279a2fb24d131c8d56ba6e0eae252cc526f9f4723eab8f3f2d779912693da098b7d706059aae114c2
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.10.3 (2016-07-12)
2
+ Support turbolinks 5 and previous versions
3
+ Optionally adding state to url so box and dropbox will work
4
+
1
5
  ### 0.10.2 (2016-05-31)
2
6
  Pin google-api-client to 0.8.x
3
7
 
@@ -304,7 +304,11 @@ auto_toggle = ->
304
304
  triggers = $('*[data-toggle=browse-everything]')
305
305
  triggers.each () -> $(this).browseEverything($(this).data())
306
306
 
307
- if Turbolinks?
308
- $(document).on 'page:change', auto_toggle
307
+ if Turbolinks? && Turbolinks.supported
308
+ # Use turbolinks:load for Turbolinks 5, otherwise use the old way
309
+ if (Turbolinks.BrowserAdapter)
310
+ $(document).on 'turbolinks:load', auto_toggle
311
+ else
312
+ $(document).on 'page:change', auto_toggle
309
313
  else
310
314
  $(document).ready auto_toggle
@@ -40,6 +40,7 @@ class BrowseEverythingController < ActionController::Base
40
40
  @auth_link ||= if provider.present?
41
41
  link, data = provider.auth_link
42
42
  session["#{provider_name}_data"] = data
43
+ link = "#{link}&state=#{provider.key}" unless link.include?("state")
43
44
  link
44
45
  else
45
46
  nil
@@ -1,3 +1,3 @@
1
1
  module BrowseEverything
2
- VERSION = "0.10.2"
2
+ VERSION = "0.10.3"
3
3
  end
@@ -8,15 +8,30 @@ describe BrowseEverythingController, type: :controller do
8
8
 
9
9
  let(:helper_context) {controller.view_context}
10
10
  let(:browser) { BrowseEverything::Browser.new(url_options) }
11
- let(:provider) { browser.providers['dropbox'] }
12
11
 
13
12
  before do
14
13
  allow(controller).to receive(:provider).and_return(provider)
15
14
  end
16
- describe "auth_link" do
17
- subject {helper_context.auth_link}
18
- it "has a single state" do
19
- expect(subject.scan(/state/).length).to eq 1
15
+
16
+ context 'dropbox' do
17
+ let(:provider) { browser.providers['dropbox'] }
18
+
19
+ describe "auth_link" do
20
+ subject {helper_context.auth_link}
21
+ it "has a single state" do
22
+ expect(subject.scan(/state/).length).to eq 1
23
+ end
24
+ end
25
+ end
26
+
27
+ context 'box' do
28
+ let(:provider) { browser.providers['box'] }
29
+
30
+ describe "auth_link" do
31
+ subject {helper_context.auth_link}
32
+ it "has a single state" do
33
+ expect(subject.scan(/state/).length).to eq 1
34
+ end
20
35
  end
21
36
  end
22
37
  end
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.10.2
4
+ version: 0.10.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: 2016-05-31 00:00:00.000000000 Z
16
+ date: 2016-07-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
@@ -478,7 +478,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
478
478
  version: '0'
479
479
  requirements: []
480
480
  rubyforge_project:
481
- rubygems_version: 2.5.1
481
+ rubygems_version: 2.6.4
482
482
  signing_key:
483
483
  specification_version: 4
484
484
  summary: AJAX/Rails engine file browser for cloud storage services