embed_html 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -2,7 +2,6 @@ Dependencies
2
2
  ============
3
3
 
4
4
  * Hpricot
5
- * Typhoeus
6
5
 
7
6
  Install
8
7
  =======
data/Rakefile CHANGED
@@ -3,13 +3,13 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('embed_html', '0.2.0') do |p|
6
+ Echoe.new('embed_html', '0.2.1') 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"
10
10
  p.author = "Francis Chong"
11
11
  p.email = "francis@ignition.hk"
12
12
  p.ignore_pattern = ["tmp/*", "script/*", "*.html"]
13
- p.runtime_dependencies = ["hpricot", "typhoeus"]
13
+ p.runtime_dependencies = ["hpricot"]
14
14
  end
15
15
 
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.0"
5
+ s.version = "0.2.1"
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"]
@@ -26,13 +26,10 @@ Gem::Specification.new do |s|
26
26
 
27
27
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
28
  s.add_runtime_dependency(%q<hpricot>, [">= 0"])
29
- s.add_runtime_dependency(%q<typhoeus>, [">= 0"])
30
29
  else
31
30
  s.add_dependency(%q<hpricot>, [">= 0"])
32
- s.add_dependency(%q<typhoeus>, [">= 0"])
33
31
  end
34
32
  else
35
33
  s.add_dependency(%q<hpricot>, [">= 0"])
36
- s.add_dependency(%q<typhoeus>, [">= 0"])
37
34
  end
38
35
  end
@@ -3,7 +3,6 @@ require 'open-uri'
3
3
  require 'hpricot'
4
4
  require 'uri'
5
5
  require 'base64'
6
- require 'typhoeus'
7
6
 
8
7
  module EmbedHtml
9
8
  class Embeder
@@ -19,7 +18,7 @@ module EmbedHtml
19
18
 
20
19
  def process
21
20
  @logger.info "downloading url: #{@url}"
22
- html = Typhoeus::Request.get(@url.to_s).body
21
+ html = open(@url.to_s).read
23
22
  doc = Hpricot(html)
24
23
 
25
24
  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
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Francis Chong
@@ -29,18 +29,6 @@ dependencies:
29
29
  version: "0"
30
30
  type: :runtime
31
31
  version_requirements: *id001
32
- - !ruby/object:Gem::Dependency
33
- name: typhoeus
34
- prerelease: false
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- segments:
40
- - 0
41
- version: "0"
42
- type: :runtime
43
- version_requirements: *id002
44
32
  description: Download and embed images in html using base64 data encoding
45
33
  email: francis@ignition.hk
46
34
  executables: