doorkeeper_jp 0.1.0 → 0.1.2
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 +16 -2
- data/README.md +6 -0
- data/Rakefile +1 -1
- data/Steepfile +31 -0
- data/doorkeeper_jp.gemspec +5 -1
- data/lib/doorkeeper_jp/client.rb +5 -5
- data/lib/doorkeeper_jp/response.rb +16 -1
- data/lib/doorkeeper_jp/version.rb +1 -1
- data/rbs_collection.lock.yaml +108 -0
- data/rbs_collection.yaml +29 -0
- data/sig/doorkeeper_jp/client.rbs +7 -7
- data/sig/doorkeeper_jp.rbs +3 -0
- metadata +36 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6080eaacadb772850905d80fe982946c71158ce59b5def8c1397ce41384a50bf
|
4
|
+
data.tar.gz: 5d25200a282e3e13837f3ae5d5d68f2dec4e4e7b85e20f3da246ad78f8ba8ce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f9c5e8420767275274e98cf4acde1adaa575cf15dd32b317d489c3801cf638f03ed83c8aaf8fadbd21d596f01136b2cde635f84b693cda65cb8120d979bb518
|
7
|
+
data.tar.gz: d079472ce373a7fbf2883554f80f547c65fb40fb049eda70d8265fe38426a7841dab78b91e4cfdf907a30a58fce892a9fe772fd989a0d65b8be1e099bb9eb874
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
## [Unreleased]
|
2
|
-
[full changelog](http://github.com/sue445/doorkeeper_jp/compare/v0.1.
|
2
|
+
[full changelog](http://github.com/sue445/doorkeeper_jp/compare/v0.1.2...main)
|
3
3
|
|
4
|
-
## [0.1.
|
4
|
+
## [0.1.2](https://github.com/sue445/doorkeeper_jp/releases/tag/v0.1.2) - 2025-05-11
|
5
|
+
[full changelog](http://github.com/sue445/doorkeeper_jp/compare/v0.1.1...v0.1.2)
|
6
|
+
|
7
|
+
* Fix rbs
|
8
|
+
* https://github.com/sue445/doorkeeper_jp/pull/40
|
9
|
+
|
10
|
+
## [0.1.1](https://github.com/sue445/doorkeeper_jp/releases/tag/v0.1.1) - 2022-10-01
|
11
|
+
[full changelog](http://github.com/sue445/doorkeeper_jp/compare/v0.1.0...v0.1.1)
|
12
|
+
|
13
|
+
* Deploy yard to Pages
|
14
|
+
* https://github.com/sue445/doorkeeper_jp/pull/19
|
15
|
+
* Enabled rubygems_mfa_required
|
16
|
+
* https://github.com/sue445/doorkeeper_jp/pull/20
|
17
|
+
|
18
|
+
## [0.1.0](https://github.com/sue445/doorkeeper_jp/releases/tag/v0.1.0) - 2022-09-29
|
5
19
|
|
6
20
|
- Initial release
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
API client for [doorkeeper.jp](https://www.doorkeeper.jp/)
|
4
4
|
|
5
|
+
[](https://badge.fury.io/rb/doorkeeper_jp)
|
5
6
|
[](https://github.com/sue445/doorkeeper_jp/actions/workflows/test.yml)
|
6
7
|
|
7
8
|
## Installation
|
@@ -60,6 +61,11 @@ group.public_url
|
|
60
61
|
#=> "https://trbmeetup.doorkeeper.jp/"
|
61
62
|
```
|
62
63
|
|
64
|
+
See below for more details
|
65
|
+
|
66
|
+
* https://sue445.github.io/doorkeeper_jp/DoorkeeperJp/Client
|
67
|
+
* https://www.doorkeeper.jp/developer/api?locale=en
|
68
|
+
|
63
69
|
## Development
|
64
70
|
|
65
71
|
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.
|
data/Rakefile
CHANGED
data/Steepfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# D = Steep::Diagnostic
|
2
|
+
#
|
3
|
+
target :lib do
|
4
|
+
signature "sig"
|
5
|
+
|
6
|
+
check "lib" # Directory name
|
7
|
+
# check "Gemfile" # File name
|
8
|
+
# check "app/models/**/*.rb" # Glob
|
9
|
+
# ignore "lib/templates/*.rb"
|
10
|
+
|
11
|
+
# library "pathname" # Standard libraries
|
12
|
+
# library "strong_json" # Gems
|
13
|
+
|
14
|
+
collection_config "rbs_collection.yaml"
|
15
|
+
|
16
|
+
# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
|
17
|
+
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
18
|
+
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
19
|
+
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
|
20
|
+
# configure_code_diagnostics do |hash| # You can setup everything yourself
|
21
|
+
# hash[D::Ruby::NoMethod] = :information
|
22
|
+
# end
|
23
|
+
end
|
24
|
+
|
25
|
+
# target :test do
|
26
|
+
# signature "sig", "sig-private"
|
27
|
+
#
|
28
|
+
# check "test"
|
29
|
+
#
|
30
|
+
# # library "pathname" # Standard libraries
|
31
|
+
# end
|
data/doorkeeper_jp.gemspec
CHANGED
@@ -17,12 +17,14 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = spec.homepage
|
19
19
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
20
|
+
spec.metadata["documentation_uri"] = "https://sue445.github.io/doorkeeper_jp/"
|
21
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
20
22
|
|
21
23
|
# Specify which files should be added to the gem when it is released.
|
22
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
26
|
`git ls-files -z`.split("\x0").reject do |f|
|
25
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|sig/non-gemify)/|\.(?:git|travis|circleci)|appveyor)})
|
26
28
|
end
|
27
29
|
end
|
28
30
|
spec.bindir = "exe"
|
@@ -34,8 +36,10 @@ Gem::Specification.new do |spec|
|
|
34
36
|
spec.add_dependency "hashie"
|
35
37
|
|
36
38
|
spec.add_development_dependency "rake"
|
39
|
+
spec.add_development_dependency "rbs"
|
37
40
|
spec.add_development_dependency "rspec"
|
38
41
|
spec.add_development_dependency "rspec-its"
|
42
|
+
spec.add_development_dependency "steep"
|
39
43
|
spec.add_development_dependency "webmock"
|
40
44
|
spec.add_development_dependency "yard"
|
41
45
|
|
data/lib/doorkeeper_jp/client.rb
CHANGED
@@ -66,7 +66,7 @@ module DoorkeeperJp
|
|
66
66
|
}.compact
|
67
67
|
|
68
68
|
res = connection.get("groups/#{group}", params).body
|
69
|
-
res
|
69
|
+
res["group"]
|
70
70
|
end
|
71
71
|
|
72
72
|
# Show a specific event
|
@@ -81,12 +81,12 @@ module DoorkeeperJp
|
|
81
81
|
def event(id, is_expand_group: false, locale: nil)
|
82
82
|
params = {
|
83
83
|
locale: locale,
|
84
|
-
}.compact
|
84
|
+
}.compact #: Hash[Symbol|String, untyped]
|
85
85
|
|
86
86
|
params["expand[]"] = "group" if is_expand_group
|
87
87
|
|
88
88
|
res = connection.get("events/#{id}", params).body
|
89
|
-
res
|
89
|
+
res["event"]
|
90
90
|
end
|
91
91
|
|
92
92
|
private
|
@@ -109,7 +109,7 @@ module DoorkeeperJp
|
|
109
109
|
)
|
110
110
|
|
111
111
|
res = connection.get(path, params).body
|
112
|
-
res.map(&:event)
|
112
|
+
res.map(&:event) # steep:ignore
|
113
113
|
end
|
114
114
|
|
115
115
|
# @return [Faraday::Connection]
|
@@ -155,7 +155,7 @@ module DoorkeeperJp
|
|
155
155
|
until: to_ymd(until_date),
|
156
156
|
q: keyword,
|
157
157
|
prefecture: prefecture
|
158
|
-
}.compact
|
158
|
+
}.compact #: Hash[Symbol|String, untyped]
|
159
159
|
|
160
160
|
params["expand[]"] = "group" if is_expand_group
|
161
161
|
|
@@ -1,9 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# @!parse
|
4
|
+
# module Hashie
|
5
|
+
# # @see https://www.rubydoc.info/gems/hashie/Hashie/Hash
|
6
|
+
# class Hash < ::Hash
|
7
|
+
# end
|
8
|
+
#
|
9
|
+
# # @see https://www.rubydoc.info/gems/hashie/Hashie/Mash
|
10
|
+
# class Mash < Hash
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
|
3
14
|
module DoorkeeperJp
|
4
15
|
require "hashie/mash"
|
5
16
|
|
17
|
+
# Doorkeeper API response
|
18
|
+
#
|
19
|
+
# @see https://www.rubydoc.info/gems/hashie/Hashie/Hash
|
20
|
+
# @see https://www.rubydoc.info/gems/hashie/Hashie/Mash
|
6
21
|
class Response < Hashie::Mash
|
7
|
-
disable_warnings
|
22
|
+
disable_warnings # steep:ignore
|
8
23
|
end
|
9
24
|
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
---
|
2
|
+
path: ".gem_rbs_collection"
|
3
|
+
gems:
|
4
|
+
- name: addressable
|
5
|
+
version: '2.8'
|
6
|
+
source:
|
7
|
+
type: git
|
8
|
+
name: ruby/gem_rbs_collection
|
9
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
10
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
11
|
+
repo_dir: gems
|
12
|
+
- name: bigdecimal
|
13
|
+
version: '3.1'
|
14
|
+
source:
|
15
|
+
type: git
|
16
|
+
name: ruby/gem_rbs_collection
|
17
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
18
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
19
|
+
repo_dir: gems
|
20
|
+
- name: date
|
21
|
+
version: '0'
|
22
|
+
source:
|
23
|
+
type: stdlib
|
24
|
+
- name: diff-lcs
|
25
|
+
version: '1.5'
|
26
|
+
source:
|
27
|
+
type: git
|
28
|
+
name: ruby/gem_rbs_collection
|
29
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
30
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
31
|
+
repo_dir: gems
|
32
|
+
- name: faraday
|
33
|
+
version: '2.7'
|
34
|
+
source:
|
35
|
+
type: git
|
36
|
+
name: ruby/gem_rbs_collection
|
37
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
38
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
39
|
+
repo_dir: gems
|
40
|
+
- name: fileutils
|
41
|
+
version: '0'
|
42
|
+
source:
|
43
|
+
type: stdlib
|
44
|
+
- name: forwardable
|
45
|
+
version: '0'
|
46
|
+
source:
|
47
|
+
type: stdlib
|
48
|
+
- name: hashdiff
|
49
|
+
version: '1.1'
|
50
|
+
source:
|
51
|
+
type: git
|
52
|
+
name: ruby/gem_rbs_collection
|
53
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
54
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
55
|
+
repo_dir: gems
|
56
|
+
- name: hashie
|
57
|
+
version: '5.0'
|
58
|
+
source:
|
59
|
+
type: git
|
60
|
+
name: ruby/gem_rbs_collection
|
61
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
62
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
63
|
+
repo_dir: gems
|
64
|
+
- name: json
|
65
|
+
version: '0'
|
66
|
+
source:
|
67
|
+
type: stdlib
|
68
|
+
- name: logger
|
69
|
+
version: '0'
|
70
|
+
source:
|
71
|
+
type: stdlib
|
72
|
+
- name: monitor
|
73
|
+
version: '0'
|
74
|
+
source:
|
75
|
+
type: stdlib
|
76
|
+
- name: net-http
|
77
|
+
version: '0'
|
78
|
+
source:
|
79
|
+
type: stdlib
|
80
|
+
- name: net-protocol
|
81
|
+
version: '0'
|
82
|
+
source:
|
83
|
+
type: stdlib
|
84
|
+
- name: rake
|
85
|
+
version: '13.0'
|
86
|
+
source:
|
87
|
+
type: git
|
88
|
+
name: ruby/gem_rbs_collection
|
89
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
90
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
91
|
+
repo_dir: gems
|
92
|
+
- name: timeout
|
93
|
+
version: '0'
|
94
|
+
source:
|
95
|
+
type: stdlib
|
96
|
+
- name: uri
|
97
|
+
version: '0'
|
98
|
+
source:
|
99
|
+
type: stdlib
|
100
|
+
- name: webmock
|
101
|
+
version: '3.19'
|
102
|
+
source:
|
103
|
+
type: git
|
104
|
+
name: ruby/gem_rbs_collection
|
105
|
+
revision: 1e026936df951c269b64b7cba278132b0af42828
|
106
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
107
|
+
repo_dir: gems
|
108
|
+
gemfile_lock_path: Gemfile.lock
|
data/rbs_collection.yaml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Download sources
|
2
|
+
sources:
|
3
|
+
- type: git
|
4
|
+
name: ruby/gem_rbs_collection
|
5
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
6
|
+
revision: main
|
7
|
+
repo_dir: gems
|
8
|
+
|
9
|
+
# You can specify local directories as sources also.
|
10
|
+
# - type: local
|
11
|
+
# path: path/to/your/local/repository
|
12
|
+
|
13
|
+
# A directory to install the downloaded RBSs
|
14
|
+
path: .gem_rbs_collection
|
15
|
+
|
16
|
+
gems:
|
17
|
+
# Skip loading rbs gem's RBS.
|
18
|
+
# It's unnecessary if you don't use rbs as a library.
|
19
|
+
- name: rbs
|
20
|
+
ignore: true
|
21
|
+
- name: steep
|
22
|
+
ignore: true
|
23
|
+
- name: doorkeeper_jp
|
24
|
+
ignore: true
|
25
|
+
- name: yard
|
26
|
+
ignore: true
|
27
|
+
- name: hashie
|
28
|
+
- name: faraday
|
29
|
+
- name: date
|
@@ -2,24 +2,24 @@ module DoorkeeperJp
|
|
2
2
|
class Client
|
3
3
|
def initialize: (?String? access_token) -> void
|
4
4
|
|
5
|
-
def events: (?page: Integer
|
5
|
+
def events: (?page: Integer?, ?locale: String?, ?sort: String?, ?since_date: Date?, ?until_date: Date?, ?keyword: String?, ?prefecture: String?, ?is_expand_group: bool) -> Array[DoorkeeperJp::Response]
|
6
6
|
|
7
|
-
def group_events: (String group, ?page: Integer
|
7
|
+
def group_events: (String group, ?page: Integer?, ?locale: String?, ?sort: String?, ?since_date: Date?, ?until_date: Date?, ?keyword: String?, ?prefecture: String?, ?is_expand_group: bool) -> Array[DoorkeeperJp::Response]
|
8
8
|
|
9
|
-
def group: (String group, ?locale: String?
|
9
|
+
def group: (String group, ?locale: String?) -> DoorkeeperJp::Response
|
10
10
|
|
11
|
-
def event: (Integer id, ?is_expand_group: bool
|
11
|
+
def event: (Integer id, ?is_expand_group: bool, ?locale: String?) -> DoorkeeperJp::Response
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
|
-
def get_events: (String
|
15
|
+
def get_events: (path: String, page: Integer?, locale: String?, sort: String?, since_date: Date?, until_date: Date?, keyword: String?, prefecture: String?, is_expand_group: bool) -> Array[DoorkeeperJp::Response]
|
16
16
|
|
17
17
|
def connection: () -> Faraday::Connection
|
18
18
|
|
19
19
|
def request_headers: () -> Hash[String, String]
|
20
20
|
|
21
|
-
def event_params: (
|
21
|
+
def event_params: (page: Integer?, locale: String?, sort: String?, since_date: Date?, until_date: Date?, keyword: String?, prefecture: String?, is_expand_group: bool) -> Hash[Symbol|String, untyped]
|
22
22
|
|
23
|
-
def to_ymd: (Date? date) -> String
|
23
|
+
def to_ymd: (Date? date) -> String?
|
24
24
|
end
|
25
25
|
end
|
data/sig/doorkeeper_jp.rbs
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper_jp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: faraday
|
@@ -66,6 +65,20 @@ dependencies:
|
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
67
|
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rbs
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
69
82
|
- !ruby/object:Gem::Dependency
|
70
83
|
name: rspec
|
71
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +107,20 @@ dependencies:
|
|
94
107
|
- - ">="
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: steep
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
97
124
|
- !ruby/object:Gem::Dependency
|
98
125
|
name: webmock
|
99
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,11 +163,14 @@ files:
|
|
136
163
|
- LICENSE.txt
|
137
164
|
- README.md
|
138
165
|
- Rakefile
|
166
|
+
- Steepfile
|
139
167
|
- doorkeeper_jp.gemspec
|
140
168
|
- lib/doorkeeper_jp.rb
|
141
169
|
- lib/doorkeeper_jp/client.rb
|
142
170
|
- lib/doorkeeper_jp/response.rb
|
143
171
|
- lib/doorkeeper_jp/version.rb
|
172
|
+
- rbs_collection.lock.yaml
|
173
|
+
- rbs_collection.yaml
|
144
174
|
- sig/doorkeeper_jp.rbs
|
145
175
|
- sig/doorkeeper_jp/client.rbs
|
146
176
|
- sig/doorkeeper_jp/response.rbs
|
@@ -151,7 +181,8 @@ metadata:
|
|
151
181
|
homepage_uri: https://github.com/sue445/doorkeeper_jp
|
152
182
|
source_code_uri: https://github.com/sue445/doorkeeper_jp
|
153
183
|
changelog_uri: https://github.com/sue445/doorkeeper_jp/blob/main/CHANGELOG.md
|
154
|
-
|
184
|
+
documentation_uri: https://sue445.github.io/doorkeeper_jp/
|
185
|
+
rubygems_mfa_required: 'true'
|
155
186
|
rdoc_options: []
|
156
187
|
require_paths:
|
157
188
|
- lib
|
@@ -166,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
197
|
- !ruby/object:Gem::Version
|
167
198
|
version: '0'
|
168
199
|
requirements: []
|
169
|
-
rubygems_version: 3.
|
170
|
-
signing_key:
|
200
|
+
rubygems_version: 3.6.7
|
171
201
|
specification_version: 4
|
172
202
|
summary: API client for doorkeeper.jp
|
173
203
|
test_files: []
|