omniauth-cybozu 0.1.1 → 0.2.1
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/.github/workflows/gem-push.yml +37 -0
- data/.github/workflows/test.yml +21 -0
- data/.rubocop.yml +11 -9
- data/CHANGELOG.md +26 -1
- data/README.md +5 -2
- data/Rakefile +5 -3
- data/bin/console +4 -11
- data/bin/setup +0 -2
- data/lib/omniauth-cybozu/version.rb +2 -2
- data/lib/omniauth/strategies/cybozu.rb +4 -2
- data/omniauth-cybozu.gemspec +9 -6
- metadata +48 -19
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4db725635b9904e089b7332986531351d70cf133eaa36af23e75c4bdd1746ef
|
4
|
+
data.tar.gz: 6ba30b5ac94f00ebf2a98e443247df2f5e3f58c8665583fdb75321b2059b4e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd329928bafb13f93266e0d96ba519d6e8df6a7866c6689c14273f600712baf8eb1a92ba6ebaeec1b09d2392d92436ea30973e2f6e0d0b83d3f76688297fc768
|
7
|
+
data.tar.gz: e56b1db819af97624f49631b2c01b0106ac1e2cde23a5d56616ce1c52e867b4107d6044655633f0dc5ce1422e476827d873e8d66213070b320af5515609add4a
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [master]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
name: Build + Publish
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby 2.6
|
15
|
+
uses: actions/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.6
|
18
|
+
|
19
|
+
- name: Build and test
|
20
|
+
run: |
|
21
|
+
gem install bundler
|
22
|
+
bundle install --jobs 4 --retry 3
|
23
|
+
bundle exec rspec
|
24
|
+
env:
|
25
|
+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|
26
|
+
|
27
|
+
- name: Publish to RubyGems
|
28
|
+
run: |
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push *.gem
|
35
|
+
continue-on-error: true
|
36
|
+
env:
|
37
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: pull_request
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v2
|
11
|
+
- name: Set up Ruby
|
12
|
+
uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 2.6
|
15
|
+
- name: Build and test
|
16
|
+
run: |
|
17
|
+
gem install bundler
|
18
|
+
bundle install --jobs 4 --retry 3
|
19
|
+
bundle exec rspec
|
20
|
+
env:
|
21
|
+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|
data/.rubocop.yml
CHANGED
@@ -23,12 +23,11 @@ Metrics/BlockNesting:
|
|
23
23
|
Max: 2
|
24
24
|
|
25
25
|
Layout/LineLength:
|
26
|
-
|
27
|
-
Enabled: false
|
26
|
+
Max: 120
|
28
27
|
|
29
28
|
Metrics/MethodLength:
|
30
29
|
CountComments: false
|
31
|
-
Max:
|
30
|
+
Max: 20
|
32
31
|
|
33
32
|
Metrics/ParameterLists:
|
34
33
|
Max: 4
|
@@ -39,10 +38,10 @@ Metrics/AbcSize:
|
|
39
38
|
|
40
39
|
Style/CollectionMethods:
|
41
40
|
PreferredMethods:
|
42
|
-
map:
|
43
|
-
reduce:
|
44
|
-
find:
|
45
|
-
find_all:
|
41
|
+
map: "collect"
|
42
|
+
reduce: "inject"
|
43
|
+
find: "detect"
|
44
|
+
find_all: "select"
|
46
45
|
|
47
46
|
Style/Documentation:
|
48
47
|
Enabled: false
|
@@ -60,10 +59,13 @@ Style/ExpandPathArguments:
|
|
60
59
|
Enabled: false
|
61
60
|
|
62
61
|
Style/HashSyntax:
|
63
|
-
EnforcedStyle:
|
62
|
+
EnforcedStyle: ruby19
|
64
63
|
|
65
64
|
Style/Lambda:
|
66
65
|
Enabled: false
|
67
66
|
|
68
67
|
Style/RaiseArgs:
|
69
|
-
EnforcedStyle: compact
|
68
|
+
EnforcedStyle: compact
|
69
|
+
|
70
|
+
Style/AsciiComments:
|
71
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
-
#
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## 0.2.1
|
4
|
+
|
5
|
+
- fix rubocop warnings.
|
6
|
+
|
7
|
+
## 0.2.0
|
8
|
+
|
9
|
+
- refs #7 fix dependencies.
|
10
|
+
|
11
|
+
## 0.1.4
|
12
|
+
|
13
|
+
- rename module 'Omniauth' to 'OmniAuth'.
|
14
|
+
- make callback_url method private method.
|
15
|
+
- update gem-push GitHub Actions settings in order to ignore error for same version.
|
16
|
+
|
17
|
+
## 0.1.3
|
18
|
+
|
19
|
+
- update README.
|
20
|
+
|
21
|
+
## 0.1.2
|
22
|
+
|
23
|
+
- refs #1 setup GitHub Actions for rspec and pushing to RubyGems.
|
24
|
+
- measure code coverage.
|
25
|
+
|
26
|
+
## 0.1.1
|
2
27
|
|
3
28
|
- Initial release
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# OmniAuth::Cybozu
|
2
2
|
|
3
|
+
[](https://github.com/koshilife/omniauth-cybozu/actions?query=workflow%3ATest)
|
4
|
+
[](https://codecov.io/gh/koshilife/omniauth-cybozu)
|
3
5
|
[](http://badge.fury.io/rb/omniauth-cybozu)
|
6
|
+
[](https://github.com/koshilife/omniauth-cybozu/blob/master/LICENSE.txt)
|
4
7
|
|
5
8
|
This gem contains [Kintone](https://www.kintone.com/) and [Garoon](https://garoon.cybozu.co.jp/) strategy for OmniAuth.
|
6
9
|
|
@@ -39,7 +42,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
39
42
|
# Garoon schedules writable
|
40
43
|
cybozu_site = 'https://{subdomain}.cybozu.com'
|
41
44
|
cybozu_scope = ['g:schedule:read', 'g:schedule:write'].join(' ')
|
42
|
-
provider :cybozu, "CLIENT_ID", "CLIENT_SECRET", :
|
45
|
+
provider :cybozu, "CLIENT_ID", "CLIENT_SECRET", { scope: cybozu_scope, client_options: { site: cybozu_site }}
|
43
46
|
|
44
47
|
end
|
45
48
|
```
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,14 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'omniauth-cybozu'
|
6
|
+
require 'irb'
|
14
7
|
IRB.start(__FILE__)
|
data/bin/setup
CHANGED
@@ -9,8 +9,10 @@ module OmniAuth
|
|
9
9
|
|
10
10
|
option :skip_info, true
|
11
11
|
|
12
|
-
option :client_options, :
|
13
|
-
:
|
12
|
+
option :client_options, authorize_url: '/oauth2/authorization',
|
13
|
+
token_url: '/oauth2/token'
|
14
|
+
|
15
|
+
private
|
14
16
|
|
15
17
|
def callback_url
|
16
18
|
full_host + script_name + callback_path
|
data/omniauth-cybozu.gemspec
CHANGED
@@ -4,7 +4,7 @@ require_relative 'lib/omniauth-cybozu/version'
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'omniauth-cybozu'
|
7
|
-
spec.version =
|
7
|
+
spec.version = OmniAuth::Cybozu::VERSION
|
8
8
|
spec.authors = ['Kenji Koshikawa']
|
9
9
|
spec.email = ['koshikawa2009@gmail.com']
|
10
10
|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
18
|
spec.metadata['source_code_uri'] = 'https://github.com/koshilife/omniauth-cybozu'
|
19
19
|
spec.metadata['changelog_uri'] = "#{spec.metadata['source_code_uri']}/blob/master/CHANGELOG.md"
|
20
|
-
spec.metadata['documentation_uri'] =
|
20
|
+
spec.metadata['documentation_uri'] = "https://www.rubydoc.info/gems/omniauth-cybozu/#{spec.version}"
|
21
21
|
|
22
22
|
# Specify which files should be added to the gem when it is released.
|
23
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -28,8 +28,11 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
|
-
spec.add_runtime_dependency 'omniauth-oauth2', '
|
32
|
-
|
33
|
-
spec.add_development_dependency '
|
34
|
-
spec.add_development_dependency '
|
31
|
+
spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.6.0'
|
32
|
+
|
33
|
+
spec.add_development_dependency 'bundler'
|
34
|
+
spec.add_development_dependency 'codecov'
|
35
|
+
spec.add_development_dependency 'rake'
|
36
|
+
spec.add_development_dependency 'rspec'
|
37
|
+
spec.add_development_dependency 'simplecov'
|
35
38
|
end
|
metadata
CHANGED
@@ -1,71 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-cybozu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenji Koshikawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: codecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
89
|
+
version: '0'
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- - "
|
94
|
+
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
96
|
+
version: '0'
|
69
97
|
description: ''
|
70
98
|
email:
|
71
99
|
- koshikawa2009@gmail.com
|
@@ -73,10 +101,11 @@ executables: []
|
|
73
101
|
extensions: []
|
74
102
|
extra_rdoc_files: []
|
75
103
|
files:
|
104
|
+
- ".github/workflows/gem-push.yml"
|
105
|
+
- ".github/workflows/test.yml"
|
76
106
|
- ".gitignore"
|
77
107
|
- ".rspec"
|
78
108
|
- ".rubocop.yml"
|
79
|
-
- ".travis.yml"
|
80
109
|
- CHANGELOG.md
|
81
110
|
- CODE_OF_CONDUCT.md
|
82
111
|
- Gemfile
|
@@ -96,7 +125,7 @@ metadata:
|
|
96
125
|
homepage_uri: https://github.com/koshilife/omniauth-cybozu
|
97
126
|
source_code_uri: https://github.com/koshilife/omniauth-cybozu
|
98
127
|
changelog_uri: https://github.com/koshilife/omniauth-cybozu/blob/master/CHANGELOG.md
|
99
|
-
documentation_uri: https://www.rubydoc.info/gems/omniauth-cybozu/
|
128
|
+
documentation_uri: https://www.rubydoc.info/gems/omniauth-cybozu/0.2.1
|
100
129
|
post_install_message:
|
101
130
|
rdoc_options: []
|
102
131
|
require_paths:
|
@@ -112,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
141
|
- !ruby/object:Gem::Version
|
113
142
|
version: '0'
|
114
143
|
requirements: []
|
115
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.0.3
|
116
145
|
signing_key:
|
117
146
|
specification_version: 4
|
118
147
|
summary: OmniAuth strategy for cybozu(Kintone and Garoon)
|