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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9069bbf984dd62c31390570c934396581e816ad884511d248ebdf3a40657ae9d
4
- data.tar.gz: 853acaa0a69a126503b90ce6726958d194cd56fd5abaf559ff759284d26bf1a6
3
+ metadata.gz: 46762e433d6de80bfe8f614bbdd3ee25fdbf976a235d69b3aecfe2039bd180f8
4
+ data.tar.gz: bcff6b310ed0056d0298a6511cdefe9ffb77aadbcbf0522a379b62d6e3fcc872
5
5
  SHA512:
6
- metadata.gz: dff7ed500809d4d457b68ae7483e4d47632c5ced344d0c01237bcec981b589b57794a086508ac99ae7ac28f1b2f351e25dc3c3498b99fb87dac172c43720ebc9
7
- data.tar.gz: 58fe0f9d4911c33c8ed9456810cef1405784ab9d778d8bb14502fb9832611877e897880ebfbbd84c29b6c69a82bf42add2f020037534fe809908816cff3409ef
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
+ [![Gem Version](https://img.shields.io/gem/v/prremote)](https://rubygems.org/gems/prremote)
11
+ [![CI](https://github.com/lumbermill/prremote/actions/workflows/ci.yml/badge.svg)](https://github.com/lumbermill/prremote/actions/workflows/ci.yml)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
+ [![Ruby](https://img.shields.io/badge/ruby-3.4%20%7C%204.0-red)](https://github.com/lumbermill/prremote)
14
+
9
15
  ---
10
16
 
11
17
  ## Requirements
12
18
 
13
- - Ruby 3.x or later
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: #{RUNTIME_VERSION})"
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] || RUNTIME_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: #{Mrbc.version} (#{Mrbc.bin})"
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
@@ -3,7 +3,7 @@ require 'fileutils'
3
3
  module Prremote
4
4
  module Commands
5
5
  class Install
6
- def initialize(version: RUNTIME_VERSION, board: 'picow')
6
+ def initialize(version: VERSION, board: 'picow')
7
7
  @version = version
8
8
  @board = board
9
9
  end
@@ -1,4 +1,3 @@
1
1
  module Prremote
2
- VERSION = '0.1.2'
3
- RUNTIME_VERSION = '0.1.3'
2
+ VERSION = File.read(File.expand_path('../../VERSION', __dir__)).strip
4
3
  end
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.2
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