specinfra 2.0.0.beta46 → 2.0.0.beta47

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: 6ef443698205c62b7286f11f976c9e5fc2095ade
4
- data.tar.gz: b9aededa5d8a142d8934a83de794580ccc6f77c6
3
+ metadata.gz: a484b18deb5a7c3741669f1e31036b9b4e8175e4
4
+ data.tar.gz: 43f6be61279cd7e7a97e083fce8db300050f1ec0
5
5
  SHA512:
6
- metadata.gz: c70f63fb853464ff83b7773449a76decaa009cad8ccb454f46b57948f5f57c46a203dba841211b715d22b32572148f8e4acc3717915273fe125968cd5012adf0
7
- data.tar.gz: 789b9b9a72f2d83eee74476ec9aa6fc1770ada83789a45079d4ae9348f73fe8277b51c85490b1926c9756211a6a412cfa9b2247c0b018fe765184feb96455cbc
6
+ metadata.gz: 1569faa6cdd2f048747c902d0f7ac6804c4fa2c27fcde68cc57f87a17363578a9fae55cf8bcd531d96fd3dc44efb953d410e5f25e2662ea016fdacaa0a2894fc
7
+ data.tar.gz: 152313739da25255bde4adf19b52c27d5568224d52638c38d49166964bd0a83901e6de3338939f592bd844d3612ce737a21ce3290b46f38280c23f5ac775c0d6
@@ -3,7 +3,7 @@ class Specinfra::Command::Base::Package < Specinfra::Command::Base
3
3
  def check_is_installed_by_gem(name, version=nil)
4
4
  regexp = "^#{name}"
5
5
  cmd = "gem list --local | grep -w -- #{escape(regexp)}"
6
- cmd = "#{cmd} | grep -w -- #{escape(version)}" if version
6
+ cmd = %Q!#{cmd} | grep -w -- "[( ]#{escape(version)}[,)]"! if version
7
7
  cmd
8
8
  end
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta46"
2
+ VERSION = "2.0.0.beta47"
3
3
  end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ set :os, { :family => nil }
4
+
5
+ describe get_command(:check_package_is_installed_by_gem, 'serverspec', '2.0.0') do
6
+ it { should eq 'gem list --local | grep -w -- \\^serverspec | grep -w -- "[( ]2.0.0[,)]"' }
7
+ 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.0.0.beta46
4
+ version: 2.0.0.beta47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-05 00:00:00.000000000 Z
11
+ date: 2014-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -328,6 +328,7 @@ files:
328
328
  - spec/backend/ssh/build_command_spec.rb
329
329
  - spec/command/base/file_spec.rb
330
330
  - spec/command/base/localhost_spec.rb
331
+ - spec/command/base/package_spec.rb
331
332
  - spec/command/base/user_spec.rb
332
333
  - spec/command/debian/service_spec.rb
333
334
  - spec/command/factory_spec.rb
@@ -375,6 +376,7 @@ test_files:
375
376
  - spec/backend/ssh/build_command_spec.rb
376
377
  - spec/command/base/file_spec.rb
377
378
  - spec/command/base/localhost_spec.rb
379
+ - spec/command/base/package_spec.rb
378
380
  - spec/command/base/user_spec.rb
379
381
  - spec/command/debian/service_spec.rb
380
382
  - spec/command/factory_spec.rb