blog-generator 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/blog-generator.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8dc5db77c4a2a7f608f424d16709202a2b74c6c
|
4
|
+
data.tar.gz: 78333987b262250f8d2e8a35cfaa97f4b85129a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfde06a5ab223af902144ed64d8f050218c9213db6f549a584d03d91b56af1fcac2c4e71604901d04351e5589d058a88bab2c71427f9a561374d9997c6ab5bb3
|
7
|
+
data.tar.gz: 871ccc05a09e354864c1312c3f288bddf943da6371ec5da5894a2c59e53ced02e716ff6db6641edcc803e6d170f063cffbc6d891c4f55da72d4deb065ea80d13
|
data/bin/blog-generator.rb
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
# blog-generator.rb [posts dir] [output base path]
|
6
6
|
|
7
7
|
require 'ostruct'
|
8
|
+
require 'fileutils'
|
8
9
|
require 'blog-generator'
|
9
10
|
|
10
11
|
POSTS_DIR, OUTPUT_BASE_PATH = ARGV
|
@@ -17,10 +18,9 @@ unless File.directory?(POSTS_DIR)
|
|
17
18
|
abort "Posts directory #{POSTS_DIR} doesn't exist."
|
18
19
|
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
21
|
+
|
22
|
+
FileUtils.rm_r(OUTPUT_BASE_PATH) if File.directory?(OUTPUT_BASE_PATH)
|
23
|
+
Dir.mkdir(OUTPUT_BASE_PATH)
|
24
24
|
|
25
25
|
path = File.expand_path(File.join(POSTS_DIR, '..', 'defaults.yml'))
|
26
26
|
unless File.exist?(path)
|