frank 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/frank.rb +1 -0
- data/lib/frank/cli.rb +5 -0
- data/lib/frank/compile.rb +8 -3
- data/lib/frank/settings.rb +6 -0
- data/lib/frank/version.rb +1 -1
- metadata +250 -161
data/Gemfile.lock
CHANGED
data/lib/frank.rb
CHANGED
data/lib/frank/cli.rb
CHANGED
@@ -68,6 +68,10 @@ module Frank
|
|
68
68
|
@options[:production] = true
|
69
69
|
end
|
70
70
|
|
71
|
+
opts.on('-f', 'Overwrite existing folder on export (frank export)') do |handler|
|
72
|
+
@options[:force_export] = true
|
73
|
+
end
|
74
|
+
|
71
75
|
opts.on('-v', '--version', 'Show the frank version and exit') do
|
72
76
|
puts "Frank v#{Frank::VERSION}"
|
73
77
|
exit
|
@@ -125,6 +129,7 @@ module Frank
|
|
125
129
|
# compile the project
|
126
130
|
Frank.exporting!
|
127
131
|
Frank.production! if @options[:production]
|
132
|
+
Frank.force_export! if @options[:force_export]
|
128
133
|
Frank.export.path = ARGV[1] if ARGV[1]
|
129
134
|
Frank::Compile.export!
|
130
135
|
when 'publish', 'p'
|
data/lib/frank/compile.rb
CHANGED
@@ -55,18 +55,23 @@ module Frank
|
|
55
55
|
# remove it if so, exit if not
|
56
56
|
def verify_overwriting
|
57
57
|
overwrite = ask_nicely
|
58
|
-
|
58
|
+
|
59
59
|
while overwrite.empty?
|
60
60
|
overwrite = ask_nicely
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
overwrite == 'y' ? FileUtils.rm_rf(Frank.export.path) : exit
|
64
64
|
end
|
65
65
|
|
66
66
|
# TODO verbose everywhere is lame
|
67
67
|
# create the dump dir, compile templates, copy over static assets
|
68
68
|
def export!
|
69
|
-
|
69
|
+
if File.exist?(Frank.export.path) && !Frank.export.force
|
70
|
+
verify_overwriting
|
71
|
+
else
|
72
|
+
FileUtils.rm_rf(Frank.export.path)
|
73
|
+
end
|
74
|
+
|
70
75
|
FileUtils.mkdir(Frank.export.path)
|
71
76
|
|
72
77
|
unless Frank.silent_export?
|
data/lib/frank/settings.rb
CHANGED
@@ -36,6 +36,7 @@ module Frank
|
|
36
36
|
@export = OpenStruct.new
|
37
37
|
@export.path = "exported"
|
38
38
|
@export.silent = false
|
39
|
+
@export.force = false
|
39
40
|
|
40
41
|
# publish options
|
41
42
|
@publish = OpenStruct.new
|
@@ -95,6 +96,11 @@ module Frank
|
|
95
96
|
@production = true
|
96
97
|
end
|
97
98
|
|
99
|
+
# Force overwrite export folder if it exists
|
100
|
+
def force_export!
|
101
|
+
@export.force = true
|
102
|
+
end
|
103
|
+
|
98
104
|
# Mark this Frank run as publishing
|
99
105
|
def publishing!
|
100
106
|
@exporting = true
|
data/lib/frank/version.rb
CHANGED
metadata
CHANGED
@@ -1,234 +1,314 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: frank
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 11
|
10
|
+
version: 1.0.11
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- blahed
|
9
14
|
- nwah
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-05-11 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
16
22
|
name: rack
|
17
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
25
|
none: false
|
19
|
-
requirements:
|
26
|
+
requirements:
|
20
27
|
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 13
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 1
|
33
|
+
version: "1.1"
|
23
34
|
type: :runtime
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
27
37
|
name: mongrel
|
28
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
|
-
requirements:
|
41
|
+
requirements:
|
31
42
|
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 1923831981
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 2
|
48
|
+
- 0
|
49
|
+
- pre
|
50
|
+
- 2
|
33
51
|
version: 1.2.0.pre2
|
34
52
|
type: :runtime
|
35
|
-
|
36
|
-
|
37
|
-
- !ruby/object:Gem::Dependency
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
38
55
|
name: haml
|
39
|
-
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
58
|
none: false
|
41
|
-
requirements:
|
59
|
+
requirements:
|
42
60
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 7
|
63
|
+
segments:
|
64
|
+
- 3
|
65
|
+
- 0
|
66
|
+
version: "3.0"
|
45
67
|
type: :runtime
|
46
|
-
|
47
|
-
|
48
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
49
70
|
name: tilt
|
50
|
-
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
51
73
|
none: false
|
52
|
-
requirements:
|
74
|
+
requirements:
|
53
75
|
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 9
|
78
|
+
segments:
|
79
|
+
- 1
|
80
|
+
- 3
|
81
|
+
version: "1.3"
|
56
82
|
type: :runtime
|
57
|
-
|
58
|
-
|
59
|
-
- !ruby/object:Gem::Dependency
|
83
|
+
version_requirements: *id004
|
84
|
+
- !ruby/object:Gem::Dependency
|
60
85
|
name: net-ssh
|
61
|
-
|
86
|
+
prerelease: false
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
62
88
|
none: false
|
63
|
-
requirements:
|
89
|
+
requirements:
|
64
90
|
- - ~>
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 3
|
93
|
+
segments:
|
94
|
+
- 2
|
95
|
+
- 0
|
96
|
+
version: "2.0"
|
67
97
|
type: :runtime
|
68
|
-
|
69
|
-
|
70
|
-
- !ruby/object:Gem::Dependency
|
98
|
+
version_requirements: *id005
|
99
|
+
- !ruby/object:Gem::Dependency
|
71
100
|
name: rspec
|
72
|
-
|
101
|
+
prerelease: false
|
102
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
73
103
|
none: false
|
74
|
-
requirements:
|
104
|
+
requirements:
|
75
105
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 23
|
108
|
+
segments:
|
109
|
+
- 2
|
110
|
+
- 6
|
111
|
+
- 0
|
77
112
|
version: 2.6.0
|
78
113
|
type: :development
|
79
|
-
|
80
|
-
|
81
|
-
- !ruby/object:Gem::Dependency
|
114
|
+
version_requirements: *id006
|
115
|
+
- !ruby/object:Gem::Dependency
|
82
116
|
name: rack-test
|
83
|
-
|
117
|
+
prerelease: false
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
84
119
|
none: false
|
85
|
-
requirements:
|
120
|
+
requirements:
|
86
121
|
- - ~>
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
hash: 1
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
- 5
|
127
|
+
version: "0.5"
|
89
128
|
type: :development
|
90
|
-
|
91
|
-
|
92
|
-
- !ruby/object:Gem::Dependency
|
129
|
+
version_requirements: *id007
|
130
|
+
- !ruby/object:Gem::Dependency
|
93
131
|
name: rake
|
94
|
-
|
132
|
+
prerelease: false
|
133
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
95
134
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
hash: 3
|
139
|
+
segments:
|
140
|
+
- 0
|
141
|
+
version: "0"
|
100
142
|
type: :development
|
101
|
-
|
102
|
-
|
103
|
-
- !ruby/object:Gem::Dependency
|
143
|
+
version_requirements: *id008
|
144
|
+
- !ruby/object:Gem::Dependency
|
104
145
|
name: builder
|
105
|
-
|
146
|
+
prerelease: false
|
147
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
106
148
|
none: false
|
107
|
-
requirements:
|
108
|
-
- -
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
hash: 3
|
153
|
+
segments:
|
154
|
+
- 0
|
155
|
+
version: "0"
|
111
156
|
type: :development
|
112
|
-
|
113
|
-
|
114
|
-
- !ruby/object:Gem::Dependency
|
157
|
+
version_requirements: *id009
|
158
|
+
- !ruby/object:Gem::Dependency
|
115
159
|
name: mocha
|
116
|
-
|
160
|
+
prerelease: false
|
161
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
117
162
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
hash: 3
|
167
|
+
segments:
|
168
|
+
- 0
|
169
|
+
version: "0"
|
122
170
|
type: :development
|
123
|
-
|
124
|
-
|
125
|
-
- !ruby/object:Gem::Dependency
|
171
|
+
version_requirements: *id010
|
172
|
+
- !ruby/object:Gem::Dependency
|
126
173
|
name: erubis
|
127
|
-
|
174
|
+
prerelease: false
|
175
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
128
176
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
hash: 3
|
181
|
+
segments:
|
182
|
+
- 0
|
183
|
+
version: "0"
|
133
184
|
type: :development
|
134
|
-
|
135
|
-
|
136
|
-
- !ruby/object:Gem::Dependency
|
185
|
+
version_requirements: *id011
|
186
|
+
- !ruby/object:Gem::Dependency
|
137
187
|
name: compass
|
138
|
-
|
188
|
+
prerelease: false
|
189
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
139
190
|
none: false
|
140
|
-
requirements:
|
191
|
+
requirements:
|
141
192
|
- - ~>
|
142
|
-
- !ruby/object:Gem::Version
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
hash: 51
|
195
|
+
segments:
|
196
|
+
- 0
|
197
|
+
- 10
|
198
|
+
- 2
|
143
199
|
version: 0.10.2
|
144
200
|
type: :development
|
145
|
-
|
146
|
-
|
147
|
-
- !ruby/object:Gem::Dependency
|
201
|
+
version_requirements: *id012
|
202
|
+
- !ruby/object:Gem::Dependency
|
148
203
|
name: rdiscount
|
149
|
-
|
204
|
+
prerelease: false
|
205
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
150
206
|
none: false
|
151
|
-
requirements:
|
152
|
-
- -
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
hash: 3
|
211
|
+
segments:
|
212
|
+
- 0
|
213
|
+
version: "0"
|
155
214
|
type: :development
|
156
|
-
|
157
|
-
|
158
|
-
- !ruby/object:Gem::Dependency
|
215
|
+
version_requirements: *id013
|
216
|
+
- !ruby/object:Gem::Dependency
|
159
217
|
name: liquid
|
160
|
-
|
218
|
+
prerelease: false
|
219
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
161
220
|
none: false
|
162
|
-
requirements:
|
163
|
-
- -
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
hash: 3
|
225
|
+
segments:
|
226
|
+
- 0
|
227
|
+
version: "0"
|
166
228
|
type: :development
|
167
|
-
|
168
|
-
|
169
|
-
- !ruby/object:Gem::Dependency
|
229
|
+
version_requirements: *id014
|
230
|
+
- !ruby/object:Gem::Dependency
|
170
231
|
name: less
|
171
|
-
|
232
|
+
prerelease: false
|
233
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
172
234
|
none: false
|
173
|
-
requirements:
|
174
|
-
- -
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
|
235
|
+
requirements:
|
236
|
+
- - ">="
|
237
|
+
- !ruby/object:Gem::Version
|
238
|
+
hash: 3
|
239
|
+
segments:
|
240
|
+
- 0
|
241
|
+
version: "0"
|
177
242
|
type: :development
|
178
|
-
|
179
|
-
|
180
|
-
- !ruby/object:Gem::Dependency
|
243
|
+
version_requirements: *id015
|
244
|
+
- !ruby/object:Gem::Dependency
|
181
245
|
name: coffee-script
|
182
|
-
|
246
|
+
prerelease: false
|
247
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
183
248
|
none: false
|
184
|
-
requirements:
|
249
|
+
requirements:
|
185
250
|
- - ~>
|
186
|
-
- !ruby/object:Gem::Version
|
251
|
+
- !ruby/object:Gem::Version
|
252
|
+
hash: 7
|
253
|
+
segments:
|
254
|
+
- 2
|
255
|
+
- 2
|
256
|
+
- 0
|
187
257
|
version: 2.2.0
|
188
258
|
type: :development
|
189
|
-
|
190
|
-
|
191
|
-
- !ruby/object:Gem::Dependency
|
259
|
+
version_requirements: *id016
|
260
|
+
- !ruby/object:Gem::Dependency
|
192
261
|
name: RedCloth
|
193
|
-
|
262
|
+
prerelease: false
|
263
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
194
264
|
none: false
|
195
|
-
requirements:
|
196
|
-
- -
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
|
265
|
+
requirements:
|
266
|
+
- - ">="
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
hash: 3
|
269
|
+
segments:
|
270
|
+
- 0
|
271
|
+
version: "0"
|
199
272
|
type: :development
|
200
|
-
|
201
|
-
|
202
|
-
- !ruby/object:Gem::Dependency
|
273
|
+
version_requirements: *id017
|
274
|
+
- !ruby/object:Gem::Dependency
|
203
275
|
name: net-scp
|
204
|
-
|
276
|
+
prerelease: false
|
277
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
205
278
|
none: false
|
206
|
-
requirements:
|
207
|
-
- -
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
|
279
|
+
requirements:
|
280
|
+
- - ">="
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
hash: 3
|
283
|
+
segments:
|
284
|
+
- 0
|
285
|
+
version: "0"
|
210
286
|
type: :development
|
211
|
-
|
212
|
-
|
213
|
-
- !ruby/object:Gem::Dependency
|
287
|
+
version_requirements: *id018
|
288
|
+
- !ruby/object:Gem::Dependency
|
214
289
|
name: net-sftp
|
215
|
-
|
290
|
+
prerelease: false
|
291
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
216
292
|
none: false
|
217
|
-
requirements:
|
218
|
-
- -
|
219
|
-
- !ruby/object:Gem::Version
|
220
|
-
|
293
|
+
requirements:
|
294
|
+
- - ">="
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
hash: 3
|
297
|
+
segments:
|
298
|
+
- 0
|
299
|
+
version: "0"
|
221
300
|
type: :development
|
222
|
-
|
223
|
-
version_requirements: *70146970694020
|
301
|
+
version_requirements: *id019
|
224
302
|
description: Rapidly develop static sites using any supported templating language
|
225
|
-
email:
|
303
|
+
email:
|
226
304
|
- tdunn13@gmail
|
227
|
-
executables:
|
305
|
+
executables:
|
228
306
|
- frank
|
229
307
|
extensions: []
|
308
|
+
|
230
309
|
extra_rdoc_files: []
|
231
|
-
|
310
|
+
|
311
|
+
files:
|
232
312
|
- .gitignore
|
233
313
|
- Gemfile
|
234
314
|
- Gemfile.lock
|
@@ -327,29 +407,38 @@ files:
|
|
327
407
|
- spec/template_helpers_spec.rb
|
328
408
|
homepage:
|
329
409
|
licenses: []
|
410
|
+
|
330
411
|
post_install_message:
|
331
412
|
rdoc_options: []
|
332
|
-
|
413
|
+
|
414
|
+
require_paths:
|
333
415
|
- lib
|
334
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
416
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
335
417
|
none: false
|
336
|
-
requirements:
|
337
|
-
- -
|
338
|
-
- !ruby/object:Gem::Version
|
339
|
-
|
340
|
-
|
418
|
+
requirements:
|
419
|
+
- - ">="
|
420
|
+
- !ruby/object:Gem::Version
|
421
|
+
hash: 3
|
422
|
+
segments:
|
423
|
+
- 0
|
424
|
+
version: "0"
|
425
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
426
|
none: false
|
342
|
-
requirements:
|
343
|
-
- -
|
344
|
-
- !ruby/object:Gem::Version
|
345
|
-
|
427
|
+
requirements:
|
428
|
+
- - ">="
|
429
|
+
- !ruby/object:Gem::Version
|
430
|
+
hash: 3
|
431
|
+
segments:
|
432
|
+
- 0
|
433
|
+
version: "0"
|
346
434
|
requirements: []
|
435
|
+
|
347
436
|
rubyforge_project: frank
|
348
|
-
rubygems_version: 1.8.
|
437
|
+
rubygems_version: 1.8.10
|
349
438
|
signing_key:
|
350
439
|
specification_version: 3
|
351
440
|
summary: Rapidly develop static sites using any supported templating language
|
352
|
-
test_files:
|
441
|
+
test_files:
|
353
442
|
- spec/base_spec.rb
|
354
443
|
- spec/compile_spec.rb
|
355
444
|
- spec/publish/base_spec.rb
|