eeepub 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -14,7 +14,7 @@ Usage
14
14
  identifier 'http://example.com/book/foo', :scheme => 'URL'
15
15
  uid 'http://example.com/book/foo'
16
16
 
17
- files ['/path/to/foo.html', '/path/to/bar.html']
17
+ files ['/path/to/foo.html', '/path/to/bar.html'] # or files [{'/path/to/foo.html' => 'dest/dir'}, {'/path/to/bar.html' => 'dest/dir'}]
18
18
  nav [
19
19
  {:label => '1. foo', :content => 'foo.html', :nav => [
20
20
  {:label => '1.1 foo-1', :content => 'foo.html#foo-1'}
data/Rakefile CHANGED
@@ -15,6 +15,7 @@ begin
15
15
  gem.add_development_dependency "rr"
16
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
17
  end
18
+ Jeweler::GemcutterTasks.new
18
19
  rescue LoadError
19
20
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
20
21
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -79,8 +79,10 @@ module EeePub
79
79
  when String
80
80
  FileUtils.cp(file, dir)
81
81
  when Hash
82
- FileUtils.mkdir_p(File.join(dir, file[:dir])) if file[:dir]
83
- FileUtils.cp(file[:path], File.join(dir, (file[:dir] || '')))
82
+ file_path, dir_path = *file.first
83
+ dest_dir = File.join(dir, dir_path)
84
+ FileUtils.mkdir_p(dest_dir)
85
+ FileUtils.cp(file_path, dest_dir)
84
86
  end
85
87
  end
86
88
 
@@ -106,7 +108,8 @@ module EeePub
106
108
  when String
107
109
  File.basename(file)
108
110
  when Hash
109
- file[:dir] ? File.join(file[:dir], File.basename(file[:path])) : File.basename(file[:path])
111
+ file_path, dir_path = *file.first
112
+ File.join(dir_path, File.basename(file_path))
110
113
  end
111
114
  },
112
115
  :ncx => @ncx_file
@@ -89,7 +89,7 @@ describe "EeePub::Maker" do
89
89
  uid 'http://example.com/book/foo'
90
90
  ncx_file 'toc.ncx'
91
91
  opf_file 'content.opf'
92
- files [{:dir => 'foo', :path => 'foo.html'}, {:dir => 'bar', :path => 'bar.html'}]
92
+ files [{'foo.html' => 'foo/bar'}, {'bar.html' => 'foo/bar/baz'}]
93
93
  nav [
94
94
  {:label => '1. foo', :content => 'foo.html'},
95
95
  {:label => '1. bar', :content => 'bar.html'}
@@ -114,7 +114,7 @@ describe "EeePub::Maker" do
114
114
  :ncx => "toc.ncx",
115
115
  :publisher => ["jugyo.org"],
116
116
  :identifier => [{:value => "http://example.com/book/foo", :scheme => "URL"}],
117
- :manifest => ["foo/foo.html", "bar/bar.html"]
117
+ :manifest => ["foo/bar/foo.html", "foo/bar/baz/bar.html"]
118
118
  ) { stub!.save }
119
119
  mock(EeePub::OCF).new.with_any_args { stub!.save }
120
120
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 0
9
- version: 0.6.0
8
+ - 1
9
+ version: 0.6.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - jugyo
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-23 00:00:00 +09:00
17
+ date: 2010-10-24 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency