specinfra 2.34.9 → 2.35.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: a777d93d183aaab25471f05f2c258f79d2231121
4
- data.tar.gz: 2e98e5cbe7d7bece55f07f5ec3f12953c1d2c38c
3
+ metadata.gz: f71af3de0c2dd150a9ccb225f2d5a64c26d218d7
4
+ data.tar.gz: dd953b030f50b05dafef1c93fcb05ca6b96f2660
5
5
  SHA512:
6
- metadata.gz: 566395ea01083514224a781d3d0abd46aa168a0b20c938ef353026712184fbf0b5df27128132c51b660870a346727dc839ed66cd15a106caf48386494dd41b3f
7
- data.tar.gz: 7eeaecd772002f82d0914de5a6e060737b4e7339dafac7eb6d0c7c29e5edffa86f94bc805beb4986c9a0cfac1341724c66d3f0f87a1b1b513d25d3d01112dfd0
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
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.34.9"
2
+ VERSION = "2.35.0"
3
3
  end
@@ -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.34.9
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: