specinfra 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/specinfra/command/freebsd/base/file.rb +8 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/freebsd/file_spec.rb +11 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9074831fe3487ecb134b3e16ac1467e06e758fa
|
4
|
+
data.tar.gz: 0ad21cd23a69f90c128a648ec575fd7c117cd68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 777f2579aa323dab448cf75cf2eed77f5ad6271fc15fb73cf65bbadee100b8bddffe89cb8ba8ca0a44e5ad0132d622949bbee00b34a1c34dc093b8c1d7ae6ee5
|
7
|
+
data.tar.gz: 9cf09fa462a839a78782304f4434f166e2d99e8f3f4254b44176e68ff0185563f1b62d9b8188d0d184b0dc6365f6b7887a9c8c151ba5b5d73ff4c6ebc84b7478
|
@@ -1,5 +1,13 @@
|
|
1
1
|
class Specinfra::Command::Freebsd::Base::File < Specinfra::Command::Base::File
|
2
2
|
class << self
|
3
|
+
def get_owner_user(file)
|
4
|
+
"stat -f%Su #{escape(file)}"
|
5
|
+
end
|
6
|
+
|
7
|
+
def get_owner_group(file)
|
8
|
+
"stat -f%Sg #{escape(file)}"
|
9
|
+
end
|
10
|
+
|
3
11
|
def check_grouped(file, group)
|
4
12
|
regexp = "^#{group}$"
|
5
13
|
"stat -f%Sg #{escape(file)} | grep -- #{escape(regexp)}"
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
set :os, :family => 'freebsd'
|
4
|
+
|
5
|
+
describe get_command(:get_file_owner_user, '/tmp') do
|
6
|
+
it { should eq 'stat -f%Su /tmp' }
|
7
|
+
end
|
8
|
+
|
9
|
+
describe get_command(:get_file_owner_group, '/tmp') do
|
10
|
+
it { should eq 'stat -f%Sg /tmp' }
|
11
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -337,6 +337,7 @@ files:
|
|
337
337
|
- spec/command/base/user_spec.rb
|
338
338
|
- spec/command/debian/service_spec.rb
|
339
339
|
- spec/command/factory_spec.rb
|
340
|
+
- spec/command/freebsd/file_spec.rb
|
340
341
|
- spec/command/linux/interface_spec.rb
|
341
342
|
- spec/command/linux/inventory_spec.rb
|
342
343
|
- spec/command/linux/ip6tables_spec.rb
|
@@ -386,6 +387,7 @@ test_files:
|
|
386
387
|
- spec/command/base/user_spec.rb
|
387
388
|
- spec/command/debian/service_spec.rb
|
388
389
|
- spec/command/factory_spec.rb
|
390
|
+
- spec/command/freebsd/file_spec.rb
|
389
391
|
- spec/command/linux/interface_spec.rb
|
390
392
|
- spec/command/linux/inventory_spec.rb
|
391
393
|
- spec/command/linux/ip6tables_spec.rb
|