prremote 0.1.2 → 0.1.4
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/README.md +9 -1
- data/VERSION +1 -0
- data/lib/prremote/cli.rb +5 -5
- data/lib/prremote/commands/install.rb +1 -1
- data/lib/prremote/version.rb +1 -2
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46762e433d6de80bfe8f614bbdd3ee25fdbf976a235d69b3aecfe2039bd180f8
|
|
4
|
+
data.tar.gz: bcff6b310ed0056d0298a6511cdefe9ffb77aadbcbf0522a379b62d6e3fcc872
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ad10419ea1caafefbdbbeaf803dc80d2a39caf148d0ad545f069661acd46010ba45eecba4c1325235b06d0e43d8cc695bc042e03906d48a820fd6c14b658f53
|
|
7
|
+
data.tar.gz: 40ba90421406056fdde9b2849b46a849bd6d642c00784c14f03b62ce12e09724d343b61d89eb97d6d9a035350f1dbd445b253cefe602a5faacc56698df36ff4c
|
data/README.md
CHANGED
|
@@ -6,11 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
Inspired by [mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html) for MicroPython.
|
|
8
8
|
|
|
9
|
+
|
|
10
|
+
[](https://rubygems.org/gems/prremote)
|
|
11
|
+
[](https://github.com/lumbermill/prremote/actions/workflows/ci.yml)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
[](https://github.com/lumbermill/prremote)
|
|
14
|
+
|
|
9
15
|
---
|
|
10
16
|
|
|
11
17
|
## Requirements
|
|
12
18
|
|
|
13
|
-
- Ruby 3.
|
|
19
|
+
- Ruby 3.4 or later
|
|
14
20
|
- Raspberry Pi Pico W
|
|
15
21
|
- `mrbc` (mruby 4.x) for `run`, `deploy`, and `eval`
|
|
16
22
|
- macOS: `brew install mruby`
|
|
@@ -74,6 +80,8 @@ prremote run blink.rb --port /dev/tty.usbmodem101
|
|
|
74
80
|
|
|
75
81
|
The device responds with `RUNNING`, streams any output, then `DONE`.
|
|
76
82
|
|
|
83
|
+
You can find some examples in [test/samples](test/samples/).
|
|
84
|
+
|
|
77
85
|
---
|
|
78
86
|
|
|
79
87
|
### `deploy FILE`
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.4
|
data/lib/prremote/cli.rb
CHANGED
|
@@ -23,10 +23,10 @@ module Prremote
|
|
|
23
23
|
remove_command :tree
|
|
24
24
|
|
|
25
25
|
desc 'install', 'Flash prremote runtime firmware to Pico W or Pico'
|
|
26
|
-
option :version, type: :string, desc: "Firmware version to install (default: #{
|
|
26
|
+
option :version, type: :string, desc: "Firmware version to install (default: #{VERSION})"
|
|
27
27
|
option :board, type: :string, desc: 'Board type: pico or picow (default: picow)'
|
|
28
28
|
def install
|
|
29
|
-
version = options[:version] ||
|
|
29
|
+
version = options[:version] || VERSION
|
|
30
30
|
board = options[:board] || 'picow'
|
|
31
31
|
unless RuntimeManager::BOARDS.include?(board)
|
|
32
32
|
raise Thor::Error, "Unknown board '#{board}'. Valid values: #{RuntimeManager::BOARDS.join(', ')}"
|
|
@@ -104,10 +104,11 @@ module Prremote
|
|
|
104
104
|
desc 'version', 'Show prremote, mrbc, and device firmware version'
|
|
105
105
|
def version
|
|
106
106
|
puts "prremote: #{VERSION}"
|
|
107
|
+
puts "runtime: #{fetch_runtime_version}"
|
|
107
108
|
|
|
108
109
|
begin
|
|
109
110
|
major = Mrbc.major_version
|
|
110
|
-
puts "mrbc:
|
|
111
|
+
puts "mrbc: #{Mrbc.version} (#{Mrbc.bin})"
|
|
111
112
|
unless major && major >= Mrbc::REQUIRED_MAJOR
|
|
112
113
|
puts " ** mrbc is too old (need #{Mrbc::REQUIRED_MAJOR}.x) **"
|
|
113
114
|
puts " Hint: the path can be set via MRBC environment variable."
|
|
@@ -116,7 +117,6 @@ module Prremote
|
|
|
116
117
|
puts "mrbc: (#{e.message})"
|
|
117
118
|
end
|
|
118
119
|
|
|
119
|
-
puts "runtime: #{fetch_runtime_version}"
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
private
|
|
@@ -160,7 +160,7 @@ module Prremote
|
|
|
160
160
|
next
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
-
return ::Regexp.last_match(1) if buf =~ %r{READY prremote-runtime/([\d.]+)}
|
|
163
|
+
return "#{::Regexp.last_match(1)} (#{port})" if buf =~ %r{READY prremote-runtime/([\d.]+)}
|
|
164
164
|
return '(not responding)' if Time.now > deadline
|
|
165
165
|
|
|
166
166
|
sleep 0.05
|
data/lib/prremote/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prremote
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ITO Yosei
|
|
@@ -103,6 +103,7 @@ extra_rdoc_files: []
|
|
|
103
103
|
files:
|
|
104
104
|
- LICENSE
|
|
105
105
|
- README.md
|
|
106
|
+
- VERSION
|
|
106
107
|
- bin/prremote
|
|
107
108
|
- lib/prremote.rb
|
|
108
109
|
- lib/prremote/cli.rb
|