spidy 0.3.12 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76cb60ea985d1a663f24b7b024198d222756376bd9dd979a032c46ba39b16548
4
- data.tar.gz: ff2e7f056f7ad5afe06df90adf0bb2e438c696472cde50c8d5758b2f9801684e
3
+ metadata.gz: b6a7d70df09642e17d34cc85e1973914b8b7e151c34670526cb4d6b2d3589227
4
+ data.tar.gz: 012b7def5510c16d68676bada533d452315244fc5d47d7f26a9bd71068a3f9a3
5
5
  SHA512:
6
- metadata.gz: a721848978135752ddcfe3da30a293317a4852b41dc99209019ae71960538fe448ec4ad54da661e0b99edef3fcb85a84b095b99ddbbba9b628fdd4ac1be2f23c
7
- data.tar.gz: a156f47f317cd4f1f0a66a13ac5102073723f139c5b797c8dc56d7dbdd41e342cb1ad1a6814812563033c68f448c4d57775c0edf300456dd164b90211632737e
6
+ metadata.gz: 8b6682cd3d1499b115cdfba3964cab62ae65f3a7943fb87f53d8613c2a6553b4f2a4a0728f2af07990dc90ae03c07df4d33914739ab4df462a37c2b04f5efdc5
7
+ data.tar.gz: a2680dd41fb1a6dead95ecd20742560d749f5c3f27367baac7d3f1294d4c6ee7de946cb173e1f2750169e6a341915197e375d1e56ca0faf7c5be4491f5a55ae9
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.2
1
+ 3.4.2
data/CLAUDE.md ADDED
@@ -0,0 +1,28 @@
1
+ # Claude Helper for Spidy
2
+
3
+ ## Build/Test/Lint Commands
4
+ - Install dependencies: `bundle install`
5
+ - Run all tests: `bundle exec rake spec`
6
+ - Run single test: `bundle exec rspec spec/path/to_spec.rb:LINE_NUMBER`
7
+ - Install gem locally: `bundle exec rake install`
8
+ - Release gem: `bundle exec rake release`
9
+
10
+ ## Code Style Guidelines
11
+ - **Naming Conventions**:
12
+ - snake_case for methods/variables/files
13
+ - CamelCase for classes/modules
14
+ - SCREAMING_SNAKE_CASE for constants
15
+ - **File Organization**: Match file paths to module/class hierarchy
16
+ - **Imports**:
17
+ - Add `# frozen_string_literal: true` at file start
18
+ - Use `extend ActiveSupport::Autoload` for modules with sub-modules
19
+ - **Error Handling**: Create custom error classes inheriting from StandardError
20
+ - **Documentation**: Add brief comments before classes and methods
21
+ - **Testing**:
22
+ - Use RSpec with `expect` syntax
23
+ - Organize with `describe` and `specify` blocks
24
+ - Name test files with `_spec.rb` suffix
25
+
26
+ ## Dependencies
27
+ - Runtime: activesupport, mechanize, socksify, tor
28
+ - Development: bundler, capybara_discoball, ffaker, rake, rspec, sinatra
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in crawler.gemspec
6
6
  gemspec
7
+
8
+ gem 'webrick'
9
+ gem 'rackup'
10
+ gem 'irb'
data/Gemfile.lock CHANGED
@@ -1,136 +1,193 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spidy (0.3.10)
5
- activesupport
4
+ spidy (0.3.12)
5
+ activesupport (~> 7.1)
6
6
  mechanize
7
- pry
8
7
  socksify
9
8
  tor
10
9
 
11
10
  GEM
12
11
  remote: https://rubygems.org/
13
12
  specs:
14
- activesupport (7.0.0)
15
- concurrent-ruby (~> 1.0, >= 1.0.2)
13
+ activesupport (7.2.2.1)
14
+ base64
15
+ benchmark (>= 0.3)
16
+ bigdecimal
17
+ concurrent-ruby (~> 1.0, >= 1.3.1)
18
+ connection_pool (>= 2.2.5)
19
+ drb
16
20
  i18n (>= 1.6, < 2)
21
+ logger (>= 1.4.2)
17
22
  minitest (>= 5.1)
18
- tzinfo (~> 2.0)
19
- addressable (2.8.0)
20
- public_suffix (>= 2.0.2, < 5.0)
21
- capybara (3.36.0)
23
+ securerandom (>= 0.3)
24
+ tzinfo (~> 2.0, >= 2.0.5)
25
+ addressable (2.8.7)
26
+ public_suffix (>= 2.0.2, < 7.0)
27
+ base64 (0.2.0)
28
+ benchmark (0.4.0)
29
+ bigdecimal (3.1.9)
30
+ capybara (3.40.0)
22
31
  addressable
23
32
  matrix
24
33
  mini_mime (>= 0.1.3)
25
- nokogiri (~> 1.8)
34
+ nokogiri (~> 1.11)
26
35
  rack (>= 1.6.0)
27
36
  rack-test (>= 0.6.3)
28
37
  regexp_parser (>= 1.5, < 3.0)
29
38
  xpath (~> 3.2)
30
39
  capybara_discoball (0.1.0)
31
40
  capybara (>= 2.7, < 4)
32
- coderay (1.1.3)
33
- concurrent-ruby (1.1.9)
34
- connection_pool (2.2.5)
35
- diff-lcs (1.5.0)
36
- domain_name (0.5.20190701)
37
- unf (>= 0.0.5, < 1.0.0)
38
- ffaker (2.20.0)
39
- http-cookie (1.0.4)
41
+ concurrent-ruby (1.3.5)
42
+ connection_pool (2.5.0)
43
+ date (3.4.1)
44
+ diff-lcs (1.6.0)
45
+ domain_name (0.6.20240107)
46
+ drb (2.2.1)
47
+ ffaker (2.24.0)
48
+ http-cookie (1.0.8)
40
49
  domain_name (~> 0.5)
41
- i18n (1.8.11)
50
+ i18n (1.14.7)
42
51
  concurrent-ruby (~> 1.0)
52
+ io-console (0.8.0)
53
+ irb (1.15.1)
54
+ pp (>= 0.6.0)
55
+ rdoc (>= 4.0.0)
56
+ reline (>= 0.4.2)
57
+ logger (1.6.6)
43
58
  matrix (0.4.2)
44
- mechanize (2.8.3)
59
+ mechanize (2.14.0)
45
60
  addressable (~> 2.8)
61
+ base64
46
62
  domain_name (~> 0.5, >= 0.5.20190701)
47
63
  http-cookie (~> 1.0, >= 1.0.3)
48
- mime-types (~> 3.0)
64
+ mime-types (~> 3.3)
49
65
  net-http-digest_auth (~> 1.4, >= 1.4.1)
50
66
  net-http-persistent (>= 2.5.2, < 5.0.dev)
67
+ nkf
51
68
  nokogiri (~> 1.11, >= 1.11.2)
52
69
  rubyntlm (~> 0.6, >= 0.6.3)
53
70
  webrick (~> 1.7)
54
71
  webrobots (~> 0.1.2)
55
- method_source (1.0.0)
56
- mime-types (3.4.1)
72
+ mime-types (3.6.1)
73
+ logger
57
74
  mime-types-data (~> 3.2015)
58
- mime-types-data (3.2021.1115)
59
- mini_mime (1.1.2)
60
- minitest (5.15.0)
75
+ mime-types-data (3.2025.0318)
76
+ mini_mime (1.1.5)
77
+ minitest (5.25.5)
61
78
  mixlib-shellout (2.4.4)
62
- mustermann (1.1.1)
79
+ mustermann (3.0.3)
63
80
  ruby2_keywords (~> 0.0.1)
64
81
  net-http-digest_auth (1.4.1)
65
- net-http-persistent (4.0.1)
82
+ net-http-persistent (4.0.5)
66
83
  connection_pool (~> 2.2)
67
- nokogiri (1.12.5-arm64-darwin)
84
+ nkf (0.2.0)
85
+ nokogiri (1.18.5-aarch64-linux-gnu)
86
+ racc (~> 1.4)
87
+ nokogiri (1.18.5-aarch64-linux-musl)
88
+ racc (~> 1.4)
89
+ nokogiri (1.18.5-arm-linux-gnu)
90
+ racc (~> 1.4)
91
+ nokogiri (1.18.5-arm-linux-musl)
92
+ racc (~> 1.4)
93
+ nokogiri (1.18.5-arm64-darwin)
94
+ racc (~> 1.4)
95
+ nokogiri (1.18.5-x86_64-darwin)
96
+ racc (~> 1.4)
97
+ nokogiri (1.18.5-x86_64-linux-gnu)
98
+ racc (~> 1.4)
99
+ nokogiri (1.18.5-x86_64-linux-musl)
68
100
  racc (~> 1.4)
69
- pry (0.14.1)
70
- coderay (~> 1.1)
71
- method_source (~> 1.0)
72
- public_suffix (4.0.6)
73
- racc (1.6.0)
74
- rack (2.2.3)
75
- rack-protection (2.1.0)
76
- rack
77
- rack-test (1.1.0)
78
- rack (>= 1.0, < 3)
79
- rake (13.0.6)
80
- regexp_parser (2.2.0)
81
- rspec (3.10.0)
82
- rspec-core (~> 3.10.0)
83
- rspec-expectations (~> 3.10.0)
84
- rspec-mocks (~> 3.10.0)
101
+ pp (0.6.2)
102
+ prettyprint
103
+ prettyprint (0.2.0)
104
+ psych (5.2.3)
105
+ date
106
+ stringio
107
+ public_suffix (6.0.1)
108
+ racc (1.8.1)
109
+ rack (3.1.12)
110
+ rack-protection (4.1.1)
111
+ base64 (>= 0.1.0)
112
+ logger (>= 1.6.0)
113
+ rack (>= 3.0.0, < 4)
114
+ rack-session (2.1.0)
115
+ base64 (>= 0.1.0)
116
+ rack (>= 3.0.0)
117
+ rack-test (2.2.0)
118
+ rack (>= 1.3)
119
+ rackup (2.2.1)
120
+ rack (>= 3)
121
+ rake (13.2.1)
122
+ rdoc (6.12.0)
123
+ psych (>= 4.0.0)
124
+ regexp_parser (2.10.0)
125
+ reline (0.6.0)
126
+ io-console (~> 0.5)
127
+ rspec (3.13.0)
128
+ rspec-core (~> 3.13.0)
129
+ rspec-expectations (~> 3.13.0)
130
+ rspec-mocks (~> 3.13.0)
85
131
  rspec-command (1.0.3)
86
132
  mixlib-shellout (~> 2.0)
87
133
  rspec (~> 3.2)
88
134
  rspec-its (~> 1.2)
89
- rspec-core (3.10.1)
90
- rspec-support (~> 3.10.0)
91
- rspec-expectations (3.10.1)
135
+ rspec-core (3.13.3)
136
+ rspec-support (~> 3.13.0)
137
+ rspec-expectations (3.13.3)
92
138
  diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.10.0)
94
- rspec-its (1.3.0)
139
+ rspec-support (~> 3.13.0)
140
+ rspec-its (1.3.1)
95
141
  rspec-core (>= 3.0.0)
96
142
  rspec-expectations (>= 3.0.0)
97
- rspec-mocks (3.10.2)
143
+ rspec-mocks (3.13.2)
98
144
  diff-lcs (>= 1.2.0, < 2.0)
99
- rspec-support (~> 3.10.0)
100
- rspec-support (3.10.3)
145
+ rspec-support (~> 3.13.0)
146
+ rspec-support (3.13.2)
101
147
  ruby2_keywords (0.0.5)
102
- rubyntlm (0.6.3)
103
- sinatra (2.1.0)
104
- mustermann (~> 1.0)
105
- rack (~> 2.2)
106
- rack-protection (= 2.1.0)
148
+ rubyntlm (0.6.5)
149
+ base64
150
+ securerandom (0.4.1)
151
+ sinatra (4.1.1)
152
+ logger (>= 1.6.0)
153
+ mustermann (~> 3.0)
154
+ rack (>= 3.0.0, < 4)
155
+ rack-protection (= 4.1.1)
156
+ rack-session (>= 2.0.0, < 3)
107
157
  tilt (~> 2.0)
108
158
  socksify (1.7.1)
109
- tilt (2.0.10)
110
- tor (0.1.5)
111
- tzinfo (2.0.4)
159
+ stringio (3.1.5)
160
+ tilt (2.6.0)
161
+ tor (0.1.7)
162
+ tzinfo (2.0.6)
112
163
  concurrent-ruby (~> 1.0)
113
- unf (0.1.4)
114
- unf_ext
115
- unf_ext (0.0.8)
116
- webrick (1.7.0)
164
+ webrick (1.9.1)
117
165
  webrobots (0.1.2)
118
166
  xpath (3.2.0)
119
167
  nokogiri (~> 1.8)
120
168
 
121
169
  PLATFORMS
122
- arm64-darwin-20
170
+ aarch64-linux-gnu
171
+ aarch64-linux-musl
172
+ arm-linux-gnu
173
+ arm-linux-musl
174
+ arm64-darwin
175
+ x86_64-darwin
176
+ x86_64-linux-gnu
177
+ x86_64-linux-musl
123
178
 
124
179
  DEPENDENCIES
125
180
  bundler (~> 2.0)
126
181
  capybara_discoball
127
182
  ffaker
128
- pry
183
+ irb
184
+ rackup
129
185
  rake (~> 13.0)
130
186
  rspec (~> 3.0)
131
187
  rspec-command
132
188
  sinatra
133
189
  spidy!
190
+ webrick
134
191
 
135
192
  BUNDLED WITH
136
- 2.2.22
193
+ 2.6.5
data/README.md CHANGED
@@ -51,7 +51,7 @@ spidy console website.rb
51
51
 
52
52
  ### reload source code
53
53
  ```
54
- pry(#<Spidy::Console>)> reload!
54
+ irb(#<Spidy::Console>)> reload!
55
55
  ```
56
56
 
57
57
  ```rb
data/bin/console CHANGED
@@ -3,12 +3,11 @@
3
3
 
4
4
  require 'bundler/setup'
5
5
  require 'spidy'
6
+ require 'irb'
6
7
 
7
8
  # You can add fixtures and/or initialization code here to make experimenting
8
9
  # with your gem easier. You can also use a different console, if you like.
9
10
 
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- require 'pry'
12
11
  def reload!
13
12
  ActiveSupport::Dependencies.clear
14
13
  ActiveSupport::DescendantsTracker.clear
@@ -18,5 +17,5 @@ end
18
17
  if ARGV[0]
19
18
  Spidy.open(ARGV[0]).console
20
19
  else
21
- Pry.start
20
+ IRB.start
22
21
  end
data/exe/spidy CHANGED
@@ -2,7 +2,6 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'spidy'
5
- require 'pry'
6
5
 
7
6
  if ARGV[1].blank?
8
7
  case ARGV[0]
data/lib/spidy/shell.rb CHANGED
@@ -9,7 +9,12 @@ class Spidy::Shell
9
9
  end
10
10
 
11
11
  def interactive
12
- Pry.start(Spidy::Console.new(@definition_file))
12
+ console = Spidy::Console.new(@definition_file)
13
+ require 'irb'
14
+ IRB.setup(nil)
15
+ irb = IRB::Irb.new(IRB::WorkSpace.new(console))
16
+ IRB.conf[:MAIN_CONTEXT] = irb.context
17
+ irb.eval_input
13
18
  end
14
19
 
15
20
  def command_line
data/lib/spidy/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spidy
4
- VERSION = '0.3.12'
4
+ VERSION = '0.4.0'
5
5
  end
data/spidy.gemspec CHANGED
@@ -27,15 +27,13 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'bundler', '~> 2.0'
28
28
  spec.add_development_dependency 'capybara_discoball'
29
29
  spec.add_development_dependency 'ffaker'
30
- spec.add_development_dependency 'pry'
31
30
  spec.add_development_dependency 'rake', '~> 13.0'
32
31
  spec.add_development_dependency 'rspec', '~> 3.0'
33
32
  spec.add_development_dependency 'rspec-command'
34
33
  spec.add_development_dependency 'sinatra'
35
34
 
36
- spec.add_runtime_dependency 'activesupport'
35
+ spec.add_runtime_dependency 'activesupport', '~> 7.1'
37
36
  spec.add_runtime_dependency 'mechanize'
38
- spec.add_runtime_dependency 'pry'
39
37
  spec.add_runtime_dependency 'socksify'
40
38
  spec.add_runtime_dependency 'tor'
41
39
  spec.metadata = {
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spidy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - aileron
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
10
+ date: 2025-03-19 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -52,20 +51,6 @@ dependencies:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
53
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: pry
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
54
  - !ruby/object:Gem::Dependency
70
55
  name: rake
71
56
  requirement: !ruby/object:Gem::Requirement
@@ -126,16 +111,16 @@ dependencies:
126
111
  name: activesupport
127
112
  requirement: !ruby/object:Gem::Requirement
128
113
  requirements:
129
- - - ">="
114
+ - - "~>"
130
115
  - !ruby/object:Gem::Version
131
- version: '0'
116
+ version: '7.1'
132
117
  type: :runtime
133
118
  prerelease: false
134
119
  version_requirements: !ruby/object:Gem::Requirement
135
120
  requirements:
136
- - - ">="
121
+ - - "~>"
137
122
  - !ruby/object:Gem::Version
138
- version: '0'
123
+ version: '7.1'
139
124
  - !ruby/object:Gem::Dependency
140
125
  name: mechanize
141
126
  requirement: !ruby/object:Gem::Requirement
@@ -150,20 +135,6 @@ dependencies:
150
135
  - - ">="
151
136
  - !ruby/object:Gem::Version
152
137
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: pry
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
138
  - !ruby/object:Gem::Dependency
168
139
  name: socksify
169
140
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +163,6 @@ dependencies:
192
163
  - - ">="
193
164
  - !ruby/object:Gem::Version
194
165
  version: '0'
195
- description:
196
166
  email:
197
167
  - aileron.cc@gmail.com
198
168
  executables:
@@ -207,6 +177,7 @@ files:
207
177
  - ".ruby-version"
208
178
  - ".travis.yml"
209
179
  - CHANGELOG.md
180
+ - CLAUDE.md
210
181
  - CODE_OF_CONDUCT.md
211
182
  - Gemfile
212
183
  - Gemfile.lock
@@ -246,7 +217,6 @@ licenses:
246
217
  - MIT
247
218
  metadata:
248
219
  rubygems_mfa_required: 'true'
249
- post_install_message:
250
220
  rdoc_options: []
251
221
  require_paths:
252
222
  - lib
@@ -261,8 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
231
  - !ruby/object:Gem::Version
262
232
  version: '0'
263
233
  requirements: []
264
- rubygems_version: 3.2.22
265
- signing_key:
234
+ rubygems_version: 3.6.5
266
235
  specification_version: 4
267
236
  summary: web spider dsl
268
237
  test_files: []