metainspector 5.15.0 → 5.16.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: 5098979bb849154a0fde8f74483401c6fac1d07aec69ce4b1cc8c4abc4d9eb3d
4
- data.tar.gz: 7c862c95f5b1a10faa25bf5346e2b3c6e26114fabf787e1ec061caa8f70f06d9
3
+ metadata.gz: 8311486a8156f619d20a7cc93283e57ae055dd9fdcb222e14d3900adfae6d6a2
4
+ data.tar.gz: 9f1288adf02bc224d5d5e6915a0c24aaab342cabe3d6a85e07989f553966324a
5
5
  SHA512:
6
- metadata.gz: 21ca7857d9cd32d2e0b5bbd2f29af1438233174d008b1d7b68df324c25da3ff8ca5b86f496cccc1c15700360e17a4f0318021483e41fd1d8d6ec3fc35e0479bc
7
- data.tar.gz: 84cf704542d0ca037ce46f9fbbca4f6c354928c5d50dbf56f22e6394413aabe087ed97ca51ad9de9279e7a621f4b38972370dd29b1a1a76645ef833e2af6f3b3
6
+ metadata.gz: 0ef843e07a8af813a4ed27f18b53eab03f5bfeaa60af5014fb3474346f3d02081891b94828ea034ffd7c5734f40c4fcb0e4028a2ccfe682152408d8f69820aec
7
+ data.tar.gz: c8da85989e7c11ad7bccff3d9f53c94daf75962492c4fa0d54550db2a02bee7928747b36354c89d47f0875c459310ea404bea9154f7e3cbd414b489fb45110e3
data/.circleci/config.yml CHANGED
@@ -2,45 +2,27 @@ version: 2.1
2
2
  orbs:
3
3
  ruby: circleci/ruby@1.0.4
4
4
  jobs:
5
- test_2_6:
6
- docker:
7
- - image: cimg/ruby:2.6.10
8
- steps:
9
- - checkout
10
- - ruby/install-deps
11
- - run:
12
- name: Run tests
13
- command: bundle exec rake
14
- test_2_7:
15
- docker:
16
- - image: cimg/ruby:2.7.6
17
- steps:
18
- - checkout
19
- - ruby/install-deps
20
- - run:
21
- name: Run tests
22
- command: bundle exec rake
23
- test_3_0:
5
+ test_3_1:
24
6
  docker:
25
- - image: cimg/ruby:3.0.4
7
+ - image: cimg/ruby:3.1.7
26
8
  steps:
27
9
  - checkout
28
10
  - ruby/install-deps
29
11
  - run:
30
12
  name: Run tests
31
13
  command: bundle exec rake
32
- test_3_1:
14
+ test_3_2:
33
15
  docker:
34
- - image: cimg/ruby:3.1.2
16
+ - image: cimg/ruby:3.2.6
35
17
  steps:
36
18
  - checkout
37
19
  - ruby/install-deps
38
20
  - run:
39
21
  name: Run tests
40
22
  command: bundle exec rake
41
- test_3_2:
23
+ test_3_3:
42
24
  docker:
43
- - image: cimg/ruby:3.2.1
25
+ - image: cimg/ruby:3.3.8
44
26
  steps:
45
27
  - checkout
46
28
  - ruby/install-deps
@@ -51,8 +33,6 @@ workflows:
51
33
  version: 2
52
34
  deploy:
53
35
  jobs:
54
- - test_2_6
55
- - test_2_7
56
- - test_3_0
57
36
  - test_3_1
58
37
  - test_3_2
38
+ - test_3_3
data/CHANGELOG.md CHANGED
@@ -1,4 +1,17 @@
1
- # MetaInpector Changelog
1
+ # MetaInspector Changelog
2
+
3
+ ## [Changes in 5.16.0](https://github.com/jaimeiniesta/metainspector/compare/v5.15.0...v5.16.0)
4
+
5
+ * Upgraded dependencies and supported Ruby versions.
6
+
7
+ ## [Changes in 5.15.0](https://github.com/jaimeiniesta/metainspector/compare/v5.14.0...v5.15.0)
8
+
9
+ * Added mechanism to use all available options in the `FollowRedirects` Faraday middleware,
10
+ https://github.com/jaimeiniesta/metainspector/pull/355 thanks to @bruno-b-martins and @miguelrod
11
+
12
+ ## [Changes in 5.14.0](https://github.com/jaimeiniesta/metainspector/compare/v5.13.0...v5.14.0)
13
+
14
+ * Several dependency updates, including Addressable 2.8.1 which fixes invalid_byte_sequence exception.
2
15
 
3
16
  ## [Changes in 5.13.0](https://github.com/jaimeiniesta/metainspector/compare/v5.12.1...v5.13.0)
4
17
 
data/Gemfile.lock CHANGED
@@ -1,23 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metainspector (5.15.0)
4
+ metainspector (5.16.0)
5
5
  addressable (~> 2.8.4)
6
6
  faraday (~> 2.5)
7
7
  faraday-cookie_jar (~> 0.0)
8
8
  faraday-encoding (~> 0.0)
9
9
  faraday-follow_redirects (~> 0.3)
10
- faraday-gzip (>= 0.1, < 2.0)
10
+ faraday-gzip (>= 0.1, < 3.0)
11
11
  faraday-http-cache (~> 2.5)
12
12
  faraday-retry (~> 2.0)
13
13
  fastimage (~> 2.2)
14
14
  nesty (~> 1.0)
15
- nokogiri (~> 1.13)
15
+ nokogiri (~> 1.18.8)
16
16
 
17
17
  GEM
18
18
  remote: http://rubygems.org/
19
19
  specs:
20
- addressable (2.8.4)
20
+ addressable (2.8.5)
21
21
  public_suffix (>= 2.0.2, < 6.0)
22
22
  ast (2.4.2)
23
23
  awesome_print (1.9.2)
@@ -25,60 +25,64 @@ GEM
25
25
  crack (0.4.5)
26
26
  rexml
27
27
  diff-lcs (1.5.0)
28
- domain_name (0.5.20190701)
29
- unf (>= 0.0.5, < 1.0.0)
30
- faraday (2.7.4)
31
- faraday-net_http (>= 2.0, < 3.1)
32
- ruby2_keywords (>= 0.0.4)
28
+ domain_name (0.6.20240107)
29
+ faraday (2.13.1)
30
+ faraday-net_http (>= 2.0, < 3.5)
31
+ json
32
+ logger
33
33
  faraday-cookie_jar (0.0.7)
34
34
  faraday (>= 0.8.0)
35
35
  http-cookie (~> 1.0.0)
36
- faraday-encoding (0.0.5)
36
+ faraday-encoding (0.0.6)
37
37
  faraday
38
38
  faraday-follow_redirects (0.3.0)
39
39
  faraday (>= 1, < 3)
40
- faraday-gzip (1.0.0)
40
+ faraday-gzip (2.0.1)
41
41
  faraday (>= 1.0)
42
- zlib (~> 2.1)
43
- faraday-http-cache (2.5.0)
42
+ zlib (~> 3.0)
43
+ faraday-http-cache (2.5.1)
44
44
  faraday (>= 0.8)
45
- faraday-net_http (3.0.2)
46
- faraday-retry (2.1.0)
45
+ faraday-net_http (3.4.0)
46
+ net-http (>= 0.5.0)
47
+ faraday-retry (2.3.1)
47
48
  faraday (~> 2.0)
48
- fastimage (2.2.6)
49
+ fastimage (2.4.0)
49
50
  hashdiff (1.0.1)
50
- http-cookie (1.0.5)
51
+ http-cookie (1.0.8)
51
52
  domain_name (~> 0.5)
52
- json (2.6.3)
53
+ json (2.7.1)
54
+ language_server-protocol (3.17.0.3)
55
+ logger (1.7.0)
53
56
  method_source (1.0.0)
54
- mini_portile2 (2.8.2)
55
57
  mustermann (3.0.0)
56
58
  ruby2_keywords (~> 0.0.1)
57
59
  nesty (1.0.2)
60
+ net-http (0.6.0)
61
+ uri
58
62
  nio4r (2.5.9)
59
- nokogiri (1.14.4)
60
- mini_portile2 (~> 2.8.0)
63
+ nokogiri (1.18.8-arm64-darwin)
61
64
  racc (~> 1.4)
62
- nokogiri (1.14.4-arm64-darwin)
65
+ nokogiri (1.18.8-x86_64-linux-gnu)
63
66
  racc (~> 1.4)
64
- parallel (1.23.0)
65
- parser (3.2.2.1)
67
+ parallel (1.24.0)
68
+ parser (3.3.0.5)
66
69
  ast (~> 2.4.1)
70
+ racc
67
71
  pry (0.14.2)
68
72
  coderay (~> 1.1)
69
73
  method_source (~> 1.0)
70
- public_suffix (5.0.1)
71
- puma (6.2.2)
74
+ public_suffix (5.0.3)
75
+ puma (6.4.0)
72
76
  nio4r (~> 2.0)
73
- racc (1.6.2)
74
- rack (2.2.7)
77
+ racc (1.8.1)
78
+ rack (2.2.14)
75
79
  rack-protection (3.0.6)
76
80
  rack
77
81
  rainbow (3.1.1)
78
- rake (13.0.6)
79
- regexp_parser (2.8.0)
82
+ rake (13.1.0)
83
+ regexp_parser (2.9.0)
80
84
  resolv (0.2.2)
81
- rexml (3.2.5)
85
+ rexml (3.2.6)
82
86
  rspec (3.12.0)
83
87
  rspec-core (~> 3.12.0)
84
88
  rspec-expectations (~> 3.12.0)
@@ -92,18 +96,19 @@ GEM
92
96
  diff-lcs (>= 1.2.0, < 2.0)
93
97
  rspec-support (~> 3.12.0)
94
98
  rspec-support (3.12.0)
95
- rubocop (1.51.0)
99
+ rubocop (1.62.0)
96
100
  json (~> 2.3)
101
+ language_server-protocol (>= 3.17.0)
97
102
  parallel (~> 1.10)
98
- parser (>= 3.2.0.0)
103
+ parser (>= 3.3.0.2)
99
104
  rainbow (>= 2.2.2, < 4.0)
100
105
  regexp_parser (>= 1.8, < 3.0)
101
106
  rexml (>= 3.2.5, < 4.0)
102
- rubocop-ast (>= 1.28.0, < 2.0)
107
+ rubocop-ast (>= 1.31.1, < 2.0)
103
108
  ruby-progressbar (~> 1.7)
104
109
  unicode-display_width (>= 2.4.0, < 3.0)
105
- rubocop-ast (1.28.1)
106
- parser (>= 3.2.1.0)
110
+ rubocop-ast (1.31.1)
111
+ parser (>= 3.3.0.4)
107
112
  ruby-progressbar (1.13.0)
108
113
  ruby2_keywords (0.0.5)
109
114
  sinatra (3.0.6)
@@ -112,25 +117,24 @@ GEM
112
117
  rack-protection (= 3.0.6)
113
118
  tilt (~> 2.0)
114
119
  tilt (2.1.0)
115
- unf (0.1.4)
116
- unf_ext
117
- unf_ext (0.0.8.2)
118
- unicode-display_width (2.4.2)
120
+ unicode-display_width (2.5.0)
121
+ uri (1.0.3)
119
122
  webmock (3.18.1)
120
123
  addressable (>= 2.8.0)
121
124
  crack (>= 0.3.2)
122
125
  hashdiff (>= 0.4.0, < 2.0.0)
123
- zlib (2.1.1)
126
+ zlib (3.2.1)
124
127
 
125
128
  PLATFORMS
126
129
  arm64-darwin-22
130
+ arm64-darwin-24
127
131
  x86_64-linux
128
132
 
129
133
  DEPENDENCIES
130
134
  awesome_print (~> 1.9)
131
135
  metainspector!
132
136
  pry (~> 0.14)
133
- puma (~> 6.2.2)
137
+ puma (~> 6.4.0)
134
138
  rake (~> 13.0)
135
139
  resolv (~> 0.2.2)
136
140
  rspec (~> 3.11)
data/README.md CHANGED
@@ -19,7 +19,7 @@ If you're using it on a Rails application, just add it to your Gemfile and run `
19
19
  gem 'metainspector'
20
20
  ```
21
21
 
22
- Supported Ruby versions are defined in [`.travis.yml`](.travis.yml).
22
+ Supported Ruby versions are defined in [`.circleci/config.yml`](.circleci/config.yml).
23
23
 
24
24
  ## Usage
25
25
 
@@ -1,3 +1,3 @@
1
1
  module MetaInspector
2
- VERSION = '5.15.0'
2
+ VERSION = '5.16.0'
3
3
  end
@@ -14,12 +14,12 @@ Gem::Specification.new do |gem|
14
14
  gem.require_paths = ["lib"]
15
15
  gem.version = MetaInspector::VERSION
16
16
 
17
- gem.add_dependency 'nokogiri', '~> 1.13'
17
+ gem.add_dependency 'nokogiri', '~> 1.18.8'
18
18
  gem.add_dependency 'faraday', '~> 2.5'
19
19
  gem.add_dependency 'faraday-cookie_jar', '~> 0.0'
20
20
  gem.add_dependency 'faraday-encoding', '~> 0.0'
21
21
  gem.add_dependency 'faraday-follow_redirects', '~> 0.3'
22
- gem.add_dependency 'faraday-gzip', '>= 0.1', '< 2.0'
22
+ gem.add_dependency 'faraday-gzip', '>= 0.1', '< 3.0'
23
23
  gem.add_dependency 'faraday-http-cache', '~> 2.5'
24
24
  gem.add_dependency 'faraday-retry', '~> 2.0'
25
25
  gem.add_dependency 'addressable', '~> 2.8.4'
@@ -31,7 +31,7 @@ Gem::Specification.new do |gem|
31
31
  gem.add_development_dependency 'awesome_print', '~> 1.9'
32
32
  gem.add_development_dependency 'rake', '~> 13.0'
33
33
  gem.add_development_dependency 'pry', '~> 0.14'
34
- gem.add_development_dependency 'puma', '~> 6.2.2'
34
+ gem.add_development_dependency 'puma', '~> 6.4.0'
35
35
  gem.add_development_dependency 'rubocop', '~> 1.34'
36
36
  gem.add_development_dependency 'resolv', '~> 0.2.2'
37
37
  gem.add_development_dependency 'sinatra', '~> 3.0.6'
@@ -52,29 +52,35 @@ describe MetaInspector do
52
52
  it "should get correct absolute links, encoding the URLs as needed" do
53
53
  m = MetaInspector.new('http://international.com')
54
54
 
55
- expect(m.links.internal).to eq([ "http://international.com/espa%C3%B1a.asp",
56
- "http://international.com/roman%C3%A9e",
57
- "http://international.com/faqs#cami%C3%B3n",
58
- "http://international.com/search?q=cami%C3%B3n",
59
- "http://international.com/search?q=espa%C3%B1a#top",
60
- "http://international.com/index.php?q=espa%C3%B1a&url=aHR0zZQ==&cntnt01pageid=21"])
61
-
62
- expect(m.links.external).to eq([ "http://example.com/espa%C3%B1a.asp",
63
- "http://example.com/roman%C3%A9e",
64
- "http://example.com/faqs#cami%C3%B3n",
65
- "http://example.com/search?q=cami%C3%B3n",
66
- "http://example.com/search?q=espa%C3%B1a#top"])
55
+ expect(m.links.internal).to eq([
56
+ "http://international.com/espa%C3%83%C2%B1a.asp",
57
+ "http://international.com/roman%C3%83%C2%A9e",
58
+ "http://international.com/faqs#cami%C3%83%C2%B3n",
59
+ "http://international.com/search?q=cami%C3%83%C2%B3n",
60
+ "http://international.com/search?q=espa%C3%83%C2%B1a#top",
61
+ "http://international.com/index.php?q=espa%C3%83%C2%B1a&url=aHR0zZQ==&cntnt01pageid=21"
62
+ ])
63
+
64
+ expect(m.links.external).to eq([
65
+ "http://example.com/espa%C3%83%C2%B1a.asp",
66
+ "http://example.com/roman%C3%83%C2%A9e",
67
+ "http://example.com/faqs#cami%C3%83%C2%B3n",
68
+ "http://example.com/search?q=cami%C3%83%C2%B3n",
69
+ "http://example.com/search?q=espa%C3%83%C2%B1a#top"])
67
70
  end
68
71
 
69
72
  describe "internal links" do
70
73
  it "should get correct internal links, encoding the URLs as needed but respecting # and ?" do
71
74
  m = MetaInspector.new('http://international.com')
72
- expect(m.links.internal).to eq([ "http://international.com/espa%C3%B1a.asp",
73
- "http://international.com/roman%C3%A9e",
74
- "http://international.com/faqs#cami%C3%B3n",
75
- "http://international.com/search?q=cami%C3%B3n",
76
- "http://international.com/search?q=espa%C3%B1a#top",
77
- "http://international.com/index.php?q=espa%C3%B1a&url=aHR0zZQ==&cntnt01pageid=21"])
75
+
76
+ expect(m.links.internal).to eq([
77
+ "http://international.com/espa%C3%83%C2%B1a.asp",
78
+ "http://international.com/roman%C3%83%C2%A9e",
79
+ "http://international.com/faqs#cami%C3%83%C2%B3n",
80
+ "http://international.com/search?q=cami%C3%83%C2%B3n",
81
+ "http://international.com/search?q=espa%C3%83%C2%B1a#top",
82
+ "http://international.com/index.php?q=espa%C3%83%C2%B1a&url=aHR0zZQ==&cntnt01pageid=21"
83
+ ])
78
84
  end
79
85
 
80
86
  it "should not crash when processing malformed hrefs" do
@@ -86,11 +92,14 @@ describe MetaInspector do
86
92
  describe "external links" do
87
93
  it "should get correct external links, encoding the URLs as needed but respecting # and ?" do
88
94
  m = MetaInspector.new('http://international.com')
89
- expect(m.links.external).to eq([ "http://example.com/espa%C3%B1a.asp",
90
- "http://example.com/roman%C3%A9e",
91
- "http://example.com/faqs#cami%C3%B3n",
92
- "http://example.com/search?q=cami%C3%B3n",
93
- "http://example.com/search?q=espa%C3%B1a#top"])
95
+
96
+ expect(m.links.external).to eq([
97
+ "http://example.com/espa%C3%83%C2%B1a.asp",
98
+ "http://example.com/roman%C3%83%C2%A9e",
99
+ "http://example.com/faqs#cami%C3%83%C2%B3n",
100
+ "http://example.com/search?q=cami%C3%83%C2%B3n",
101
+ "http://example.com/search?q=espa%C3%83%C2%B1a#top"
102
+ ])
94
103
  end
95
104
 
96
105
  it "should not crash when processing malformed hrefs" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metainspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.15.0
4
+ version: 5.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime Iniesta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-16 00:00:00.000000000 Z
11
+ date: 2025-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: 1.18.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: 1.18.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: '0.1'
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: '2.0'
92
+ version: '3.0'
93
93
  type: :runtime
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: '0.1'
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: '2.0'
102
+ version: '3.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: faraday-http-cache
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -246,14 +246,14 @@ dependencies:
246
246
  requirements:
247
247
  - - "~>"
248
248
  - !ruby/object:Gem::Version
249
- version: 6.2.2
249
+ version: 6.4.0
250
250
  type: :development
251
251
  prerelease: false
252
252
  version_requirements: !ruby/object:Gem::Requirement
253
253
  requirements:
254
254
  - - "~>"
255
255
  - !ruby/object:Gem::Version
256
- version: 6.2.2
256
+ version: 6.4.0
257
257
  - !ruby/object:Gem::Dependency
258
258
  name: rubocop
259
259
  requirement: !ruby/object:Gem::Requirement
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
432
432
  - !ruby/object:Gem::Version
433
433
  version: '0'
434
434
  requirements: []
435
- rubygems_version: 3.4.12
435
+ rubygems_version: 3.5.22
436
436
  signing_key:
437
437
  specification_version: 4
438
438
  summary: MetaInspector is a ruby gem for web scraping purposes, that returns metadata