omniauth-qiita-v2 1.3.0 → 1.5.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +29 -16
- data/lib/omniauth/qiita_v2/version.rb +1 -1
- data/lib/omniauth/strategies/qiita_v2.rb +10 -10
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c253e29b58bb3a597346d4da851a821c71a1041173cdfbb96a0efce01751bcc0
|
|
4
|
+
data.tar.gz: 485521c8d1f867898debde9d721073e359a2eb9ee717df308314c7b144ff2f7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d2afac7e28f52e709e42fb0495980d090d457e2c9fbd71f9d872e581bd0811dc2fe0fc76c14f01f5e6599434bba64de0fa0b00e1b6c6debc8a6137ea12038cd
|
|
7
|
+
data.tar.gz: 32cbbda374538770de74d2397c773a474bc56a0a78c6a81d68d82832d024f267c2aa8e2d25e5ead37b902658215ac2f0814b1d1430d069f1e5a8f11f8514c197
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.0] - 2025-08-02
|
|
4
|
+
|
|
5
|
+
- Refactor: Refactor `OmniAuth::Strategies::QiitaV2#authorize_params`
|
|
6
|
+
- Test: Update test
|
|
7
|
+
- Other: Update .rubocop.yml
|
|
8
|
+
|
|
9
|
+
## [1.4.0] - 2025-07-20
|
|
10
|
+
|
|
11
|
+
- New: Update auth hash
|
|
12
|
+
- Test: Update test
|
|
13
|
+
- Other: Update README.md
|
|
14
|
+
|
|
3
15
|
## [1.3.0] - 2025-07-17
|
|
4
16
|
|
|
5
17
|
- New: Remove oauth2 dependency
|
data/README.md
CHANGED
|
@@ -88,24 +88,20 @@ After successful authentication, the auth hash will be available in `request.env
|
|
|
88
88
|
```ruby
|
|
89
89
|
{
|
|
90
90
|
provider: 'qiita_v2',
|
|
91
|
-
uid: '
|
|
91
|
+
uid: 'qiita',
|
|
92
92
|
info: {
|
|
93
|
-
name: '
|
|
94
|
-
nickname: '
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
description: 'Software Developer',
|
|
93
|
+
name: 'Qiita キータ',
|
|
94
|
+
nickname: 'qiita',
|
|
95
|
+
image: 'https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439',
|
|
96
|
+
description: 'Hello, world.',
|
|
98
97
|
location: 'Tokyo, Japan',
|
|
99
|
-
organization: 'Example Inc.',
|
|
100
|
-
followees_count: 50,
|
|
101
|
-
followers_count: 100,
|
|
102
|
-
items_count: 30,
|
|
103
98
|
urls: {
|
|
104
|
-
website: 'https://
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
website: 'https://qiita.com',
|
|
100
|
+
x: 'https://x.com/qiita',
|
|
101
|
+
twitter: 'https://twitter.com/qiita',
|
|
102
|
+
facebook: 'https://facebook.com/qiita',
|
|
103
|
+
linkedin: 'https://www.linkedin.com/in/qiita',
|
|
104
|
+
github: 'https://github.com/qiitan'
|
|
109
105
|
}
|
|
110
106
|
},
|
|
111
107
|
credentials: {
|
|
@@ -114,7 +110,24 @@ After successful authentication, the auth hash will be available in `request.env
|
|
|
114
110
|
},
|
|
115
111
|
extra: {
|
|
116
112
|
raw_info: {
|
|
117
|
-
|
|
113
|
+
'description' => 'Hello, world.',
|
|
114
|
+
'facebook_id' => 'qiita',
|
|
115
|
+
'followees_count' => 100,
|
|
116
|
+
'followers_count' => 200,
|
|
117
|
+
'github_login_name' => 'qiitan',
|
|
118
|
+
'id' => 'qiita',
|
|
119
|
+
'items_count' => 300,
|
|
120
|
+
'linkedin_id' => 'qiita',
|
|
121
|
+
'location' => 'Tokyo, Japan',
|
|
122
|
+
'name' => 'Qiita キータ',
|
|
123
|
+
'organization' => 'Qiita Inc.',
|
|
124
|
+
'permanent_id' => 1,
|
|
125
|
+
'profile_image_url' => 'https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439',
|
|
126
|
+
'team_only' => false,
|
|
127
|
+
'twitter_screen_name' => 'qiita',
|
|
128
|
+
'website_url' => 'https://qiita.com',
|
|
129
|
+
'image_monthly_upload_limit' => 1048576,
|
|
130
|
+
'image_monthly_upload_remaining' => 524288
|
|
118
131
|
}
|
|
119
132
|
}
|
|
120
133
|
}
|
|
@@ -28,18 +28,14 @@ module OmniAuth
|
|
|
28
28
|
prune!({
|
|
29
29
|
name: raw_info['name'],
|
|
30
30
|
nickname: raw_info['id'],
|
|
31
|
-
permanent_id: raw_info['permanent_id'],
|
|
32
31
|
email: nil, # Qiita API v2 does not provide email
|
|
33
32
|
description: raw_info['description'],
|
|
34
33
|
image: raw_info['profile_image_url'],
|
|
35
34
|
location: raw_info['location'],
|
|
36
|
-
organization: raw_info['organization'],
|
|
37
|
-
followees_count: raw_info['followees_count'],
|
|
38
|
-
followers_count: raw_info['followers_count'],
|
|
39
|
-
items_count: raw_info['items_count'],
|
|
40
35
|
urls: {
|
|
41
36
|
website: raw_info['website_url'],
|
|
42
|
-
|
|
37
|
+
x: raw_info['twitter_screen_name'] ? "https://x.com/#{raw_info['twitter_screen_name']}" : nil,
|
|
38
|
+
twitter: raw_info['twitter_screen_name'] ? "https://twitter.com/#{raw_info['twitter_screen_name']}" : nil,
|
|
43
39
|
facebook: raw_info['facebook_id'] ? "https://facebook.com/#{raw_info['facebook_id']}" : nil,
|
|
44
40
|
linkedin: raw_info['linkedin_id'] ? "https://www.linkedin.com/in/#{raw_info['linkedin_id']}" : nil,
|
|
45
41
|
github: raw_info['github_login_name'] ? "https://github.com/#{raw_info['github_login_name']}" : nil
|
|
@@ -71,11 +67,11 @@ module OmniAuth
|
|
|
71
67
|
|
|
72
68
|
def authorize_params
|
|
73
69
|
super.tap do |params|
|
|
74
|
-
[
|
|
75
|
-
params[
|
|
70
|
+
options[:authorize_options].each do |key|
|
|
71
|
+
params[key] = request.params[key.to_s] unless empty?(request.params[key.to_s])
|
|
76
72
|
end
|
|
77
73
|
params[:scope] ||= DEFAULT_SCOPE
|
|
78
|
-
session['omniauth.state'] = params[:state]
|
|
74
|
+
session['omniauth.state'] = params[:state] unless empty?(params[:state])
|
|
79
75
|
end
|
|
80
76
|
end
|
|
81
77
|
|
|
@@ -90,10 +86,14 @@ module OmniAuth
|
|
|
90
86
|
def prune!(hash)
|
|
91
87
|
hash.delete_if do |_, value|
|
|
92
88
|
prune!(value) if value.is_a?(Hash)
|
|
93
|
-
|
|
89
|
+
empty?(value)
|
|
94
90
|
end
|
|
95
91
|
end
|
|
96
92
|
|
|
93
|
+
def empty?(value)
|
|
94
|
+
value.nil? || (value.respond_to?(:empty?) && value.empty?)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
97
|
def base_params
|
|
98
98
|
{
|
|
99
99
|
headers: {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-qiita-v2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masahiro
|
|
@@ -52,15 +52,15 @@ files:
|
|
|
52
52
|
- lib/omniauth-qiita-v2.rb
|
|
53
53
|
- lib/omniauth/qiita_v2/version.rb
|
|
54
54
|
- lib/omniauth/strategies/qiita_v2.rb
|
|
55
|
-
homepage: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.
|
|
55
|
+
homepage: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.5.0
|
|
56
56
|
licenses:
|
|
57
57
|
- MIT
|
|
58
58
|
metadata:
|
|
59
|
-
homepage_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.
|
|
60
|
-
source_code_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.
|
|
61
|
-
changelog_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/blob/v1.
|
|
59
|
+
homepage_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.5.0
|
|
60
|
+
source_code_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.5.0
|
|
61
|
+
changelog_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/blob/v1.5.0/CHANGELOG.md
|
|
62
62
|
bug_tracker_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/issues
|
|
63
|
-
documentation_uri: https://rubydoc.info/gems/omniauth-qiita-v2/1.
|
|
63
|
+
documentation_uri: https://rubydoc.info/gems/omniauth-qiita-v2/1.5.0
|
|
64
64
|
funding_uri: https://patreon.com/CadenzaTech
|
|
65
65
|
rubygems_mfa_required: 'true'
|
|
66
66
|
rdoc_options: []
|