bergamasco 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62901afff36fd4f178b9cf83af26ca098b624bfc
4
- data.tar.gz: 259429f324394efe47680033ff33068427171b4b
3
+ metadata.gz: d366e22815b8d717e90a4939ec552ed49b21f784
4
+ data.tar.gz: 3336cc66bfdf33a51d7ba3fdebda5932586446cd
5
5
  SHA512:
6
- metadata.gz: e230e0cd85143096d69b4fce20b7fbbf87b37fc48dd69c455113eb6e1d6207ddcf87884ffc3ee17774b0cd442bec61bbb4b7011e2d037df445ba902b6fa05eee
7
- data.tar.gz: 88d56f662c43c51f48617729f7542b93dd3e3f60d80b7388748cd30809ed0ddc09ceebbb3b82b126375e616a36e4680e0091e1f7c6ca2e45a85017aea2e5e792
6
+ metadata.gz: e538ea066a4542ec91d11a461c3a8b33a621e71b8c499c9eb6eed29e517308c93a0828133b4173ad621e96adbd1256301ef7299722be0f35701353894285a445
7
+ data.tar.gz: fe7cabeaa4fb34769ff36d1d70743c777de89cc536ac795bf23e72b6d4e42558fafc16141d414bfb4967a1d62835d1281516b4edc6029f31684dcf353326364f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bergamasco (0.1.2)
4
+ bergamasco (0.1.3)
5
5
  activesupport (~> 4.2, >= 4.2.5)
6
6
  builder (~> 3.2, >= 3.2.2)
7
7
  commonmarker (~> 0.14.0)
data/lib/bergamasco.rb CHANGED
@@ -5,6 +5,7 @@ require 'yaml'
5
5
  require 'safe_yaml/load'
6
6
  require 'loofah'
7
7
  require 'commonmarker'
8
+ require 'pathname'
8
9
 
9
10
  require "bergamasco/summarize"
10
11
  require "bergamasco/sanitize"
@@ -29,6 +29,12 @@ module Bergamasco
29
29
  end
30
30
 
31
31
  def self.write_yaml(filepath, content)
32
+ unless File.exist?(filepath)
33
+ parentdir = Pathname.new(filepath).parent
34
+ FileUtils.mkdir_p parentdir
35
+ FileUtils.touch filepath
36
+ end
37
+
32
38
  IO.write(filepath, content.to_yaml)
33
39
  end
34
40
 
@@ -1,3 +1,3 @@
1
1
  module Bergamasco
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bergamasco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Fenner