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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9efa656f4b989f1702d73b9fc4dcd1526edeb944fd9de450993cea3a359ac980
4
- data.tar.gz: eb2027e3aaf434de6014f8ad60775af313c6a3bc88dfca3ac350dd5ad4798c91
3
+ metadata.gz: 671c43acc2022139dba5f4f69a76f518fdd46561c7081211a324e3ba1e2d75d5
4
+ data.tar.gz: 3f6b0607f128651fbfda09b6911d83a01f9f8bc03c04f714fcc7f67c65ad5c55
5
5
  SHA512:
6
- metadata.gz: d7f681333e86714dbf3aba86319761118c002b914f0d45579b9c35bcb0d0937a4a276ee04137c7cc76cdf66ddd25ab057e431420bd3b95b0fa91e411a96925d0
7
- data.tar.gz: 7c0159dbc2da88fed921c25887488b5c81406ebcb4793ff10bf76de8d447cb5d8d61f7954c0c44a0b766e3ee1828d68f6ef9c9fa2812eaf709ab5f705d678579
6
+ metadata.gz: '029f55ae678e76b578b4fd350694439a253b4f3b9165a6926e709df1b5ac6d1b8bc908a299ab4e0bfb01a1c88a0ad2035c5a5259827323104c73d3816ea1a30e'
7
+ data.tar.gz: 2dcb7f62d814e81967ec466a2d746ed89a27c1191a416ceec7de0ffe1f0a4c33f664a0f2337250a76c83cc1cbd5a0371871b0e417f3a00f966ae95d6bcaecddd
@@ -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
@@ -8,3 +8,4 @@
8
8
  /tmp/
9
9
  Gemfile.lock
10
10
  .env
11
+ .gem_rbs_collection/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Unreleased
2
- https://github.com/yhara/simple_twitter/compare/v2.1.0...main
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("https://api.twitter.com/2/tweets",
115
- json: {
116
- text: "Test tweet with image",
117
- media: { media_ids: [media[:media_id_string]] },
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
@@ -1,3 +1,3 @@
1
1
  module SimpleTwitter
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  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
@@ -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
@@ -0,0 +1,7 @@
1
+ # TypeProf 0.21.3
2
+
3
+ # Classes
4
+ module SimpleTwitter
5
+ class ClientError < Error
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # TypeProf 0.21.3
2
+
3
+ # Classes
4
+ module SimpleTwitter
5
+ class Error < StandardError
6
+ attr_reader raw_response: HTTP::Response
7
+ attr_reader body: Hash[Symbol, untyped]
8
+ def initialize: (HTTP::Response raw_response) -> void
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ # TypeProf 0.21.3
2
+
3
+ # Classes
4
+ module SimpleTwitter
5
+ class ServerError < Error
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ # TypeProf 0.21.3
2
+
3
+ # Classes
4
+ module SimpleTwitter
5
+ VERSION: String
6
+ end
@@ -0,0 +1,5 @@
1
+ # TypeProf 0.21.3
2
+
3
+ # Classes
4
+ module SimpleTwitter
5
+ end
@@ -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.1.0
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-21 00:00:00.000000000 Z
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: