programmable-ventouse 0.1.0 → 0.1.1

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.
@@ -2,4 +2,9 @@ class String
2
2
  def filter_prefix prefix
3
3
  self.starts_with?(prefix) ? self[prefix.to_s.length, self.length] : self
4
4
  end
5
+
6
+ def filter_prefix! prefix
7
+ self.slice! Regexp.new "^#{prefix}"
8
+ end
9
+
5
10
  end
data/lib/ventouse.rb CHANGED
@@ -35,6 +35,6 @@ class Ventouse
35
35
  end
36
36
 
37
37
  def self.ensure_dir_exists dir
38
- FileUtils.mkdir dir unless File.exist? dir and File.directory? dir
38
+ FileUtils.mkdir_p dir unless File.exist? dir and File.directory? dir
39
39
  end
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: programmable-ventouse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilia Ablamonov