Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodejs 24.10.0
ruby 3.2.2
3 changes: 2 additions & 1 deletion rails/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'https://rubygems.org'
ruby '>= 3.0'
# ruby 3.2.2 is the latest as of rails 7.0.7.2 specified below
ruby '3.2.2'

gem 'rails', '7.0.7.2'

Expand Down
6 changes: 3 additions & 3 deletions rails/bin/determinator
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

gemfile = File.read("./Gemfile")
REQUIRED_RUBY_VERSION = gemfile[/ruby ['"]>=(.+)['"]/, 1]
REQUIRED_RUBY_VERSION = gemfile[/ruby ['"]([\d\.]+)['"]/, 1]
ACTUAL_RUBY_VERSION = RUBY_VERSION

HOMEBREW_INSTALLATION_COMMAND = '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'
Expand Down Expand Up @@ -52,9 +52,9 @@ end

puts ""
puts "🤖 I am The Determinator! Come with me if you want to use the right Ruby version!"
puts "ℹ️ Minicom uses Ruby #{REQUIRED_RUBY_VERSION} or greater. Let me check what version of Ruby you have…"
puts "ℹ️ Minicom uses Ruby #{REQUIRED_RUBY_VERSION}. Let me check what version of Ruby you have…"

if REQUIRED_RUBY_VERSION <= ACTUAL_RUBY_VERSION
if REQUIRED_RUBY_VERSION == ACTUAL_RUBY_VERSION
puts "✅ You’re using Ruby #{ACTUAL_RUBY_VERSION}. You’re all set!"
exit(0)
else
Expand Down