specinfra 1.6.0 → 1.7.0

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: 6361a10be88cbdefe56f1f3c81c75d56bf1e7566
4
- data.tar.gz: 2be2105e1659881aeac93bd9aef68b827361b4d9
3
+ metadata.gz: 2b5eb5cdd5654ade31e57548e585ca3f90622a72
4
+ data.tar.gz: 4f5fb42d69cd7e1f52a69408f424771eb54b226f
5
5
  SHA512:
6
- metadata.gz: 65ae10325e47408b2e000aae8ab16db791674740c34d9ade192e1f377d6187b901ea6e319241c7fdb6d4b644000115e2b6f31742a93e483cb179dc90d675433b
7
- data.tar.gz: 39a52e6dda5d5cfe71b8b127cc5f47ffdb92de49ad98a87c1326e7e827572224bb608a5ff1850962ef4ee6917307b19952d8259fb0ef20a7010fc9ebfa82661b
6
+ metadata.gz: aed5b95b5bcb33e7c17cba8e8fb2c953142e86b63eeed6ee7eb93afa47c510c146b88948ec0e5d0591202767253d4e0f177dd1e49997e7dd002c843e83841f17
7
+ data.tar.gz: 3dd99383ec435fcb3bc65749a09b8d603c58693bb817997891b792de2fdad7c8111998749765a1eb32609fbd974ded943658277b4766a2d8da685796ac826406
@@ -47,11 +47,25 @@ module SpecInfra
47
47
  "egrep '^#{escape(recipient)}:.*#{escape(target)}' /etc/mail/aliases"
48
48
  end
49
49
 
50
+ def check_link(link, target)
51
+ "stat -f %Y #{escape(link)} | grep -- #{escape(target)}"
52
+ end
53
+
50
54
  def check_mode(file, mode)
51
55
  regexp = "^#{mode}$"
52
56
  "stat -f%Lp #{escape(file)} | grep #{escape(regexp)}"
53
57
  end
54
58
 
59
+ def check_owner(file, owner)
60
+ regexp = "^#{owner}$"
61
+ "stat -f %Su #{escape(file)} | grep -- #{escape(regexp)}"
62
+ end
63
+
64
+ def check_grouped(file, group)
65
+ regexp = "^#{group}$"
66
+ "stat -f %Sg #{escape(file)} | grep -- #{escape(regexp)}"
67
+ end
68
+
55
69
  def check_mounted(path)
56
70
  regexp = "on #{path} "
57
71
  "mount | grep #{escape(regexp)}"
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.6.0"
2
+ VERSION = "1.7.0"
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: 1.6.0
4
+ version: 1.7.0
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-04-25 00:00:00.000000000 Z
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler