specinfra 2.76.9 → 2.77.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: 946b19777d3224efb0e7f23db836f5c7984ad9ba
4
- data.tar.gz: c654c5f566c5a2291312659fe740239776b264a7
3
+ metadata.gz: c816e2175462978667dc1b11577c5cba4676f374
4
+ data.tar.gz: cbd32cff99844fea12f52d1e739b6cc246e12935
5
5
  SHA512:
6
- metadata.gz: 948d18e9aca46c3d3e9fbb6ce8cf16de13872783d0392246c304e01565b4b763d788c01ccff667d1f2ed4c5f57f29644ab604b1b44af630aa91d11093ea495b8
7
- data.tar.gz: b421531c07a596ba43c1382139ed7204f2373ce3be5e99908ca3c9f0692daba388a1668e74e5ca9655b0424e6c01801d70ce592c0e0ebf750df59b1fd31bee39
6
+ metadata.gz: 68670a9e09aeb1e4f0aaf42b3bcad219769313e8acd556765311d0bb6b35a0be4b5785c7f2fcc24f5aea74c8a1d834e7d46bf9eef8de310144e0556f453cfc21
7
+ data.tar.gz: 38b9be7f4d733740f8353ef79b3e2267ccfda81cd60ea4402a2401767a5d3c6f56dd905a168cffced369792cfed9f833a3851175b9038587f8bc8b68cad382a7
@@ -37,5 +37,8 @@ class Specinfra::Command::Linux::Base::Inventory < Specinfra::Command::Base::Inv
37
37
  "dmidecode -s system-product-name"
38
38
  end
39
39
 
40
+ def get_mount
41
+ 'cat /proc/mounts'
42
+ end
40
43
  end
41
44
  end
@@ -17,6 +17,7 @@ module Specinfra
17
17
  group
18
18
  facter
19
19
  ohai
20
+ mount
20
21
  }
21
22
 
22
23
  include Enumerable
@@ -0,0 +1,31 @@
1
+ module Specinfra
2
+ class HostInventory
3
+ class Mount < Base
4
+ def get
5
+ cmd = backend.command.get(:get_inventory_mount)
6
+ ret = backend.run_command(cmd)
7
+ if ret.exit_status == 0
8
+ parse(ret.stdout)
9
+ else
10
+ nil
11
+ end
12
+ end
13
+ def parse(ret)
14
+ mounts = []
15
+ ret.each_line do |line|
16
+ mount = {}
17
+ if line =~ /^(.+)\s+(.+)\s+(.+)\s+(.+)\s+(\d+)\s+(\d+)$/
18
+ mount['device'] = $1
19
+ mount['point'] = $2
20
+ mount['type'] = $3
21
+ mount['options'] = $4.split(',')
22
+ mount['dump'] = $5
23
+ mount['pass'] = $6
24
+ end
25
+ mounts << mount
26
+ end
27
+ mounts
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.76.9"
2
+ VERSION = "2.77.0"
3
3
  end
@@ -25,10 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_runtime_dependency "net-telnet", "0.1.1"
26
26
  spec.add_runtime_dependency "sfl"
27
27
 
28
- spec.add_development_dependency "bundler", "~> 1.3"
29
28
  spec.add_development_dependency "rake", "~> 10.1.1"
30
29
  spec.add_development_dependency "rspec"
31
30
  spec.add_development_dependency "rspec-its"
32
- spec.add_development_dependency "guard"
33
- spec.add_development_dependency "guard-rspec"
34
31
  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.76.9
4
+ version: 2.77.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: 2019-01-16 00:00:00.000000000 Z
11
+ date: 2019-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.3'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rake
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -122,34 +108,6 @@ dependencies:
122
108
  - - ">="
123
109
  - !ruby/object:Gem::Version
124
110
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: guard
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: guard-rspec
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
111
  description: Common layer for serverspec and itamae
154
112
  email:
155
113
  - gosukenator@gmail.com
@@ -517,6 +475,7 @@ files:
517
475
  - lib/specinfra/host_inventory/hostname.rb
518
476
  - lib/specinfra/host_inventory/kernel.rb
519
477
  - lib/specinfra/host_inventory/memory.rb
478
+ - lib/specinfra/host_inventory/mount.rb
520
479
  - lib/specinfra/host_inventory/ohai.rb
521
480
  - lib/specinfra/host_inventory/platform.rb
522
481
  - lib/specinfra/host_inventory/platform_version.rb