omniauth-timetree 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/omniauth-timetree/version.rb +1 -1
- data/lib/omniauth/strategies/timetree.rb +5 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c404006ef54a15ed8c2fab82e06b438f43df2fd25887537811fd31a664fd5c73
|
4
|
+
data.tar.gz: a34cda6f5b30df21a42c44cb152511b9cc4082c4f045214c86ae30b0eb1930db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2afc6cd07d67c9fedd01d439cc9333a131d240b7eba9bdfa5a6593a762fae687f0a02333121c0c77602601a4b5e03cdf0425bb5421d4afcad3b0295113485357
|
7
|
+
data.tar.gz: 65dd1f8eed1d7878968d8cd2b03ff934e56fe4a3b2be6d748aa4931f6b4c29383bd80a29b0e44648a1216c7ab18a3de97f278714e39afa0b4765e66e3ab2bb6b
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# OmniAuth::Timetree
|
2
2
|
|
3
3
|
[![Test](https://github.com/koshilife/omniauth-timetree/workflows/Test/badge.svg)](https://github.com/koshilife/omniauth-timetree/actions?query=workflow%3ATest)
|
4
4
|
[![codecov](https://codecov.io/gh/koshilife/omniauth-timetree/branch/master/graph/badge.svg)](https://codecov.io/gh/koshilife/omniauth-timetree)
|
@@ -6,22 +6,21 @@ module OmniAuth
|
|
6
6
|
module Strategies
|
7
7
|
class Timetree < OmniAuth::Strategies::OAuth2
|
8
8
|
option :name, 'timetree'
|
9
|
-
option :client_options, site
|
10
|
-
authorize_url: '/oauth/authorize',
|
11
|
-
token_url: '/oauth/token'
|
9
|
+
option :client_options, :site => 'https://timetreeapp.com'
|
12
10
|
|
13
11
|
uid { raw_info[:id] }
|
14
12
|
|
15
13
|
extra do
|
16
|
-
{
|
14
|
+
{:raw_info => raw_info}
|
17
15
|
end
|
18
16
|
|
19
17
|
def raw_info
|
20
18
|
return @raw_info unless @raw_info.nil?
|
19
|
+
|
21
20
|
endpoint = 'https://timetreeapis.com/user'
|
22
|
-
options = {
|
21
|
+
options = {:headers => {'Accept' => 'application/vnd.timetree.v1+json'}}
|
23
22
|
res = access_token.get(endpoint, options)
|
24
|
-
parsed_body = JSON.parse(res.body, symbolize_names
|
23
|
+
parsed_body = JSON.parse(res.body, :symbolize_names => true)
|
25
24
|
@raw_info = parsed_body[:data] || {}
|
26
25
|
end
|
27
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-timetree
|
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
|
- Kenji Koshikawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -125,7 +125,7 @@ metadata:
|
|
125
125
|
homepage_uri: https://github.com/koshilife/omniauth-timetree
|
126
126
|
source_code_uri: https://github.com/koshilife/omniauth-timetree
|
127
127
|
changelog_uri: https://github.com/koshilife/omniauth-timetree/blob/master/CHANGELOG.md
|
128
|
-
documentation_uri: https://www.rubydoc.info/gems/omniauth-timetree/0.1.
|
128
|
+
documentation_uri: https://www.rubydoc.info/gems/omniauth-timetree/0.1.4
|
129
129
|
post_install_message:
|
130
130
|
rdoc_options: []
|
131
131
|
require_paths:
|