specinfra 2.71.0 → 2.71.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22c27e74d4f222ca0d10de2f17c3737876fb76f7
4
- data.tar.gz: 937890d3ec6635987cd1cc1bcbacd8f0daee7442
3
+ metadata.gz: ebe788a051676564bc601eaaccc3bf269f3e1d8d
4
+ data.tar.gz: b270094d769ee9eeab865dbdd6e4206137e721c4
5
5
  SHA512:
6
- metadata.gz: c848931100720913bf72a96a7c098aa920b14045c06936917e8f1fcaacbefc5f8f060acc57299976dbac305222f8ef4ef2ffdb346413737168f538589e61927c
7
- data.tar.gz: 4fdf5a547e08fbf11fbcd50de361092ceaa8e989d604146b3f9acc650b2fd72fe7cc34de90d8509e2473b3eeeba55bc58a9bed55ea1b6c426ac6c40cf6704677
6
+ metadata.gz: 8b96ae856255f81a3c8adefa8daa7dbee07e86d19e725f3833693914ecffbf299d82b7abdcf62c224a28f53a6cea3d5e94e7d2d9427e2c502f5952c9c71d0108
7
+ data.tar.gz: 9ff71b000596a7050818bd9c76c31be3d7e195c993a40440b65c9e38f6c241613cfbe10e2335176df5d195bb3e38517eb23aa258793113da1a91f1a53e98c7b5
@@ -1,8 +1,13 @@
1
1
  class Specinfra::Command::Alpine::Base::Package < Specinfra::Command::Linux::Base::Package
2
2
  class << self
3
3
  def check_is_installed(package, version = nil)
4
- pkg = [escape(package), version].compact.join('=')
5
- "apk info -qe #{pkg}"
4
+ if version.nil? then
5
+ pkg = escape(package)
6
+ "apk info -qe #{pkg}"
7
+ else
8
+ pkg = "#{package}-#{version}"
9
+ "apk info -v | grep -w -- '^#{Regexp.escape(pkg)}'"
10
+ end
6
11
  end
7
12
 
8
13
  alias_method :check_is_installed_by_apk, :check_is_installed
@@ -13,7 +18,7 @@ class Specinfra::Command::Alpine::Base::Package < Specinfra::Command::Linux::Bas
13
18
  end
14
19
 
15
20
  def get_version(package, _opts = nil)
16
- "apk version #{package} | tail -n1 | awk '{ print $1; }' | cut -d- -f2-"
21
+ "apk version #{package} | tail -n1 | awk '{ print $3; }'"
17
22
  end
18
23
  end
19
24
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.71.0"
2
+ VERSION = "2.71.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.71.0
4
+ version: 2.71.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-26 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp