vpsadmin-client 2.3.0 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0201c799bf6e1d1573fe678f3c55645b0f6e6524
4
- data.tar.gz: c7ac0933e44dd445735a44497cf2696426095dfd
3
+ metadata.gz: 1ca05b241b9cd46236d3f4640090529cebe318dc
4
+ data.tar.gz: 321f38e8afafca27a4833cc61684089ef03d26d9
5
5
  SHA512:
6
- metadata.gz: 5c94af86fdbec2dfd8132e7e5931c371652152d9159fc7d721785188b725764f057ce15a83f8a67f3630d1a3b29d2f596d7685dc1fa9a4ad596c341dc874123c
7
- data.tar.gz: 39688e6d85d56d6d1fa2da38060cc719296427af25cb3ddc52dfff2ea097a3820f7fe7e22446f9f095ad8832f29f2fa3c801b1e7dd461bf9885023691b3ccfe9
6
+ metadata.gz: 083b5435010e259a7aca0279875472e93fa4495e4dca3075ff825432ce4924e85ec092c1bd36a25200bb7d21cffaf3d896ffa017015e9ee075d2a4bcab690c7b
7
+ data.tar.gz: 3f9935163fb0fb17ea13e14e85c041f52b4eed7df23b68cb2a59db5202f4a2edc1a0244db9c5ae5dc1ffc32a84f263ec1964a1b7f143fdaee89fb62a3d11a184
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ * Web Mar 23 2016 - version 2.3.1
2
+ - Add option --[no-]sudo to command backup dataset
3
+ - Fix ZFS call to work on both ZoL and BSD
4
+
1
5
  * Mon Mar 21 2016 - version 2.3.0
2
6
  - New commands for downloading snapshots:
3
7
  - snapshot download
@@ -21,6 +21,7 @@ module VpsAdmin::CLI::Commands
21
21
  attempts: 10,
22
22
  checksum: true,
23
23
  delete_after: true,
24
+ sudo: true,
24
25
  }
25
26
 
26
27
  opts.on('-p', '--pretend', 'Print what would the program do') do
@@ -80,6 +81,10 @@ module VpsAdmin::CLI::Commands
80
81
  opts.on('--no-snapshots-as-error', 'Consider no snapshots to download as an error') do
81
82
  @opts[:no_snapshots_error] = true
82
83
  end
84
+
85
+ opts.on('--[no-]sudo', 'Use sudo to run zfs if not run as root (enabled)') do |s|
86
+ @opts[:sudo] = s
87
+ end
83
88
  end
84
89
 
85
90
  def exec(args)
@@ -384,7 +389,7 @@ END
384
389
 
385
390
  zfs(
386
391
  :get,
387
- '-Hrp -d2 name,creation -tsnapshot -oname,property,value',
392
+ '-Hrp -d2 -tsnapshot -oname,property,value name,creation',
388
393
  fs
389
394
  ).split("\n").each do |line|
390
395
  name, property, value = line.split
@@ -464,7 +469,7 @@ END
464
469
 
465
470
  def zfs_cmd(cmd, opts, fs)
466
471
  s = ''
467
- s += 'sudo ' if Process.euid != 0
472
+ s += 'sudo ' if @opts[:sudo] && Process.euid != 0
468
473
  s += 'zfs'
469
474
  "#{s} #{cmd} #{opts} #{fs}"
470
475
  end
@@ -1,5 +1,5 @@
1
1
  module VpsAdmin
2
2
  module Client
3
- VERSION = '2.3.0'
3
+ VERSION = '2.3.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vpsadmin-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler