omniauth-linear 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b5959c5984ffabb34eaa54921f2a7654322cb1e823762ca435729d363caf9fc
4
- data.tar.gz: afee27f2a374d79f0ed615dc19a81d63aec829cc99a5edb5d79953d677538e02
3
+ metadata.gz: fecc8a9475ce01f4d3fed3929fd6f3016740b6afcebbc628672720e2eccc9da5
4
+ data.tar.gz: d06067cec9650c874e2f8b6daa205e50e66adaac9c8e77ab014eed4ecbdebc5f
5
5
  SHA512:
6
- metadata.gz: 4c9320de46fc3d6c084a5de782dbf947349835565c2f996bec6476e91993b73416c42e7377de0747998c2730fcdbea90d028751335a858cae67b35c721c9fa6c
7
- data.tar.gz: c476481613c76ec25e000bfd44ef57362475685b0ddede8d1156347b48cf18afea02e60f5c8c1a4ca04daeec9cb4c955b620ddb76736c0bbfc9f032021d4c74f
6
+ metadata.gz: 2e37095ac59369c4e3eacc9df3fba08b52872d526ded83e6958564997c16f3f22adffb30ef2eee296107673d2cac037e9487fdfb5fcfd4eb0a962bbad4704900
7
+ data.tar.gz: c25995cab54fe249a6d7f91c75dd7354c29c3da035cdac92a10813645fca5d92f71da9c4236536f5c87ab536d317047502411adbb14a8cc1153c03cde5eb6e30
@@ -30,10 +30,10 @@ module OmniAuth
30
30
  end
31
31
  end
32
32
 
33
- uid { me.viewer.id }
33
+ uid { "#{me['organization']['id']}-#{me['viewer']['id']}" }
34
34
 
35
35
  extra do
36
- { raw_info: raw_info, me: me.viewer }
36
+ { raw_info: raw_info, me: me['viewer'], organization: me['organization'] }
37
37
  end
38
38
 
39
39
  def raw_info
@@ -53,6 +53,10 @@ module OmniAuth
53
53
 
54
54
  gql = client.parse <<~GRAPHQL
55
55
  query {
56
+ organization {
57
+ id
58
+ name
59
+ }
56
60
  viewer {
57
61
  id
58
62
  name
@@ -61,7 +65,7 @@ module OmniAuth
61
65
  }
62
66
  GRAPHQL
63
67
  response = client.query(gql, context: {token: access_token.token})
64
- response.data
68
+ response.data.to_h
65
69
  end
66
70
  end
67
71
 
@@ -72,4 +76,4 @@ module OmniAuth
72
76
  end
73
77
  end
74
78
 
75
- OmniAuth.config.add_camelization 'linear', 'Linear'
79
+ OmniAuth.config.add_camelization 'linear', 'Linear'
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Linear
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
 
19
19
  gem.add_dependency 'omniauth', '~> 1.5'
20
20
  gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
21
- gem.add_dependency 'graphlient'
21
+ gem.add_dependency 'graphql-client'
22
22
  gem.add_development_dependency 'rspec', '~> 3.5'
23
23
  gem.add_development_dependency 'rack-test'
24
24
  gem.add_development_dependency 'simplecov'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-linear
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentin Rousseau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-01 00:00:00.000000000 Z
11
+ date: 2023-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -45,7 +45,7 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '2.0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: graphlient
48
+ name: graphql-client
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="