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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a863d63cfccd0d251315f154912c9422cb7ca216cf324da353b073c659b115c8
4
- data.tar.gz: 4187ad54595560e76bcfe08c8bdac09b2d430cd1e2b05d678b0f4173a5d1db09
3
+ metadata.gz: a7e59d030d792e7f4855c26079a6603b4283e6327438316e2b8acf77659cf36a
4
+ data.tar.gz: 333842257625f0836cc5dd8f34f2512d4714f239d61e88aebee6642543a9e1fb
5
5
  SHA512:
6
- metadata.gz: 364f16b054e815863a566c502853b46e2001b48a91abb47f9557b8173459b58db3be7b45a6700c2ec190c3e54c9289688c42d83d65962833c1a7a20a7ef94e58
7
- data.tar.gz: 46da4ef5979a2dd28ba4bd6195bffcb239d0b42b6a051e04110fb0e5b8a51db5dbec4faaed6e930d8d4a7640e9e3ab722f38467f7fb2a6e52f28e0af16d9c13e
6
+ metadata.gz: 4e131edeb3e983f65beebf33818e98956da47aaad6346cb3a6f8c72b936ddc6e82e97e20edf712f407b08f5053b45ff0c61fe959e316e9afdd99fe6823288c3b
7
+ data.tar.gz: 986bd3e4510e9a9b3cba5fb013a79af6d37e71c895fee414e1568e78c39767c946133a70dfc59bace475f7084a9ffd4c23f7bede8fb5156677628d4f06b8522f
@@ -9,7 +9,8 @@ module LinuxAdmin
9
9
  attr_accessor :path
10
10
 
11
11
  def self.local
12
- Dir.glob(['/dev/[vhs]d[a-z]', '/dev/xvd[a-z]']).collect do |d|
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
@@ -1,3 +1,3 @@
1
1
  module LinuxAdmin
2
- VERSION = "1.2.1".freeze
2
+ VERSION = "1.2.2".freeze
3
3
  end
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(Dir).to receive(:glob).with(['/dev/[vhs]d[a-z]', '/dev/xvd[a-z]']).
5
- and_return(['/dev/hda', '/dev/sda'])
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.1
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-02-23 00:00:00.000000000 Z
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.1
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.1
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.6
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.