specinfra 2.0.2 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9074831fe3487ecb134b3e16ac1467e06e758fa
4
- data.tar.gz: 0ad21cd23a69f90c128a648ec575fd7c117cd68a
3
+ metadata.gz: 3b6a949c9ddf160afaeb0d25b499f1bb959c24cb
4
+ data.tar.gz: 53c24b1f59e94e0cdcf77930992f648ca05fa788
5
5
  SHA512:
6
- metadata.gz: 777f2579aa323dab448cf75cf2eed77f5ad6271fc15fb73cf65bbadee100b8bddffe89cb8ba8ca0a44e5ad0132d622949bbee00b34a1c34dc093b8c1d7ae6ee5
7
- data.tar.gz: 9cf09fa462a839a78782304f4434f166e2d99e8f3f4254b44176e68ff0185563f1b62d9b8188d0d184b0dc6365f6b7887a9c8c151ba5b5d73ff4c6ebc84b7478
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 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
-
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 check_owner(file, owner)
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
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
@@ -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(:get_file_owner_user, '/tmp') do
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(:get_file_owner_group, '/tmp') do
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
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
+ property[:os] = nil
3
4
  set :os, :family => 'linux'
4
5
 
5
6
  describe get_command(:check_interface_has_ipv6_address, 'eth0', '2001:0db8:bd05:01d2:288a:1fc0:0001:10ee') do
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.2
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-03 00:00:00.000000000 Z
11
+ date: 2014-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh