charmkit 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89b4c283b2d6dadc937ccfb891720976b47fe6e4
4
- data.tar.gz: ff44fd07cf6650aa69428a3688b6420eb3e85d99
3
+ metadata.gz: '085bbf025dc62ab2a3055ece656da11355623e06'
4
+ data.tar.gz: b34202cdbab9d6d49d3a2d7285cdd5ff01f9fa00
5
5
  SHA512:
6
- metadata.gz: 120bfb015365589522d5c022f14816df5c751ae9848417936410d9014248fb4465175e58d7d9db8dcf778697aae5066a8f763fe4a955744c3328fb50db76fd57
7
- data.tar.gz: d059c8cff4a09d9e9555dab319122d5fc2f2971c92afe056a180c8b6c35003e5b0cd55db14b0b40eef2b00b74c3fcc7961ce388986b0f940b8c1b253e99a29d7
6
+ metadata.gz: f7f6052e9e05a23d5aa9256320916666ca9c9280c7040dac21226efda3abff7f986915a1fc11dd8874e6bf3936e740ef81855ed1c6f7f760e2989cf4e23a7746
7
+ data.tar.gz: 92fb9c39b875643eff49593b2097138cf8c511be8121fa26dc9459d09917f9f94269bba8f86e230fe859278b94381bdfbeacb960d58d5dbfcf460d35b1ff028b
data/lib/charmkit/fs.rb CHANGED
@@ -2,24 +2,14 @@ require 'fileutils'
2
2
 
3
3
  module Charmkit
4
4
  module DSL
5
- def file(src, content:)
6
- File.write(src, content)
5
+ FileUtils.singleton_methods.each do |m|
6
+ define_method m, FileUtils.method(m).to_proc
7
7
  end
8
-
9
8
  def is_file?(path)
10
- return File.exists?(path)
9
+ return File.exists? path
11
10
  end
12
-
13
11
  def is_dir?(path)
14
- return Dir.exists?(path)
15
- end
16
-
17
- def mkdir(path)
18
- FileUtils.mkdir_p path
19
- end
20
-
21
- def rm(path)
22
- FileUtils.rm_rf(path, :force => true)
12
+ return Dir.exists? path
23
13
  end
24
14
  end
25
15
  end
@@ -1,3 +1,3 @@
1
1
  module Charmkit
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
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.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Stokes