yt-auth 0.3.1 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7fe566f505bb9ce9a4481ce80a8b280b8d2e9647
4
- data.tar.gz: 874cd60e6091c8b75d0c0981bdcba59076534060
2
+ SHA256:
3
+ metadata.gz: cdfefa6ede46c8b10e59770092ed43beeccf56a54211f5d97dcb8e9355ea2966
4
+ data.tar.gz: 1e1c3d106efa74d854155f39076f0fdfe19b1c9fa2cbfdbd9b46fd13a6aab9ba
5
5
  SHA512:
6
- metadata.gz: 1a2bb317a6c99de5e2fee9e8f687884e801570a87f1623a7d76fe3e2a4f627e30af9cbda0c02fdf0fea6fcd9136003020fd942c2599512d901d14efc177836e8
7
- data.tar.gz: 970fc17a7774877192ab4561fc482e03a288ae18da10a1a5342878e2b3f18e0cf614f85f602eb52e88492892b84fedede286876eebf8e220e85eb7c38c2285a1
6
+ metadata.gz: a61619e2f28f1ca1926375147bf05cd17a6b45676a64757b96281dc88927892db4c9e5ccad2c57f06eb3041c78047c19c0094073a57a6e8b4c617c6d53f01bb6
7
+ data.tar.gz: '05249f451e92f0b2d389ce5bb9f28a354ba79697b625a2e2a28579dd2c7ca26d1ffffbd86be6ba555d7cb634c37af61c7cdf46cd0d4c3257282be6e42b595b4f'
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 1.0.0 - 2024-11-26
10
+
11
+ Released major version. No breaking changes.
12
+
9
13
  ## 0.3.1 - 2017-08-26
10
14
 
11
15
  * [ENHANCEMENT] Add placeholder method to be notified when token is refreshed.
@@ -20,7 +24,7 @@ If your code uses `Yt::Auth.new(refresh_token:)` then you must use `Yt::Auth.fin
20
24
 
21
25
  * [ENHANCEMENT] Extract `Auth#url` into `Auth.url_for`
22
26
  * [ENHANCEMENT] Rename `Auth.new(code:)` into `Auth.create(code:)`
23
- * [ENHANCEMENT] Rename `Auth.new(refresh_token:)` into `Auth.create(refresh_token:)`
27
+ * [ENHANCEMENT] Rename `Auth.new(refresh_token:)` into `Auth.find_by(refresh_token:)`
24
28
  * [FEATURE] Yt::Auth.url_for now accepts the scope to authenticate
25
29
  * [FEATURE] Yt::Auth.url_for now accepts an option to force re-authentication
26
30
  * [FEATURE] Add `Auth#revoke` to revoke a refresh token
data/README.md CHANGED
@@ -7,12 +7,12 @@ their Google-based email address.
7
7
  With Yt::Auth, it is easy to limit access to your app to a few users without
8
8
  the need for them to create a username and password.
9
9
 
10
- The **source code** is available on [GitHub](https://github.com/fullscreen/yt-auth) and the **documentation** on [RubyDoc](http://www.rubydoc.info/gems/yt-auth/frames).
10
+ The **source code** is available on [GitHub](https://github.com/claudiob/yt-auth) and the **documentation** on [RubyDoc](http://www.rubydoc.info/gems/yt-auth/frames).
11
11
 
12
- [![Build Status](http://img.shields.io/travis/Fullscreen/yt-auth/master.svg)](https://travis-ci.org/Fullscreen/yt-auth)
13
- [![Coverage Status](http://img.shields.io/coveralls/Fullscreen/yt-auth/master.svg)](https://coveralls.io/r/Fullscreen/yt-auth)
14
- [![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/yt-auth.svg)](https://gemnasium.com/Fullscreen/yt-auth)
15
- [![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/yt-auth.svg)](https://codeclimate.com/github/Fullscreen/yt-auth)
12
+ [![Build Status](http://img.shields.io/travis/claudiob/yt-auth/master.svg)](https://travis-ci.org/claudiob/yt-auth)
13
+ [![Coverage Status](http://img.shields.io/coveralls/claudiob/yt-auth/master.svg)](https://coveralls.io/r/claudiob/yt-auth)
14
+ [![Dependency Status](http://img.shields.io/gemnasium/claudiob/yt-auth.svg)](https://gemnasium.com/claudiob/yt-auth)
15
+ [![Code Climate](http://img.shields.io/codeclimate/github/claudiob/yt-auth.svg)](https://codeclimate.com/github/claudiob/yt-auth)
16
16
  [![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/gems/yt-auth/frames)
17
17
  [![Gem Version](http://img.shields.io/gem/v/yt-auth.svg)](http://rubygems.org/gems/yt-auth)
18
18
 
@@ -112,6 +112,9 @@ How to contribute
112
112
  Contribute to the code by forking the project, adding the missing code,
113
113
  writing the appropriate tests and submitting a pull request.
114
114
 
115
+ To run the tests correctly, set up the environment variables `YT_ACCOUNT_CLIENT_ID`
116
+ and `YT_ACCOUNT_CLIENT_SECRET` with the credentials of an existing Google OAuth app.
117
+
115
118
  In order for a PR to be approved, all the tests need to pass and all the public
116
119
  methods need to be documented and listed in the guides. Remember:
117
120
 
data/bin/console CHANGED
@@ -6,9 +6,5 @@ require 'yt/auth'
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
8
8
 
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require 'pry'
11
- # Pry.start
12
-
13
9
  require 'irb'
14
10
  IRB.start(__FILE__)
@@ -2,6 +2,6 @@ module Yt
2
2
  class Auth
3
3
  # @return [String] the SemVer-compatible gem version.
4
4
  # @see http://semver.org
5
- VERSION = '0.3.1'
5
+ VERSION = '1.0.0'
6
6
  end
7
7
  end
data/lib/yt/auth.rb CHANGED
@@ -108,8 +108,8 @@ module Yt
108
108
 
109
109
  def tokens_params
110
110
  {}.tap do |params|
111
- params[:host] = 'accounts.google.com'
112
- params[:path] = '/o/oauth2/token'
111
+ params[:host] = 'oauth2.googleapis.com'
112
+ params[:path] = '/token'
113
113
  params[:method] = :post
114
114
  params[:request_format] = :form
115
115
  params[:body] = @tokens_body
@@ -119,8 +119,8 @@ module Yt
119
119
 
120
120
  def revoke_params
121
121
  {}.tap do |params|
122
- params[:host] = 'accounts.google.com'
123
- params[:path] = '/o/oauth2/revoke'
122
+ params[:host] = 'oauth2.googleapis.com'
123
+ params[:path] = '/revoke'
124
124
  params[:params] = {token: refresh_token || access_token}
125
125
  end
126
126
  end
data/yt-auth.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{Google Authentication Ruby client}
13
13
  spec.description = %q{Yt::Auth makes it easy to authenticate users to any
14
14
  web application by means of their Google account.}
15
- spec.homepage = 'https://github.com/fullscreen/yt-auth'
15
+ spec.homepage = 'https://github.com/claudiob/yt-auth'
16
16
  spec.license = 'MIT'
17
17
 
18
18
  spec.required_ruby_version = '>= 2.2.2'
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency 'yt-support', '>= 0.1.3'
28
28
  spec.add_dependency 'jwt', '>= 1.5.6'
29
29
 
30
- spec.add_development_dependency 'bundler', '~> 1.14'
31
- spec.add_development_dependency 'rspec', '~> 3.5'
32
- spec.add_development_dependency 'rake', '~> 12.0'
33
- spec.add_development_dependency 'coveralls', '~> 0.8.20'
34
- spec.add_development_dependency 'pry-nav', '~> 0.2.4'
35
- spec.add_development_dependency 'yard', '~> 0.9.8'
30
+ spec.add_development_dependency 'bundler'
31
+ spec.add_development_dependency 'debug'
32
+ spec.add_development_dependency 'rspec'#, '~> 3.5'
33
+ spec.add_development_dependency 'rake'#, '~> 12.0'
34
+ spec.add_development_dependency 'coveralls'#, '~> 0.8.20'
35
+ spec.add_development_dependency 'yard'#, '~> 0.9.8'
36
36
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  - Kang-Kyu Lee
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-08-27 00:00:00.000000000 Z
12
+ date: 2024-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yt-support
@@ -43,86 +43,86 @@ dependencies:
43
43
  name: bundler
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '1.14'
48
+ version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '1.14'
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
- name: rspec
57
+ name: debug
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '3.5'
62
+ version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '3.5'
69
+ version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: rake
71
+ name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: '12.0'
76
+ version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '12.0'
83
+ version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: coveralls
85
+ name: rake
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 0.8.20
90
+ version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
- version: 0.8.20
97
+ version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: pry-nav
99
+ name: coveralls
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "~>"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 0.2.4
104
+ version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "~>"
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: 0.2.4
111
+ version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: yard
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
- version: 0.9.8
118
+ version: '0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 0.9.8
125
+ version: '0'
126
126
  description: |-
127
127
  Yt::Auth makes it easy to authenticate users to any
128
128
  web application by means of their Google account.
@@ -146,11 +146,11 @@ files:
146
146
  - lib/yt/auth.rb
147
147
  - lib/yt/auth/version.rb
148
148
  - yt-auth.gemspec
149
- homepage: https://github.com/fullscreen/yt-auth
149
+ homepage: https://github.com/claudiob/yt-auth
150
150
  licenses:
151
151
  - MIT
152
152
  metadata: {}
153
- post_install_message:
153
+ post_install_message:
154
154
  rdoc_options: []
155
155
  require_paths:
156
156
  - lib
@@ -165,9 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  requirements: []
168
- rubyforge_project:
169
- rubygems_version: 2.6.11
170
- signing_key:
168
+ rubygems_version: 3.5.22
169
+ signing_key:
171
170
  specification_version: 4
172
171
  summary: Google Authentication Ruby client
173
172
  test_files: []