Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Ruby 3 #602

Merged
merged 5 commits into from
Aug 19, 2024
Merged

Move to Ruby 3 #602

merged 5 commits into from
Aug 19, 2024

Conversation

PeterJCLaw
Copy link
Member

@PeterJCLaw PeterJCLaw commented Aug 18, 2024

Ruby 2.x is fairly old and likely to hold us back from package updates. This PR updates some packages which enable us to move to Ruby 3.x and then upgrades us all the way to the latest version.

This is broadly equivalent to other updates already done to our other jekyll repos (e.g: srobo/website#550).

The package updates appear to include some small changes to syntax highlighting within f-strings, though nothing which appears incorrect.

Note: I haven't tested the setup process on Windows -- if someone is able to do that and ensure that it's easy enough to set up Ruby 3 in Windows that would be great.

Copy link

github-actions bot commented Aug 18, 2024

🔀 Build diff:

diff -ru main/simulator/simulated_robot.html local/simulator/simulated_robot.html
--- main/simulator/simulated_robot.html	2024-08-18 18:17:18.000000000 +0000
+++ local/simulator/simulated_robot.html	2024-08-18 18:16:55.000000000 +0000
@@ -958,7 +958,7 @@
 <div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">reading</span> <span class="o">=</span> <span class="n">R</span><span class="p">.</span><span class="n">arduino</span><span class="p">.</span><span class="n">pins</span><span class="p">[</span><span class="n">A5</span><span class="p">].</span><span class="n">analog_read</span><span class="p">()</span>
 <span class="c1"># convert reading from volts to meters
 </span><span class="n">measurement</span> <span class="o">=</span> <span class="n">reading</span> <span class="o">/</span> <span class="p">(</span><span class="mi">5</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span>
-<span class="k">print</span><span class="p">(</span><span class="sa">f</span><span class="s">"Rear ultrasound distance </span><span class="si">{</span><span class="n">measurement</span><span class="p">:.</span><span class="mi">2</span><span class="n">f</span><span class="si">}</span><span class="s"> meters"</span><span class="p">)</span>
+<span class="k">print</span><span class="p">(</span><span class="sa">f</span><span class="s">"Rear ultrasound distance </span><span class="si">{</span><span class="n">measurement</span><span class="si">:</span><span class="p">.</span><span class="mi">2</span><span class="n">f</span><span class="si">}</span><span class="s"> meters"</span><span class="p">)</span>
 </code></pre></div></div>
 
 <h3 id="leds">LEDs</h3>

This appears to include some small changes to syntax highlighting
within f-strings, though nothing which appears incorrect.
This includes updating our validation yaml loading to allow parsing
date values in the kit versions file, which was previously implicitly
allowed but now needs to be explicit.
@PeterJCLaw PeterJCLaw merged commit 3ea275a into main Aug 19, 2024
6 checks passed
@PeterJCLaw PeterJCLaw deleted the ruby-3 branch August 19, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants