omniauth-gplus 1.2.0 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/CHANGELOG.md +22 -0
- data/LICENSE.txt +1 -1
- data/README.md +20 -36
- data/lib/omniauth/gplus/version.rb +1 -1
- data/lib/omniauth/strategies/gplus.rb +2 -5
- data/omniauth-gplus.gemspec +7 -1
- data/test/lib/omniauth/strategies/gplus_test.rb +5 -5
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8acb5ae7c83c1728f717c4385e4217bcd8337621
|
4
|
+
data.tar.gz: 2b55f613f0eb0f415bd10c72a1bcdde02d18129a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a23afce6c3d5f705b0ff975916f5b6fb2eb4270785e159214af5adfae0482efd234b85282ed6908f57de6672510a24140cca9eb3d3f45d07e71b8b47cad6f65e
|
7
|
+
data.tar.gz: ed04c2cc4276876e04d0b5d87120f56a0deea144d208b3decb28cd0b46e056090019a9cf93dc76b4201d739ac4bd4bf21ab5dbf1372930e38b0de97c14de11a7
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Changelog
|
2
|
+
---------
|
3
|
+
**v2.0.0**
|
4
|
+
|
5
|
+
* Support for hybrid sign-in flow
|
6
|
+
* Conform to [ruby style guidelines](bbatsov/ruby-style-guide)
|
7
|
+
* Support for Ruby 2.1 & 2.0
|
8
|
+
* Ensure compatibility with Rails 4.1 and 4.0
|
9
|
+
* Squashed bugs
|
10
|
+
* Moved changelog to seperate file
|
11
|
+
|
12
|
+
**v1.1.1**
|
13
|
+
|
14
|
+
* Using the correct api scope
|
15
|
+
|
16
|
+
**v1.1.0**
|
17
|
+
|
18
|
+
* Fixed UID field always being nil
|
19
|
+
|
20
|
+
**v1.0.0**
|
21
|
+
|
22
|
+
* Initial release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
omniauth-gplus
|
2
2
|
=========
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
[![Gem Version](http://img.shields.io/gem/v/omniauth-gplus.svg)][gem]
|
5
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/samdunne/omniauth-gplus.svg)][codeclimate]
|
6
|
+
[![Build Status](http://img.shields.io/travis/samdunne/omniauth-gplus.svg)][travis]
|
7
|
+
[![Dependency Status](http://img.shields.io/gemnasium/samdunne/omniauth-gplus.svg)][gemnasium]
|
8
|
+
[![Coverage Status](http://img.shields.io/coveralls/samdunne/omniauth-gplus.svg)][coveralls]
|
9
|
+
|
10
|
+
[gem]: https://rubygems.org/gems/omniauth-gplus
|
11
|
+
[codeclimate]: https://codeclimate.com/github/samdunne/omniauth-gplus
|
12
|
+
[travis]: https://travis-ci.org/samdunne/omniauth-gplus
|
13
|
+
[gemnasium]: https://gemnasium.com/samdunne/omniauth-gplus
|
14
|
+
[coveralls]: https://coveralls.io/r/samdunne/omniauth-gplus
|
9
15
|
|
10
16
|
`omniauth-gplus` is a Google+ strategy for OmniAuth.
|
11
17
|
It allows you to easily interact with the Google+ OAuth2 endpoint.
|
@@ -55,10 +61,10 @@ The information schema looks like this:
|
|
55
61
|
``` ruby
|
56
62
|
info do
|
57
63
|
{
|
58
|
-
'email' => '
|
59
|
-
'name' => '
|
60
|
-
'first_name' => '
|
61
|
-
'last_name' => '
|
64
|
+
'email' => 'sam@sam-dunne.com',
|
65
|
+
'name' => 'Sam Dunne',
|
66
|
+
'first_name' => 'Sam',
|
67
|
+
'last_name' => 'Dunne',
|
62
68
|
'image' => 'http://somelongurl.png',
|
63
69
|
'urls' => {
|
64
70
|
"Google+" => 'http://urltouserprofile.com'
|
@@ -82,7 +88,7 @@ Installing
|
|
82
88
|
|
83
89
|
**Requirements**:
|
84
90
|
|
85
|
-
1. Ruby 1.9 OR Rubinius 1.9 OR JRuby 1.9
|
91
|
+
1. Ruby 2.1, 2.0, 1.9 OR Rubinius 1.9 OR JRuby 1.9
|
86
92
|
2. A GPlus API key/secret
|
87
93
|
|
88
94
|
You can either install manually:
|
@@ -96,35 +102,19 @@ Or put it in your `Gemfile`:
|
|
96
102
|
``` ruby
|
97
103
|
source 'https://rubygems.org'
|
98
104
|
|
99
|
-
gem 'omniauth-gplus', '~>
|
105
|
+
gem 'omniauth-gplus', '~> 2.0'
|
100
106
|
```
|
101
107
|
|
102
108
|
|
103
109
|
Issues & Documentation
|
104
110
|
----------------------
|
105
111
|
|
106
|
-
* [Documentation](https://github.com/
|
107
|
-
* [Issues](https://github.com/
|
112
|
+
* [Documentation](https://github.com/samdunne/omniauth-gplus/wiki)
|
113
|
+
* [Issues](https://github.com/samdunne/omniauth-gplus/issues)
|
108
114
|
|
109
115
|
Absolutely feel free to contribute, please!
|
110
116
|
|
111
117
|
|
112
|
-
Changelog
|
113
|
-
---------
|
114
|
-
|
115
|
-
**v1.1.1**
|
116
|
-
|
117
|
-
* Using the correct api scope
|
118
|
-
|
119
|
-
**v1.1.0**
|
120
|
-
|
121
|
-
* Fixed UID field always being nil
|
122
|
-
|
123
|
-
**v1.0.0**
|
124
|
-
|
125
|
-
* Initial release
|
126
|
-
|
127
|
-
|
128
118
|
Contributing
|
129
119
|
------------
|
130
120
|
|
@@ -144,16 +134,10 @@ Contributing
|
|
144
134
|
* Make a **Pull Request**
|
145
135
|
|
146
136
|
|
147
|
-
Credits
|
148
|
-
-------
|
149
|
-
|
150
|
-
- [Sam Dunne](https://github.com/samdunne), for initial work and bug fixes
|
151
|
-
|
152
|
-
|
153
137
|
License
|
154
138
|
-------
|
155
139
|
|
156
|
-
Copyright (c)
|
140
|
+
Copyright (c) 2014 Sam Dunne
|
157
141
|
|
158
142
|
MIT License
|
159
143
|
|
@@ -46,7 +46,7 @@ module OmniAuth
|
|
46
46
|
params['scope'] = format_scopes(params['scope'])
|
47
47
|
if (params['request_visible_actions'])
|
48
48
|
params['request_visible_actions'] = format_actions(params['request_visible_actions'])
|
49
|
-
end
|
49
|
+
end
|
50
50
|
custom_parameters(params)
|
51
51
|
end
|
52
52
|
end
|
@@ -70,15 +70,12 @@ module OmniAuth
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def custom_parameters(params)
|
73
|
-
["scope", "client_options", "
|
73
|
+
["scope", "client_options", "request_visible_actions"].each { |k| add_key_to_params(params, k) }
|
74
74
|
end
|
75
75
|
|
76
76
|
def add_key_to_params(params, key)
|
77
77
|
if request.params[key]
|
78
78
|
params[key] = request.params[key]
|
79
|
-
|
80
|
-
# to support omniauth-oauth2's auto csrf protection
|
81
|
-
session['omniauth.state'] = params[:state] if key == 'state'
|
82
79
|
end
|
83
80
|
end
|
84
81
|
|
data/omniauth-gplus.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["me@kurtisrainboltgreene.name", "sam@sam-dunne.com"]
|
10
10
|
spec.summary = %q{A Google+ OAuth2 solution for Omniauth}
|
11
11
|
spec.description = spec.summary
|
12
|
-
spec.homepage = "http://
|
12
|
+
spec.homepage = "http://samdunne.github.com/omniauth-gplus"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
@@ -25,4 +25,10 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'kramdown'
|
26
26
|
spec.add_development_dependency 'pry'
|
27
27
|
spec.add_development_dependency 'coveralls'
|
28
|
+
|
29
|
+
if RUBY_PLATFORM == 'rbx'
|
30
|
+
spec.add_development_dependency 'racc'
|
31
|
+
spec.add_development_dependency 'rubinius-coverage', github: 'rubinius/rubinius-coverage'
|
32
|
+
spec.add_development_dependency 'rubysl'
|
33
|
+
end
|
28
34
|
end
|
@@ -42,19 +42,19 @@ class TestOmniAuthGPlus < MiniTest::Unit::TestCase
|
|
42
42
|
assert_equal(expected, actual)
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def test_state_state_is_not_included_in_request_params_when_present
|
46
46
|
expected = 'some_state'
|
47
47
|
@request.stubs(:params).returns({ 'state' => expected })
|
48
|
-
|
48
|
+
refute_equal expected, strategy.authorize_params[:state]
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
51
|
+
def test_do_not_store_state_in_the_session_when_present
|
52
52
|
expected = 'some_state'
|
53
53
|
@request.stubs(:params).returns({ 'state' => expected })
|
54
54
|
refute_empty strategy.authorize_params['state']
|
55
|
-
|
55
|
+
refute_equal expected, strategy.authorize_params[:state]
|
56
56
|
refute_empty strategy.session['omniauth.state']
|
57
|
-
|
57
|
+
refute_equal expected, strategy.session['omniauth.state']
|
58
58
|
end
|
59
59
|
|
60
60
|
def test_that_it_has_a_version_number
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-gplus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kurtis Rainbolt-Greene
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- .ruby-gemset
|
137
137
|
- .ruby-version
|
138
138
|
- .travis.yml
|
139
|
+
- CHANGELOG.md
|
139
140
|
- Gemfile
|
140
141
|
- LICENSE.txt
|
141
142
|
- README.md
|
@@ -146,7 +147,7 @@ files:
|
|
146
147
|
- omniauth-gplus.gemspec
|
147
148
|
- test/helper.rb
|
148
149
|
- test/lib/omniauth/strategies/gplus_test.rb
|
149
|
-
homepage: http://
|
150
|
+
homepage: http://samdunne.github.com/omniauth-gplus
|
150
151
|
licenses:
|
151
152
|
- MIT
|
152
153
|
metadata: {}
|
@@ -161,12 +162,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
162
|
version: '0'
|
162
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
164
|
requirements:
|
164
|
-
- - '
|
165
|
+
- - '>'
|
165
166
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
167
|
+
version: 1.3.1
|
167
168
|
requirements: []
|
168
169
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
170
|
+
rubygems_version: 2.2.2
|
170
171
|
signing_key:
|
171
172
|
specification_version: 4
|
172
173
|
summary: A Google+ OAuth2 solution for Omniauth
|