birdsong 0.2.5 → 0.2.7

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: ebf200672c8ac8965aa8e61af1346f32724a1b5244cebda6dff9e74efbdaea50
4
- data.tar.gz: b73a8da99d9fdf61ccb62e2ddd474e2267ca4e5057a29f642d36d8a9e4f8837c
3
+ metadata.gz: 1808eed99ef9e1885a1935f212651f7da9d5a60dcf2d74d5988eca88fd962122
4
+ data.tar.gz: c7fc73864f0f71cbd4dfd7f038e02bdbfa11ff1091d8d1f2fd13f07ad71abefd
5
5
  SHA512:
6
- metadata.gz: 686cf3df6f5dfac9fbe71de0c599b5581057ef8f5e63c93dfda4c6ab58e5b775a475dda944b41f2d0fee2a97acb1e478b301969c9af3ee4c9540636bee86f851
7
- data.tar.gz: 556899f220a43bd05e3fed8b214c77312d48f33cc4d029c8d21c9a919cf2d21f046821d9b883014fa1f966353b926bb2f9510a0dc55f850c9f293fb42c0e0a45
6
+ metadata.gz: 97a72857edf2f49da68729ac86f4cc1aa992e76d0f58bcaafc1b7595e9becb5859dcb17819929920833e477586c58cdc957a8c480a8036862f5df5e9fa7c57da
7
+ data.tar.gz: 874c0218358e28d827a67da10a0ef0dad45623deb0897c5dbf7939266fb2eaa23d40146d624acbb6a68cbd9bc02f36890be96bfe18affaa810e49bc919d3ff52
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.4
1
+ 3.0.5
data/Gemfile.lock CHANGED
@@ -1,8 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- birdsong (0.1.0)
4
+ birdsong (0.2.5)
5
+ capybara (~> 3.40)
6
+ curb (~> 1.0, >= 1.0.5)
5
7
  oauth (~> 0.5.6)
8
+ oj (~> 3.16, >= 3.16.3)
9
+ selenium-devtools
10
+ selenium-webdriver (~> 4.21, >= 4.21.1)
6
11
  typhoeus (~> 1.4.0)
7
12
 
8
13
  GEM
@@ -26,22 +31,38 @@ GEM
26
31
  i18n (>= 1.6, < 2)
27
32
  minitest (>= 5.1)
28
33
  tzinfo (~> 2.0)
34
+ addressable (2.8.6)
35
+ public_suffix (>= 2.0.2, < 6.0)
29
36
  ast (2.4.2)
37
+ base64 (0.2.0)
38
+ bigdecimal (3.1.7)
30
39
  builder (3.2.4)
31
40
  byebug (11.1.3)
41
+ capybara (3.40.0)
42
+ addressable
43
+ matrix
44
+ mini_mime (>= 0.1.3)
45
+ nokogiri (~> 1.11)
46
+ rack (>= 1.6.0)
47
+ rack-test (>= 0.6.3)
48
+ regexp_parser (>= 1.5, < 3.0)
49
+ xpath (~> 3.2)
32
50
  concurrent-ruby (1.1.9)
33
51
  crass (1.0.6)
52
+ curb (1.0.5)
34
53
  dotenv (2.7.6)
35
54
  erubi (1.10.0)
36
- ethon (0.15.0)
55
+ ethon (0.16.0)
37
56
  ffi (>= 1.15.0)
38
- ffi (1.15.5)
57
+ ffi (1.16.3)
39
58
  i18n (1.9.1)
40
59
  concurrent-ruby (~> 1.0)
41
60
  loofah (2.13.0)
42
61
  crass (~> 1.0.2)
43
62
  nokogiri (>= 1.5.9)
63
+ matrix (0.4.2)
44
64
  method_source (1.0.0)
65
+ mini_mime (1.1.5)
45
66
  minitest (5.15.0)
46
67
  nokogiri (1.13.1-arm64-darwin)
47
68
  racc (~> 1.4)
@@ -49,10 +70,13 @@ GEM
49
70
  racc (~> 1.4)
50
71
  nokogiri (1.13.1-x86_64-linux)
51
72
  racc (~> 1.4)
52
- oauth (0.5.8)
73
+ oauth (0.5.14)
74
+ oj (3.16.3)
75
+ bigdecimal (>= 3.0)
53
76
  parallel (1.21.0)
54
77
  parser (3.1.0.0)
55
78
  ast (~> 2.4.1)
79
+ public_suffix (5.0.5)
56
80
  racc (1.6.0)
57
81
  rack (2.2.3)
58
82
  rack-test (1.1.0)
@@ -104,17 +128,29 @@ GEM
104
128
  rubocop-performance (~> 1.11)
105
129
  rubocop-rails (~> 2.0)
106
130
  ruby-progressbar (1.11.0)
131
+ rubyzip (2.3.2)
132
+ selenium-devtools (0.125.0)
133
+ selenium-webdriver (~> 4.2)
134
+ selenium-webdriver (4.21.1)
135
+ base64 (~> 0.2)
136
+ rexml (~> 3.2, >= 3.2.5)
137
+ rubyzip (>= 1.2.2, < 3.0)
138
+ websocket (~> 1.0)
107
139
  thor (1.2.1)
108
- typhoeus (1.4.0)
140
+ typhoeus (1.4.1)
109
141
  ethon (>= 0.9.0)
110
142
  tzinfo (2.0.4)
111
143
  concurrent-ruby (~> 1.0)
112
144
  unicode-display_width (2.1.0)
145
+ websocket (1.2.10)
146
+ xpath (3.2.0)
147
+ nokogiri (~> 1.8)
113
148
  zeitwerk (2.5.4)
114
149
 
115
150
  PLATFORMS
116
151
  arm64-darwin-21
117
152
  arm64-darwin-22
153
+ arm64-darwin-23
118
154
  x86_64-darwin-20
119
155
  x86_64-linux
120
156
 
@@ -130,4 +166,4 @@ DEPENDENCIES
130
166
  rubocop-rails_config
131
167
 
132
168
  BUNDLED WITH
133
- 2.3.3
169
+ 2.3.26
data/birdsong.gemspec CHANGED
@@ -32,6 +32,11 @@ Gem::Specification.new do |spec|
32
32
  # Prod dependencies
33
33
  spec.add_dependency "typhoeus", "~> 1.4.0"
34
34
  spec.add_dependency "oauth", "~> 0.5.6"
35
+ spec.add_dependency "oj", "~> 3.16", ">= 3.16.3"
36
+ spec.add_dependency "capybara", "~> 3.40"
37
+ spec.add_dependency "selenium-webdriver", "~> 4.21", ">= 4.21.1"
38
+ spec.add_dependency "curb", "~> 1.0", ">= 1.0.5"
39
+ spec.add_dependency "selenium-devtools"
35
40
 
36
41
  # Dev dependencies
37
42
  spec.add_development_dependency "byebug"
@@ -41,7 +41,7 @@ module SeleniumMonkeypatch
41
41
  data[:sessionId] = @session_id if @session_id
42
42
  message = @ws.send_cmd(**data)
43
43
  if message.nil? == false && message["error"] && (method != "Fetch.continueRequest")
44
- raise Birdsong::WebDriverError, error_message(message["error"])
44
+ raise Selenium::WebDriver::Error::WebDriverError, error_message(message["error"])
45
45
  end
46
46
 
47
47
  message
@@ -7,7 +7,7 @@ require "selenium-webdriver"
7
7
  require "logger"
8
8
  require "securerandom"
9
9
  require "selenium/webdriver/remote/http/curb"
10
- require "debug"
10
+ # require "debug"
11
11
 
12
12
  # 2022-06-07 14:15:23 WARN Selenium [DEPRECATION] [:browser_options] :options as a parameter for driver initialization is deprecated. Use :capabilities with an Array of value capabilities/options if necessary instead.
13
13
 
@@ -148,11 +148,11 @@ module Birdsong
148
148
  # page.quit
149
149
 
150
150
  # # Check if we're on a Instagram page already, if not visit it.
151
- # unless page.driver.browser.current_url.include? "twitter.com"
151
+ # unless page.driver.browser.current_url.include? "twitter.com" || page.driver.browser.current_url.include? "x.com"
152
152
  # # There seems to be a bug in the Linux ARM64 version of chromedriver where this will properly
153
153
  # # navigate but then timeout, crashing it all up. So instead we check and raise the error when
154
154
  # # that then fails again.
155
- # page.driver.browser.navigate.to("https://twitter.com")
155
+ # page.driver.browser.navigate.to("https://x.com")
156
156
  # end
157
157
 
158
158
  # # We don't have to login if we already are
@@ -14,12 +14,12 @@ module Birdsong
14
14
  # - Number of likes *
15
15
  # - Hashtags
16
16
 
17
- Capybara.app_host = "https://twitter.com"
17
+ Capybara.app_host = "https://x.com"
18
18
 
19
19
  # video slideshows https://www.instagram.com/p/CY7KxwYOFBS/?utm_source=ig_embed&utm_campaign=loading
20
20
  # login
21
21
  graphql_object = get_content_of_subpage_from_url(
22
- "https://twitter.com/jack/status/#{id}",
22
+ "https://x.com/jack/status/#{id}",
23
23
  "/graphql",
24
24
  "data,tweetResult,result"
25
25
  )
data/lib/birdsong/user.rb CHANGED
@@ -39,7 +39,7 @@ module Birdsong
39
39
 
40
40
  @description = user_object[:description]
41
41
  @url = user_object[:url]
42
- @url = "https://www.twitter.com/#{@username}" if @url.nil?
42
+ @url = "https://www.x.com/#{@username}" if @url.nil?
43
43
 
44
44
  @followers_count = user_object[:followers_count]
45
45
  @following_count = user_object[:following_count]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Birdsong
4
- VERSION = "0.2.5"
4
+ VERSION = "0.2.7"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birdsong
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Guess
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-15 00:00:00.000000000 Z
11
+ date: 2024-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -38,6 +38,94 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.5.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: oj
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.16'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.16.3
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '3.16'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.16.3
61
+ - !ruby/object:Gem::Dependency
62
+ name: capybara
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.40'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.40'
75
+ - !ruby/object:Gem::Dependency
76
+ name: selenium-webdriver
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '4.21'
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 4.21.1
85
+ type: :runtime
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '4.21'
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 4.21.1
95
+ - !ruby/object:Gem::Dependency
96
+ name: curb
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '1.0'
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 1.0.5
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '1.0'
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 1.0.5
115
+ - !ruby/object:Gem::Dependency
116
+ name: selenium-devtools
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :runtime
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
41
129
  - !ruby/object:Gem::Dependency
42
130
  name: byebug
43
131
  requirement: !ruby/object:Gem::Requirement
@@ -200,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
288
  - !ruby/object:Gem::Version
201
289
  version: '0'
202
290
  requirements: []
203
- rubygems_version: 3.4.20
291
+ rubygems_version: 3.2.33
204
292
  signing_key:
205
293
  specification_version: 4
206
294
  summary: A gem to interface with Twitter's API V2