bookshelf 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_dependency "thor"
28
28
  s.add_dependency "eeepub-with-cover-support"
29
29
  s.add_dependency "notifier"
30
+ s.add_dependency "sass"
30
31
 
31
32
  s.add_development_dependency "rspec"
32
33
  s.add_development_dependency "test_notifier"
@@ -17,10 +17,22 @@ module Bookshelf
17
17
  @ui ||= Thor::Base.shell.new
18
18
  end
19
19
 
20
+ def export_assets
21
+ FileUtils.mkdir_p("output/assets/fonts")
22
+ FileUtils.mkdir_p("output/assets/images")
23
+ FileUtils.mkdir_p("output/assets/styles")
24
+ FileUtils.cp_r(Dir.glob('assets/fonts/*'), "output/assets/fonts/")
25
+ FileUtils.cp_r(Dir.glob('assets/images/*'), "output/assets/images/")
26
+ ["epub","html"].each do |style_sheet|
27
+ `sass assets/styles/#{style_sheet}.scss output/assets/styles/#{style_sheet}.css`
28
+ end
29
+ end
30
+
20
31
  def export!
21
32
  helper = Bookshelf.root_dir.join("config/helper.rb")
22
33
  load(helper) if helper.exist?
23
34
 
35
+ export_assets
24
36
  export_pdf = [nil, "pdf"].include?(options[:only])
25
37
  export_epub = [nil, "mobi", "epub"].include?(options[:only])
26
38
  export_mobi = [nil, "mobi"].include?(options[:only])
@@ -43,6 +43,10 @@ module Bookshelf
43
43
 
44
44
  def create_empty_directories
45
45
  empty_directory "output"
46
+ empty_directory "output/assets"
47
+ empty_directory "output/assets/fonts"
48
+ empty_directory "output/assets/images"
49
+ empty_directory "output/assets/styles"
46
50
  empty_directory "text"
47
51
  end
48
52
 
@@ -50,10 +54,15 @@ module Bookshelf
50
54
  create_file ".gitignore" do
51
55
  "output/*.{html,epub,pdf}\noutput/tmp"
52
56
  end
57
+ create_file "assets/.gitkeep"
53
58
  create_file "assets/fonts/.gitkeep"
54
59
  create_file "assets/images/.gitkeep"
55
60
  create_file "assets/styles/.gitkeep"
56
61
  create_file "output/.gitkeep"
62
+ create_file "output/assets/.gitkeep"
63
+ create_file "output/assets/fonts/.gitkeep"
64
+ create_file "output/assets/images/.gitkeep"
65
+ create_file "output/assets/styles/.gitkeep"
57
66
  create_file "text/.gitkeep"
58
67
  end
59
68
  end
@@ -1,7 +1,7 @@
1
1
  module Bookshelf
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 1
4
+ MINOR = 2
5
5
  PATCH = 0
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
@@ -1,13 +1,10 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
3
  <html>
4
4
  <head>
5
5
  <title><%= title %></title>
6
6
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
7
- <link rel="stylesheet" type="text/css" href="../templates/html/layout.css"/>
8
- <link rel="stylesheet" type="text/css" href="../templates/html/syntax.css"/>
9
- <link rel="stylesheet" type="text/css" href="../templates/html/user.css"/>
10
-
7
+ <link rel="stylesheet" type="text/css" href="assets/styles/html.css"/>
11
8
  <meta name="author" content="<%= authors.join(', ') %>" />
12
9
  <meta name="subject" content="<%= subject %>" />
13
10
  <meta name="keywords" content="<%= keywords %>" />
metadata CHANGED
@@ -1,179 +1,212 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bookshelf
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 2
8
+ - 0
9
+ version: 1.2.0
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Brad Crawford
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2013-05-24 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2013-05-25 00:00:00 +12:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: activesupport
16
- requirement: &70107041166720 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: *70107041166720
25
- - !ruby/object:Gem::Dependency
26
- name: nokogiri
27
- requirement: &70107041166260 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
33
30
  type: :runtime
31
+ version_requirements: *id001
32
+ - !ruby/object:Gem::Dependency
33
+ name: nokogiri
34
34
  prerelease: false
35
- version_requirements: *70107041166260
36
- - !ruby/object:Gem::Dependency
37
- name: RedCloth
38
- requirement: &70107041165840 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
41
+ version: "0"
44
42
  type: :runtime
43
+ version_requirements: *id002
44
+ - !ruby/object:Gem::Dependency
45
+ name: RedCloth
45
46
  prerelease: false
46
- version_requirements: *70107041165840
47
- - !ruby/object:Gem::Dependency
48
- name: rdiscount
49
- requirement: &70107041165420 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
47
+ requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
55
54
  type: :runtime
55
+ version_requirements: *id003
56
+ - !ruby/object:Gem::Dependency
57
+ name: rdiscount
56
58
  prerelease: false
57
- version_requirements: *70107041165420
58
- - !ruby/object:Gem::Dependency
59
- name: i18n
60
- requirement: &70107041165000 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
59
+ requirement: &id004 !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
65
+ version: "0"
66
66
  type: :runtime
67
+ version_requirements: *id004
68
+ - !ruby/object:Gem::Dependency
69
+ name: i18n
67
70
  prerelease: false
68
- version_requirements: *70107041165000
69
- - !ruby/object:Gem::Dependency
70
- name: thor
71
- requirement: &70107040946860 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
71
+ requirement: &id005 !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
77
+ version: "0"
77
78
  type: :runtime
79
+ version_requirements: *id005
80
+ - !ruby/object:Gem::Dependency
81
+ name: thor
78
82
  prerelease: false
79
- version_requirements: *70107040946860
80
- - !ruby/object:Gem::Dependency
81
- name: eeepub-with-cover-support
82
- requirement: &70107040943560 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ! '>='
86
- - !ruby/object:Gem::Version
87
- version: '0'
83
+ requirement: &id006 !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ segments:
88
+ - 0
89
+ version: "0"
88
90
  type: :runtime
91
+ version_requirements: *id006
92
+ - !ruby/object:Gem::Dependency
93
+ name: eeepub-with-cover-support
89
94
  prerelease: false
90
- version_requirements: *70107040943560
91
- - !ruby/object:Gem::Dependency
95
+ requirement: &id007 !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ type: :runtime
103
+ version_requirements: *id007
104
+ - !ruby/object:Gem::Dependency
92
105
  name: notifier
93
- requirement: &70107040942300 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ! '>='
97
- - !ruby/object:Gem::Version
98
- version: '0'
106
+ prerelease: false
107
+ requirement: &id008 !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ segments:
112
+ - 0
113
+ version: "0"
99
114
  type: :runtime
115
+ version_requirements: *id008
116
+ - !ruby/object:Gem::Dependency
117
+ name: sass
100
118
  prerelease: false
101
- version_requirements: *70107040942300
102
- - !ruby/object:Gem::Dependency
119
+ requirement: &id009 !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ segments:
124
+ - 0
125
+ version: "0"
126
+ type: :runtime
127
+ version_requirements: *id009
128
+ - !ruby/object:Gem::Dependency
103
129
  name: rspec
104
- requirement: &70107040940380 !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- type: :development
111
130
  prerelease: false
112
- version_requirements: *70107040940380
113
- - !ruby/object:Gem::Dependency
114
- name: test_notifier
115
- requirement: &70107053171060 !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
131
+ requirement: &id010 !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ segments:
136
+ - 0
137
+ version: "0"
121
138
  type: :development
139
+ version_requirements: *id010
140
+ - !ruby/object:Gem::Dependency
141
+ name: test_notifier
122
142
  prerelease: false
123
- version_requirements: *70107053171060
124
- - !ruby/object:Gem::Dependency
125
- name: rake
126
- requirement: &70107053170640 !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
143
+ requirement: &id011 !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ segments:
148
+ - 0
149
+ version: "0"
132
150
  type: :development
151
+ version_requirements: *id011
152
+ - !ruby/object:Gem::Dependency
153
+ name: rake
133
154
  prerelease: false
134
- version_requirements: *70107053170640
135
- - !ruby/object:Gem::Dependency
136
- name: pry
137
- requirement: &70107053170220 !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - ! '>='
141
- - !ruby/object:Gem::Version
142
- version: '0'
155
+ requirement: &id012 !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ segments:
160
+ - 0
161
+ version: "0"
143
162
  type: :development
163
+ version_requirements: *id012
164
+ - !ruby/object:Gem::Dependency
165
+ name: pry
144
166
  prerelease: false
145
- version_requirements: *70107053170220
146
- - !ruby/object:Gem::Dependency
147
- name: pry-nav
148
- requirement: &70107053169800 !ruby/object:Gem::Requirement
149
- none: false
150
- requirements:
151
- - - ! '>='
152
- - !ruby/object:Gem::Version
153
- version: '0'
167
+ requirement: &id013 !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ segments:
172
+ - 0
173
+ version: "0"
154
174
  type: :development
175
+ version_requirements: *id013
176
+ - !ruby/object:Gem::Dependency
177
+ name: pry-nav
155
178
  prerelease: false
156
- version_requirements: *70107053169800
157
- - !ruby/object:Gem::Dependency
158
- name: awesome_print
159
- requirement: &70107053169380 !ruby/object:Gem::Requirement
160
- none: false
161
- requirements:
162
- - - ! '>='
163
- - !ruby/object:Gem::Version
164
- version: '0'
179
+ requirement: &id014 !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ segments:
184
+ - 0
185
+ version: "0"
165
186
  type: :development
187
+ version_requirements: *id014
188
+ - !ruby/object:Gem::Dependency
189
+ name: awesome_print
166
190
  prerelease: false
167
- version_requirements: *70107053169380
168
- description: A framework that generates PDF and e-Pub from Markdown, Textile, and
169
- HTML files.
170
- email:
191
+ requirement: &id015 !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ segments:
196
+ - 0
197
+ version: "0"
198
+ type: :development
199
+ version_requirements: *id015
200
+ description: A framework that generates PDF and e-Pub from Markdown, Textile, and HTML files.
201
+ email:
171
202
  - brad.robert.crawford@gmail.com
172
- executables:
203
+ executables:
173
204
  - bookshelf
174
205
  extensions: []
206
+
175
207
  extra_rdoc_files: []
176
- files:
208
+
209
+ files:
177
210
  - .gitignore
178
211
  - .gitmodules
179
212
  - Gemfile
@@ -214,30 +247,36 @@ files:
214
247
  - templates/helper.rb
215
248
  - templates/html.scss
216
249
  - templates/layout.erb
250
+ has_rdoc: true
217
251
  homepage: https://bitbucket.org/bradcrawford/bookshelf
218
- licenses:
252
+ licenses:
219
253
  - MIT
220
254
  post_install_message:
221
255
  rdoc_options: []
222
- require_paths:
256
+
257
+ require_paths:
223
258
  - lib
224
- required_ruby_version: !ruby/object:Gem::Requirement
225
- none: false
226
- requirements:
227
- - - ! '>='
228
- - !ruby/object:Gem::Version
229
- version: '1.9'
230
- required_rubygems_version: !ruby/object:Gem::Requirement
231
- none: false
232
- requirements:
233
- - - ! '>='
234
- - !ruby/object:Gem::Version
235
- version: '0'
259
+ required_ruby_version: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ segments:
264
+ - 1
265
+ - 9
266
+ version: "1.9"
267
+ required_rubygems_version: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ segments:
272
+ - 0
273
+ version: "0"
236
274
  requirements: []
275
+
237
276
  rubyforge_project:
238
- rubygems_version: 1.8.15
277
+ rubygems_version: 1.3.6
239
278
  signing_key:
240
279
  specification_version: 3
241
- summary: A framework that generates PDF and e-Pub from Markdown, Textile, and HTML
242
- files.
280
+ summary: A framework that generates PDF and e-Pub from Markdown, Textile, and HTML files.
243
281
  test_files: []
282
+