x 0.18.0 → 1.0.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +9 -0
  3. data/CHANGELOG.md +651 -15
  4. data/README.md +513 -67
  5. data/SECURITY.md +66 -0
  6. data/UPGRADING.md +670 -0
  7. data/lib/x/version.rb +16 -1
  8. data/lib/x.rb +13 -1
  9. data/sig/manifest.yaml +5 -0
  10. data/sig/x.rbs +5 -346
  11. metadata +57 -48
  12. data/bin/console +0 -10
  13. data/bin/setup +0 -6
  14. data/lib/x/account_uploader.rb +0 -168
  15. data/lib/x/authenticator.rb +0 -21
  16. data/lib/x/bearer_token_authenticator.rb +0 -36
  17. data/lib/x/client.rb +0 -160
  18. data/lib/x/client_credentials.rb +0 -208
  19. data/lib/x/connection.rb +0 -166
  20. data/lib/x/errors/bad_gateway.rb +0 -6
  21. data/lib/x/errors/bad_request.rb +0 -6
  22. data/lib/x/errors/client_error.rb +0 -6
  23. data/lib/x/errors/connection_exception.rb +0 -6
  24. data/lib/x/errors/error.rb +0 -4
  25. data/lib/x/errors/forbidden.rb +0 -6
  26. data/lib/x/errors/gateway_timeout.rb +0 -6
  27. data/lib/x/errors/gone.rb +0 -6
  28. data/lib/x/errors/http_error.rb +0 -84
  29. data/lib/x/errors/internal_server_error.rb +0 -6
  30. data/lib/x/errors/invalid_media_type.rb +0 -6
  31. data/lib/x/errors/network_error.rb +0 -6
  32. data/lib/x/errors/not_acceptable.rb +0 -6
  33. data/lib/x/errors/not_found.rb +0 -6
  34. data/lib/x/errors/payload_too_large.rb +0 -6
  35. data/lib/x/errors/server_error.rb +0 -6
  36. data/lib/x/errors/service_unavailable.rb +0 -6
  37. data/lib/x/errors/too_many_redirects.rb +0 -6
  38. data/lib/x/errors/too_many_requests.rb +0 -58
  39. data/lib/x/errors/unauthorized.rb +0 -6
  40. data/lib/x/errors/unprocessable_entity.rb +0 -6
  41. data/lib/x/media_upload_validator.rb +0 -36
  42. data/lib/x/media_uploader.rb +0 -234
  43. data/lib/x/oauth2_authenticator.rb +0 -169
  44. data/lib/x/oauth_authenticator.rb +0 -182
  45. data/lib/x/rate_limit.rb +0 -89
  46. data/lib/x/redirect_handler.rb +0 -109
  47. data/lib/x/request_builder.rb +0 -93
  48. data/lib/x/response_parser.rb +0 -81
data/lib/x/version.rb CHANGED
@@ -1,6 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rubygems/version"
2
4
 
3
5
  module X
4
6
  # The current version of the X gem
5
- VERSION = Gem::Version.create("0.18.0")
7
+ # @api public
8
+ VERSION = "1.0.0"
9
+
10
+ # The version as a Gem::Version, which compares one release with another
11
+ #
12
+ # VERSION is a String, as a version constant is throughout Ruby, so that what reads it can split it, match it, or
13
+ # send it wherever a String belongs, such as the release a crash reporter is told. This builds the Gem::Version
14
+ # that compares it with another version, which a String compares by character rather than by segment.
15
+ #
16
+ # @api public
17
+ # @return [Gem::Version] the version
18
+ # @example Take a path that a later release opened
19
+ # X.gem_version >= Gem::Version.new("1.1")
20
+ def self.gem_version = Gem::Version.new(VERSION)
6
21
  end
data/lib/x.rb CHANGED
@@ -1 +1,13 @@
1
- require_relative "x/client"
1
+ # frozen_string_literal: true
2
+
3
+ require "x/core"
4
+ require "x/uploads"
5
+ require "x/streams"
6
+ require "x/resources"
7
+ require_relative "x/version"
8
+
9
+ module X
10
+ Client.include(Resources::API)
11
+ Client.include(Uploads::API)
12
+ Client.include(Streams::API)
13
+ end
data/sig/manifest.yaml ADDED
@@ -0,0 +1,5 @@
1
+ # The standard libraries the signatures of x refer to, which rbs collection loads for code that depends on it
2
+ #
3
+ # rbs collection reads every library named here as a standard library, so the gems x depends on are left to their
4
+ # gemspecs, from which it installs their signatures.
5
+ dependencies: []
data/sig/x.rbs CHANGED
@@ -1,352 +1,11 @@
1
1
  module X
2
- VERSION: Gem::Version
2
+ VERSION: String
3
3
 
4
- class Authenticator
5
- AUTHENTICATION_HEADER: String
6
-
7
- def header: (Net::HTTPRequest? request) -> Hash[String, String]
8
- end
9
-
10
- class BearerTokenAuthenticator < Authenticator
11
- attr_accessor bearer_token: String
12
- def initialize: (bearer_token: String) -> void
13
- def header: (Net::HTTPRequest? request) -> Hash[String, String]
14
- end
15
-
16
- class OAuthAuthenticator < Authenticator
17
- OAUTH_VERSION: String
18
- OAUTH_SIGNATURE_METHOD: String
19
- OAUTH_SIGNATURE_ALGORITHM: String
20
-
21
- attr_accessor api_key: String
22
- attr_accessor api_key_secret: String
23
- attr_accessor access_token: String
24
- attr_accessor access_token_secret: String
25
- def initialize: (api_key: String, api_key_secret: String, access_token: String, access_token_secret: String) -> void
26
- def header: (Net::HTTPRequest request) -> Hash[String, String]
27
-
28
- private
29
- def parse_request: (Net::HTTPRequest request) -> [String, String, Hash[String, String]]
30
- def parse_query_params: (String query_string) -> Hash[String, String]
31
- def uri_without_query: (URI::Generic uri) -> String
32
- def build_oauth_header: (String method, String url, Hash[String, String] query_params) -> String
33
- def default_oauth_params: -> Hash[String, String]
34
- def generate_signature: (String method, String url, Hash[String, String] params) -> String
35
- def hmac_signature: (String base_string) -> String
36
- def signature_base_string: (String method, String url, Hash[String, String] params) -> String
37
- def signing_key: -> String
38
- def format_oauth_header: (Hash[String, String] params) -> String
39
- def escape: (String value) -> String
40
- end
41
-
42
- class Error < StandardError
43
- end
44
-
45
- class ClientError < HTTPError
46
- end
47
-
48
- class BadGateway < ClientError
49
- end
50
-
51
- class BadRequest < ClientError
52
- end
53
-
54
- class ConnectionException < ClientError
55
- end
56
-
57
- class HTTPError < Error
58
- JSON_CONTENT_TYPE_REGEXP: Regexp
59
-
60
- attr_reader response : Net::HTTPResponse
61
- attr_reader code : String
62
-
63
- def initialize: (response: Net::HTTPResponse) -> void
64
-
65
- private
66
- def error_message: (Net::HTTPResponse response) -> String
67
- def message_from_json_response: (Net::HTTPResponse response) -> String
68
- def json?: (Net::HTTPResponse response) -> bool
69
- end
70
-
71
- class Forbidden < ClientError
72
- end
73
-
74
- class GatewayTimeout < ClientError
75
- end
76
-
77
- class Gone < ClientError
78
- end
79
-
80
- class InternalServerError < ServerError
81
- end
82
-
83
- class NetworkError < Error
84
- end
85
-
86
- class NotAcceptable < ClientError
87
- end
88
-
89
- class NotFound < ClientError
90
- end
91
-
92
- class PayloadTooLarge < ClientError
93
- end
94
-
95
- class ServerError < HTTPError
96
- end
97
-
98
- class ServiceUnavailable < ServerError
99
- end
100
-
101
- class TooManyRedirects < Error
102
- end
103
-
104
- class InvalidMediaType < Error
105
- end
106
-
107
- class TooManyRequests < ClientError
108
- @rate_limits: Array[RateLimit]
109
-
110
- def rate_limit: -> RateLimit?
111
- def rate_limits: -> Array[RateLimit]
112
- def reset_at: -> Time
113
- def reset_in: -> Integer?
114
- end
115
-
116
- class Unauthorized < ClientError
117
- end
118
-
119
- class UnprocessableEntity < ClientError
120
- end
121
-
122
- class Connection
123
- DEFAULT_HOST: String
124
- DEFAULT_PORT: Integer
125
- DEFAULT_OPEN_TIMEOUT: Integer
126
- DEFAULT_READ_TIMEOUT: Integer
127
- DEFAULT_WRITE_TIMEOUT: Integer
128
- DEFAULT_DEBUG_OUTPUT: IO
129
- NETWORK_ERRORS: Array[(singleton(Errno::ECONNREFUSED) | singleton(Errno::ECONNRESET) | singleton(Net::OpenTimeout) | singleton(Net::ReadTimeout) | singleton(OpenSSL::SSL::SSLError))]
130
-
131
- @proxy_url: URI::Generic | String
132
-
133
- extend Forwardable
134
-
135
- attr_accessor open_timeout : Float | Integer
136
- attr_accessor read_timeout : Float | Integer
137
- attr_accessor write_timeout : Float | Integer
138
- attr_accessor debug_output : IO
139
-
140
- attr_reader proxy_uri: URI::Generic?
141
- attr_reader proxy_host : String?
142
- attr_reader proxy_port : Integer?
143
- attr_reader proxy_user : String?
144
- attr_reader proxy_pass : String?
145
-
146
- def initialize: (?open_timeout: Float | Integer, ?read_timeout: Float | Integer, ?write_timeout: Float | Integer, ?proxy_url: URI::Generic? | String?, ?debug_output: IO) -> void
147
- def proxy_url=: (URI::Generic | String proxy_url) -> void
148
- def perform: (request: Net::HTTPRequest) -> Net::HTTPResponse
149
-
150
- private
151
- def build_http_client: (?String host, ?Integer port) -> Net::HTTP
152
- def configure_http_client: (Net::HTTP http_client) -> Net::HTTP
153
- end
154
-
155
- class RateLimit
156
- RATE_LIMIT_TYPE: String
157
- APP_LIMIT_TYPE: String
158
- USER_LIMIT_TYPE: String
159
- TYPES: Array[String]
160
-
161
- attr_accessor type: String
162
- attr_accessor response: Net::HTTPResponse
163
- def initialize: (type: String, response: Net::HTTPResponse) -> void
164
- def limit: -> Integer
165
- def remaining: -> Integer
166
- def reset_at: -> Time
167
- def reset_in: -> Integer?
168
- end
169
-
170
- class RequestBuilder
171
- HTTP_METHODS: Hash[Symbol, (singleton(Net::HTTP::Get) | singleton(Net::HTTP::Post) | singleton(Net::HTTP::Put) | singleton(Net::HTTP::Delete))]
172
- DEFAULT_HEADERS: Hash[String, String]
173
-
174
- def initialize: (?content_type: String, ?user_agent: String) -> void
175
- def build: (http_method: Symbol, uri: URI::Generic, ?body: String?, ?headers: Hash[String, String], ?authenticator: Authenticator) -> (Net::HTTPRequest)
176
-
177
- private
178
- def create_request: (http_method: Symbol, uri: URI::Generic, body: String?) -> (Net::HTTPRequest)
179
- def add_authentication: (request: Net::HTTPRequest, authenticator: Authenticator) -> void
180
- def add_headers: (request: Net::HTTPRequest, headers: Hash[String, String]) -> void
181
- def escape_query_params: (URI::Generic uri) -> URI::Generic
182
- end
183
-
184
- class RedirectHandler
185
- DEFAULT_MAX_REDIRECTS: Integer
186
-
187
- attr_reader authenticator: Authenticator
188
- attr_reader connection: Connection
189
- attr_reader request_builder: RequestBuilder
190
- attr_reader max_redirects: Integer
191
- def initialize: (?connection: Connection, ?request_builder: RequestBuilder, ?max_redirects: Integer) -> void
192
- def handle: (response: Net::HTTPResponse, request: Net::HTTPRequest, base_url: String, ?authenticator: Authenticator, ?redirect_count: Integer) -> Net::HTTPResponse
193
-
194
- private
195
- def build_new_uri: (Net::HTTPResponse response, String base_url) -> URI::Generic
196
- def build_request: (Net::HTTPRequest request, URI::Generic new_uri, Integer response_code, Authenticator authenticator) -> Net::HTTPRequest
197
- def send_new_request: (URI::Generic new_uri, Net::HTTPRequest new_request) -> Net::HTTPResponse
198
- end
199
-
200
- class ResponseParser
201
- ERROR_MAP: Hash[Integer, singleton(BadGateway) | singleton(BadRequest) | singleton(ConnectionException) | singleton(Forbidden) | singleton(GatewayTimeout) | singleton(Gone) | singleton(InternalServerError) | singleton(NotAcceptable) | singleton(NotFound) | singleton(PayloadTooLarge) | singleton(ServiceUnavailable) | singleton(TooManyRequests) | singleton(Unauthorized) | singleton(UnprocessableEntity)]
202
-
203
- def parse: (response: Net::HTTPResponse, ?array_class: Class?, ?object_class: Class?) -> untyped
204
-
205
- private
206
- def error: (Net::HTTPResponse response) -> HTTPError
207
- def error_class: (Net::HTTPResponse response) -> (singleton(BadGateway) | singleton(BadRequest) | singleton(ConnectionException) | singleton(Forbidden) | singleton(GatewayTimeout) | singleton(Gone) | singleton(InternalServerError) | singleton(NotAcceptable) | singleton(NotFound) | singleton(PayloadTooLarge) | singleton(ServiceUnavailable) | singleton(TooManyRequests) | singleton(Unauthorized) | singleton(UnprocessableEntity))
208
- def json?: (Net::HTTPResponse response) -> bool
209
- end
210
-
211
- class OAuth2Authenticator < Authenticator
212
- TOKEN_PATH: String
213
- TOKEN_HOST: String
214
- REFRESH_GRANT_TYPE: String
215
- EXPIRATION_BUFFER: Integer
216
-
217
- attr_accessor client_id: String
218
- attr_accessor client_secret: String
219
- attr_accessor access_token: String
220
- attr_accessor refresh_token: String
221
- attr_accessor expires_at: Time?
222
- attr_accessor connection: Connection
223
- def initialize: (client_id: String, client_secret: String, access_token: String, refresh_token: String, ?expires_at: Time?, ?connection: Connection) -> void
224
- def header: (Net::HTTPRequest? request) -> Hash[String, String]
225
- def token_expired?: -> bool
226
- def refresh_token!: -> Hash[String, untyped]
227
-
228
- private
229
- def send_token_request: -> Net::HTTPResponse
230
- def build_token_request: -> Net::HTTP::Post
231
- def handle_token_response: (Net::HTTPResponse response) -> Hash[String, untyped]
232
- def update_tokens: (Hash[String, untyped] token_response) -> void
233
- end
234
-
235
- module ClientCredentials
236
- attr_reader api_key: String?
237
- attr_reader api_key_secret: String?
238
- attr_reader access_token: String?
239
- attr_reader access_token_secret: String?
240
- attr_reader bearer_token: String?
241
- attr_reader client_id: String?
242
- attr_reader client_secret: String?
243
- attr_reader refresh_token: String?
244
- def api_key=: (String api_key) -> void
245
- def api_key_secret=: (String api_key_secret) -> void
246
- def access_token=: (String access_token) -> void
247
- def access_token_secret=: (String access_token_secret) -> void
248
- def bearer_token=: (String bearer_token) -> void
249
- def client_id=: (String client_id) -> void
250
- def client_secret=: (String client_secret) -> void
251
- def refresh_token=: (String refresh_token) -> void
252
-
253
- private
254
- def initialize_credentials: (api_key: String?, api_key_secret: String?, access_token: String?, access_token_secret: String?, bearer_token: String?, client_id: String?, client_secret: String?, refresh_token: String?) -> void
255
- def initialize_authenticator: -> (Authenticator | BearerTokenAuthenticator | OAuthAuthenticator | OAuth2Authenticator)
256
- def oauth_authenticator: -> OAuthAuthenticator?
257
- def oauth2_authenticator: -> OAuth2Authenticator?
258
- def bearer_authenticator: -> BearerTokenAuthenticator?
259
- end
4
+ def self.gem_version: () -> Gem::Version
260
5
 
261
6
  class Client
262
- include ClientCredentials
263
-
264
- DEFAULT_BASE_URL: String
265
- DEFAULT_ARRAY_CLASS: singleton(Array)
266
- DEFAULT_OBJECT_CLASS: singleton(Hash)
267
- extend Forwardable
268
- @authenticator: Authenticator | BearerTokenAuthenticator | OAuthAuthenticator | OAuth2Authenticator
269
- @connection: Connection
270
- @request_builder: RequestBuilder
271
- @redirect_handler: RedirectHandler
272
- @response_parser: ResponseParser
273
-
274
- attr_accessor base_url: String
275
- attr_accessor default_array_class: singleton(Array)
276
- attr_accessor default_object_class: singleton(Hash)
277
- attr_reader authenticator: Authenticator | BearerTokenAuthenticator | OAuthAuthenticator | OAuth2Authenticator
278
- def initialize: (?api_key: String?, ?api_key_secret: String?, ?access_token: String?, ?access_token_secret: String?, ?bearer_token: String?, ?client_id: String?, ?client_secret: String?, ?refresh_token: String?, ?base_url: String, ?open_timeout: Integer, ?read_timeout: Integer, ?write_timeout: Integer, ?debug_output: untyped, ?proxy_url: String?, ?default_array_class: singleton(Array), ?default_object_class: singleton(Hash), ?max_redirects: Integer) -> void
279
- def get: (String endpoint, ?headers: Hash[String, String], ?array_class: Class, ?object_class: Class) -> untyped
280
- def post: (String endpoint, ?String? body, ?headers: Hash[String, String], ?array_class: Class, ?object_class: Class) -> untyped
281
- def put: (String endpoint, ?String? body, ?headers: Hash[String, String], ?array_class: Class, ?object_class: Class) -> untyped
282
- def delete: (String endpoint, ?headers: Hash[String, String], ?array_class: Class, ?object_class: Class) -> untyped
283
-
284
- private
285
- def execute_request: (:delete | :get | :post | :put http_method, String endpoint, ?body: String?, ?headers: Hash[String, String], ?array_class: Class, ?object_class: Class) -> nil
286
- end
287
-
288
- module MediaUploader
289
- MAX_RETRIES: Integer
290
- BYTES_PER_MB: Integer
291
- DM_GIF: String
292
- DM_IMAGE: String
293
- DM_VIDEO: String
294
- SUBTITLES: String
295
- TWEET_GIF: String
296
- TWEET_IMAGE: String
297
- TWEET_VIDEO: String
298
- MIME_TYPES: Array[String]
299
- GIF_MIME_TYPE: String
300
- JPEG_MIME_TYPE: String
301
- MP4_MIME_TYPE: String
302
- PNG_MIME_TYPE: String
303
- SUBRIP_MIME_TYPE: String
304
- WEBP_MIME_TYPE: String
305
- MIME_TYPE_MAP: Hash[String, String]
306
- PROCESSING_INFO_STATES: Array[String]
307
- extend MediaUploader
308
-
309
- def upload: (client: Client, file_path: String, media_category: String, ?boundary: String) -> untyped
310
- def upload_binary: (client: Client, content: String, media_category: String, ?boundary: String) -> untyped
311
- def chunked_upload: (client: Client, file_path: String, media_category: String, ?media_type: String, ?boundary: String, ?chunk_size_mb: Integer) -> untyped
312
- def await_processing: (client: Client, media: untyped) -> untyped
313
- def await_processing!: (client: Client, media: untyped) -> untyped
314
- def infer_media_type: (String file_path, String media_category) -> String
315
-
316
- private
317
- def split: (String file_path, Integer chunk_size) -> Array[String]
318
- def init: (client: Client, file_path: String, media_type: String, media_category: String) -> untyped
319
- def append: (client: Client, file_paths: Array[String], media: untyped, ?boundary: String) -> Array[String]
320
- def upload_chunk: (client: Client, media_id: String, upload_body: String, file_path: String, ?headers: Hash[String, String]) -> Integer?
321
- def cleanup_file: (String file_path) -> Integer?
322
- def finalize: (client: Client, media: untyped) -> untyped
323
- def construct_upload_body: (content: String, ?media_category: String, ?segment_index: Integer, ?boundary: String) -> String
324
- end
325
-
326
- module MediaUploadValidator
327
- MEDIA_CATEGORIES: Array[String]
328
- extend MediaUploadValidator
329
-
330
- def validate_file_path!: (file_path: String) -> nil
331
- def validate_media_category!: (media_category: String) -> nil
332
- end
333
-
334
- module AccountUploader
335
- V1_BASE_URL: String
336
- SUPPORTED_EXTENSIONS: Array[String]
337
- MIME_TYPE_MAP: Hash[String, String]
338
- extend AccountUploader
339
-
340
- def update_profile_image: (client: Client, file_path: String, ?boundary: String) -> untyped
341
- def upload_profile_image_binary: (client: Client, content: String, ?boundary: String) -> untyped
342
- def update_profile_banner: (client: Client, file_path: String, ?width: Integer?, ?height: Integer?, ?offset_left: Integer?, ?offset_top: Integer?, ?boundary: String) -> untyped
343
- def upload_profile_banner_binary: (client: Client, content: String, ?width: Integer?, ?height: Integer?, ?offset_left: Integer?, ?offset_top: Integer?, ?boundary: String) -> untyped
344
-
345
- private
346
- def v1_client: (Client client) -> Client
347
- def validate_file!: (String file_path) -> nil
348
- def construct_multipart_body: (field_name: String, content: String, boundary: String) -> String
349
- def construct_banner_body: (content: String, width: Integer?, height: Integer?, offset_left: Integer?, offset_top: Integer?, boundary: String) -> String
350
- def multipart_field: (String name, untyped value, String boundary) -> String
7
+ include Resources::API
8
+ include Uploads::API
9
+ include Streams::API
351
10
  end
352
11
  end
metadata CHANGED
@@ -1,76 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Berlin
8
- bindir: exe
8
+ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: base64
13
+ name: x-core
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ">="
16
+ - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: '0.2'
18
+ version: 1.0.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - ">="
23
+ - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: '0.2'
25
+ version: 1.0.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: x-uploads
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '='
38
+ - !ruby/object:Gem::Version
39
+ version: 1.0.0
40
+ - !ruby/object:Gem::Dependency
41
+ name: x-streams
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.0.0
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.0
54
+ - !ruby/object:Gem::Dependency
55
+ name: x-resources
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 1.0.0
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 1.0.0
26
68
  email:
27
69
  - sferik@gmail.com
28
70
  executables: []
29
71
  extensions: []
30
72
  extra_rdoc_files: []
31
73
  files:
74
+ - ".yardopts"
32
75
  - CHANGELOG.md
33
76
  - LICENSE.txt
34
77
  - README.md
35
- - bin/console
36
- - bin/setup
78
+ - SECURITY.md
79
+ - UPGRADING.md
37
80
  - lib/x.rb
38
- - lib/x/account_uploader.rb
39
- - lib/x/authenticator.rb
40
- - lib/x/bearer_token_authenticator.rb
41
- - lib/x/client.rb
42
- - lib/x/client_credentials.rb
43
- - lib/x/connection.rb
44
- - lib/x/errors/bad_gateway.rb
45
- - lib/x/errors/bad_request.rb
46
- - lib/x/errors/client_error.rb
47
- - lib/x/errors/connection_exception.rb
48
- - lib/x/errors/error.rb
49
- - lib/x/errors/forbidden.rb
50
- - lib/x/errors/gateway_timeout.rb
51
- - lib/x/errors/gone.rb
52
- - lib/x/errors/http_error.rb
53
- - lib/x/errors/internal_server_error.rb
54
- - lib/x/errors/invalid_media_type.rb
55
- - lib/x/errors/network_error.rb
56
- - lib/x/errors/not_acceptable.rb
57
- - lib/x/errors/not_found.rb
58
- - lib/x/errors/payload_too_large.rb
59
- - lib/x/errors/server_error.rb
60
- - lib/x/errors/service_unavailable.rb
61
- - lib/x/errors/too_many_redirects.rb
62
- - lib/x/errors/too_many_requests.rb
63
- - lib/x/errors/unauthorized.rb
64
- - lib/x/errors/unprocessable_entity.rb
65
- - lib/x/media_upload_validator.rb
66
- - lib/x/media_uploader.rb
67
- - lib/x/oauth2_authenticator.rb
68
- - lib/x/oauth_authenticator.rb
69
- - lib/x/rate_limit.rb
70
- - lib/x/redirect_handler.rb
71
- - lib/x/request_builder.rb
72
- - lib/x/response_parser.rb
73
81
  - lib/x/version.rb
82
+ - sig/manifest.yaml
74
83
  - sig/x.rbs
75
84
  homepage: https://sferik.github.io/x-ruby
76
85
  licenses:
@@ -78,8 +87,8 @@ licenses:
78
87
  metadata:
79
88
  allowed_push_host: https://rubygems.org
80
89
  bug_tracker_uri: https://github.com/sferik/x-ruby/issues
81
- changelog_uri: https://github.com/sferik/x-ruby/blob/master/CHANGELOG.md
82
- documentation_uri: https://rubydoc.info/gems/x/
90
+ changelog_uri: https://github.com/sferik/x-ruby/blob/main/CHANGELOG.md
91
+ documentation_uri: https://sferik.github.io/x-ruby/api/
83
92
  funding_uri: https://github.com/sponsors/sferik/
84
93
  homepage_uri: https://sferik.github.io/x-ruby
85
94
  rubygems_mfa_required: 'true'
@@ -91,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
100
  requirements:
92
101
  - - ">="
93
102
  - !ruby/object:Gem::Version
94
- version: '3.2'
103
+ version: '3.4'
95
104
  required_rubygems_version: !ruby/object:Gem::Requirement
96
105
  requirements:
97
106
  - - ">="
98
107
  - !ruby/object:Gem::Version
99
108
  version: '0'
100
109
  requirements: []
101
- rubygems_version: 4.0.3
110
+ rubygems_version: 4.0.21
102
111
  specification_version: 4
103
112
  summary: A Ruby interface to the X API.
104
113
  test_files: []
data/bin/console DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "x"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- require "irb"
10
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install