omniauth-qiita-v2 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 156f9db42cf98499927fb2937b60c5c78e95b4dd11a9ecee5ff256feb3d4458a
4
- data.tar.gz: 9a1dfa80180f02ba9269c614ca0d68f2625a24e7daf3856cc73e4669cbb1f00b
3
+ metadata.gz: c253e29b58bb3a597346d4da851a821c71a1041173cdfbb96a0efce01751bcc0
4
+ data.tar.gz: 485521c8d1f867898debde9d721073e359a2eb9ee717df308314c7b144ff2f7b
5
5
  SHA512:
6
- metadata.gz: 39c180fa2fe009f29eed214a0cd4fd0ff5e2e54ba6ff3c8dbc6d00e1f7065e74ecfe36d1786e408c1b53f0dc9d493dad793cb543441e45ebd427ce0bd764d9ca
7
- data.tar.gz: 0e03a55f4e588a4ea3414026f254a3a081d6dd6a65658825602c6ee2d18fddc0eab91847fa04509b5e6d2d152127c88d365fa188e3e791c795e092d6b2b2050e
6
+ metadata.gz: 5d2afac7e28f52e709e42fb0495980d090d457e2c9fbd71f9d872e581bd0811dc2fe0fc76c14f01f5e6599434bba64de0fa0b00e1b6c6debc8a6137ea12038cd
7
+ data.tar.gz: 32cbbda374538770de74d2397c773a474bc56a0a78c6a81d68d82832d024f267c2aa8e2d25e5ead37b902658215ac2f0814b1d1430d069f1e5a8f11f8514c197
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## [1.4.0] - 2025-07-20
4
10
 
5
11
  - New: Update auth hash
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module QiitaV2
5
- VERSION = '1.4.0'
5
+ VERSION = '1.5.0'
6
6
  end
7
7
  end
@@ -67,11 +67,11 @@ module OmniAuth
67
67
 
68
68
  def authorize_params
69
69
  super.tap do |params|
70
- ['scope', 'state'].each do |v|
71
- params[v.to_sym] = request.params[v] if request.params[v]
70
+ options[:authorize_options].each do |key|
71
+ params[key] = request.params[key.to_s] unless empty?(request.params[key.to_s])
72
72
  end
73
73
  params[:scope] ||= DEFAULT_SCOPE
74
- session['omniauth.state'] = params[:state] if params[:state]
74
+ session['omniauth.state'] = params[:state] unless empty?(params[:state])
75
75
  end
76
76
  end
77
77
 
@@ -86,10 +86,14 @@ module OmniAuth
86
86
  def prune!(hash)
87
87
  hash.delete_if do |_, value|
88
88
  prune!(value) if value.is_a?(Hash)
89
- value.nil? || (value.respond_to?(:empty?) && value.empty?)
89
+ empty?(value)
90
90
  end
91
91
  end
92
92
 
93
+ def empty?(value)
94
+ value.nil? || (value.respond_to?(:empty?) && value.empty?)
95
+ end
96
+
93
97
  def base_params
94
98
  {
95
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.0
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.4.0
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.4.0
60
- source_code_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/tree/v1.4.0
61
- changelog_uri: https://github.com/cadenza-tech/omniauth-qiita-v2/blob/v1.4.0/CHANGELOG.md
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.4.0
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: []