specinfra 0.5.8 → 0.5.9

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: 6ef7aa033a801726f811188a418cc0a69d8e61e5
4
- data.tar.gz: 5f498638b1a934242bf042f52e3bc2bda6f22734
3
+ metadata.gz: 435ccd7d6235168493d866a544d63080463997a5
4
+ data.tar.gz: fff80d5a375cf3a240ec3546d58d1a16eaf60c86
5
5
  SHA512:
6
- metadata.gz: 13e5c402882f7f50e03124b211b8adcd63347f7274a3062122422728ceeecdebd56e1c4e152ced6ed4820f0d3ccfc769b35e0b8dde7bd93561ac514a8803cbea
7
- data.tar.gz: 8acd3900038b66864231626d4da4ef6ff132f13261b822364ad2d06802907cedceeac42bdb8b33eceb6af00b2244c3b43f685c1363fdcc9dd1b43fe490eeeee3
6
+ metadata.gz: 3770696459535aafb583a378d178fe4e2277b7962befa71b8efd9c9035156199a3c37c39f36e5f5aa0b9310335e9ae5e67fc2411786df9af58d7baefc82abcd1
7
+ data.tar.gz: 7e092224e1cb4c85e80398344a7bd508d6515266b769b4ca37c84d278b11552b939526606d1c56217242411e7032aa2bc78c6630ad976c02773f1605049acd00
@@ -12,7 +12,7 @@ module SpecInfra
12
12
  `#{build_command(cmd)} 2>&1`
13
13
  end
14
14
  # In ruby 1.9, it is possible to use Open3.capture3, but not in 1.8
15
- #stdout, stderr, status = Open3.capture3(cmd)
15
+ # stdout, stderr, status = Open3.capture3(cmd)
16
16
 
17
17
  if @example
18
18
  @example.metadata[:command] = cmd
@@ -6,7 +6,11 @@ module SpecInfra
6
6
  end
7
7
 
8
8
  def check_installed(package, version=nil)
9
- "pkg_info -Ix #{escape(package)}"
9
+ if version
10
+ "pkg_info -I #{escape(package)}-#{escape(version)}"
11
+ else
12
+ "pkg_info -Ix #{escape(package)}"
13
+ end
10
14
  end
11
15
 
12
16
  def check_listening(port)
@@ -22,6 +26,14 @@ module SpecInfra
22
26
  def get_mode(file)
23
27
  "stat -f%Lp #{escape(file)}"
24
28
  end
29
+
30
+ def install(package)
31
+ "pkg_add -r install #{package}"
32
+ end
33
+
34
+ def get_package_version(package, opts=nil)
35
+ "pkg_info -Ix #{escape(package)} | cut -f 1 -w | sed -n 's/^#{escape(package)}-//p'"
36
+ end
25
37
  end
26
38
  end
27
39
  end
@@ -8,6 +8,14 @@ module SpecInfra
8
8
  "pkg info #{escape(package)}"
9
9
  end
10
10
  end
11
+
12
+ def install(package)
13
+ "pkg install -y #{package}"
14
+ end
15
+
16
+ def get_package_version(package, opts=nil)
17
+ "pkg query %v #{escape(package)}"
18
+ end
11
19
  end
12
20
  end
13
21
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
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: 0.5.8
4
+ version: 0.5.9
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-02-16 00:00:00.000000000 Z
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler