omniauth-daccount 0.3.2 → 0.4.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
- SHA1:
3
- metadata.gz: 5ecea44ccd40301f57e0cf82fd3640397aa4ce50
4
- data.tar.gz: dadc3407cdafb6a990bf399f196dacd23b8196e0
2
+ SHA256:
3
+ metadata.gz: a562dac0273de79df407c8473217f7234031e0732f58d4996cce711fcc400722
4
+ data.tar.gz: 07ad6339a83baea27582ac560bd87c11b33c68fdb756be11fc9d67f8b1f1f0c9
5
5
  SHA512:
6
- metadata.gz: f5923c76b11ca941da0b5ed99ffbd4ed51c58f9cb699f81138a52b8b085a53d520506b71f7ff0c8ce0c36e72ef2a90a44e84657d330f1c9a2d77d9f4ac36cd77
7
- data.tar.gz: d997d6a414f047c25abdcaf8dcf9956906975e717f9ee2ba686cd03477a47997e8475098ca3341154222bcfccc70ce15ddeac479bbd665332fd9359bfb980b18
6
+ metadata.gz: 8fc97432ffc94e6361d60f71de74e31f0c47416c38bcc830bce1d8e366bcbd788fed9858e53e78bb68a77f355e54a26d00dfc575db6f9a2a2b5ddc0e1c2d244e
7
+ data.tar.gz: 9618763d036068b6f0288ccd3fbbda36ff0c8362a8a338f0c3239e269473935bb5defe907cf9913968f892a6bd69afe623cc33b9d6225a0850d49c73ab104c99
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
10
11
 
11
12
  # rspec failure tracking
12
13
  .rspec_status
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.0
1
+ 3.4.4
data/CHANGELOG.md ADDED
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.4.0] - 2025-01-09
9
+
10
+ ### Added
11
+ - CHANGELOG.md for tracking release history
12
+
13
+ ### Changed
14
+ - **BREAKING**: Updated minimum Ruby version requirement to >= 3.4.0 for Ruby 3.4.x compatibility
15
+ - **BREAKING**: Updated Rails compatibility to support Rails 7.2.3
16
+ - Modernized gemspec structure (using `__dir__` instead of `__FILE__`)
17
+ - Updated all development dependencies to latest versions compatible with Ruby 3.4.x
18
+ - bundler: >= 2.0
19
+ - rake: >= 13.0
20
+ - rspec: ~> 3.12
21
+ - simplecov: ~> 0.22
22
+ - rack-test: ~> 2.1
23
+ - webmock: ~> 3.18
24
+ - Updated runtime dependencies for Rails 7.2.3 compatibility
25
+ - omniauth: >= 2.0
26
+ - omniauth-oauth2: >= 1.8
27
+
28
+ ### Removed
29
+ - **BREAKING**: Removed `multi_json` runtime dependency (not actually used, Ruby 3.4 uses native JSON)
30
+ - Removed `pry-byebug` development dependency (not used in codebase)
31
+ - Removed `.travis.yml` (outdated CI configuration)
32
+
33
+ ### Fixed
34
+ - Ensured compatibility with Ruby 3.x keyword argument handling
35
+ - Ensured compatibility with Psych 4 YAML parser (Ruby 3.1+)
36
+
37
+ ## [0.3.3] - 2020-05-12
38
+
39
+ ### Changed
40
+ - Version bump to 0.3.3
41
+
42
+ ## [0.3.2] - Earlier Release
43
+
44
+ ### Added
45
+ - Initial OAuth2 authentication support for d-account
46
+ - OmniAuth strategy implementation
data/README.md CHANGED
@@ -20,20 +20,24 @@ Or install it yourself as:
20
20
 
21
21
  $ gem install omniauth-daccount
22
22
 
23
- ## Usage
23
+ ## Setup Your d-account API
24
+ - Go to https://g.daccount.docomo.ne.jp/VIEW_OC01/login4
25
+ - Sign in and Go to 'RPサイト情報管理'
26
+ - Create Your RP Site if you don't have, then you must provide the `openid` scope.
27
+ - Go to '詳細', then note client_id and client_secret.
24
28
 
25
- TODO: Write usage instructions here
29
+ ## Usage
26
30
 
27
- ## Development
31
+ Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:
28
32
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+ ```
34
+ Rails.application.config.middleware.use OmniAuth::Builder do
35
+ provider :daccount, ENV['D_ACCOUNT_CLIENT_ID'], ENV['D_ACCOUNT_CLIENT_SECRET'], callback_path: "your callback url"
36
+ end
37
+ ```
30
38
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
39
+ Note: daccount connect cannot register http url as callback url. That is, localhost cannot be registered. Of course in most cases using localhosts while developing your application... but we need to prepare https callback url in this case(You can choise deploying heloku or using ngrok, and more).
32
40
 
33
41
  ## Contributing
34
42
 
35
43
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/omniauth-daccount. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
-
37
- ## Code of Conduct
38
-
39
- Everyone interacting in the Omniauth::Daccount project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/omniauth-daccount/blob/master/CODE_OF_CONDUCT.md).
data/build.log ADDED
@@ -0,0 +1,22 @@
1
+
2
+ OmniAuth::Daccount
3
+ client options
4
+ should have correct site
5
+ should have correct authorize url
6
+ should have correct token url
7
+ should be overrideable
8
+ for site
9
+ for authorize url
10
+ for token url
11
+ #raw_info
12
+ should use relative paths
13
+ #info.urls
14
+ should use html_url from raw_info
15
+ #callback_url
16
+ is a combination of host, script name, and callback path
17
+
18
+ Finished in 0.05532 seconds (files took 3.86 seconds to load)
19
+ 9 examples, 0 failures
20
+
21
+ Coverage report generated for RSpec to /Users/koji.yamazaki/workspace/omniauth-daccount/coverage.
22
+ Line Coverage: 64.58% (31 / 48)
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Daccount
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  require "omniauth/daccount/version"
3
- require 'multi_json'
4
3
  require 'omniauth/strategies/oauth2'
5
4
  require 'uri'
6
5
 
@@ -14,12 +13,13 @@ module OmniAuth
14
13
  AUTH_IF = 1
15
14
 
16
15
  option :name, 'daccount'
17
- #authorizeにリクエストフォワードする時のapp側のパラメータ値にこれらを含めること。
16
+ #Include parameters when request-forwarding to authorize.
18
17
  option :authorize_options, %i[nounce redirect_uri]
19
18
  option :verify_iss, true
20
19
  option :callback_path, '/login/docomo_callback'
21
20
 
22
- option :client_options, {#authorizationリクエスト時の追加パラメータ
21
+ # Additional Parameters which requires when authorization requests.
22
+ option :client_options, {
23
23
  site: 'https://conf.uw.docomo.ne.jp',
24
24
  authorize_url: 'https://id.smt.docomo.ne.jp/cgi8/oidc/authorize',
25
25
  token_url: 'https://conf.uw.docomo.ne.jp/common/token',
@@ -1,13 +1,13 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
2
+ lib = File.expand_path("lib", __dir__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require "omniauth/daccount/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "omniauth-daccount"
8
8
  spec.version = OmniAuth::Daccount::VERSION
9
- spec.authors = ["Koji Yamazaki"]
10
- spec.email = ["kouji.yamazaki.cv@nttdocomo.com"]
9
+ spec.authors = ["jagrament"]
10
+ spec.email = ["t10933ky@gmail.com"]
11
11
 
12
12
  spec.summary = %q{d-account Oauth2 strategy for OmniAuth.}
13
13
  spec.description = %q{d-account Oauth2 strategy for OmniAuth. This allows you to login to d-account with your ruby app}
@@ -19,13 +19,16 @@ Gem::Specification.new do |spec|
19
19
  spec.bindir = "exe"
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
+ spec.required_ruby_version = '>= 3.4.0'
22
23
 
23
- spec.add_development_dependency "bundler", "~> 1.15"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "rspec", "~> 3.0"
24
+ spec.add_development_dependency "bundler", ">= 2.0"
25
+ spec.add_development_dependency "rake", ">= 13.0"
26
+ spec.add_development_dependency "rspec", "~> 3.12"
27
+ spec.add_development_dependency "simplecov", "~> 0.22"
28
+ spec.add_development_dependency "rack-test", "~> 2.1"
29
+ spec.add_development_dependency "webmock", "~> 3.18"
26
30
 
27
- spec.add_runtime_dependency 'omniauth', '>= 1.1.1'
28
- spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.3.1'
29
- spec.add_runtime_dependency 'multi_json', '~> 1.3'
31
+ spec.add_runtime_dependency 'omniauth', '>= 2.0'
32
+ spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.8'
30
33
 
31
34
  end
metadata CHANGED
@@ -1,103 +1,130 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-daccount
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
- - Koji Yamazaki
8
- autorequire:
7
+ - jagrament
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2019-02-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '2.0'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '2.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '13.0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '13.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rspec
15
42
  requirement: !ruby/object:Gem::Requirement
16
43
  requirements:
17
44
  - - "~>"
18
45
  - !ruby/object:Gem::Version
19
- version: '1.15'
46
+ version: '3.12'
20
47
  type: :development
21
48
  prerelease: false
22
49
  version_requirements: !ruby/object:Gem::Requirement
23
50
  requirements:
24
51
  - - "~>"
25
52
  - !ruby/object:Gem::Version
26
- version: '1.15'
53
+ version: '3.12'
27
54
  - !ruby/object:Gem::Dependency
28
- name: rake
55
+ name: simplecov
29
56
  requirement: !ruby/object:Gem::Requirement
30
57
  requirements:
31
58
  - - "~>"
32
59
  - !ruby/object:Gem::Version
33
- version: '10.0'
60
+ version: '0.22'
34
61
  type: :development
35
62
  prerelease: false
36
63
  version_requirements: !ruby/object:Gem::Requirement
37
64
  requirements:
38
65
  - - "~>"
39
66
  - !ruby/object:Gem::Version
40
- version: '10.0'
67
+ version: '0.22'
41
68
  - !ruby/object:Gem::Dependency
42
- name: rspec
69
+ name: rack-test
43
70
  requirement: !ruby/object:Gem::Requirement
44
71
  requirements:
45
72
  - - "~>"
46
73
  - !ruby/object:Gem::Version
47
- version: '3.0'
74
+ version: '2.1'
48
75
  type: :development
49
76
  prerelease: false
50
77
  version_requirements: !ruby/object:Gem::Requirement
51
78
  requirements:
52
79
  - - "~>"
53
80
  - !ruby/object:Gem::Version
54
- version: '3.0'
81
+ version: '2.1'
55
82
  - !ruby/object:Gem::Dependency
56
- name: omniauth
83
+ name: webmock
57
84
  requirement: !ruby/object:Gem::Requirement
58
85
  requirements:
59
- - - ">="
86
+ - - "~>"
60
87
  - !ruby/object:Gem::Version
61
- version: 1.1.1
62
- type: :runtime
88
+ version: '3.18'
89
+ type: :development
63
90
  prerelease: false
64
91
  version_requirements: !ruby/object:Gem::Requirement
65
92
  requirements:
66
- - - ">="
93
+ - - "~>"
67
94
  - !ruby/object:Gem::Version
68
- version: 1.1.1
95
+ version: '3.18'
69
96
  - !ruby/object:Gem::Dependency
70
- name: omniauth-oauth2
97
+ name: omniauth
71
98
  requirement: !ruby/object:Gem::Requirement
72
99
  requirements:
73
100
  - - ">="
74
101
  - !ruby/object:Gem::Version
75
- version: 1.3.1
102
+ version: '2.0'
76
103
  type: :runtime
77
104
  prerelease: false
78
105
  version_requirements: !ruby/object:Gem::Requirement
79
106
  requirements:
80
107
  - - ">="
81
108
  - !ruby/object:Gem::Version
82
- version: 1.3.1
109
+ version: '2.0'
83
110
  - !ruby/object:Gem::Dependency
84
- name: multi_json
111
+ name: omniauth-oauth2
85
112
  requirement: !ruby/object:Gem::Requirement
86
113
  requirements:
87
- - - "~>"
114
+ - - ">="
88
115
  - !ruby/object:Gem::Version
89
- version: '1.3'
116
+ version: '1.8'
90
117
  type: :runtime
91
118
  prerelease: false
92
119
  version_requirements: !ruby/object:Gem::Requirement
93
120
  requirements:
94
- - - "~>"
121
+ - - ">="
95
122
  - !ruby/object:Gem::Version
96
- version: '1.3'
123
+ version: '1.8'
97
124
  description: d-account Oauth2 strategy for OmniAuth. This allows you to login to d-account
98
125
  with your ruby app
99
126
  email:
100
- - kouji.yamazaki.cv@nttdocomo.com
127
+ - t10933ky@gmail.com
101
128
  executables: []
102
129
  extensions: []
103
130
  extra_rdoc_files: []
@@ -105,13 +132,14 @@ files:
105
132
  - ".gitignore"
106
133
  - ".rspec"
107
134
  - ".ruby-version"
108
- - ".travis.yml"
135
+ - CHANGELOG.md
109
136
  - CODE_OF_CONDUCT.md
110
137
  - Gemfile
111
138
  - README.md
112
139
  - Rakefile
113
140
  - bin/console
114
141
  - bin/setup
142
+ - build.log
115
143
  - lib/omniauth-daccount.rb
116
144
  - lib/omniauth/daccount.rb
117
145
  - lib/omniauth/daccount/version.rb
@@ -120,7 +148,6 @@ files:
120
148
  homepage: https://github.com/jagrament/omniauth-daccount
121
149
  licenses: []
122
150
  metadata: {}
123
- post_install_message:
124
151
  rdoc_options: []
125
152
  require_paths:
126
153
  - lib
@@ -128,16 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
155
  requirements:
129
156
  - - ">="
130
157
  - !ruby/object:Gem::Version
131
- version: '0'
158
+ version: 3.4.0
132
159
  required_rubygems_version: !ruby/object:Gem::Requirement
133
160
  requirements:
134
161
  - - ">="
135
162
  - !ruby/object:Gem::Version
136
163
  version: '0'
137
164
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.6.11
140
- signing_key:
165
+ rubygems_version: 3.6.7
141
166
  specification_version: 4
142
167
  summary: d-account Oauth2 strategy for OmniAuth.
143
168
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.0
5
- before_install: gem install bundler -v 1.15.3