charmkit 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/charmkit/fs.rb +21 -0
- data/lib/charmkit/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80eb981dc102d082b0f5596f4b83101d340faec0
|
4
|
+
data.tar.gz: 1a581779cc5df31754e6092f8a72bc50e793c3c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a5b80cb5a23b2834d6ee127935555b1897cf8b8f5641a22b0f636bcad3d328606ee89ad9ef6eb3d76707c1715abf087eef0ce0684eeafbcfbf83f277c069ea
|
7
|
+
data.tar.gz: dbfd92058d61b55b0e467c67c348409de3dd5de3446cb546b486c61869f8a5599599aea85b1756b8205ebb90f3b9cd1368885829578a6113e7d12c4644af85f7
|
data/lib/charmkit/fs.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Charmkit
|
4
|
+
module DSL
|
5
|
+
def file(src, content:)
|
6
|
+
File.write(src, content)
|
7
|
+
end
|
8
|
+
|
9
|
+
def is_file?(path)
|
10
|
+
return File.exists?(path)
|
11
|
+
end
|
12
|
+
|
13
|
+
def is_dir?(path)
|
14
|
+
return Dir.exists?(path)
|
15
|
+
end
|
16
|
+
|
17
|
+
def mkdir(path)
|
18
|
+
FileUtils.mkdir_p path unless is_dir? path
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/charmkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charmkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Stokes
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- examples/template.rb
|
89
89
|
- examples/templates/user_auth.txt
|
90
90
|
- lib/charmkit.rb
|
91
|
+
- lib/charmkit/fs.rb
|
91
92
|
- lib/charmkit/hook-tools.rb
|
92
93
|
- lib/charmkit/package.rb
|
93
94
|
- lib/charmkit/runner.rb
|