metainspector 5.1.0 → 5.1.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 +3 -0
- data/lib/meta_inspector/document.rb +5 -7
- data/lib/meta_inspector/version.rb +1 -1
- data/meta_inspector.gemspec +1 -1
- data/spec/document_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 643aa29d03ea4670123b161d94749d9121a2a69e
|
4
|
+
data.tar.gz: f4a7f1f4cd104e6e20c7751fba47217d50dcb86c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04dc392b79a68f5259c0061be14a6bb6aa4747b69abd34f6c72960095192c99c9a656f34fdb0110ec11265a8f3e25bdb7e19ce65de25483b6b9e7b25ce6bb9ee
|
7
|
+
data.tar.gz: a03e0d71d3a06c4173ec31cf61736e85464d3940a6f456b8dce39849037685f6b161ed5d5c09cf10c5cea740b73ddd1535bd81b04e75d751206b052582028cfc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# MetaInpector Changelog
|
2
2
|
|
3
|
+
## [Changes in 5.1](https://github.com/jaimeiniesta/metainspector/compare/v5.0.0...v5.1.0)
|
4
|
+
|
5
|
+
Deprecates the `html_content_only` option, and turns it on by default.
|
3
6
|
|
4
7
|
## [Changes in 5.0](https://github.com/jaimeiniesta/metainspector/compare/v4.7.1...v5.0.0)
|
5
8
|
|
@@ -14,19 +14,17 @@ module MetaInspector
|
|
14
14
|
# * normalize_url: true by default
|
15
15
|
# * faraday_options: an optional hash of options to pass to Faraday on the request
|
16
16
|
def initialize(initial_url, options = {})
|
17
|
-
options = defaults.merge(options)
|
18
|
-
@connection_timeout = options[:connection_timeout]
|
19
|
-
@read_timeout = options[:read_timeout]
|
20
|
-
@retries = options[:retries]
|
21
|
-
|
22
17
|
unless options[:html_content_only].nil?
|
23
|
-
@html_content_only = options[:html_content_only]
|
24
|
-
|
25
18
|
puts <<-EOS
|
26
19
|
DEPRECATION NOTICE: html_content_only is deprecated and turned on by default since 5.1.0,
|
27
20
|
this option will be removed in 5.2.0
|
28
21
|
EOS
|
29
22
|
end
|
23
|
+
options = defaults.merge(options)
|
24
|
+
@connection_timeout = options[:connection_timeout]
|
25
|
+
@read_timeout = options[:read_timeout]
|
26
|
+
@retries = options[:retries]
|
27
|
+
@html_content_only = options[:html_content_only]
|
30
28
|
|
31
29
|
@allow_redirections = options[:allow_redirections]
|
32
30
|
@document = options[:document]
|
data/meta_inspector.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.add_dependency 'faraday_middleware', '~> 0.10'
|
20
20
|
gem.add_dependency 'faraday-cookie_jar', '~> 0.0'
|
21
21
|
gem.add_dependency 'faraday-http-cache', '~> 1.2'
|
22
|
-
gem.add_dependency 'faraday-encoding', '~> 0.0.
|
22
|
+
gem.add_dependency 'faraday-encoding', '~> 0.0.3'
|
23
23
|
gem.add_dependency 'addressable', '~> 2.4'
|
24
24
|
gem.add_dependency 'fastimage', '~> 1.8.1'
|
25
25
|
gem.add_dependency 'nesty', '~> 1.0'
|
data/spec/document_spec.rb
CHANGED
@@ -79,7 +79,7 @@ describe MetaInspector::Document do
|
|
79
79
|
expect do
|
80
80
|
image_url = MetaInspector::Document.new('http://pagerankalert.com/image.png')
|
81
81
|
image_url.title
|
82
|
-
end.to raise_error
|
82
|
+
end.to raise_error(MetaInspector::ParserError)
|
83
83
|
end
|
84
84
|
|
85
85
|
it "should parse images when parse_html_content_type_only is false" 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.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Iniesta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.0.
|
89
|
+
version: 0.0.3
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.0.
|
96
|
+
version: 0.0.3
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: addressable
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -380,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
380
380
|
version: '0'
|
381
381
|
requirements: []
|
382
382
|
rubyforge_project:
|
383
|
-
rubygems_version: 2.
|
383
|
+
rubygems_version: 2.5.1
|
384
384
|
signing_key:
|
385
385
|
specification_version: 4
|
386
386
|
summary: MetaInspector is a ruby gem for web scraping purposes, that returns metadata
|