omniauth-freee 0.0.4 → 1.1.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: c3f19abd0ff445e08d56c8a038b942b119d6072088eb61b9553bb56fec7738c7
4
- data.tar.gz: 90084cdaa53c0bd63b00227e64016dd932e8040e8f5ac2f0b8b7431be682056f
3
+ metadata.gz: c7aa510b78accae915cf4b5b466d93a69b4f3fd5c69c6391699d3b68cd380dfc
4
+ data.tar.gz: b26c10f02283656ce1378ac4a76e7677c8e7727247c5e39989417fda797772de
5
5
  SHA512:
6
- metadata.gz: b3ebaa6024c2092dcf758e991d3360f05bbaf113313131a2e8ac1cbbe1c4b69a669546daa96d4d6f2df6e8993e8a94d970feab0a29d3ef12e392b88669e27bc3
7
- data.tar.gz: b90942e9267e807fc6b30e150abcff29714452399078db00af450f524974e7ee2b77ae7552a7c4620af75dd6a7f5bb21ae1ac0936df83383254a9ea13d40be31
6
+ metadata.gz: 7ae6b0f254d976bae6b1cbf8a5566f491c7372e0e78aac408c788d6a4d19c66ed9a1f1c59993c03c9f7de6e9d816b5c2f8b86f95f0395ef33d61bcedc5884798
7
+ data.tar.gz: 77fdc2e978c7b7cc7e89ce708b2488b5a7977d7b4d43ad33cef193f64e93144b70a80d57cba260cf25dba87a478ffd61566ee1404b92921024d381863de093f3
@@ -0,0 +1,39 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ # 既定の権限を読み取りのみに絞る
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ # 同じ ref に新しい push があれば古い実行を打ち切る
15
+ group: ${{ github.workflow }}-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ spec:
20
+ name: RSpec (Ruby ${{ matrix.ruby }})
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ # 1 バージョンが落ちても他の結果を知りたいので中断しない
24
+ fail-fast: false
25
+ matrix:
26
+ ruby: ['3.2', '3.3', '3.4', '4.0']
27
+ env:
28
+ # guard 系はローカル開発専用なので CI では入れない(Gemfile 参照)
29
+ BUNDLE_WITHOUT: guard
30
+ steps:
31
+ # サプライチェーン対策のため commit SHA で固定する(更新は Renovate に任せる)
32
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33
+
34
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
35
+ with:
36
+ ruby-version: ${{ matrix.ruby }}
37
+ bundler-cache: true
38
+
39
+ - run: bundle exec rspec
@@ -0,0 +1,56 @@
1
+ name: Release
2
+
3
+ # Travis と同じく「v1.2.3 形式のタグを push したら公開」の運用を踏襲する。
4
+ # 手元では `rake tag` でタグを作成・push できる(Rakefile 参照)。
5
+ on:
6
+ push:
7
+ tags: ['v*']
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ publish:
15
+ name: Push gem to RubyGems.org
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ # RubyGems.org の Trusted Publishing(OIDC)に必要。
20
+ # これがないと OIDC トークンを取得できない。
21
+ id-token: write
22
+ env:
23
+ BUNDLE_WITHOUT: guard
24
+ steps:
25
+ # サプライチェーン対策のため commit SHA で固定する(更新は Renovate に任せる)
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27
+
28
+ - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
29
+ with:
30
+ ruby-version: '3.4'
31
+ bundler-cache: true
32
+
33
+ # タグと VERSION の食い違いによる誤リリースを防ぐ
34
+ - name: Verify tag matches OmniAuth::Freee::VERSION
35
+ if: startsWith(github.ref, 'refs/tags/v')
36
+ run: |
37
+ version="$(ruby -r./lib/omniauth-freee/version -e 'print OmniAuth::Freee::VERSION')"
38
+ tag="${GITHUB_REF_NAME#v}"
39
+ if [ "$version" != "$tag" ]; then
40
+ echo "::error::tag ${GITHUB_REF_NAME} does not match VERSION ${version}"
41
+ exit 1
42
+ fi
43
+ echo "tag ${GITHUB_REF_NAME} == VERSION ${version}"
44
+
45
+ # 公開前の最終ゲート
46
+ - run: bundle exec rspec
47
+
48
+ # GitHub の OIDC トークンを短命の RubyGems API キーに交換する。
49
+ # 長期の API キーをリポジトリに置く必要がなくなる。
50
+ - uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
51
+
52
+ - name: Build gem
53
+ run: gem build omniauth-freee.gemspec
54
+
55
+ - name: Push gem
56
+ run: gem push omniauth-freee-*.gem
data/Gemfile CHANGED
@@ -4,10 +4,15 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :development, :test do
7
+ gem 'rake'
8
+ end
9
+
10
+ # ファイル監視によるテスト自動実行はローカル開発でのみ使う。
11
+ # growl / rb-fsevent は macOS 前提なので、CI では BUNDLE_WITHOUT=guard で除外する。
12
+ group :guard do
7
13
  gem 'guard'
8
14
  gem 'guard-rspec'
9
15
  gem 'guard-bundler'
10
16
  gem 'rb-fsevent'
11
17
  gem 'growl'
12
- gem 'rake'
13
18
  end
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # OmniAuth Freee
2
2
 
3
+ [![CI](https://github.com/kkanazaw/omniauth-freee/actions/workflows/ci.yml/badge.svg)](https://github.com/kkanazaw/omniauth-freee/actions/workflows/ci.yml)
4
+
3
5
  This is the *unofficial* OmniAuth strategy for authenticating to Freee. To
4
6
  use it, you'll need to sign up for an OAuth2 Application ID and Secret
5
7
  on the [Freee Applications Page](https://secure.freee.co.jp/oauth/applications).
@@ -31,7 +31,7 @@ module OmniAuth
31
31
  end
32
32
 
33
33
  def callback_url
34
- full_host + script_name + callback_path
34
+ full_host + callback_path
35
35
  end
36
36
  end
37
37
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Freee
3
- VERSION = "0.0.4"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -16,8 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = OmniAuth::Freee::VERSION
18
18
 
19
- gem.add_dependency 'omniauth', '~> 1.5'
20
- gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
19
+ gem.add_dependency 'omniauth', '~> 2.0'
20
+ gem.add_dependency 'omniauth-oauth2', '~> 1.8'
21
21
  gem.add_development_dependency 'rspec', '~> 3.5'
22
22
  gem.add_development_dependency 'rack-test'
23
23
  gem.add_development_dependency 'simplecov'
data/renovate.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": ["config:best-practices"],
4
+ "timezone": "Asia/Tokyo",
5
+ "schedule": ["before 9am on monday"],
6
+ "labels": ["dependencies"],
7
+ "packageRules": [
8
+ {
9
+ "description": "GitHub Actions の更新は 1 本の PR にまとめる",
10
+ "matchManagers": ["github-actions"],
11
+ "groupName": "github-actions"
12
+ }
13
+ ]
14
+ }
@@ -63,12 +63,12 @@ describe OmniAuth::Strategies::Freee do
63
63
  end
64
64
  end
65
65
 
66
- # describe '#callback_url' do
67
- # it 'is a combination of host, script name, and callback path' do
68
- # allow(subject).to receive(:full_host).and_return('https://example.com')
69
- # allow(subject).to receive(:script_name).and_return('/sub_uri')
66
+ describe '#callback_url' do
67
+ it 'is a combination of host, script name, and callback path' do
68
+ allow(subject).to receive(:full_host).and_return('https://example.com')
69
+ allow(subject).to receive(:script_name).and_return('/sub_uri')
70
70
 
71
- # expect(subject.callback_url).to eq('https://example.com/sub_uri/auth/freee/callback')
72
- # end
73
- # end
71
+ expect(subject.callback_url).to eq('https://example.com/sub_uri/auth/freee/callback')
72
+ end
73
+ end
74
74
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-freee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keigo Kanazawa
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2019-05-23 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: omniauth
@@ -16,34 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.5'
18
+ version: '2.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '1.5'
25
+ version: '2.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: omniauth-oauth2
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.4.0
34
- - - "<"
30
+ - - "~>"
35
31
  - !ruby/object:Gem::Version
36
- version: '2.0'
32
+ version: '1.8'
37
33
  type: :runtime
38
34
  prerelease: false
39
35
  version_requirements: !ruby/object:Gem::Requirement
40
36
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.4.0
44
- - - "<"
37
+ - - "~>"
45
38
  - !ruby/object:Gem::Version
46
- version: '2.0'
39
+ version: '1.8'
47
40
  - !ruby/object:Gem::Dependency
48
41
  name: rspec
49
42
  requirement: !ruby/object:Gem::Requirement
@@ -107,9 +100,10 @@ executables: []
107
100
  extensions: []
108
101
  extra_rdoc_files: []
109
102
  files:
103
+ - ".github/workflows/ci.yml"
104
+ - ".github/workflows/release.yml"
110
105
  - ".gitignore"
111
106
  - ".rspec"
112
- - ".travis.yml"
113
107
  - Gemfile
114
108
  - Guardfile
115
109
  - LICENSE.txt
@@ -119,13 +113,13 @@ files:
119
113
  - lib/omniauth-freee/version.rb
120
114
  - lib/omniauth/strategies/freee.rb
121
115
  - omniauth-freee.gemspec
116
+ - renovate.json
122
117
  - spec/omniauth/strategies/freee_spec.rb
123
118
  - spec/spec_helper.rb
124
119
  homepage: https://github.com/kkanazaw/omniauth-freee
125
120
  licenses:
126
121
  - MIT
127
122
  metadata: {}
128
- post_install_message:
129
123
  rdoc_options: []
130
124
  require_paths:
131
125
  - lib
@@ -140,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
134
  - !ruby/object:Gem::Version
141
135
  version: '0'
142
136
  requirements: []
143
- rubygems_version: 3.0.3
144
- signing_key:
137
+ rubygems_version: 3.6.9
145
138
  specification_version: 4
146
139
  summary: Unofficial OmniAuth strategy for Freee.
147
140
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: ruby
2
- deploy:
3
- provider: rubygems
4
- api_key:
5
- secure: KRmedrg9+bmTZ3jboI1AcoGqZTJSIYP9A8H+OABOrmk2zh6WywiJKUZcpIXfltrn+Caw/LiYknN++5KSZbLRqQyKSwAiDyeTzS3mgOFV2KoHZW734vhXqhk4Q6S+n799hEtlgmE3ceXQ4fgLkM+FuauurEJuFDYnNm+2b+LteCSxmm71gLqYfSEXy4X4tnhRJEq6z3hpCc9jIq/4JMs62mjh7akvXv4EQHauq7rhjKrDLbAFX4ROgwOvcheBMn5LsSIcSvBjQNPTq6fP1X1++l7Xt/0jCu9x4QADvbdRYD/exK227dPCPZUBn0VuDT6WeNhjAsp9GufmOR3/e3e6ceEe2rA8dM0+5hSCt3n7RKW3IvYgvJQ+XLskvXyD2X8xzumkjJVNTUzHN97uotxfrYyEUpxO0NRHswqg2JphCc+p4Pqdyx5XLYVXsvF0i0N4xXYxx/mVckWEjFlZezYsLoDVos+CcP1AbP2LZgwYyw+T+u+ukYO2TAA+jA516YxssRh4rs4cbamJOOGxDkMniQPFgwgBp+Aro9fWdKqJyglt57+ptDnlzamUYXYgGeAnN5q995rfZ+4aNoyajwHEsCYPLIewDlfv4609zqnZCMkc8laHXbrsYVgN5uPf7VVuNEwSLBQST9mLDggEosBTSMcQp+Mpv+7jA6vzrG3bwuU=
6
- on:
7
- tags: true