linux_admin 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linux_admin/disk.rb +2 -1
- data/lib/linux_admin/version.rb +1 -1
- data/spec/disk_spec.rb +4 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7e59d030d792e7f4855c26079a6603b4283e6327438316e2b8acf77659cf36a
|
4
|
+
data.tar.gz: 333842257625f0836cc5dd8f34f2512d4714f239d61e88aebee6642543a9e1fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e131edeb3e983f65beebf33818e98956da47aaad6346cb3a6f8c72b936ddc6e82e97e20edf712f407b08f5053b45ff0c61fe959e316e9afdd99fe6823288c3b
|
7
|
+
data.tar.gz: 986bd3e4510e9a9b3cba5fb013a79af6d37e71c895fee414e1568e78c39767c946133a70dfc59bace475f7084a9ffd4c23f7bede8fb5156677628d4f06b8522f
|
data/lib/linux_admin/disk.rb
CHANGED
@@ -9,7 +9,8 @@ module LinuxAdmin
|
|
9
9
|
attr_accessor :path
|
10
10
|
|
11
11
|
def self.local
|
12
|
-
|
12
|
+
result = Common.run!(Common.cmd("lsblk"), :params => {:d => nil, :n => nil, :p => nil, :o => "NAME"})
|
13
|
+
result.output.split.collect do |d|
|
13
14
|
Disk.new :path => d
|
14
15
|
end
|
15
16
|
end
|
data/lib/linux_admin/version.rb
CHANGED
data/spec/disk_spec.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
describe LinuxAdmin::Disk do
|
2
2
|
describe "#local" do
|
3
3
|
it "returns local disks" do
|
4
|
-
expect(
|
5
|
-
|
4
|
+
expect(LinuxAdmin::Common).to receive(:run!).with(
|
5
|
+
LinuxAdmin::Common.cmd(:lsblk),
|
6
|
+
:params => {:d => nil, :n => nil, :p => nil, :o => "NAME"}
|
7
|
+
).and_return(double("result", :output => "/dev/hda\n/dev/sda"))
|
6
8
|
disks = LinuxAdmin::Disk.local
|
7
9
|
paths = disks.collect { |disk| disk.path }
|
8
10
|
expect(paths).to include('/dev/hda')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dunne
|
@@ -20,10 +20,11 @@ authors:
|
|
20
20
|
- Bo Yao
|
21
21
|
- DuskyPrawn
|
22
22
|
- Petr Blaho
|
23
|
+
- Nick LaMuro
|
23
24
|
autorequire:
|
24
25
|
bindir: bin
|
25
26
|
cert_chain: []
|
26
|
-
date: 2018-
|
27
|
+
date: 2018-09-27 00:00:00.000000000 Z
|
27
28
|
dependencies:
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
30
|
name: bundler
|
@@ -143,7 +144,7 @@ dependencies:
|
|
143
144
|
requirements:
|
144
145
|
- - ">="
|
145
146
|
- !ruby/object:Gem::Version
|
146
|
-
version: 1.8.
|
147
|
+
version: 1.8.2
|
147
148
|
- - "~>"
|
148
149
|
- !ruby/object:Gem::Version
|
149
150
|
version: '1.8'
|
@@ -153,7 +154,7 @@ dependencies:
|
|
153
154
|
requirements:
|
154
155
|
- - ">="
|
155
156
|
- !ruby/object:Gem::Version
|
156
|
-
version: 1.8.
|
157
|
+
version: 1.8.2
|
157
158
|
- - "~>"
|
158
159
|
- !ruby/object:Gem::Version
|
159
160
|
version: '1.8'
|
@@ -207,6 +208,7 @@ email:
|
|
207
208
|
- boyao@redhat.com
|
208
209
|
- 32548790+DuskyPrawn@users.noreply.github.com
|
209
210
|
- pblaho@redhat.com
|
211
|
+
- nicklamuro@gmail.com
|
210
212
|
executables: []
|
211
213
|
extensions: []
|
212
214
|
extra_rdoc_files: []
|
@@ -320,7 +322,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
322
|
version: '0'
|
321
323
|
requirements: []
|
322
324
|
rubyforge_project:
|
323
|
-
rubygems_version: 2.7.
|
325
|
+
rubygems_version: 2.7.7
|
324
326
|
signing_key:
|
325
327
|
specification_version: 4
|
326
328
|
summary: LinuxAdmin is a module to simplify management of linux systems.
|