specinfra 2.0.0.beta16 → 2.0.0.beta17

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: 2d14a86072b75b57a9623d3008288d7abcfc8a77
4
- data.tar.gz: d19a4a7af63fe7137cf5e7a52ce35dae188cd6d3
3
+ metadata.gz: 9141ed5f23cd671075173286b85cc67b619889f7
4
+ data.tar.gz: 28a674a6cc109c73a8fb4a50c47eda6daddac8c0
5
5
  SHA512:
6
- metadata.gz: 2e44a954ee10cc6be369ed721885c7a6016c096d0811e72a06464468b56b86381e25b228a0d04d5177cb54e4830d431ce0a34026f7516ddab9badd6876547191
7
- data.tar.gz: 33143b70844ac8fea1f5bd343d61380151ca23af594824791a41218e5f442c3a21769a6db9183566b4cb11e273a5e4fc0b8e73447b232e9a9e69becdb5b1e071
6
+ metadata.gz: f328422b57af471639714cb4c9f327e296d78f9063d47db3df43687458da33d61446a3207bbea9d65141b6e5c4931e4215791ef74a10f095b325404a9d3315d8
7
+ data.tar.gz: 797567cf8b7aef533bb050a615a842f7621e60167613ac22497538153961ba667a99f62bd48cfa30777d05b59bec98f71909ae330f9229b3eabe65e476dd5d84
@@ -1,5 +1,15 @@
1
1
  class Specinfra::Command::Freebsd::Base::File < Specinfra::Command::Base::File
2
2
  class << self
3
+ def check_grouped(file, group)
4
+ regexp = "^#{group}$"
5
+ "stat -f%Sg #{escape(file)} | grep -- #{escape(regexp)}"
6
+ end
7
+
8
+ def check_owner(file, owner)
9
+ regexp = "^#{owner}$"
10
+ "stat -f%Su #{escape(file)} | grep -- #{escape(regexp)}"
11
+ end
12
+
3
13
  def check_has_mode(file, mode)
4
14
  regexp = "^#{mode}$"
5
15
  "stat -f%Lp #{escape(file)} | grep -- #{escape(regexp)}"
@@ -8,5 +18,17 @@ class Specinfra::Command::Freebsd::Base::File < Specinfra::Command::Base::File
8
18
  def get_mode(file)
9
19
  "stat -f%Lp #{escape(file)}"
10
20
  end
21
+
22
+ def check_is_linked_to(link, target)
23
+ "stat -f%Y #{escape(link)} | grep -- #{escape(target)}"
24
+ end
25
+
26
+ def get_mtime(file)
27
+ "stat -f%m #{escape(file)}"
28
+ end
29
+
30
+ def get_size(file)
31
+ "stat -f%z #{escape(file)}"
32
+ end
11
33
  end
12
34
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.0.beta16"
2
+ VERSION = "2.0.0.beta17"
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.0.0.beta16
4
+ version: 2.0.0.beta17
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-08-02 00:00:00.000000000 Z
11
+ date: 2014-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh