yt-auth 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +13 -1
- data/lib/yt/auth.rb +5 -0
- data/lib/yt/auth/version.rb +1 -1
- data/yt-auth.gemspec +6 -4
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 710ce4b2631d068119df7df6a9fdd4f69c0b8ac9
|
4
|
+
data.tar.gz: 1f9dd810e4b3078db3512405cce20808a0c52f73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c59c29fcd624154635cf63c6dbb535b13f9e024b097f6ee5b168e9f62b50b106644d99c6b7b096d312bd3c70b6ed4941fa8474a249c1bcaf8cdbf2dccbc2f549
|
7
|
+
data.tar.gz: 603725edf347e698a6957b36a4a4d1ddf44c8e62d3a59ea7c1050a2a82120036d7108728e1cbd73baa97e844441831ae9f75ed9b7f13cf37aa0e267ddc2b56b4
|
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
|
+
## 0.2.2 - 2017-05-31
|
10
|
+
|
11
|
+
* [FEATURE] Add `Auth#access_token`
|
12
|
+
|
9
13
|
## 0.2.1 - 2017-03-29
|
10
14
|
|
11
15
|
* [ENHANCEMENT] Speed up process by fetching email with 1 HTTP request (not 2).
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2017 Fullscreen, Inc.
|
3
|
+
Copyright (c) 2017-present Fullscreen, Inc.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ The **source code** is available on [GitHub](https://github.com/fullscreen/yt-au
|
|
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
|
|
19
|
-
The Yt::Auth class provides
|
19
|
+
The Yt::Auth class provides three public methods: `url`, `email`, and `access_token`.
|
20
20
|
|
21
21
|
Yt::Auth#url
|
22
22
|
------------
|
@@ -46,6 +46,18 @@ Yt::Auth.new(redirect_uri: redirect_uri, code: code).email
|
|
46
46
|
# => "user@example.com"
|
47
47
|
```
|
48
48
|
|
49
|
+
Yt::Auth#access_token
|
50
|
+
---------------------
|
51
|
+
|
52
|
+
Similarly, with the `access_token` method, you can obtain an access token of the users:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
redirect_uri = 'https://example.com/auth' # REPLACE WITH REAL ONE
|
56
|
+
code = '1234' # REPLACE WITH REAL ONE
|
57
|
+
Yt::Auth.new(redirect_uri: redirect_uri, code: code).access_token
|
58
|
+
# => "ya29.GltbBLXt74GrwX8S_xr70aX"
|
59
|
+
```
|
60
|
+
|
49
61
|
Yt::HTTPError
|
50
62
|
-------------
|
51
63
|
|
data/lib/yt/auth.rb
CHANGED
data/lib/yt/auth/version.rb
CHANGED
data/yt-auth.gemspec
CHANGED
@@ -17,7 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.required_ruby_version = '>= 2.2.2'
|
19
19
|
|
20
|
-
spec.files = `git ls-files -z`.split("\x0").reject
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
f.match(%r{^(test|spec|features)/})
|
22
|
+
end
|
21
23
|
spec.bindir = 'exe'
|
22
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
25
|
spec.require_paths = ['lib']
|
@@ -27,8 +29,8 @@ Gem::Specification.new do |spec|
|
|
27
29
|
|
28
30
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
29
31
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
30
|
-
spec.add_development_dependency 'rake', '~>
|
31
|
-
spec.add_development_dependency 'coveralls', '~> 0.8.
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
33
|
+
spec.add_development_dependency 'coveralls', '~> 0.8.20'
|
32
34
|
spec.add_development_dependency 'pry-nav', '~> 0.2.4'
|
33
|
-
spec.add_development_dependency 'yard', '~> 0.9.
|
35
|
+
spec.add_development_dependency 'yard', '~> 0.9.8'
|
34
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yt-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Baccigalupo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: yt-support
|
@@ -73,28 +73,28 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '12.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: '
|
83
|
+
version: '12.0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: coveralls
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.8.
|
90
|
+
version: 0.8.20
|
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.
|
97
|
+
version: 0.8.20
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: pry-nav
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,14 +115,14 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.9.
|
118
|
+
version: 0.9.8
|
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.
|
125
|
+
version: 0.9.8
|
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.
|