specinfra 2.34.9 → 2.35.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 +4 -4
- data/lib/specinfra/command/base/file.rb +8 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/base/file_spec.rb +8 -0
- metadata +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71af3de0c2dd150a9ccb225f2d5a64c26d218d7
|
4
|
+
data.tar.gz: dd953b030f50b05dafef1c93fcb05ca6b96f2660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a42296f05370abc91650698bc4238cd4cf6fc529b03d9a4a8a0ed927639deeba1a368bb44b4d6478183bae15438c1ba69003126a3b0e7cf6d2532a47fe0b881
|
7
|
+
data.tar.gz: 4d797f54fd069f295ce0d86735a4b1380114ffff951c768af2862351bac9926386da3c04fac7784c52b07ade2ebe52b54d9bca062ad0d278ac39663430c0a1b5
|
@@ -16,6 +16,14 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
|
|
16
16
|
"test -S #{escape(file)}"
|
17
17
|
end
|
18
18
|
|
19
|
+
def check_is_block_device(file)
|
20
|
+
"test -b #{escape(file)}"
|
21
|
+
end
|
22
|
+
|
23
|
+
def check_is_character_device(file)
|
24
|
+
"test -c #{escape(file)}"
|
25
|
+
end
|
26
|
+
|
19
27
|
def check_is_symlink(file)
|
20
28
|
"test -L #{escape(file)}"
|
21
29
|
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -62,6 +62,14 @@ describe get_command(:check_file_is_pipe, '/tmp') do
|
|
62
62
|
it { should eq 'test -p /tmp' }
|
63
63
|
end
|
64
64
|
|
65
|
+
describe get_command(:check_file_is_block_device, '/tmp') do
|
66
|
+
it { should eq 'test -b /tmp' }
|
67
|
+
end
|
68
|
+
|
69
|
+
describe get_command(:check_file_is_character_device, '/tmp') do
|
70
|
+
it { should eq 'test -c /tmp' }
|
71
|
+
end
|
72
|
+
|
65
73
|
describe get_command(:get_file_link_target, '/tmp') do
|
66
74
|
it { should eq 'readlink /tmp' }
|
67
75
|
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.
|
4
|
+
version: 2.35.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -495,4 +495,3 @@ test_files:
|
|
495
495
|
- spec/helper/set_spec.rb
|
496
496
|
- spec/host_inventory/cpu_spec.rb
|
497
497
|
- spec/spec_helper.rb
|
498
|
-
has_rdoc:
|