rpremote 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.ja.md +17 -3
- data/README.md +17 -3
- data/RELEASING.md +2 -2
- data/THIRD_PARTY_NOTICES.md +4 -0
- data/lib/rpremote/bootsel_command.rb +124 -0
- data/lib/rpremote/cli.rb +60 -9
- data/lib/rpremote/config.rb +2 -0
- data/lib/rpremote/deploy_command.rb +191 -0
- data/lib/rpremote/dfu_command.rb +65 -3
- data/lib/rpremote/flash_command.rb +4 -1
- data/lib/rpremote/flasher.rb +49 -11
- data/lib/rpremote/help.rb +64 -11
- data/lib/rpremote/mrbgems.rb +41 -12
- data/lib/rpremote/nuke_firmware.rb +71 -0
- data/lib/rpremote/picoruby_source_patch.rb +23 -6
- data/lib/rpremote/recursive_copy.rb +84 -0
- data/lib/rpremote/runner.rb +33 -6
- data/lib/rpremote/setup_command.rb +4 -1
- data/lib/rpremote/shell.rb +9 -5
- data/lib/rpremote/terminal.rb +13 -1
- data/lib/rpremote/version.rb +1 -1
- data/lib/rpremote.rb +4 -0
- data/patches/picoruby-3.4.5-bootsel.patch +71 -0
- data/patches/picoruby-4.0.3-bootsel.patch +71 -0
- data/sig/rpremote.rbs +50 -2
- metadata +7 -1
data/sig/rpremote.rbs
CHANGED
|
@@ -166,6 +166,15 @@ module Rpremote
|
|
|
166
166
|
def source_dir: () -> String
|
|
167
167
|
end
|
|
168
168
|
|
|
169
|
+
class NukeFirmware
|
|
170
|
+
URL: String
|
|
171
|
+
FILENAME: String
|
|
172
|
+
MAX_REDIRECTS: Integer
|
|
173
|
+
|
|
174
|
+
def initialize: (?directory: String, ?fetcher: untyped) -> void
|
|
175
|
+
def setup: (?force: bool) -> String
|
|
176
|
+
end
|
|
177
|
+
|
|
169
178
|
class PicoRubySourcePatch
|
|
170
179
|
JOB_PATH: String
|
|
171
180
|
PATCH_ALIASES: Hash[String, String]
|
|
@@ -310,6 +319,11 @@ module Rpremote
|
|
|
310
319
|
def run: (String data, ?output: IO?) -> String
|
|
311
320
|
end
|
|
312
321
|
|
|
322
|
+
class RecursiveCopy
|
|
323
|
+
def initialize: (output: IO, ?serial: untyped, ?device: untyped) -> void
|
|
324
|
+
def call: (String source, String destination, Hash[Symbol, untyped] options) -> void
|
|
325
|
+
end
|
|
326
|
+
|
|
313
327
|
class Resetter
|
|
314
328
|
DEFAULT_TIMEOUT: Float
|
|
315
329
|
RETRY_INTERVAL: Float
|
|
@@ -337,7 +351,7 @@ module Rpremote
|
|
|
337
351
|
class Result < Data
|
|
338
352
|
attr_reader mount: String
|
|
339
353
|
attr_reader destination: String
|
|
340
|
-
attr_reader port: String
|
|
354
|
+
attr_reader port: String?
|
|
341
355
|
end
|
|
342
356
|
|
|
343
357
|
class Error < Rpremote::Error
|
|
@@ -362,8 +376,10 @@ module Rpremote
|
|
|
362
376
|
?port_probe: untyped,
|
|
363
377
|
?sleeper: untyped
|
|
364
378
|
) -> void
|
|
365
|
-
def flash: (String uf2_path, ?mount: String?, ?port: String?) -> Result
|
|
379
|
+
def flash: (String uf2_path, ?mount: String?, ?port: String?, ?wait_for_port: bool) -> Result
|
|
366
380
|
def find_mount: (?String? explicit_mount) -> String
|
|
381
|
+
def find_mounted: (?String? explicit_mount) -> String?
|
|
382
|
+
def wait_for_mount: (?mount: String?) -> String
|
|
367
383
|
end
|
|
368
384
|
|
|
369
385
|
class DfuCommand
|
|
@@ -415,4 +431,36 @@ module Rpremote
|
|
|
415
431
|
?flasher: untyped
|
|
416
432
|
) -> void
|
|
417
433
|
end
|
|
434
|
+
|
|
435
|
+
class DeployCommand
|
|
436
|
+
def self.run: (
|
|
437
|
+
Array[String] args,
|
|
438
|
+
defaults: Hash[Symbol, untyped],
|
|
439
|
+
?output: IO,
|
|
440
|
+
?error: IO,
|
|
441
|
+
?services: Hash[Symbol, untyped]
|
|
442
|
+
) -> void
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
class BootselCommand
|
|
446
|
+
RESET_FLASH_FIRMWARE: String
|
|
447
|
+
|
|
448
|
+
class Error < Rpremote::Error
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
def self.run: (
|
|
452
|
+
Array[String] args,
|
|
453
|
+
defaults: Hash[Symbol, untyped],
|
|
454
|
+
?output: IO,
|
|
455
|
+
?services: Hash[Symbol, untyped]
|
|
456
|
+
) -> void
|
|
457
|
+
def self.enter: (
|
|
458
|
+
mount: String?,
|
|
459
|
+
port: String?,
|
|
460
|
+
baud: Integer,
|
|
461
|
+
timeout: Numeric,
|
|
462
|
+
output: IO,
|
|
463
|
+
?services: Hash[Symbol, untyped]
|
|
464
|
+
) -> String
|
|
465
|
+
end
|
|
418
466
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rpremote
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ogom
|
|
@@ -26,12 +26,14 @@ files:
|
|
|
26
26
|
- THIRD_PARTY_NOTICES.md
|
|
27
27
|
- exe/rpremote
|
|
28
28
|
- lib/rpremote.rb
|
|
29
|
+
- lib/rpremote/bootsel_command.rb
|
|
29
30
|
- lib/rpremote/build_command.rb
|
|
30
31
|
- lib/rpremote/builder.rb
|
|
31
32
|
- lib/rpremote/checksum.rb
|
|
32
33
|
- lib/rpremote/cli.rb
|
|
33
34
|
- lib/rpremote/config.rb
|
|
34
35
|
- lib/rpremote/config_show.rb
|
|
36
|
+
- lib/rpremote/deploy_command.rb
|
|
35
37
|
- lib/rpremote/device.rb
|
|
36
38
|
- lib/rpremote/dfu_command.rb
|
|
37
39
|
- lib/rpremote/dfu_compiler.rb
|
|
@@ -42,8 +44,10 @@ files:
|
|
|
42
44
|
- lib/rpremote/language_source.rb
|
|
43
45
|
- lib/rpremote/mrbgems.rb
|
|
44
46
|
- lib/rpremote/mrbgems_command.rb
|
|
47
|
+
- lib/rpremote/nuke_firmware.rb
|
|
45
48
|
- lib/rpremote/picomodem.rb
|
|
46
49
|
- lib/rpremote/picoruby_source_patch.rb
|
|
50
|
+
- lib/rpremote/recursive_copy.rb
|
|
47
51
|
- lib/rpremote/remote_path.rb
|
|
48
52
|
- lib/rpremote/resetter.rb
|
|
49
53
|
- lib/rpremote/runner.rb
|
|
@@ -53,7 +57,9 @@ files:
|
|
|
53
57
|
- lib/rpremote/target.rb
|
|
54
58
|
- lib/rpremote/terminal.rb
|
|
55
59
|
- lib/rpremote/version.rb
|
|
60
|
+
- patches/picoruby-3.4.5-bootsel.patch
|
|
56
61
|
- patches/picoruby-3.4.5-ruby-exception-status.patch
|
|
62
|
+
- patches/picoruby-4.0.3-bootsel.patch
|
|
57
63
|
- patches/picoruby-4.0.3-ruby-exception-status.patch
|
|
58
64
|
- sig/rpremote.rbs
|
|
59
65
|
- tasks/firmware_build.rb
|