Permalink
Browse files

Force hpricot version to be 0.8.1

  • Loading branch information...
1 parent e04fa38 commit 5ff1f73ab585bb4ce6a0f22a64e73707de2ee888 @zetaben committed Aug 18, 2010
Showing with 15 additions and 12 deletions.
  1. +3 −3 Html2Feedbooks.gemspec
  2. +12 −9 bin/html2fb.rb
@@ -1,9 +1,9 @@
Gem::Specification.new do |s|
s.name = %q{Html2Feedbooks}
- s.version = '1.1.0'
+ s.version = '1.1.1'
s.date = %q{2009-04-28}
s.authors = ["Benoit Larroque"]
- s.email = "zeta dot ben at gmail dot com"
+ s.email = "benoit dot larroque at feedbooks dot com"
s.summary = %q{Html2Feedbooks is script to automate basic publishing on feedbooks.com}
s.homepage = %q{http://github.com/zetaben/Html2Feedbooks}
s.description = %q{Html2Feedbooks is script to automate basic publishing on feedbooks.com}
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.executables = ['html2fb.rb']
s.default_executable = 'html2fb.rb'
- s.add_dependency('hpricot', '>= 0.8.1')
+ s.add_dependency('hpricot', '= 0.8.1')
s.add_dependency('htmlentities', '>= 4.2.1')
s.add_dependency('launchy', '>= 0.3')
s.add_dependency('progressbar', '>= 0.0.3')
View
@@ -57,23 +57,26 @@
cache=Marshal.restore(File.open(basedir+'.cache','r'))
ok=Digest::MD5.hexdigest(content)==Digest::MD5.hexdigest(cache[:content])
abridged_conf.each do |k,v|
-# puts (abridged_conf[k]==cache[:conf][k]).inspect
-# puts (abridged_conf[k]).inspect
-# puts (cache[:conf][k]).inspect
-# puts "-_-_-_-_"
+ # puts (abridged_conf[k]==cache[:conf][k]).inspect
+ # puts (abridged_conf[k]).inspect
+ # puts (cache[:conf][k]).inspect
+ # puts "-_-_-_-_"
ok&&=abridged_conf[k]==cache[:conf][k]
end
end
#puts content.size
if options[:cache] && ok
-puts "Using cache file"
-doc=cache[:doc]
+ puts "Using cache file"
+ doc=cache[:doc]
else
-doc=Parser.new(conf).parse(content)
+ doc=Parser.new(conf).parse(content)
end
+
File.open(basedir+'.cache','w') do |e|
-Marshal.dump({:url => url,:conf => abridged_conf, :content => content, :doc => doc},e)
+ Marshal.dump({:url => url,:conf => abridged_conf, :content => content, :doc => doc},e)
end
+puts "Writing cache File "
+
puts doc.toc.to_yaml
if options[:preview]
page=File.join(Dir.tmpdir(),Digest::MD5.hexdigest(url.to_s))+'.html'
@@ -85,5 +88,5 @@
puts "When happy with the parsed output rerun with -s option to send to Feedbooks.com"
Launchy::Browser.run(page)
else
-doc.to_feedbooks(conf)
+ doc.to_feedbooks(conf)
end

0 comments on commit 5ff1f73

Please sign in to comment.