diskman 1.4.1 → 1.5.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
  SHA256:
3
- metadata.gz: b3c8bb21502707f69bc682c2ff23fbd239bf408b25583244cce2d248c41bf7df
4
- data.tar.gz: 4521234bda09cefee4f57bace6d3a8d88d3233b6a038ef13deaa568d8470c52e
3
+ metadata.gz: 075f85ded76e5d34099a005bb0ffb4462852ec0bd4a6c44ec9e62e40a1f64d6e
4
+ data.tar.gz: d3faaaa710ed96e05dd9241085c21b87f88cc66be6079d7e3974981e1e08af80
5
5
  SHA512:
6
- metadata.gz: 86c75665f9a41eaf4325b3edf4c54f859ebdf10cd625dd370a17371bf15da718858ea96f496912fdb2b200e2a65144ac9e1cf05e3600690886efa6334906ec78
7
- data.tar.gz: 71314d064f2a9623984925a7e8a73a1efff7c55a673a17eb8d59a43a62dfb80b69782defcc27ba7f691068498e88caa395cb10c026e86ae464c5d9020d5d4941
6
+ metadata.gz: 60879bf68126d3f63217d6a3a1f2071482db36cbea5a32ad983a0b90360e5bd4fb2b618a1ef9faed717556d10ef2bdabc20ae550fcf7b794031e09af19a0b3e5
7
+ data.tar.gz: fc3207c01229fbedc0f21d7b0a12912cce3750d767fe360e5d489cd5b39e857b61905bd924fef2cdfe5b421f1aaa7561bfbb9aa8e12d539908225f14d6623638
data/bin/diskman CHANGED
@@ -11,6 +11,7 @@ Params = Struct.new(
11
11
  :clone,
12
12
  :fdisk,
13
13
  :mkfs,
14
+ :ls,
14
15
  :file,
15
16
  :choose,
16
17
  :device,
@@ -35,6 +36,7 @@ class Main
35
36
  clone: @opts['clone'],
36
37
  fdisk: @opts['fdisk'],
37
38
  mkfs: @opts['mkfs'],
39
+ ls: @opts['ls'],
38
40
  file: @opts['<file>'],
39
41
  choose: @opts['choose'],
40
42
  device: @opts['device'],
@@ -48,7 +50,9 @@ class Main
48
50
  exit
49
51
  end
50
52
 
51
- if params.mkfs
53
+ if params.ls
54
+ Command::Ls.new.run
55
+ elsif params.mkfs
52
56
  Command::Mkfs.new.run(list: params.list)
53
57
  elsif params.write
54
58
  Command::Write.new.run(file: params.file)
@@ -73,7 +77,8 @@ usage = <<~EOF
73
77
  #{PROGRAM_NAME} clone <file>
74
78
  #{PROGRAM_NAME} fdisk
75
79
  #{PROGRAM_NAME} mkfs [--list]
76
- #{PROGRAM_NAME} choose ( device | partition )
80
+ #{PROGRAM_NAME} choose (device | partition)
81
+ #{PROGRAM_NAME} ls
77
82
  #{PROGRAM_NAME} --version
78
83
 
79
84
  Options:
@@ -0,0 +1,7 @@
1
+ module Command
2
+ class Ls
3
+ def run
4
+ puts RootDevice.get_removable.map(&:path)
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Diskman
2
- VERSION = '1.4.1'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diskman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-29 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -80,6 +80,7 @@ files:
80
80
  - lib/diskman/commands/choose_partition.rb
81
81
  - lib/diskman/commands/clone.rb
82
82
  - lib/diskman/commands/fdisk.rb
83
+ - lib/diskman/commands/ls.rb
83
84
  - lib/diskman/commands/mkfs.rb
84
85
  - lib/diskman/commands/write.rb
85
86
  - lib/diskman/confirmer.rb