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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70611d34eb28467a1b3ae1950b4e56f62e27aad1
4
- data.tar.gz: 39eed33ee8c1a90dd48734ee74caafe68da97c92
3
+ metadata.gz: 16275d2d06cc5d346b8ca94268f9198a82aa576a
4
+ data.tar.gz: 77c7f9f7b842504e87849176a581d30e9f5b77c4
5
5
  SHA512:
6
- metadata.gz: aafccfa73f466485093c4eb7c8af88593557fd124fbfa945034080606ed4aeec32a89d115f3e397e03eaff3045b1268ba16e03ba2737a0da5ccd728370fc8491
7
- data.tar.gz: ccaa60674d85635828f6dc835351011b841f1e53f385e1a68e0d579dcdba7ccdaf381e1cf1a58085d1e07243f2a0428e4d31ea346050d7ba24988f43f3175f61
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]
@@ -1,3 +1,3 @@
1
1
  module MetaInspector
2
- VERSION = '5.0.0'
2
+ VERSION = '5.0.1'
3
3
  end
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.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.2.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