diskman 1.0.2 → 1.0.6

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: 60a56cc84faf0b324ccd66b0839aae9b647fd2ce580bfb0b699f42eba3ad136a
4
- data.tar.gz: 49689697c2d6ad593fad02dbee1fc10283bcd97d43a350f8c8c8924ea96e9ede
3
+ metadata.gz: 9f2c09fe30a14620d77849bcfba12190887388f22428a877c5204f2939dc725d
4
+ data.tar.gz: eaeed253b79780a6feef0c2cad7280ba2b062bf279357038a7f2b1e39d583e81
5
5
  SHA512:
6
- metadata.gz: b40ccefcd84a1adfe607029800ecb2107b64ad2cb4022d3507d8c105e40e531d82e7fecc04bcad6f1bb5b3f299119d3c0668c4a2150d87a3c5c07da18c638627
7
- data.tar.gz: c6c571cada30b6228851b2e61a564ae01fa3fac63ea04e94615bb8501b0d466599df6afb2bda0d06be34ed90f387f42d5e593507041a3cea8d101464c37847a4
6
+ metadata.gz: de0710480c87de05bb0f19438baa0679d3d7f0c4d6502e65c010297d089d3932b4c53cefb760d2b1f69ad76340cf3e68f73d8f20d6b882663b845018bf03b797
7
+ data.tar.gz: 42cffea6693583345a0275bf25b3f882c8d5bf2257ae0659521506c712e4ba5c085624d14c7a429950b97fd44d502074ff684abf876961c70dc883a46100b03d
@@ -36,7 +36,7 @@ module Diskman
36
36
  puts
37
37
 
38
38
  if @items.length == 1
39
- puts 'Press any key to select it.'
39
+ puts 'Press enter to select it.'
40
40
  $stdin.gets
41
41
  return @items.first
42
42
  end
@@ -7,6 +7,8 @@ module Command
7
7
  end
8
8
 
9
9
  device = RootDevice.choose
10
+ device = device.choose_with_partitions
11
+
10
12
  size = File.size(file)
11
13
  cmd = device.get_write_command(file, size)
12
14
 
@@ -1,7 +1,7 @@
1
1
  module Diskman
2
2
  # Confirms whether the user wants to do something destructive.
3
3
  class Confirmer
4
- YES = 'YES'
4
+ YES = 'yes'
5
5
 
6
6
  def self.check!
7
7
  new.check!
@@ -9,7 +9,7 @@ module Diskman
9
9
 
10
10
  def check!
11
11
  puts
12
- puts 'Are you sure? Type "%s" if so.' % YES
12
+ puts 'Are you sure? Type "%s"' % YES
13
13
  puts
14
14
 
15
15
  print '> '
@@ -17,13 +17,7 @@ module Diskman
17
17
  end
18
18
 
19
19
  def get_write_command(path, bytes)
20
- if `which 2>/dev/null pv`.length > 0
21
- pv = 'pv --size %d' % bytes
22
- dd = 'dd if="%s" | ' + pv + ' | sudo dd of="%s" bs=%d'
23
- else
24
- dd = 'sudo dd if="%s" of="%s" bs=%d'
25
- end
26
-
20
+ dd = 'sudo dd if="%s" of="%s" bs=%dK status=progress'
27
21
  dd % [path, @path, 4096]
28
22
  end
29
23
 
@@ -1,3 +1,3 @@
1
1
  module Diskman
2
- VERSION = "1.0.2"
2
+ VERSION = '1.0.6'
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.0.2
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.17.0
61
+ version: 0.21.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.17.0
68
+ version: 0.21.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -86,16 +86,16 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '12.3'
89
+ version: '13.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '12.3'
97
- description:
98
- email:
96
+ version: '13.0'
97
+ description:
98
+ email:
99
99
  executables:
100
100
  - diskman
101
101
  extensions: []
@@ -117,7 +117,7 @@ homepage: https://github.com/crdx/diskman
117
117
  licenses:
118
118
  - MIT
119
119
  metadata: {}
120
- post_install_message:
120
+ post_install_message:
121
121
  rdoc_options: []
122
122
  require_paths:
123
123
  - lib
@@ -132,8 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.0.6
136
- signing_key:
135
+ rubygems_version: 3.2.21
136
+ signing_key:
137
137
  specification_version: 4
138
138
  summary: Interactive command line interface for safely managing disks
139
139
  test_files: []