twitter 7.0.0 → 8.0.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -4
- data/README.md +4 -6
- data/lib/twitter/base.rb +11 -11
- data/lib/twitter/basic_user.rb +3 -2
- data/lib/twitter/client.rb +3 -3
- data/lib/twitter/creatable.rb +2 -2
- data/lib/twitter/cursor.rb +3 -3
- data/lib/twitter/direct_message.rb +4 -5
- data/lib/twitter/direct_message_event.rb +3 -3
- data/lib/twitter/direct_messages/welcome_message.rb +3 -3
- data/lib/twitter/direct_messages/welcome_message_rule.rb +2 -2
- data/lib/twitter/direct_messages/welcome_message_rule_wrapper.rb +3 -3
- data/lib/twitter/direct_messages/welcome_message_wrapper.rb +3 -3
- data/lib/twitter/entities.rb +6 -6
- data/lib/twitter/entity/hashtag.rb +1 -1
- data/lib/twitter/entity/symbol.rb +1 -1
- data/lib/twitter/entity/uri.rb +1 -1
- data/lib/twitter/entity/user_mention.rb +1 -1
- data/lib/twitter/entity.rb +1 -1
- data/lib/twitter/enumerable.rb +1 -3
- data/lib/twitter/error.rb +7 -6
- data/lib/twitter/factory.rb +1 -1
- data/lib/twitter/geo/point.rb +1 -1
- data/lib/twitter/geo/polygon.rb +1 -1
- data/lib/twitter/geo.rb +2 -2
- data/lib/twitter/geo_factory.rb +3 -3
- data/lib/twitter/geo_results.rb +2 -2
- data/lib/twitter/headers.rb +4 -4
- data/lib/twitter/identity.rb +2 -2
- data/lib/twitter/language.rb +1 -1
- data/lib/twitter/list.rb +3 -2
- data/lib/twitter/media/animated_gif.rb +1 -1
- data/lib/twitter/media/photo.rb +2 -2
- data/lib/twitter/media/video.rb +3 -3
- data/lib/twitter/media/video_info.rb +2 -2
- data/lib/twitter/media_factory.rb +4 -4
- data/lib/twitter/metadata.rb +1 -1
- data/lib/twitter/null_object.rb +4 -4
- data/lib/twitter/oembed.rb +2 -1
- data/lib/twitter/place.rb +3 -3
- data/lib/twitter/premium_search_results.rb +5 -5
- data/lib/twitter/profile.rb +8 -8
- data/lib/twitter/profile_banner.rb +2 -2
- data/lib/twitter/rate_limit.rb +4 -4
- data/lib/twitter/relationship.rb +2 -1
- data/lib/twitter/rest/account_activity.rb +3 -3
- data/lib/twitter/rest/api.rb +19 -19
- data/lib/twitter/rest/client.rb +4 -4
- data/lib/twitter/rest/direct_messages/welcome_messages.rb +13 -13
- data/lib/twitter/rest/direct_messages.rb +17 -17
- data/lib/twitter/rest/favorites.rb +15 -19
- data/lib/twitter/rest/form_encoder.rb +27 -0
- data/lib/twitter/rest/friends_and_followers.rb +21 -21
- data/lib/twitter/rest/help.rb +6 -18
- data/lib/twitter/rest/lists.rb +32 -32
- data/lib/twitter/rest/oauth.rb +8 -8
- data/lib/twitter/rest/places_and_geo.rb +6 -6
- data/lib/twitter/rest/premium_search.rb +3 -3
- data/lib/twitter/rest/request.rb +28 -21
- data/lib/twitter/rest/saved_searches.rb +6 -6
- data/lib/twitter/rest/search.rb +3 -3
- data/lib/twitter/rest/spam_reporting.rb +3 -3
- data/lib/twitter/rest/suggested_users.rb +5 -5
- data/lib/twitter/rest/timelines.rb +7 -7
- data/lib/twitter/rest/trends.rb +7 -7
- data/lib/twitter/rest/tweets.rb +19 -23
- data/lib/twitter/rest/undocumented.rb +7 -7
- data/lib/twitter/rest/upload_utils.rb +13 -13
- data/lib/twitter/rest/users.rb +32 -32
- data/lib/twitter/rest/utils.rb +17 -17
- data/lib/twitter/saved_search.rb +2 -2
- data/lib/twitter/search_results.rb +6 -6
- data/lib/twitter/settings.rb +2 -1
- data/lib/twitter/size.rb +2 -2
- data/lib/twitter/source_user.rb +1 -1
- data/lib/twitter/streaming/client.rb +14 -14
- data/lib/twitter/streaming/connection.rb +4 -5
- data/lib/twitter/streaming/message_parser.rb +6 -6
- data/lib/twitter/streaming/response.rb +11 -10
- data/lib/twitter/suggestion.rb +3 -3
- data/lib/twitter/target_user.rb +1 -1
- data/lib/twitter/trend.rb +3 -2
- data/lib/twitter/trend_results.rb +5 -5
- data/lib/twitter/tweet.rb +3 -3
- data/lib/twitter/user.rb +9 -9
- data/lib/twitter/utils.rb +2 -2
- data/lib/twitter/variant.rb +2 -1
- data/lib/twitter/version.rb +3 -3
- data/lib/twitter.rb +36 -36
- data/twitter.gemspec +19 -18
- metadata +23 -22
- data/lib/twitter/configuration.rb +0 -27
@@ -1,6 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require 'resolv'
|
1
|
+
require "openssl"
|
2
|
+
require "resolv"
|
4
3
|
|
5
4
|
module Twitter
|
6
5
|
module Streaming
|
@@ -10,7 +9,7 @@ module Twitter
|
|
10
9
|
def initialize(options = {})
|
11
10
|
@tcp_socket_class = options.fetch(:tcp_socket_class) { TCPSocket }
|
12
11
|
@ssl_socket_class = options.fetch(:ssl_socket_class) { OpenSSL::SSL::SSLSocket }
|
13
|
-
@using_ssl = options.fetch(:using_ssl
|
12
|
+
@using_ssl = options.fetch(:using_ssl, false)
|
14
13
|
@write_pipe = nil
|
15
14
|
end
|
16
15
|
|
@@ -40,7 +39,7 @@ module Twitter
|
|
40
39
|
end
|
41
40
|
|
42
41
|
def close
|
43
|
-
@write_pipe&.write(
|
42
|
+
@write_pipe&.write("q")
|
44
43
|
end
|
45
44
|
|
46
45
|
private
|
@@ -1,9 +1,9 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
1
|
+
require "twitter/direct_message"
|
2
|
+
require "twitter/streaming/deleted_tweet"
|
3
|
+
require "twitter/streaming/event"
|
4
|
+
require "twitter/streaming/friend_list"
|
5
|
+
require "twitter/streaming/stall_warning"
|
6
|
+
require "twitter/tweet"
|
7
7
|
|
8
8
|
module Twitter
|
9
9
|
module Streaming
|
@@ -1,7 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
1
|
+
require "buftok"
|
2
|
+
require "http"
|
3
|
+
require "json"
|
4
|
+
require "twitter/error"
|
5
|
+
require "llhttp"
|
5
6
|
|
6
7
|
module Twitter
|
7
8
|
module Streaming
|
@@ -11,7 +12,7 @@ module Twitter
|
|
11
12
|
# @return [Twitter::Streaming::Response]
|
12
13
|
def initialize(&block)
|
13
14
|
@block = block
|
14
|
-
@parser =
|
15
|
+
@parser = LLHttp::Parser.new(self, type: :response)
|
15
16
|
@tokenizer = BufferedTokenizer.new("\r\n")
|
16
17
|
end
|
17
18
|
|
@@ -19,11 +20,6 @@ module Twitter
|
|
19
20
|
@parser << data
|
20
21
|
end
|
21
22
|
|
22
|
-
def on_headers_complete(_headers)
|
23
|
-
error = Twitter::Error::ERRORS[@parser.status_code]
|
24
|
-
raise error if error
|
25
|
-
end
|
26
|
-
|
27
23
|
def on_body(data)
|
28
24
|
@tokenizer.extract(data).each do |line|
|
29
25
|
next if line.empty?
|
@@ -31,6 +27,11 @@ module Twitter
|
|
31
27
|
@block.call(JSON.parse(line, symbolize_names: true))
|
32
28
|
end
|
33
29
|
end
|
30
|
+
|
31
|
+
def on_status(_status)
|
32
|
+
error = Twitter::Error::ERRORS[@parser.status_code]
|
33
|
+
raise error if error
|
34
|
+
end
|
34
35
|
end
|
35
36
|
end
|
36
37
|
end
|
data/lib/twitter/suggestion.rb
CHANGED
data/lib/twitter/target_user.rb
CHANGED
data/lib/twitter/trend.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "equalizer"
|
2
|
+
require "twitter/base"
|
3
3
|
|
4
4
|
module Twitter
|
5
5
|
class Trend < Twitter::Base
|
6
6
|
include Equalizer.new(:name)
|
7
7
|
# @return [String]
|
8
8
|
attr_reader :events, :name, :query, :tweet_volume
|
9
|
+
|
9
10
|
predicate_attr_reader :promoted_content
|
10
11
|
uri_attr_reader :uri
|
11
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require "memoizable"
|
2
|
+
require "twitter/creatable"
|
3
|
+
require "twitter/enumerable"
|
4
|
+
require "twitter/null_object"
|
5
|
+
require "twitter/utils"
|
6
6
|
|
7
7
|
module Twitter
|
8
8
|
class TrendResults
|
data/lib/twitter/tweet.rb
CHANGED
data/lib/twitter/user.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
1
|
+
require "addressable/uri"
|
2
|
+
require "twitter/basic_user"
|
3
|
+
require "twitter/creatable"
|
4
|
+
require "twitter/entity/uri"
|
5
|
+
require "twitter/profile"
|
6
6
|
|
7
7
|
module Twitter
|
8
8
|
class User < Twitter::BasicUser
|
@@ -41,10 +41,10 @@ module Twitter
|
|
41
41
|
# @param key1 [Symbol]
|
42
42
|
# @param key2 [Symbol]
|
43
43
|
def define_entity_uris_methods(key1, key2)
|
44
|
-
array = key1.to_s.split(
|
45
|
-
index = array.index(
|
46
|
-
array[index] =
|
47
|
-
url_key = array.join(
|
44
|
+
array = key1.to_s.split("_")
|
45
|
+
index = array.index("uris")
|
46
|
+
array[index] = "urls"
|
47
|
+
url_key = array.join("_").to_sym
|
48
48
|
define_entity_uris_method(key1, key2)
|
49
49
|
alias_method(url_key, key1)
|
50
50
|
define_entity_uris_predicate_method(key1)
|
data/lib/twitter/utils.rb
CHANGED
@@ -18,11 +18,11 @@ module Twitter
|
|
18
18
|
#
|
19
19
|
# @param enumerable [Enumerable]
|
20
20
|
# @return [Array, Enumerator]
|
21
|
-
def pmap(enumerable)
|
21
|
+
def pmap(enumerable, &block)
|
22
22
|
return to_enum(:pmap, enumerable) unless block_given?
|
23
23
|
|
24
24
|
if enumerable.count == 1
|
25
|
-
enumerable.collect
|
25
|
+
enumerable.collect(&block)
|
26
26
|
else
|
27
27
|
enumerable.collect { |object| Thread.new { yield(object) } }.collect(&:value)
|
28
28
|
end
|
data/lib/twitter/variant.rb
CHANGED
data/lib/twitter/version.rb
CHANGED
@@ -4,7 +4,7 @@ module Twitter
|
|
4
4
|
|
5
5
|
# @return [Integer]
|
6
6
|
def major
|
7
|
-
|
7
|
+
8
|
8
8
|
end
|
9
9
|
|
10
10
|
# @return [Integer]
|
@@ -19,7 +19,7 @@ module Twitter
|
|
19
19
|
|
20
20
|
# @return [Integer, NilClass]
|
21
21
|
def pre
|
22
|
-
|
22
|
+
"rc.1"
|
23
23
|
end
|
24
24
|
|
25
25
|
# @return [Hash]
|
@@ -39,7 +39,7 @@ module Twitter
|
|
39
39
|
|
40
40
|
# @return [String]
|
41
41
|
def to_s
|
42
|
-
to_a.join(
|
42
|
+
to_a.join(".")
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
data/lib/twitter.rb
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
13
|
-
require
|
14
|
-
require
|
15
|
-
require
|
16
|
-
require
|
17
|
-
require
|
18
|
-
require
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
require
|
25
|
-
require
|
26
|
-
require
|
27
|
-
require
|
28
|
-
require
|
29
|
-
require
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
33
|
-
require
|
34
|
-
require
|
35
|
-
require
|
36
|
-
require
|
1
|
+
require "addressable/uri"
|
2
|
+
require "twitter/base"
|
3
|
+
require "twitter/cursor"
|
4
|
+
require "twitter/direct_message"
|
5
|
+
require "twitter/entity"
|
6
|
+
require "twitter/entity/hashtag"
|
7
|
+
require "twitter/entity/symbol"
|
8
|
+
require "twitter/entity/uri"
|
9
|
+
require "twitter/entity/user_mention"
|
10
|
+
require "twitter/geo_factory"
|
11
|
+
require "twitter/language"
|
12
|
+
require "twitter/list"
|
13
|
+
require "twitter/media_factory"
|
14
|
+
require "twitter/metadata"
|
15
|
+
require "twitter/oembed"
|
16
|
+
require "twitter/place"
|
17
|
+
require "twitter/profile_banner"
|
18
|
+
require "twitter/rate_limit"
|
19
|
+
require "twitter/relationship"
|
20
|
+
require "twitter/rest/client"
|
21
|
+
require "twitter/saved_search"
|
22
|
+
require "twitter/search_results"
|
23
|
+
require "twitter/premium_search_results"
|
24
|
+
require "twitter/settings"
|
25
|
+
require "twitter/size"
|
26
|
+
require "twitter/source_user"
|
27
|
+
require "twitter/streaming/client"
|
28
|
+
require "twitter/suggestion"
|
29
|
+
require "twitter/target_user"
|
30
|
+
require "twitter/trend"
|
31
|
+
require "twitter/tweet"
|
32
|
+
require "twitter/user"
|
33
|
+
require "twitter/direct_messages/welcome_message"
|
34
|
+
require "twitter/direct_messages/welcome_message_rule"
|
35
|
+
require "twitter/direct_messages/welcome_message_rule_wrapper"
|
36
|
+
require "twitter/direct_messages/welcome_message_wrapper"
|
data/twitter.gemspec
CHANGED
@@ -1,27 +1,28 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
3
|
+
require "twitter/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.add_dependency
|
7
|
-
spec.add_dependency
|
8
|
-
spec.add_dependency
|
9
|
-
spec.add_dependency
|
10
|
-
spec.add_dependency
|
11
|
-
spec.add_dependency
|
12
|
-
spec.add_dependency
|
13
|
-
spec.add_dependency
|
14
|
-
spec.add_dependency
|
15
|
-
spec.add_dependency
|
16
|
-
spec.authors = [
|
17
|
-
spec.description =
|
6
|
+
spec.add_dependency "addressable", "~> 2.3"
|
7
|
+
spec.add_dependency "buftok", "~> 0.3.0"
|
8
|
+
spec.add_dependency "equalizer", "~> 0.0.11"
|
9
|
+
spec.add_dependency "http", "~> 5.1"
|
10
|
+
spec.add_dependency "http-form_data", "~> 2.3"
|
11
|
+
spec.add_dependency "llhttp-ffi", "~> 0.4.0"
|
12
|
+
spec.add_dependency "memoizable", "~> 0.4.0"
|
13
|
+
spec.add_dependency "multipart-post", "~> 2.0"
|
14
|
+
spec.add_dependency "naught", "~> 1.0"
|
15
|
+
spec.add_dependency "simple_oauth", "~> 0.3.0"
|
16
|
+
spec.authors = ["Erik Berlin", "John Nunemaker", "Wynn Netherland", "Steve Richert", "Steve Agalloco"]
|
17
|
+
spec.description = "A Ruby interface to the Twitter API."
|
18
18
|
spec.email = %w[sferik@gmail.com]
|
19
|
-
spec.files = %w[.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md twitter.gemspec] + Dir[
|
20
|
-
spec.homepage =
|
19
|
+
spec.files = %w[.yardopts CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md twitter.gemspec] + Dir["lib/**/*.rb"]
|
20
|
+
spec.homepage = "https://sferik.github.io/twitter/"
|
21
21
|
spec.licenses = %w[MIT]
|
22
|
-
spec.
|
22
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
23
|
+
spec.name = "twitter"
|
23
24
|
spec.require_paths = %w[lib]
|
24
|
-
spec.required_ruby_version =
|
25
|
+
spec.required_ruby_version = ">= 3.0"
|
25
26
|
spec.summary = spec.description
|
26
27
|
spec.version = Twitter::Version
|
27
28
|
end
|
metadata
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Erik
|
7
|
+
- Erik Berlin
|
8
8
|
- John Nunemaker
|
9
9
|
- Wynn Netherland
|
10
10
|
- Steve Richert
|
11
11
|
- Steve Agalloco
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: addressable
|
@@ -34,14 +34,14 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - "~>"
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: 0.
|
37
|
+
version: 0.3.0
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
42
|
- - "~>"
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.
|
44
|
+
version: 0.3.0
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: equalizer
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,42 +62,42 @@ dependencies:
|
|
62
62
|
requirements:
|
63
63
|
- - "~>"
|
64
64
|
- !ruby/object:Gem::Version
|
65
|
-
version: '
|
65
|
+
version: '5.1'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
70
|
- - "~>"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '5.1'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: http-form_data
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '2.
|
79
|
+
version: '2.3'
|
80
80
|
type: :runtime
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '2.
|
86
|
+
version: '2.3'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
|
-
name:
|
88
|
+
name: llhttp-ffi
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
91
|
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.
|
93
|
+
version: 0.4.0
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - "~>"
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0.
|
100
|
+
version: 0.4.0
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: memoizable
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +171,6 @@ files:
|
|
171
171
|
- lib/twitter/base.rb
|
172
172
|
- lib/twitter/basic_user.rb
|
173
173
|
- lib/twitter/client.rb
|
174
|
-
- lib/twitter/configuration.rb
|
175
174
|
- lib/twitter/creatable.rb
|
176
175
|
- lib/twitter/cursor.rb
|
177
176
|
- lib/twitter/direct_message.rb
|
@@ -218,6 +217,7 @@ files:
|
|
218
217
|
- lib/twitter/rest/direct_messages.rb
|
219
218
|
- lib/twitter/rest/direct_messages/welcome_messages.rb
|
220
219
|
- lib/twitter/rest/favorites.rb
|
220
|
+
- lib/twitter/rest/form_encoder.rb
|
221
221
|
- lib/twitter/rest/friends_and_followers.rb
|
222
222
|
- lib/twitter/rest/help.rb
|
223
223
|
- lib/twitter/rest/lists.rb
|
@@ -259,11 +259,12 @@ files:
|
|
259
259
|
- lib/twitter/variant.rb
|
260
260
|
- lib/twitter/version.rb
|
261
261
|
- twitter.gemspec
|
262
|
-
homepage:
|
262
|
+
homepage: https://sferik.github.io/twitter/
|
263
263
|
licenses:
|
264
264
|
- MIT
|
265
|
-
metadata:
|
266
|
-
|
265
|
+
metadata:
|
266
|
+
rubygems_mfa_required: 'true'
|
267
|
+
post_install_message:
|
267
268
|
rdoc_options: []
|
268
269
|
require_paths:
|
269
270
|
- lib
|
@@ -271,15 +272,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
271
272
|
requirements:
|
272
273
|
- - ">="
|
273
274
|
- !ruby/object:Gem::Version
|
274
|
-
version: '
|
275
|
+
version: '3.0'
|
275
276
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
277
|
requirements:
|
277
|
-
- - "
|
278
|
+
- - ">"
|
278
279
|
- !ruby/object:Gem::Version
|
279
|
-
version:
|
280
|
+
version: 1.3.1
|
280
281
|
requirements: []
|
281
|
-
rubygems_version: 3.
|
282
|
-
signing_key:
|
282
|
+
rubygems_version: 3.2.33
|
283
|
+
signing_key:
|
283
284
|
specification_version: 4
|
284
285
|
summary: A Ruby interface to the Twitter API.
|
285
286
|
test_files: []
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'memoizable'
|
2
|
-
require 'twitter/base'
|
3
|
-
|
4
|
-
module Twitter
|
5
|
-
class Configuration < Twitter::Base
|
6
|
-
include Memoizable
|
7
|
-
|
8
|
-
# @return [Array<String>]
|
9
|
-
attr_reader :non_username_paths
|
10
|
-
# @return [Integer]
|
11
|
-
attr_reader :characters_reserved_per_media, :dm_text_character_limit,
|
12
|
-
:max_media_per_upload, :photo_size_limit, :short_url_length,
|
13
|
-
:short_url_length_https
|
14
|
-
alias short_uri_length short_url_length
|
15
|
-
alias short_uri_length_https short_url_length_https
|
16
|
-
|
17
|
-
# Returns an array of photo sizes
|
18
|
-
#
|
19
|
-
# @return [Array<Twitter::Size>]
|
20
|
-
def photo_sizes
|
21
|
-
@attrs.fetch(:photo_sizes, []).each_with_object({}) do |(key, value), object|
|
22
|
-
object[key] = Size.new(value)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
memoize :photo_sizes
|
26
|
-
end
|
27
|
-
end
|