wst-parser 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wst/content.rb +2 -0
- 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: 39af25746b9ea2e0532a44e96047958229c95b4b
|
4
|
+
data.tar.gz: 942b267ea92fe93b0fa091bd7100dd93878d33f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91b54f0938236768f5da44218698a82b4402809c5f2e42a4e6f90ac8dd1a513342a984bdfbe63c9c0468ca7c30ce364384f81f7272eb705c5be9e42c444fbfd8
|
7
|
+
data.tar.gz: e70b11e2d214cb540e5bea9ca70aa1e615c088bf4c7a171f9355551c6f9ec60112fee7df711b1f47586fb11aafbe750f60ae71cdcbb4850bec42396f4323a773
|
data/lib/wst/content.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'yaml'
|
3
3
|
require 'wst/configuration'
|
4
4
|
require 'digest/md5'
|
5
|
+
require 'fileutils'
|
5
6
|
|
6
7
|
module Wst
|
7
8
|
class Content
|
@@ -12,6 +13,7 @@ module Wst
|
|
12
13
|
# param [Hash] datas Header datas
|
13
14
|
# param [String] content Content to write
|
14
15
|
def save! file_path, datas, content
|
16
|
+
FileUtils.mkdir_p File.dirname file_path
|
15
17
|
File.open(file_path, "w") do |file|
|
16
18
|
file.write datas.to_yaml
|
17
19
|
file.write "---\n"
|