google_sign_in 0.1.3 → 0.1.4
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.
- checksums.yaml +5 -5
- data/README.md +5 -3
- data/google_sign_in.gemspec +1 -1
- data/lib/google_sign_in/helper.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 97c5ef43841bbc4901283ef218bd5bafcd321fbca2cbe51b991dce9c3943a656
|
|
4
|
+
data.tar.gz: f644ef5388eda41ae7181c68c53ce10843f8b862946305075023d3c79a91c0cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a8116d55e09e785113aa8591a2ea3827f45bbe566413b323f3d8712a43dc84a7e21f1c0987c06b4ef5199a5ebf569d9237674ac949011e63aaad527bf725c2a
|
|
7
|
+
data.tar.gz: e4e034189b5e8307d5454a2a59a7e5c50e8ebf33813163f9eb241e9f9e4ede44e3f31364cf912a4e2992f156df4ac99de75a401a7ed8112cfbce4d7b89157215
|
data/README.md
CHANGED
|
@@ -73,10 +73,12 @@ the decoding of the Google ID Token using the google-id-token library. Interroga
|
|
|
73
73
|
for profile details is particularly helpful when you use Google for signup, as you can get the name, email
|
|
74
74
|
address, avatar url, and locale through it.
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## Compatibility with Turbolinks
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
Google's JavaScript doesn't play nice with Turbolinks. We've routed around the damage by adding a [Turbolinks
|
|
79
|
+
meta tag](https://github.com/turbolinks/turbolinks/blob/master/README.md#ensuring-specific-pages-trigger-a-full-reload)
|
|
80
|
+
on whatever page `google_sign_in` is called to always do a full reload for that page. Note that this
|
|
81
|
+
auto-compatibility feature requires Turbolinks 5.1+.
|
|
80
82
|
|
|
81
83
|
## License
|
|
82
84
|
|
data/google_sign_in.gemspec
CHANGED
|
@@ -5,7 +5,8 @@ module GoogleSignIn
|
|
|
5
5
|
def google_sign_in(**form_options, &block)
|
|
6
6
|
content_for :head,
|
|
7
7
|
google_sign_in_javacript_include_tag +
|
|
8
|
-
google_sign_in_client_id_meta_tag
|
|
8
|
+
google_sign_in_client_id_meta_tag +
|
|
9
|
+
turbolinks_reload_meta_tag
|
|
9
10
|
|
|
10
11
|
google_sign_in_javascript_tag +
|
|
11
12
|
google_sign_in_hidden_form_tag(**form_options) +
|
|
@@ -16,14 +17,17 @@ module GoogleSignIn
|
|
|
16
17
|
def google_sign_in_javacript_include_tag
|
|
17
18
|
javascript_include_tag "https://apis.google.com/js/api.js", async: true, defer: true,
|
|
18
19
|
onload: "this.onload=function(){};setupGoogleSignIn()",
|
|
19
|
-
onreadystatechange: "if (this.readyState === 'complete') this.onload()"
|
|
20
|
-
data: { turbolinks_track: :reload, force_turbolinks_reload: Time.now.to_i }
|
|
20
|
+
onreadystatechange: "if (this.readyState === 'complete') this.onload()"
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def google_sign_in_client_id_meta_tag
|
|
24
24
|
tag.meta name: "google-signin-client_id", content: GoogleSignIn::Identity.client_id
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
def turbolinks_reload_meta_tag
|
|
28
|
+
tag.meta name: "turbolinks-visit-control", content: "reload"
|
|
29
|
+
end
|
|
30
|
+
|
|
27
31
|
def google_sign_in_hidden_form_tag(**options)
|
|
28
32
|
options.reverse_merge!(html: { style: "display: none" })
|
|
29
33
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_sign_in
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-01-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
90
|
version: '0'
|
|
91
91
|
requirements: []
|
|
92
92
|
rubyforge_project:
|
|
93
|
-
rubygems_version: 2.
|
|
93
|
+
rubygems_version: 2.7.3
|
|
94
94
|
signing_key:
|
|
95
95
|
specification_version: 4
|
|
96
96
|
summary: Sign in (or up) with Google for Rails applications
|