specinfra 1.21.0 → 1.22.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: 4113c8dba49526c18e7053c4953980bb946939e2
4
- data.tar.gz: f4e44193b0ae65e7a64e90513da808d759664303
3
+ metadata.gz: e34d0908411ee970e7366cffefbdddfac52a8f1b
4
+ data.tar.gz: 06ccc49c4991f80c126ebff49c2caad7834f52cf
5
5
  SHA512:
6
- metadata.gz: 30563ece4c15e57f120732fd17e772ac9565a5df5697c67e0d66a18b70c92ba2c96aa360cc235395d3759702fb23a3c4376671fdbaf06fa5018336b825bfbb16
7
- data.tar.gz: 746c69443b60c736de71c81c80d20635f2fe1821ad6490e94ac0f7a3feb41e05133aa3b8f64c3e977259ea972f62a38a1d05ce60ebe153b101dd97336b3141f9
6
+ metadata.gz: 757b624598cd4aa750b6871a870e62174f50a7dc68a0195f7659ed72c8c9a6817703a97642d30512f08b5283cac8676ab4d36bead7928d3894a68cea8eaf9e55
7
+ data.tar.gz: 9a6b008688364618900c52b12579003b3af77bf8ab81a2923a11303822a8db5c577c9294b8401823168ecb433ca827641e3dcd25def2996ce23dd2b1b3a78c9b
@@ -257,6 +257,10 @@ module SpecInfra
257
257
  "id #{escape(user)} | awk '{print $3}' | grep -- #{escape(group)}"
258
258
  end
259
259
 
260
+ def check_primary_group(group)
261
+ raise NotImplementedError.new
262
+ end
263
+
260
264
  def check_gid(group, gid)
261
265
  regexp = "^#{group}"
262
266
  "getent group | grep -w -- #{escape(regexp)} | cut -f 3 -d ':' | grep -w -- #{escape(gid)}"
@@ -6,6 +6,10 @@ module SpecInfra
6
6
  "runuser -s /bin/sh -c \"test -#{access} #{file}\" #{user}"
7
7
  end
8
8
 
9
+ def check_belonging_primary_group(user, group)
10
+ "id -gn #{escape(user)}| grep ^#{escape(group)}$"
11
+ end
12
+
9
13
  def check_enabled(service, level=3)
10
14
  "chkconfig --list #{escape(service)} | grep #{level}:on"
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.21.0"
2
+ VERSION = "1.22.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.21.0
4
+ version: 1.22.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-07-15 00:00:00.000000000 Z
11
+ date: 2014-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler