Permalink
Browse files

Added nokogiri as the run time dep

  • Loading branch information...
1 parent eea20e1 commit 869c46eed7d3eeb3430ff42c20e9ba52d40ae9a5 @hemanth committed May 21, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −1 bin/xkcd
  2. +2 −2 lib/xkcd.rb
  3. +2 −1 xkcd.gemspec
View
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require 'xkcd'
puts XKCD.get
-
+puts XKCD.
View
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
-require 'hpricot'
+require 'nokogiri'
require 'open-uri'
# The main XKCD driver
class XKCD
@@ -21,6 +21,6 @@ class << XKCD
end
def self.img
- Hpricot(open('http://dynamic.xkcd.com/random/comic/')).search("#comic img").first.raw_attributes["src"]
+ Nokogiri::HTML(open('http://dynamic.xkcd.com/random/comic/')).css('#comic img')[0].attributes["src"].value
end
end
View
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "xkcd"
- s.version = "0.0.3"
+ s.version = "0.0.5"
s.default_executable = "xkcd"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.rubygems_version = %q{1.6.2}
s.summary = %q{XCKD random img urls!}
+ s.add_runtime_dependency 'nokogiri', '~> 1.5.2', '>= 1.5.0'
if s.respond_to? :specification_version then
s.specification_version = 3

0 comments on commit 869c46e

Please sign in to comment.