specinfra 1.19.0 → 1.20.0

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: 4125a9c7444240a534f2693abca5513426944f76
4
- data.tar.gz: 426a8a155b8e1bad3f8c926e4271a990e04a41d7
3
+ metadata.gz: 9442638d0b2afa5e51c603132e54e58d43d17d7f
4
+ data.tar.gz: 2a346243cacf54129b9f7440e864351d89f4a251
5
5
  SHA512:
6
- metadata.gz: b84154fff712d7b3fe378a1f1cd278571e34c2b0ad1f3eab55bc835500358b98ac5e51042e715dbb192e196b8ac9224cf7cf9b27da30eb0140c7084c5df77d08
7
- data.tar.gz: 24f2e2d5de398662e78883aec586c681a7a3feb134a4f623b6a0c05a7a560d384c9a0c332b276b67a1b4dbdcd7df6d9749f5a5dfa2154e201e848f3cb5e9ac0c
6
+ metadata.gz: 21fdbb27bb12f1251ad762df72e33fdf7dff8ddc26c68cfd9305e1b3c8dd323a97a31cc4735312aa4ecd10f63adc4c35c7850ae524f7f2af77d2cc1b4431ebcb
7
+ data.tar.gz: c2aa5b824919de8ddd18e4d12f51f5e1cabf04f1e984df9c7c4d0abb635f9776724e9845391a3c9e0f4810cbdcb85d09c01b4b43b814ef5c22c6b3be0b52e928
@@ -341,6 +341,10 @@ module SpecInfra
341
341
  raise NotImplementedError.new
342
342
  end
343
343
 
344
+ def check_immutable(file)
345
+ raise NotImplementedError.new
346
+ end
347
+
344
348
  def get_package_version(package, opts=nil)
345
349
  raise NotImplementedError.new
346
350
  end
@@ -66,6 +66,14 @@ module SpecInfra
66
66
  "lxc-info -n #{escape(container)} -t RUNNING"
67
67
  end
68
68
 
69
+ def check_attribute(file, attribute)
70
+ "lsattr -d #{escape(file)} 2>&1 | awk '$1~/^-*#{escape(attribute)}-*$/ {exit 0} {exit 1}'"
71
+ end
72
+
73
+ def check_immutable(file)
74
+ check_attribute(file, 'i')
75
+ end
76
+
69
77
  end
70
78
  end
71
79
  end
@@ -1,3 +1,3 @@
1
1
  module SpecInfra
2
- VERSION = "1.19.0"
2
+ VERSION = "1.20.0"
3
3
  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: 1.19.0
4
+ version: 1.20.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: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler