iconoclasm 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/sander6/iconoclasm"
12
12
  gem.authors = ["Sander Hartlage"]
13
13
  gem.add_dependency("addressable")
14
+ gem.add_dependency("typhoeus")
14
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
16
  end
16
17
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
@@ -18,11 +18,11 @@ module Iconoclasm
18
18
  end
19
19
 
20
20
  def get(url)
21
- Typhoeus::Request.get(url, :user_agent => user_agent, :follow_location => true, :timeout => 1000)
21
+ Typhoeus::Request.get(url, :user_agent => user_agent, :follow_location => true, :timeout => Iconoclasm.timeout||=1000)
22
22
  end
23
23
 
24
24
  def head(url)
25
- Typhoeus::Request.head(url, :user_agent => user_agent, :timeout => 1000)
25
+ Typhoeus::Request.head(url, :user_agent => user_agent, :timeout => Iconoclasm.timeout||=1000)
26
26
  end
27
27
  end
28
- end
28
+ end
data/lib/iconoclasm.rb CHANGED
@@ -9,6 +9,7 @@ module Iconoclasm
9
9
 
10
10
  class << self
11
11
  include Iconoclasm::Extractor
12
+ attr_accessor :timeout
12
13
 
13
14
  def extract(url, content = nil)
14
15
  Iconoclasm::Favicon.new(extract_favicon_from(url, content))
@@ -22,4 +23,4 @@ class String
22
23
  def lines
23
24
  Enumerable::Enumerator.new(self.split("\n"))
24
25
  end
25
- end unless ''.respond_to?(:lines)
26
+ end unless ''.respond_to?(:lines)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iconoclasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sander Hartlage
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-19 00:00:00 -05:00
12
+ date: 2010-04-28 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,6 +22,16 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: typhoeus
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
25
35
  description: Finds favorites icons for web pages on the world wide internets by checking the HTML head or the standard favicon location. Then, do with them what you will.
26
36
  email: sander.hartlage@gmail.com
27
37
  executables: []