simple_twitter 2.2.3 → 2.3.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 +4 -4
- data/.github/dependabot.yml +5 -1
- data/.github/release.yml +31 -0
- data/.github/workflows/pages.yml +3 -3
- data/.github/workflows/release_gem.yml +3 -3
- data/.github/workflows/test.yml +76 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile +1 -5
- data/gemfiles/common.gemfile +3 -0
- data/gemfiles/http_4.gemfile +7 -0
- data/gemfiles/http_5.gemfile +7 -0
- data/gemfiles/http_6.gemfile +7 -0
- data/lib/simple_twitter/client.rb +11 -1
- data/lib/simple_twitter/version.rb +1 -1
- data/rbs_collection.lock.yaml +36 -0
- data/sig/simple_twitter/client.rbs +1 -0
- data/simple_twitter.gemspec +4 -1
- metadata +48 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 29d38ab0964ac1b22f5e6426505a2a6ba080a438aaf13f4de95e5f23c50e7218
|
|
4
|
+
data.tar.gz: fd9fee5bbb098986a6f94f96eb6c8c20e2bbc3dfef8d48072f0683b037a6d7d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33e74c6c9b1443430c65e0de3a30facb33cbb5ea9596c8facca99578f5cc068000c578293c04e4ce9c720ddcd1a409c87dc0b1d595a3eb98672b2f8a5e9e2f3b
|
|
7
|
+
data.tar.gz: 6952312f24cb38e7417e53b8b2032f253c3f2fbc672184f8eddcf4e4dfcc4a8211c4231769e4073bc3b4b232d4e025e35d8afce4226fff1aabce53de5d0b114a
|
data/.github/dependabot.yml
CHANGED
data/.github/release.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ref. https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes
|
|
2
|
+
|
|
3
|
+
changelog:
|
|
4
|
+
exclude:
|
|
5
|
+
labels:
|
|
6
|
+
- chore
|
|
7
|
+
|
|
8
|
+
categories:
|
|
9
|
+
- title: ":bomb: Breaking Changes"
|
|
10
|
+
labels:
|
|
11
|
+
- breaking change
|
|
12
|
+
|
|
13
|
+
- title: ":lock: Security Fix"
|
|
14
|
+
labels:
|
|
15
|
+
- security
|
|
16
|
+
|
|
17
|
+
- title: ":rocket: Features"
|
|
18
|
+
labels:
|
|
19
|
+
- enhancement
|
|
20
|
+
|
|
21
|
+
- title: ":bug: Bug Fixes"
|
|
22
|
+
labels:
|
|
23
|
+
- bug
|
|
24
|
+
|
|
25
|
+
- title: ":dependabot: Dependency updates"
|
|
26
|
+
labels:
|
|
27
|
+
- dependencies
|
|
28
|
+
|
|
29
|
+
- title: ":pencil: Other Changes"
|
|
30
|
+
labels:
|
|
31
|
+
- "*"
|
data/.github/workflows/pages.yml
CHANGED
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
runs-on: ubuntu-latest
|
|
31
31
|
steps:
|
|
32
32
|
- name: Checkout
|
|
33
|
-
uses: actions/checkout@
|
|
33
|
+
uses: actions/checkout@v6.0.1
|
|
34
34
|
|
|
35
35
|
- uses: ruby/setup-ruby@v1
|
|
36
36
|
with:
|
|
@@ -40,7 +40,7 @@ jobs:
|
|
|
40
40
|
- run: bundle exec yard
|
|
41
41
|
|
|
42
42
|
- name: Setup Pages
|
|
43
|
-
uses: actions/configure-pages@
|
|
43
|
+
uses: actions/configure-pages@v6
|
|
44
44
|
- name: Upload artifact
|
|
45
45
|
uses: actions/upload-pages-artifact@v4
|
|
46
46
|
with:
|
|
@@ -48,4 +48,4 @@ jobs:
|
|
|
48
48
|
path: './doc'
|
|
49
49
|
- name: Deploy to GitHub Pages
|
|
50
50
|
id: deployment
|
|
51
|
-
uses: actions/deploy-pages@
|
|
51
|
+
uses: actions/deploy-pages@v5
|
|
@@ -18,11 +18,11 @@ jobs:
|
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
20
|
- name: Harden Runner
|
|
21
|
-
uses: step-security/harden-runner@
|
|
21
|
+
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
22
22
|
with:
|
|
23
23
|
egress-policy: audit
|
|
24
24
|
|
|
25
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5.0.1
|
|
26
26
|
|
|
27
27
|
- name: Set up Ruby
|
|
28
28
|
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
ruby-version: ruby
|
|
32
32
|
|
|
33
33
|
- name: Publish to RubyGems
|
|
34
|
-
uses: rubygems/release-gem@
|
|
34
|
+
uses: rubygems/release-gem@1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
|
|
35
35
|
|
|
36
36
|
- name: Create GitHub release
|
|
37
37
|
run: |
|
data/.github/workflows/test.yml
CHANGED
|
@@ -12,6 +12,8 @@ on:
|
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
14
|
test:
|
|
15
|
+
name: "test (Ruby ${{ matrix.ruby }}, gemfile ${{ matrix.gemfile }})"
|
|
16
|
+
|
|
15
17
|
runs-on: ubuntu-latest
|
|
16
18
|
|
|
17
19
|
strategy:
|
|
@@ -29,14 +31,62 @@ jobs:
|
|
|
29
31
|
- "3.2"
|
|
30
32
|
- "3.3"
|
|
31
33
|
- "3.4"
|
|
34
|
+
- "4.0"
|
|
35
|
+
|
|
36
|
+
gemfile:
|
|
37
|
+
- http_4
|
|
38
|
+
- http_5
|
|
39
|
+
- http_6
|
|
40
|
+
|
|
41
|
+
exclude:
|
|
42
|
+
# http gem v5+ requires Ruby 2.5+
|
|
43
|
+
- ruby: "2.3"
|
|
44
|
+
gemfile: http_5
|
|
45
|
+
- ruby: "2.4"
|
|
46
|
+
gemfile: http_5
|
|
47
|
+
|
|
48
|
+
# http gem v6+ requires Ruby 3.2+
|
|
49
|
+
- ruby: "2.3"
|
|
50
|
+
gemfile: http_6
|
|
51
|
+
- ruby: "2.4"
|
|
52
|
+
gemfile: http_6
|
|
53
|
+
- ruby: "2.5"
|
|
54
|
+
gemfile: http_6
|
|
55
|
+
- ruby: "2.6"
|
|
56
|
+
gemfile: http_6
|
|
57
|
+
- ruby: "2.7"
|
|
58
|
+
gemfile: http_6
|
|
59
|
+
- ruby: "3.0"
|
|
60
|
+
gemfile: http_6
|
|
61
|
+
- ruby: "3.1"
|
|
62
|
+
gemfile: http_6
|
|
63
|
+
|
|
64
|
+
include:
|
|
65
|
+
# FIXME: Workaround for "ArgumentError: wrong number of arguments (given 4, expected 1)"
|
|
66
|
+
# c.f. https://github.com/ruby/setup-ruby#rubygems
|
|
67
|
+
- ruby: "2.5"
|
|
68
|
+
rubygems: "3.0.0"
|
|
69
|
+
|
|
70
|
+
env:
|
|
71
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
|
|
32
72
|
|
|
33
73
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
74
|
+
- uses: actions/checkout@v6.0.1
|
|
75
|
+
|
|
76
|
+
# FIXME: Workaround for error in `bundle clean`
|
|
77
|
+
# /opt/hostedtoolcache/Ruby/2.5.9/x64/bin/bundle clean
|
|
78
|
+
# Cleaning all the gems on your system is dangerous! If you're sure you want to
|
|
79
|
+
# remove every system gem not in this bundle, run `bundle clean --force`.
|
|
80
|
+
- name: export BUNDLE_PATH
|
|
81
|
+
run: echo "BUNDLE_PATH=vendor/bundle" >> $GITHUB_ENV
|
|
82
|
+
if: matrix.ruby == '2.5'
|
|
35
83
|
|
|
36
84
|
- uses: ruby/setup-ruby@v1
|
|
37
85
|
with:
|
|
38
86
|
ruby-version: ${{ matrix.ruby }}
|
|
39
87
|
bundler-cache: true
|
|
88
|
+
rubygems: ${{ matrix.rubygems || 'default' }}
|
|
89
|
+
cache-version: ${{ matrix.gemfile }}
|
|
40
90
|
|
|
41
91
|
- name: bundle update
|
|
42
92
|
run: |
|
|
@@ -45,13 +95,12 @@ jobs:
|
|
|
45
95
|
bundle update --jobs $(nproc) --retry 3
|
|
46
96
|
|
|
47
97
|
- run: bundle exec rspec
|
|
48
|
-
- run: bundle exec yard --fail-on-warning
|
|
49
98
|
|
|
50
99
|
rbs:
|
|
51
100
|
runs-on: ubuntu-latest
|
|
52
101
|
|
|
53
102
|
steps:
|
|
54
|
-
- uses: actions/checkout@
|
|
103
|
+
- uses: actions/checkout@v6.0.1
|
|
55
104
|
|
|
56
105
|
- uses: ruby/setup-ruby@v1
|
|
57
106
|
with:
|
|
@@ -62,8 +111,31 @@ jobs:
|
|
|
62
111
|
run: |
|
|
63
112
|
set -xe
|
|
64
113
|
bundle config path vendor/bundle
|
|
65
|
-
bundle update --jobs $(nproc) --retry 3
|
|
114
|
+
bundle update --all --jobs $(nproc) --retry 3
|
|
66
115
|
|
|
67
116
|
- run: bundle exec rbs collection install
|
|
68
117
|
- run: bundle exec rbs validate
|
|
69
118
|
- run: bundle exec steep check
|
|
119
|
+
|
|
120
|
+
yard:
|
|
121
|
+
runs-on: ubuntu-latest
|
|
122
|
+
|
|
123
|
+
steps:
|
|
124
|
+
- uses: actions/checkout@v6
|
|
125
|
+
|
|
126
|
+
- uses: ruby/setup-ruby@v1
|
|
127
|
+
with:
|
|
128
|
+
ruby-version: ruby
|
|
129
|
+
bundler-cache: true
|
|
130
|
+
|
|
131
|
+
- name: bundle update
|
|
132
|
+
run: |
|
|
133
|
+
set -xe
|
|
134
|
+
bundle config path vendor/bundle
|
|
135
|
+
bundle update --all --jobs $(nproc) --retry 3
|
|
136
|
+
|
|
137
|
+
- name: yard generating test
|
|
138
|
+
run: |
|
|
139
|
+
set -xe
|
|
140
|
+
bundle exec yard --fail-on-warning
|
|
141
|
+
ls -ld doc/
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
## Unreleased
|
|
2
|
-
https://github.com/yhara/simple_twitter/compare/v2.
|
|
2
|
+
https://github.com/yhara/simple_twitter/compare/v2.3.0...main
|
|
3
|
+
|
|
4
|
+
## [v2.3.0](https://github.com/yhara/simple_twitter/releases/tag/v2.3.0) (2026-04-01)
|
|
5
|
+
https://github.com/yhara/simple_twitter/compare/v2.2.3...v2.3.0
|
|
6
|
+
|
|
7
|
+
* Support http gem v6
|
|
8
|
+
* https://github.com/yhara/simple_twitter/pull/59
|
|
3
9
|
|
|
4
10
|
## [v2.2.3](https://github.com/yhara/simple_twitter/releases/tag/v2.2.3) (2025-11-30)
|
|
5
11
|
https://github.com/yhara/simple_twitter/compare/v2.2.2...v2.2.3
|
data/Gemfile
CHANGED
|
@@ -5,8 +5,4 @@ source "https://rubygems.org"
|
|
|
5
5
|
# Specify your gem's dependencies in simple_twitter.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# FIXME: rbs bundled with ffi v1.17.0+ is broken
|
|
11
|
-
# c.f. https://github.com/ffi/ffi/issues/1107
|
|
12
|
-
gem "ffi", "< 1.17.0"
|
|
8
|
+
eval_gemfile "#{__dir__}/gemfiles/common.gemfile"
|
|
@@ -119,7 +119,12 @@ module SimpleTwitter
|
|
|
119
119
|
|
|
120
120
|
def #{m}_raw(url, params: {}, json: {}, form: {})
|
|
121
121
|
args = create_http_args(params: params, json: json, form: form)
|
|
122
|
-
|
|
122
|
+
|
|
123
|
+
if http_v6_or_later?
|
|
124
|
+
http(:#{m}, url, params).#{m}(url, **args)
|
|
125
|
+
else
|
|
126
|
+
http(:#{m}, url, params).#{m}(url, args)
|
|
127
|
+
end
|
|
123
128
|
end
|
|
124
129
|
EOD
|
|
125
130
|
end
|
|
@@ -142,6 +147,11 @@ module SimpleTwitter
|
|
|
142
147
|
args
|
|
143
148
|
end
|
|
144
149
|
|
|
150
|
+
# @return [Boolean]
|
|
151
|
+
def http_v6_or_later?
|
|
152
|
+
Gem::Version.new(HTTP::VERSION) >= Gem::Version.new("6.0.0")
|
|
153
|
+
end
|
|
154
|
+
|
|
145
155
|
# @param method [Symbol]
|
|
146
156
|
# @param url [String]
|
|
147
157
|
# @param params [Hash<Symbol, String>]
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -17,6 +17,14 @@ gems:
|
|
|
17
17
|
version: '0'
|
|
18
18
|
source:
|
|
19
19
|
type: stdlib
|
|
20
|
+
- name: cgi
|
|
21
|
+
version: '0.5'
|
|
22
|
+
source:
|
|
23
|
+
type: git
|
|
24
|
+
name: ruby/gem_rbs_collection
|
|
25
|
+
revision: ecdc16fbc015cc667476120bdc2bd20735882f3a
|
|
26
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
27
|
+
repo_dir: gems
|
|
20
28
|
- name: delegate
|
|
21
29
|
version: '0'
|
|
22
30
|
source:
|
|
@@ -53,6 +61,22 @@ gems:
|
|
|
53
61
|
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
54
62
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
55
63
|
repo_dir: gems
|
|
64
|
+
- name: io-console
|
|
65
|
+
version: '0'
|
|
66
|
+
source:
|
|
67
|
+
type: stdlib
|
|
68
|
+
- name: pp
|
|
69
|
+
version: '0'
|
|
70
|
+
source:
|
|
71
|
+
type: stdlib
|
|
72
|
+
- name: prettyprint
|
|
73
|
+
version: '0'
|
|
74
|
+
source:
|
|
75
|
+
type: stdlib
|
|
76
|
+
- name: prism
|
|
77
|
+
version: 1.9.0
|
|
78
|
+
source:
|
|
79
|
+
type: rubygems
|
|
56
80
|
- name: rake
|
|
57
81
|
version: '13.0'
|
|
58
82
|
source:
|
|
@@ -61,6 +85,10 @@ gems:
|
|
|
61
85
|
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
62
86
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
63
87
|
repo_dir: gems
|
|
88
|
+
- name: rdoc
|
|
89
|
+
version: '0'
|
|
90
|
+
source:
|
|
91
|
+
type: stdlib
|
|
64
92
|
- name: simple_oauth
|
|
65
93
|
version: '0.3'
|
|
66
94
|
source:
|
|
@@ -69,6 +97,14 @@ gems:
|
|
|
69
97
|
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
70
98
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
71
99
|
repo_dir: gems
|
|
100
|
+
- name: stringio
|
|
101
|
+
version: '0'
|
|
102
|
+
source:
|
|
103
|
+
type: stdlib
|
|
104
|
+
- name: tempfile
|
|
105
|
+
version: '0'
|
|
106
|
+
source:
|
|
107
|
+
type: stdlib
|
|
72
108
|
- name: webmock
|
|
73
109
|
version: '3.19'
|
|
74
110
|
source:
|
|
@@ -22,6 +22,7 @@ module SimpleTwitter
|
|
|
22
22
|
|
|
23
23
|
def create_http_args: (params: Hash[Symbol, untyped], json: Hash[Symbol, untyped], form: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
|
24
24
|
def http: (Symbol method, String url, Hash[Symbol, String] params) -> HTTP::Client
|
|
25
|
+
def http_v6_or_later?: () -> bool
|
|
25
26
|
def auth_header: (Symbol method, String url, Hash[Symbol, String] params) -> String
|
|
26
27
|
def parse_response: (HTTP::Response res) -> Hash[Symbol, untyped]
|
|
27
28
|
end
|
data/simple_twitter.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
|
22
22
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
23
23
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
24
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|sig/non-gemify)/}) }
|
|
25
25
|
end
|
|
26
26
|
spec.bindir = "exe"
|
|
27
27
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
@@ -31,6 +31,9 @@ Gem::Specification.new do |spec|
|
|
|
31
31
|
spec.add_dependency "simple_oauth", ">= 0.3.1"
|
|
32
32
|
|
|
33
33
|
spec.add_development_dependency "dotenv"
|
|
34
|
+
spec.add_development_dependency "irb"
|
|
35
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
|
36
|
+
spec.add_development_dependency "rdoc"
|
|
34
37
|
spec.add_development_dependency "rspec"
|
|
35
38
|
spec.add_development_dependency "rspec-its"
|
|
36
39
|
spec.add_development_dependency "steep"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_twitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yutaka HARA
|
|
@@ -52,6 +52,48 @@ dependencies:
|
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: irb
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rake
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - "~>"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '13.0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '13.0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rdoc
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
55
97
|
- !ruby/object:Gem::Dependency
|
|
56
98
|
name: rspec
|
|
57
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -133,6 +175,7 @@ extra_rdoc_files: []
|
|
|
133
175
|
files:
|
|
134
176
|
- ".env.example"
|
|
135
177
|
- ".github/dependabot.yml"
|
|
178
|
+
- ".github/release.yml"
|
|
136
179
|
- ".github/workflows/pages.yml"
|
|
137
180
|
- ".github/workflows/release_gem.yml"
|
|
138
181
|
- ".github/workflows/test.yml"
|
|
@@ -147,6 +190,10 @@ files:
|
|
|
147
190
|
- Steepfile
|
|
148
191
|
- bin/console
|
|
149
192
|
- bin/setup
|
|
193
|
+
- gemfiles/common.gemfile
|
|
194
|
+
- gemfiles/http_4.gemfile
|
|
195
|
+
- gemfiles/http_5.gemfile
|
|
196
|
+
- gemfiles/http_6.gemfile
|
|
150
197
|
- lib/simple_twitter.rb
|
|
151
198
|
- lib/simple_twitter/client.rb
|
|
152
199
|
- lib/simple_twitter/client_error.rb
|