zfs-tools 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/zfs_safe_destroy +3 -3
  2. metadata +2 -2
@@ -21,14 +21,14 @@ end
21
21
 
22
22
  def enumerate_objects dataset
23
23
  zfs = Mixlib::ShellOut.new(
24
- 'zfs', 'list -r -t all -Ho name,type ', dataset)
24
+ 'zfs', *%w(list -r -t all -Ho name,type), dataset)
25
25
  zfs.run_command
26
26
  zfs.error!
27
27
 
28
28
  summary = Hash.new(0)
29
29
 
30
30
  zfs.stdout.lines.map do |line|
31
- name, _, type = line.chomp.rpartition(' ')
31
+ name, _, type = line.chomp.rpartition(/\s/)
32
32
  name.strip!
33
33
 
34
34
  next if name.size == 0
@@ -43,7 +43,7 @@ rescue => ex
43
43
  exit(3)
44
44
  end
45
45
  def zfs_recursive_destroy dataset
46
- destroy = Mixlib::ShellOut.new('zfs', 'destroy -r ', dataset)
46
+ destroy = Mixlib::ShellOut.new('zfs', *%w(destroy -r), dataset)
47
47
  destroy.run_command
48
48
  destroy.error!
49
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfs-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2013-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mixlib-shellout