simple_twitter 2.2.1 → 2.2.3
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 +2 -0
- data/.github/workflows/pages.yml +4 -4
- data/.github/workflows/release_gem.yml +41 -0
- data/.github/workflows/test.yml +5 -5
- data/CHANGELOG.md +17 -1
- data/Gemfile +4 -0
- data/README.md +1 -1
- data/lib/simple_twitter/client.rb +16 -5
- data/lib/simple_twitter/version.rb +1 -1
- data/rbs_collection.lock.yaml +62 -8
- data/simple_twitter.gemspec +2 -2
- metadata +7 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 57cec5257602dc5ee5cc35a46f7ac893cf0edca185086614f2c16864dda7a3f7
|
|
4
|
+
data.tar.gz: '09b25d37bf00b366a3d13eaabd25550a9a01823378a03573aa22de03b337c2b2'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f4a9a65933b6e19a3dcd695973b829019c1e408b3756c925a74e89e0d399c4285a7de51326a2d727abf7c4826805cd3a5df55803e5b273a92148db27505fe89
|
|
7
|
+
data.tar.gz: bf59173a82a86f306d3ea4553af50c116dba8465209d371a53f3dd3c263f83a2fee47debb1136d0d6c80c3d3c04b14714bcb8d8c86c07d66e1bc334d3c948d52
|
data/.github/dependabot.yml
CHANGED
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@v5
|
|
34
34
|
|
|
35
35
|
- uses: ruby/setup-ruby@v1
|
|
36
36
|
with:
|
|
@@ -40,12 +40,12 @@ jobs:
|
|
|
40
40
|
- run: bundle exec yard
|
|
41
41
|
|
|
42
42
|
- name: Setup Pages
|
|
43
|
-
uses: actions/configure-pages@
|
|
43
|
+
uses: actions/configure-pages@v5
|
|
44
44
|
- name: Upload artifact
|
|
45
|
-
uses: actions/upload-pages-artifact@
|
|
45
|
+
uses: actions/upload-pages-artifact@v4
|
|
46
46
|
with:
|
|
47
47
|
# Upload entire repository
|
|
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@v4
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Publish gem to rubygems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
release:
|
|
8
|
+
if: github.repository == 'yhara/simple_twitter'
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
environment:
|
|
12
|
+
name: rubygems.org
|
|
13
|
+
url: https://rubygems.org/gems/simple_twitter
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Harden Runner
|
|
21
|
+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
|
|
22
|
+
with:
|
|
23
|
+
egress-policy: audit
|
|
24
|
+
|
|
25
|
+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
26
|
+
|
|
27
|
+
- name: Set up Ruby
|
|
28
|
+
uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
|
|
29
|
+
with:
|
|
30
|
+
bundler-cache: true
|
|
31
|
+
ruby-version: ruby
|
|
32
|
+
|
|
33
|
+
- name: Publish to RubyGems
|
|
34
|
+
uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
|
|
35
|
+
|
|
36
|
+
- name: Create GitHub release
|
|
37
|
+
run: |
|
|
38
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
|
39
|
+
gh release create "${tag_name}" --verify-tag --generate-notes
|
|
40
|
+
env:
|
|
41
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.github/workflows/test.yml
CHANGED
|
@@ -9,8 +9,6 @@ on:
|
|
|
9
9
|
- opened
|
|
10
10
|
- synchronize
|
|
11
11
|
- reopened
|
|
12
|
-
schedule:
|
|
13
|
-
- cron: "0 10 * * 5" # JST 19:00 (Fri)
|
|
14
12
|
|
|
15
13
|
jobs:
|
|
16
14
|
test:
|
|
@@ -29,9 +27,11 @@ jobs:
|
|
|
29
27
|
- "3.0"
|
|
30
28
|
- "3.1"
|
|
31
29
|
- "3.2"
|
|
30
|
+
- "3.3"
|
|
31
|
+
- "3.4"
|
|
32
32
|
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@v5
|
|
35
35
|
|
|
36
36
|
- uses: ruby/setup-ruby@v1
|
|
37
37
|
with:
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
runs-on: ubuntu-latest
|
|
52
52
|
|
|
53
53
|
steps:
|
|
54
|
-
- uses: actions/checkout@
|
|
54
|
+
- uses: actions/checkout@v5
|
|
55
55
|
|
|
56
56
|
- uses: ruby/setup-ruby@v1
|
|
57
57
|
with:
|
|
@@ -65,5 +65,5 @@ jobs:
|
|
|
65
65
|
bundle update --jobs $(nproc) --retry 3
|
|
66
66
|
|
|
67
67
|
- run: bundle exec rbs collection install
|
|
68
|
-
- run: bundle exec rbs validate
|
|
68
|
+
- run: bundle exec rbs validate
|
|
69
69
|
- run: bundle exec steep check
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
## Unreleased
|
|
2
|
-
https://github.com/yhara/simple_twitter/compare/v2.2.
|
|
2
|
+
https://github.com/yhara/simple_twitter/compare/v2.2.3...main
|
|
3
|
+
|
|
4
|
+
## [v2.2.3](https://github.com/yhara/simple_twitter/releases/tag/v2.2.3) (2025-11-30)
|
|
5
|
+
https://github.com/yhara/simple_twitter/compare/v2.2.2...v2.2.3
|
|
6
|
+
|
|
7
|
+
* ci: Release gem from GitHub Actions
|
|
8
|
+
* https://github.com/yhara/simple_twitter/pull/47
|
|
9
|
+
|
|
10
|
+
## v2.2.2 (2023-09-11)
|
|
11
|
+
https://github.com/yhara/simple_twitter/compare/v2.2.1...v2.2.2
|
|
12
|
+
|
|
13
|
+
* [docs] Tweak yard doc
|
|
14
|
+
* https://github.com/yhara/simple_twitter/pull/31
|
|
15
|
+
* Embed filename and line number of the method generated by eval into backtrace
|
|
16
|
+
* https://github.com/yhara/simple_twitter/pull/33
|
|
17
|
+
* Tweak gem description
|
|
18
|
+
* https://github.com/yhara/simple_twitter/pull/34
|
|
3
19
|
|
|
4
20
|
## v2.2.1 (2023-07-25)
|
|
5
21
|
https://github.com/yhara/simple_twitter/compare/v2.2.0...v2.2.1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# simple_twitter
|
|
2
2
|
|
|
3
|
-
Dead simple Twitter API client. Supports both v1 and v2
|
|
3
|
+
Dead simple X (formerly Twitter) API client. Supports both v1 and v2
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/rb/simple_twitter)
|
|
6
6
|
[](https://github.com/yhara/simple_twitter/actions/workflows/test.yml)
|
|
@@ -2,10 +2,21 @@ module SimpleTwitter
|
|
|
2
2
|
# Twitter API Client
|
|
3
3
|
class Client
|
|
4
4
|
# @param bearer_token [String] This requires for OAuth 2
|
|
5
|
-
# @param api_key [String] This requires for OAuth 1.0a
|
|
6
|
-
# @param api_secret_key [String] This requires for OAuth 1.0a
|
|
7
|
-
# @param access_token [String] This requires for OAuth 1.0a
|
|
8
|
-
# @param access_token_secret [String] This requires for OAuth 1.0a
|
|
5
|
+
# @param api_key [String] API Key (a.k.a Consumer Key). This requires for OAuth 1.0a
|
|
6
|
+
# @param api_secret_key [String] API Secret Key (a.k.a Consumer Secret). This requires for OAuth 1.0a
|
|
7
|
+
# @param access_token [String] Access Token. This requires for OAuth 1.0a
|
|
8
|
+
# @param access_token_secret [String] Access Token Secret. This requires for OAuth 1.0a
|
|
9
|
+
#
|
|
10
|
+
# @example Initialize with OAuth 2
|
|
11
|
+
# client = SimpleTwitter::Client.new(bearer_token: "bearer_token")
|
|
12
|
+
#
|
|
13
|
+
# @example Initialize with OAuth 1.0a
|
|
14
|
+
# client = SimpleTwitter::Client.new(
|
|
15
|
+
# api_key: "api_key",
|
|
16
|
+
# api_secret_key: "api_secret_key",
|
|
17
|
+
# access_token: "access_token",
|
|
18
|
+
# access_token_secret: "access_token_secret",
|
|
19
|
+
# )
|
|
9
20
|
def initialize(bearer_token: nil,
|
|
10
21
|
api_key: nil,
|
|
11
22
|
api_secret_key: nil,
|
|
@@ -100,7 +111,7 @@ module SimpleTwitter
|
|
|
100
111
|
# @see https://www.rubydoc.info/github/httprb/http/HTTP/Response HTTP::Response documentation
|
|
101
112
|
|
|
102
113
|
%i[get post put delete].each do |m|
|
|
103
|
-
class_eval <<~EOD
|
|
114
|
+
class_eval <<~EOD, __FILE__, __LINE__ + 1
|
|
104
115
|
def #{m}(url, params: {}, json: {}, form: {})
|
|
105
116
|
res = #{m}_raw(url, params: params, json: json, form: form)
|
|
106
117
|
parse_response(res)
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -1,18 +1,64 @@
|
|
|
1
1
|
---
|
|
2
|
-
sources:
|
|
3
|
-
- type: git
|
|
4
|
-
name: ruby/gem_rbs_collection
|
|
5
|
-
revision: aeede7258d020bfd509541e0c8075ce833292409
|
|
6
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
7
|
-
repo_dir: gems
|
|
8
2
|
path: ".gem_rbs_collection"
|
|
9
3
|
gems:
|
|
4
|
+
- name: addressable
|
|
5
|
+
version: '2.8'
|
|
6
|
+
source:
|
|
7
|
+
type: git
|
|
8
|
+
name: ruby/gem_rbs_collection
|
|
9
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
10
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
11
|
+
repo_dir: gems
|
|
12
|
+
- name: base64
|
|
13
|
+
version: '0'
|
|
14
|
+
source:
|
|
15
|
+
type: stdlib
|
|
16
|
+
- name: bigdecimal
|
|
17
|
+
version: '0'
|
|
18
|
+
source:
|
|
19
|
+
type: stdlib
|
|
20
|
+
- name: delegate
|
|
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: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
30
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
31
|
+
repo_dir: gems
|
|
32
|
+
- name: fileutils
|
|
33
|
+
version: '0'
|
|
34
|
+
source:
|
|
35
|
+
type: stdlib
|
|
36
|
+
- name: forwardable
|
|
37
|
+
version: '0'
|
|
38
|
+
source:
|
|
39
|
+
type: stdlib
|
|
40
|
+
- name: hashdiff
|
|
41
|
+
version: '1.1'
|
|
42
|
+
source:
|
|
43
|
+
type: git
|
|
44
|
+
name: ruby/gem_rbs_collection
|
|
45
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
46
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
47
|
+
repo_dir: gems
|
|
10
48
|
- name: http
|
|
11
49
|
version: '5.1'
|
|
12
50
|
source:
|
|
13
51
|
type: git
|
|
14
52
|
name: ruby/gem_rbs_collection
|
|
15
|
-
revision:
|
|
53
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
54
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
55
|
+
repo_dir: gems
|
|
56
|
+
- name: rake
|
|
57
|
+
version: '13.0'
|
|
58
|
+
source:
|
|
59
|
+
type: git
|
|
60
|
+
name: ruby/gem_rbs_collection
|
|
61
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
16
62
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
17
63
|
repo_dir: gems
|
|
18
64
|
- name: simple_oauth
|
|
@@ -20,7 +66,15 @@ gems:
|
|
|
20
66
|
source:
|
|
21
67
|
type: git
|
|
22
68
|
name: ruby/gem_rbs_collection
|
|
23
|
-
revision:
|
|
69
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
70
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
71
|
+
repo_dir: gems
|
|
72
|
+
- name: webmock
|
|
73
|
+
version: '3.19'
|
|
74
|
+
source:
|
|
75
|
+
type: git
|
|
76
|
+
name: ruby/gem_rbs_collection
|
|
77
|
+
revision: 2c49b34efb3ab42ec5160e1870c23d8349adb157
|
|
24
78
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
25
79
|
repo_dir: gems
|
|
26
80
|
gemfile_lock_path: Gemfile.lock
|
data/simple_twitter.gemspec
CHANGED
|
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
|
|
|
6
6
|
spec.authors = ["Yutaka HARA", "sue445"]
|
|
7
7
|
spec.email = ["yutaka.hara+github@gmail.com", "sue445fukuoka@gmail.com"]
|
|
8
8
|
|
|
9
|
-
spec.summary = "Dead simple client for Twitter API v1/v2"
|
|
10
|
-
spec.description = "Dead simple client for Twitter API (supports both v1 and v2)"
|
|
9
|
+
spec.summary = "Dead simple client for X (formerly Twitter) API v1/v2"
|
|
10
|
+
spec.description = "Dead simple client for X (formerly Twitter) API (supports both v1 and v2)"
|
|
11
11
|
spec.homepage = "https://github.com/yhara/simple_twitter"
|
|
12
12
|
spec.license = "MIT"
|
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_twitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yutaka HARA
|
|
8
8
|
- sue445
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: http
|
|
@@ -123,7 +122,8 @@ dependencies:
|
|
|
123
122
|
- - ">="
|
|
124
123
|
- !ruby/object:Gem::Version
|
|
125
124
|
version: '0'
|
|
126
|
-
description: Dead simple client for Twitter API (supports both v1 and
|
|
125
|
+
description: Dead simple client for X (formerly Twitter) API (supports both v1 and
|
|
126
|
+
v2)
|
|
127
127
|
email:
|
|
128
128
|
- yutaka.hara+github@gmail.com
|
|
129
129
|
- sue445fukuoka@gmail.com
|
|
@@ -134,6 +134,7 @@ files:
|
|
|
134
134
|
- ".env.example"
|
|
135
135
|
- ".github/dependabot.yml"
|
|
136
136
|
- ".github/workflows/pages.yml"
|
|
137
|
+
- ".github/workflows/release_gem.yml"
|
|
137
138
|
- ".github/workflows/test.yml"
|
|
138
139
|
- ".gitignore"
|
|
139
140
|
- ".rspec"
|
|
@@ -170,7 +171,6 @@ metadata:
|
|
|
170
171
|
changelog_uri: https://github.com/yhara/simple_twitter/blob/main/CHANGELOG.md
|
|
171
172
|
documentation_uri: https://yhara.github.io/simple_twitter/
|
|
172
173
|
rubygems_mfa_required: 'true'
|
|
173
|
-
post_install_message:
|
|
174
174
|
rdoc_options: []
|
|
175
175
|
require_paths:
|
|
176
176
|
- lib
|
|
@@ -185,8 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
185
185
|
- !ruby/object:Gem::Version
|
|
186
186
|
version: '0'
|
|
187
187
|
requirements: []
|
|
188
|
-
rubygems_version: 3.
|
|
189
|
-
signing_key:
|
|
188
|
+
rubygems_version: 3.6.7
|
|
190
189
|
specification_version: 4
|
|
191
|
-
summary: Dead simple client for Twitter API v1/v2
|
|
190
|
+
summary: Dead simple client for X (formerly Twitter) API v1/v2
|
|
192
191
|
test_files: []
|