text_search 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 6853d6b8d0090202efa77b7985dd75746ea5b8d5
4
- data.tar.gz: 366788794571bb4bf5370eab95d7d6fc05b75496
3
+ metadata.gz: 1f26cfd0b019c971bcc49419d60da6ffb6312bca
4
+ data.tar.gz: 493344f346fdb75ae42edb71af5ede0b0583cb27
5
5
  SHA512:
6
- metadata.gz: cf7a150846e00cef9f264bd5aca5ab935583afd3bee4c4ed745c9504f570f96de51aa6f8e8dcb6fb8800fa65fbab1f871a9cab5d9c5c9cb62e1f6f7b67a7994b
7
- data.tar.gz: 8d1a2d19c9fedd164e7b176386b4e037f94e15d6374b1c6d52491cf06ab3903892d62ef64afc35b1e06d54aea99d334bb9feaeb3e18fad577ac3a329e03be21e
6
+ metadata.gz: 0280bf0c3f56c8d4c8475a9445f6c1c6089d03beeb6e7512b72a779a93409fa73690eb9ee72fd6c715743462e1fc7ae44ad515482ea2843d5c3f5245208b4240
7
+ data.tar.gz: b69c428adb7daa4a6a59535d2f7dde7cb720a03bc0a5a3a5db9f19269fba71c6f836d50786d8c831263ad3d0d2e88495c5bb7cef13d22e1319560a5f5ad49918
@@ -1,3 +1,3 @@
1
1
  module TextSearch
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -20,10 +20,10 @@ module TextSearch
20
20
  end
21
21
  private
22
22
  def fetchtext
23
- @url = "http://#{@url}" if (!URI.parse(@url).scheme)
23
+ @url = "http://#{@url}" if (!URI.parse(URI.encode(@url)).scheme)
24
24
  @text = ""
25
25
  begin
26
- html = Nokogiri::HTML(open( @url, :allow_redirections => :safe))
26
+ html = Nokogiri::HTML(open(URI.parse(URI.encode(@url)), :allow_redirections => :safe))
27
27
  html.css('script').remove
28
28
  @text = html.at('html').inner_text
29
29
  rescue Exception => e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide Santangelo