microformats 4.0.3 → 4.0.4

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: 96d92a5bb4aaef19f5e6fa918cd5ffc556c76ec0
4
- data.tar.gz: 8ab579244cd67680bbca05ee4d14700680676462
3
+ metadata.gz: d0d43fe15ed1fa8915d12f622aa25481860f287b
4
+ data.tar.gz: 14939808b046effdc74e119067608cb474b92a05
5
5
  SHA512:
6
- metadata.gz: 6fa1e48cb0c84380e0d123ea89faa16192dd6ed2580348b14d170d82cac3b69100fbfaaf66a8d306989f39be8698d69af1167d3f9e6fd9cff24ea617f3dcca5f
7
- data.tar.gz: 31a5ec4d62d21bcf985100eb27ec3dfc9d604c963a3a5e7260125f405cf14483451c713fc736cfec108aab62fa6297f791fa0d5c2fee5715616dbc71a0df1943
6
+ metadata.gz: fc3d8ec9d776c3846211b654f3289928fe5b3a44f8df35052e9ef3dbf57a9f0d7dbb5d288ac7dabb7c7282a3fb952a6b43db972ac0af1bec05f1fc3eebda288c
7
+ data.tar.gz: cded134d21fa25d5890863a53b3c6ffbe7e2b460d20a8feb6d06807fd39eddc1885d3b861fdc9ab1915937ee9b5965bb02d969e737243ab3f4f360f1c4139aa8
data/README.md CHANGED
@@ -34,9 +34,9 @@ Not Implemented:
34
34
 
35
35
  ## Current Version
36
36
 
37
- 4.0.3
37
+ 4.0.4
38
38
 
39
- ![Version 4.0.3](https://img.shields.io/badge/VERSION-4.0.3-green.svg)
39
+ ![Version 4.0.3](https://img.shields.io/badge/VERSION-4.0.4-green.svg)
40
40
 
41
41
 
42
42
  ## Requirements
@@ -42,6 +42,7 @@ module Microformats
42
42
  end
43
43
 
44
44
  def read_html(html, headers:{})
45
+ html.strip!
45
46
  open(html, headers) do |response|
46
47
  @http_headers = response.meta if response.respond_to?(:meta)
47
48
  @http_body = response.read
@@ -1,3 +1,3 @@
1
1
  module Microformats
2
- VERSION = "4.0.3"
2
+ VERSION = "4.0.4"
3
3
  end
@@ -39,6 +39,22 @@ describe Microformats::Parser do
39
39
  end
40
40
  end
41
41
 
42
+ describe "#bad_input" do
43
+
44
+ describe "space after url" do
45
+ before do
46
+ stub_request(:get, "http://www.example.com/").
47
+ with(:headers => {"Accept"=>"*/*", "User-Agent"=>"Ruby"}).
48
+ to_return(:status => 200, :body => "abc", :headers => {"Content-Length" => 3})
49
+ parser.parse("http://www.example.com ")
50
+ end
51
+
52
+ it "saves #http_body" do
53
+ expect(parser.http_body).to eq("abc")
54
+ end
55
+ end
56
+ end
57
+
42
58
  describe "edge cases" do
43
59
  cases_dir = "spec/support/lib/edge_cases/"
44
60
  Dir[File.join(cases_dir, "*")].keep_if { |f| f =~ /([.]js$)/ }.each do |json_file|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microformats
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Becker
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-22 00:00:00.000000000 Z
13
+ date: 2017-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri