embed_html 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('embed_html', '0.2.1') do |p|
6
+ Echoe.new('embed_html', '0.2.2') do |p|
7
7
  p.description = "Download and embed images in html using base64 data encoding"
8
8
  p.summary = "Download or process a HTML page, find images there, download them and embed it into the HTML using Base64 data encoding"
9
9
  p.url = "http://github.com/siuying/embed_html"
data/embed_html.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{embed_html}
5
- s.version = "0.2.1"
5
+ s.version = "0.2.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Francis Chong"]
@@ -3,6 +3,7 @@ require 'open-uri'
3
3
  require 'hpricot'
4
4
  require 'uri'
5
5
  require 'base64'
6
+ require 'typhoeus'
6
7
 
7
8
  module EmbedHtml
8
9
  class Embeder
@@ -18,7 +19,7 @@ module EmbedHtml
18
19
 
19
20
  def process
20
21
  @logger.info "downloading url: #{@url}"
21
- html = open(@url.to_s).read
22
+ html = Typhoeus::Request.get(@url.to_s).body
22
23
  doc = Hpricot(html)
23
24
 
24
25
  hydra = Typhoeus::Hydra.new(:max_concurrency => MAX_CONCURRENCY)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Francis Chong