specinfra 2.0.2 → 2.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b6a949c9ddf160afaeb0d25b499f1bb959c24cb
|
4
|
+
data.tar.gz: 53c24b1f59e94e0cdcf77930992f648ca05fa788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43aee4e28b36078caf1b6550c244ffbf7b8b1fb7032425c374d6374662b22a85d5f573288fc57c59a7dea6abb727f6099359dc79aab2773c7c5bcde6f1f862be
|
7
|
+
data.tar.gz: 42e7759bac38628267fefd099bd4e6411d2171b3f7c56a9870d6ce080bdf5d4dd73ce44f3e5d9b5fc2a84e91ee79f766fa36461cdee437c4c0177b276cac86bc
|
@@ -1,19 +1,11 @@
|
|
1
1
|
class Specinfra::Command::Freebsd::Base::File < Specinfra::Command::Base::File
|
2
2
|
class << self
|
3
|
-
def
|
4
|
-
"stat -f%Su #{escape(file)}"
|
5
|
-
end
|
6
|
-
|
7
|
-
def get_owner_group(file)
|
8
|
-
"stat -f%Sg #{escape(file)}"
|
9
|
-
end
|
10
|
-
|
11
|
-
def check_grouped(file, group)
|
3
|
+
def check_is_grouped(file, group)
|
12
4
|
regexp = "^#{group}$"
|
13
5
|
"stat -f%Sg #{escape(file)} | grep -- #{escape(regexp)}"
|
14
6
|
end
|
15
7
|
|
16
|
-
def
|
8
|
+
def check_is_owned_by(file, owner)
|
17
9
|
regexp = "^#{owner}$"
|
18
10
|
"stat -f%Su #{escape(file)} | grep -- #{escape(regexp)}"
|
19
11
|
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
+
property[:os] = nil
|
3
4
|
set :os, :family => 'freebsd'
|
4
5
|
|
5
|
-
describe get_command(:
|
6
|
-
it { should eq 'stat -f%Su /tmp' }
|
6
|
+
describe get_command(:check_file_is_owned_by, '/tmp', 'root') do
|
7
|
+
it { should eq 'stat -f%Su /tmp | grep -- \\^root\\$' }
|
7
8
|
end
|
8
9
|
|
9
|
-
describe get_command(:
|
10
|
-
it { should eq 'stat -f%Sg /tmp' }
|
10
|
+
describe get_command(:check_file_is_grouped, '/tmp', 'wheel') do
|
11
|
+
it { should eq 'stat -f%Sg /tmp | grep -- \\^wheel\\$' }
|
11
12
|
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.
|
4
|
+
version: 2.0.3
|
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-10-
|
11
|
+
date: 2014-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|