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 +4 -4
- data/lib/specinfra/command/freebsd/base/file.rb +22 -0
- data/lib/specinfra/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9141ed5f23cd671075173286b85cc67b619889f7
|
4
|
+
data.tar.gz: 28a674a6cc109c73a8fb4a50c47eda6daddac8c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/specinfra/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|