specinfra 2.24.2 → 2.25.0

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: 13a5592e8b5efed7685e1b48360901f91cf048cc
4
- data.tar.gz: 768c899780b0c52b35cee4562055ad154e4c424b
3
+ metadata.gz: 83c057b2afe4689661eacd46887735fc2b5dd0b2
4
+ data.tar.gz: fba4b32ea8b49d36089e3cc9a76c6e3be00e1c99
5
5
  SHA512:
6
- metadata.gz: 0cb1d7080ee1880b3ebefe804456909a2aba9658bba3878a5dc46480682c8d35ca81d5984eaf3944ab7fcf40c8579b6ec84cbe0efe27044035cf438439fb8076
7
- data.tar.gz: d3afc9012dcda128d3c8382dd95c614156d133b411bbc2d6b30bc82ee1318142ca8de294ff5d8632c4711ee20389a29a9d5e327cde27cf00f6df9dc766e89fb6
6
+ metadata.gz: ea5828fa50fb9906b6116ba3d936a938c91c3cd2ecaf6687b2e1a3dc101ecf5f8b628c477e7fd825c82dcbb7e94ccda5f0e1180b55d91c36cbf71d18e6874027
7
+ data.tar.gz: 4b46c4c33eee33fffc2cb104b64cd87d3ca227fd5ad1c417f39f086c6bf2ff79d0bd9cb50026b0be6b782c0378858a3371c68aed244d0a07a64c79285d430792
@@ -11,5 +11,9 @@ class Specinfra::Command::Linux::Base::File < Specinfra::Command::Base::File
11
11
  def check_attribute(file, attribute)
12
12
  "lsattr -d #{escape(file)} 2>&1 | awk '$1~/^-*#{escape(attribute)}-*$/ {exit 0} {exit 1}'"
13
13
  end
14
+
15
+ def get_selinuxlabel(file)
16
+ "stat -c %C #{escape(file)}"
17
+ end
14
18
  end
15
19
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.24.2"
2
+ VERSION = "2.25.0"
3
3
  end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ property[:os] = nil
4
+ set :os, :family => 'linux'
5
+
6
+ describe get_command(:get_file_selinuxlabel, 'some_file') do
7
+ it { should eq 'stat -c %C some_file' }
8
+ 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.24.2
4
+ version: 2.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -385,6 +385,7 @@ files:
385
385
  - spec/command/freebsd/file_spec.rb
386
386
  - spec/command/linux/bond_spec.rb
387
387
  - spec/command/linux/bridge_spec.rb
388
+ - spec/command/linux/file_spec.rb
388
389
  - spec/command/linux/interface_spec.rb
389
390
  - spec/command/linux/inventory_spec.rb
390
391
  - spec/command/linux/ip6tables_spec.rb
@@ -446,6 +447,7 @@ test_files:
446
447
  - spec/command/freebsd/file_spec.rb
447
448
  - spec/command/linux/bond_spec.rb
448
449
  - spec/command/linux/bridge_spec.rb
450
+ - spec/command/linux/file_spec.rb
449
451
  - spec/command/linux/interface_spec.rb
450
452
  - spec/command/linux/inventory_spec.rb
451
453
  - spec/command/linux/ip6tables_spec.rb