simple_twitter 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +21 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +7 -1
- data/README.md +6 -5
- data/Steepfile +30 -0
- data/lib/simple_twitter/version.rb +1 -1
- data/rbs_collection.lock.yaml +26 -0
- data/rbs_collection.yaml +30 -0
- data/sig/simple_twitter/client.rbs +28 -0
- data/sig/simple_twitter/client_error.rbs +7 -0
- data/sig/simple_twitter/error.rbs +10 -0
- data/sig/simple_twitter/server_error.rbs +7 -0
- data/sig/simple_twitter/version.rbs +6 -0
- data/sig/simple_twitter.rbs +5 -0
- data/simple_twitter.gemspec +1 -0
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671c43acc2022139dba5f4f69a76f518fdd46561c7081211a324e3ba1e2d75d5
|
4
|
+
data.tar.gz: 3f6b0607f128651fbfda09b6911d83a01f9f8bc03c04f714fcc7f67c65ad5c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '029f55ae678e76b578b4fd350694439a253b4f3b9165a6926e709df1b5ac6d1b8bc908a299ab4e0bfb01a1c88a0ad2035c5a5259827323104c73d3816ea1a30e'
|
7
|
+
data.tar.gz: 2dcb7f62d814e81967ec466a2d746ed89a27c1191a416ceec7de0ffe1f0a4c33f664a0f2337250a76c83cc1cbd5a0371871b0e417f3a00f966ae95d6bcaecddd
|
data/.github/workflows/test.yml
CHANGED
@@ -46,3 +46,24 @@ jobs:
|
|
46
46
|
|
47
47
|
- run: bundle exec rspec
|
48
48
|
- run: bundle exec yard --fail-on-warning
|
49
|
+
|
50
|
+
rbs:
|
51
|
+
runs-on: ubuntu-latest
|
52
|
+
|
53
|
+
steps:
|
54
|
+
- uses: actions/checkout@v3
|
55
|
+
|
56
|
+
- uses: ruby/setup-ruby@v1
|
57
|
+
with:
|
58
|
+
ruby-version: ruby
|
59
|
+
bundler-cache: true
|
60
|
+
|
61
|
+
- name: bundle update
|
62
|
+
run: |
|
63
|
+
set -xe
|
64
|
+
bundle config path vendor/bundle
|
65
|
+
bundle update --jobs $(nproc) --retry 3
|
66
|
+
|
67
|
+
- run: bundle exec rbs collection install
|
68
|
+
- run: bundle exec rbs validate --silent
|
69
|
+
- run: bundle exec steep check
|
data/.gitignore
CHANGED
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.2.0...main
|
3
|
+
|
4
|
+
## v2.2.0 (2023-07-24)
|
5
|
+
https://github.com/yhara/simple_twitter/compare/v2.1.0...v2.2.0
|
6
|
+
|
7
|
+
* Add rbs
|
8
|
+
* https://github.com/yhara/simple_twitter/pull/21
|
3
9
|
|
4
10
|
## v2.1.0 (2023-07-22)
|
5
11
|
https://github.com/yhara/simple_twitter/compare/v2.0.0...v2.1.0
|
data/README.md
CHANGED
@@ -111,11 +111,12 @@ media = client.post(
|
|
111
111
|
# :image=>{:image_type=>"image/png", :w=>400, :h=>400}}
|
112
112
|
|
113
113
|
# Tweet with media
|
114
|
-
client.post(
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
114
|
+
client.post(
|
115
|
+
"https://api.twitter.com/2/tweets",
|
116
|
+
json: {
|
117
|
+
text: "Test tweet with image",
|
118
|
+
media: { media_ids: [media[:media_id_string]] },
|
119
|
+
}
|
119
120
|
)
|
120
121
|
```
|
121
122
|
|
data/Steepfile
ADDED
@@ -0,0 +1,30 @@
|
|
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
|
+
library "json"
|
14
|
+
|
15
|
+
# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
|
16
|
+
# configure_code_diagnostics(D::Ruby.strict) # `strict` diagnostics setting
|
17
|
+
# configure_code_diagnostics(D::Ruby.lenient) # `lenient` diagnostics setting
|
18
|
+
# configure_code_diagnostics(D::Ruby.silent) # `silent` diagnostics setting
|
19
|
+
# configure_code_diagnostics do |hash| # You can setup everything yourself
|
20
|
+
# hash[D::Ruby::NoMethod] = :information
|
21
|
+
# end
|
22
|
+
end
|
23
|
+
|
24
|
+
# target :test do
|
25
|
+
# signature "sig", "sig-private"
|
26
|
+
#
|
27
|
+
# check "test"
|
28
|
+
#
|
29
|
+
# # library "pathname" # Standard libraries
|
30
|
+
# end
|
@@ -0,0 +1,26 @@
|
|
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
|
+
path: ".gem_rbs_collection"
|
9
|
+
gems:
|
10
|
+
- name: http
|
11
|
+
version: '5.1'
|
12
|
+
source:
|
13
|
+
type: git
|
14
|
+
name: ruby/gem_rbs_collection
|
15
|
+
revision: aeede7258d020bfd509541e0c8075ce833292409
|
16
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
17
|
+
repo_dir: gems
|
18
|
+
- name: simple_oauth
|
19
|
+
version: '0.3'
|
20
|
+
source:
|
21
|
+
type: git
|
22
|
+
name: ruby/gem_rbs_collection
|
23
|
+
revision: aeede7258d020bfd509541e0c8075ce833292409
|
24
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
25
|
+
repo_dir: gems
|
26
|
+
gemfile_lock_path: Gemfile.lock
|
data/rbs_collection.yaml
ADDED
@@ -0,0 +1,30 @@
|
|
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
|
+
|
22
|
+
- name: simple_twitter
|
23
|
+
ignore: true
|
24
|
+
- name: steep
|
25
|
+
ignore: true
|
26
|
+
- name: yard
|
27
|
+
ignore: true
|
28
|
+
|
29
|
+
- name: http
|
30
|
+
- name: simple_oauth
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# TypeProf 0.21.3
|
2
|
+
|
3
|
+
# Classes
|
4
|
+
module SimpleTwitter
|
5
|
+
class Client
|
6
|
+
@bearer_token: string
|
7
|
+
@oauth_params: {consumer_key: string, consumer_secret: string, token: string, token_secret: string}
|
8
|
+
|
9
|
+
def initialize: (?bearer_token: string, ?api_key: string, ?api_secret_key: string, ?access_token: string, ?access_token_secret: string) -> void
|
10
|
+
|
11
|
+
def get: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
12
|
+
def post: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
13
|
+
def put: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
14
|
+
def delete: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
15
|
+
|
16
|
+
def get_raw: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> HTTP::Response
|
17
|
+
def post_raw: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> HTTP::Response
|
18
|
+
def put_raw: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> HTTP::Response
|
19
|
+
def delete_raw: (String url, params: Hash[Symbol, untyped], json: Hash[Symbol, untyped]) -> HTTP::Response
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def create_http_args: (params: Hash[Symbol, untyped], json: Hash[Symbol, untyped], form: Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
|
24
|
+
def http: (Symbol method, String url, Hash[Symbol, String] params) -> HTTP::Client
|
25
|
+
def auth_header: (Symbol method, String url, Hash[Symbol, String] params) -> String
|
26
|
+
def parse_response: (HTTP::Response res) -> Hash[Symbol, untyped]
|
27
|
+
end
|
28
|
+
end
|
data/simple_twitter.gemspec
CHANGED
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency "dotenv"
|
34
34
|
spec.add_development_dependency "rspec"
|
35
35
|
spec.add_development_dependency "rspec-its"
|
36
|
+
spec.add_development_dependency "steep"
|
36
37
|
spec.add_development_dependency "webmock"
|
37
38
|
spec.add_development_dependency "yard"
|
38
39
|
end
|
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.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka HARA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-07-
|
12
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: http
|
@@ -81,6 +81,20 @@ dependencies:
|
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: steep
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: webmock
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +143,7 @@ files:
|
|
129
143
|
- LICENSE.txt
|
130
144
|
- README.md
|
131
145
|
- Rakefile
|
146
|
+
- Steepfile
|
132
147
|
- bin/console
|
133
148
|
- bin/setup
|
134
149
|
- lib/simple_twitter.rb
|
@@ -137,6 +152,14 @@ files:
|
|
137
152
|
- lib/simple_twitter/error.rb
|
138
153
|
- lib/simple_twitter/server_error.rb
|
139
154
|
- lib/simple_twitter/version.rb
|
155
|
+
- rbs_collection.lock.yaml
|
156
|
+
- rbs_collection.yaml
|
157
|
+
- sig/simple_twitter.rbs
|
158
|
+
- sig/simple_twitter/client.rbs
|
159
|
+
- sig/simple_twitter/client_error.rbs
|
160
|
+
- sig/simple_twitter/error.rbs
|
161
|
+
- sig/simple_twitter/server_error.rbs
|
162
|
+
- sig/simple_twitter/version.rbs
|
140
163
|
- simple_twitter.gemspec
|
141
164
|
homepage: https://github.com/yhara/simple_twitter
|
142
165
|
licenses:
|