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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/blog-generator.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d99102c7282e8b497bb3ee93e22ba80fc93a571
4
- data.tar.gz: a125def0764764fbc248d39aa8c9f47f60246422
3
+ metadata.gz: c8dc5db77c4a2a7f608f424d16709202a2b74c6c
4
+ data.tar.gz: 78333987b262250f8d2e8a35cfaa97f4b85129a9
5
5
  SHA512:
6
- metadata.gz: 254ac9f801bf59d256bf430866d952e97788c3846bbb64b2bdc299c2989e4ce0690c739e04ae638460e672f749b6f2be5ee94d4295f4ad5a1b72ea1529e0c57c
7
- data.tar.gz: 2bf7abd9c10a769925d7c9fde83ace10eeb58ca0ed9dc0a8f23fcdb0b144d14464f43f91d700daad7dfda2c2565855a8e67bf46ba7c77cee2bfd4be27c95b75a
6
+ metadata.gz: bfde06a5ab223af902144ed64d8f050218c9213db6f549a584d03d91b56af1fcac2c4e71604901d04351e5589d058a88bab2c71427f9a561374d9997c6ab5bb3
7
+ data.tar.gz: 871ccc05a09e354864c1312c3f288bddf943da6371ec5da5894a2c59e53ced02e716ff6db6641edcc803e6d170f063cffbc6d891c4f55da72d4deb065ea80d13
@@ -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
- unless File.directory?(OUTPUT_BASE_PATH)
21
- puts "~ #{OUTPUT_BASE_PATH} doesn't exist, creating."
22
- Dir.mkdir(OUTPUT_BASE_PATH)
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blog-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James C Russell