Permalink
Browse files

Ruby 1.8 compatibility

  • Loading branch information...
1 parent 1315a28 commit c1106fca1421e687235c262a23b6e2a5c4618aaa @avdgaag committed Apr 15, 2012
Showing with 10 additions and 19 deletions.
  1. +0 −4 Gemfile.lock
  2. +0 −4 Guardfile
  3. +1 −1 lib/rpub/epub/container.rb
  4. +1 −1 lib/rpub/epub/content.rb
  5. +7 −7 lib/rpub/epub/toc.rb
  6. +1 −1 lib/rpub/xml_file.rb
  7. +0 −1 rpub.gemspec
View
4 Gemfile.lock
@@ -19,9 +19,6 @@ GEM
thor (~> 0.14.6)
guard-rspec (0.7.0)
guard (>= 0.10.0)
- guard-yard (1.0.2)
- guard (>= 0.2.2)
- yard (>= 0.7.0)
kramdown (0.13.5)
rake (0.9.2.2)
rb-fsevent (0.9.1)
@@ -47,7 +44,6 @@ DEPENDENCIES
growl
guard
guard-rspec
- guard-yard
rake
rb-fsevent
rpub!
View
4 Guardfile
@@ -3,7 +3,3 @@ guard 'rspec', :version => 2 do
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
-
-guard 'yard' do
- watch(%r{lib/.+\.rb})
-end
View
2 lib/rpub/epub/container.rb
@@ -3,7 +3,7 @@ class Epub
class Container < XmlFile
def render
xml.instruct!
- xml.container version: '1.0', xmlns: 'urn:oasis:names:tc:opendocument:xmlns:container' do
+ xml.container :version => '1.0', :xmlns => 'urn:oasis:names:tc:opendocument:xmlns:container' do
xml.rootfiles do
xml.rootfile 'full-path' => 'OEBPS/content.opf', 'media-type' => 'application/oebps-package+xml'
end
View
2 lib/rpub/epub/content.rb
@@ -18,7 +18,7 @@ def render
xml.dc :creator, book.creator, 'opf:role' => 'aut'
xml.dc :publisher, book.publisher
xml.dc :subject, book.subject
- xml.dc :identifier, book.uid, id: 'BookId'
+ xml.dc :identifier, book.uid, :id => 'BookId'
xml.dc :rights, book.rights
xml.dc :description, book.description
end
View
14 lib/rpub/epub/toc.rb
@@ -11,19 +11,19 @@ def initialize(book)
def render
xml.instruct!
xml.declare! :DOCTYPE, :ncx, :PUBLIC, "-//W3C//DTD XHTML 1.1//EN", 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'
- xml.ncx xmlns: 'http://www.daisy.org/z3986/2005/ncx/' , version: '2005-1' do
+ xml.ncx :xmlns => 'http://www.daisy.org/z3986/2005/ncx/', :version => '2005-1' do
xml.head do
- xml.meta name: 'dtb:uid', content: @book.uid
- xml.meta name: 'dtb:depth', content: '1'
- xml.meta name: 'dtb:totalPageCount', content: '0'
- xml.meta name: 'dtb:maxPageNumber', content: '0'
+ xml.meta :name => 'dtb:uid', :content => @book.uid
+ xml.meta :name => 'dtb:depth', :content => '1'
+ xml.meta :name => 'dtb:totalPageCount', :content => '0'
+ xml.meta :name => 'dtb:maxPageNumber', :content => '0'
end
xml.docTitle { xml.text @book.title }
xml.navMap do
@book.chapters.each_with_index do |chapter, n|
- xml.navPoint id: chapter.id, playOrder: n do
+ xml.navPoint :id => chapter.id, :playOrder => n do
xml.navLabel { xml.text chapter.title }
- xml.content src: chapter.filename
+ xml.content :src => chapter.filename
end
end
end
View
2 lib/rpub/xml_file.rb
@@ -3,7 +3,7 @@ class XmlFile
attr_reader :xml
def initialize
- @xml = Builder::XmlMarkup.new indent: 2
+ @xml = Builder::XmlMarkup.new :indent => 2
end
def to_s
View
1 rpub.gemspec
@@ -45,7 +45,6 @@ EOS
s.add_development_dependency 'rspec'
s.add_development_dependency 'rake'
s.add_development_dependency 'guard'
- s.add_development_dependency 'guard-yard'
s.add_development_dependency 'guard-rspec'
s.add_development_dependency 'rb-fsevent'
s.add_development_dependency 'growl'

0 comments on commit c1106fc

Please sign in to comment.