metainspector 5.0.0 → 5.0.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 +6 -0
- data/lib/meta_inspector/request.rb +2 -0
- data/lib/meta_inspector/version.rb +1 -1
- data/spec/request_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16275d2d06cc5d346b8ca94268f9198a82aa576a
|
4
|
+
data.tar.gz: 77c7f9f7b842504e87849176a581d30e9f5b77c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc54179561cd8f1f6d798115540ec39ded83d9667a0b00fa4be5b0b355c005704322bcf90e88dc49d368f7ef9f02aef9a02c26efa18b9de5b99627c468f6dc7
|
7
|
+
data.tar.gz: 11ac7e15565d859696a54563119921a87ed5f86399a31c453c878cd9c2b8168ada4016781bed19565eedaba1e3b32ad64a0c5bb0650f958d1ad39b29bb49ac93
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# MetaInpector Changelog
|
2
2
|
|
3
|
+
|
4
|
+
## [Changes in 5.0](https://github.com/jaimeiniesta/metainspector/compare/v4.7.1...v5.0.0)
|
5
|
+
|
6
|
+
Removes the ExceptionLog, all exceptions are now encapsulated in our own exception classes and
|
7
|
+
always raised.
|
8
|
+
|
3
9
|
## [Changes in 4.7](https://github.com/jaimeiniesta/metainspector/compare/v4.6.0...v4.7.1)
|
4
10
|
|
5
11
|
MetaInspector can be configured to use [Faraday::HttpCache](https://github.com/plataformatec/faraday-http-cache) to cache page responses. For that you should pass the `faraday_http_cache` option with at least the `:store` key, for example:
|
@@ -10,6 +10,8 @@ module MetaInspector
|
|
10
10
|
def initialize(initial_url, options = {})
|
11
11
|
@url = initial_url
|
12
12
|
|
13
|
+
fail MetaInspector::RequestError.new('URL must be HTTP') unless @url.url =~ /http[s]?:\/\//i
|
14
|
+
|
13
15
|
@allow_redirections = options[:allow_redirections]
|
14
16
|
@connection_timeout = options[:connection_timeout]
|
15
17
|
@read_timeout = options[:read_timeout]
|
data/spec/request_spec.rb
CHANGED
@@ -2,6 +2,12 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe MetaInspector::Request do
|
4
4
|
|
5
|
+
it "raises an error if the URL is non-HTTP" do
|
6
|
+
expect do
|
7
|
+
MetaInspector::Request.new(url('ftp://ftp.example.com'))
|
8
|
+
end.to raise_error(MetaInspector::RequestError)
|
9
|
+
end
|
10
|
+
|
5
11
|
describe "read" do
|
6
12
|
it "should return the content of the page" do
|
7
13
|
page_request = MetaInspector::Request.new(url('http://pagerankalert.com'))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metainspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Iniesta
|
@@ -365,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
365
365
|
version: '0'
|
366
366
|
requirements: []
|
367
367
|
rubyforge_project:
|
368
|
-
rubygems_version: 2.
|
368
|
+
rubygems_version: 2.4.8
|
369
369
|
signing_key:
|
370
370
|
specification_version: 4
|
371
371
|
summary: MetaInspector is a ruby gem for web scraping purposes, that returns metadata
|