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

Upgrade Ruby to 3.2.2 #706

Merged
merged 1 commit into from
Nov 3, 2023
Merged
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.6
3.2.2
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.2.2
20 changes: 10 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
source "https://rubygems.org"

ruby '2.7.6'
ruby '3.2.2'

gem 'activesupport'
gem "erector", "~> 0.10.0"
gem "sinatra", "~> 3.0.3"
gem "sinatra-contrib", "~> 3.0.3"
gem "erector", github: "erector/erector"
gem "sinatra"
gem "sinatra-contrib"
gem "nokogiri"
gem "thin", "1.8.1"
gem "thin"
gem 'rack-codehighlighter'
gem 'coderay'
gem "deckrb", "~> 0.5.2"
gem "deckrb"
gem "sass"
gem "redcarpet"
gem "rubyzip"
gem "i18n", "~> 0.7"
gem "i18n"
gem 'font-awesome-sass'
gem 'bootstrap-sass'
gem 'jquery-cdn'
gem 'sprockets'
gem 'ffi', "1.15.5"
gem 'backports', "3.23.0"
gem 'ffi'
gem 'backports'

group :development do
gem "rspec"
gem "rerun"
gem "rake"
gem "rack-test"
gem "files", "~> 0.3.0"
gem 'files', github: "alexch/files"
gem 'rb-fsevent', :platform => :ruby
end
144 changes: 107 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
GIT
remote: https://github.com/alexch/files.git
revision: 4938dd85ed79f421b808e8798764661a71cab5a4
specs:
files (0.4.0)

GIT
remote: https://github.com/erector/erector.git
revision: 32cb38e3381889295183230caf8bf334d2f0e82a
specs:
erector (0.10.0)
haml
jeweler
nokogiri
sass
treetop (>= 1.2.3)

GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
activesupport (6.0.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
autoprefixer-rails (10.4.2.0)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.4.0)
autoprefixer-rails (10.4.15.0)
execjs (~> 2)
backports (3.23.0)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
coderay (1.1.1)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.1.9)
daemons (1.2.4)
deckrb (0.5.2)
Expand All @@ -25,47 +45,89 @@ GEM
redcarpet (~> 2)
thin
trollop
diff-lcs (1.3)
erector (0.10.0)
treetop (>= 1.2.3)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.5.0)
eventmachine (1.2.3)
execjs (2.8.1)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.15.5)
files (0.3.1)
font-awesome-sass (4.7.0)
sass (>= 3.2)
i18n (0.8.1)
font-awesome-sass (6.4.2)
sassc (~> 2.0)
git (1.11.0)
rchardet (~> 1.8)
github_api (0.16.0)
addressable (~> 2.4.0)
descendants_tracker (~> 0.0.4)
faraday (~> 0.8, < 0.10)
hashie (>= 3.4)
mime-types (>= 1.16, < 3.0)
oauth2 (~> 1.0)
haml (6.2.3)
temple (>= 0.8.2)
thor
tilt
hashie (5.0.0)
highline (2.1.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jeweler (2.3.9)
builder
bundler
git (>= 1.2.5)
github_api (~> 0.16.0)
highline (>= 1.6.15)
nokogiri (>= 1.5.10)
psych
rake
rdoc
semver2
jquery-cdn (2.2.4)
sprockets (>= 2)
json (2.6.1)
listen (3.1.5)
jwt (2.7.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mime-types (2.99.3)
mini_portile2 (2.8.0)
minitest (5.15.0)
minitest (5.20.0)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
nokogiri (1.13.9)
nokogiri (1.14.5)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oauth2 (1.4.8)
faraday (>= 0.8, < 3.0)
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
polyglot (0.3.5)
racc (1.6.0)
psych (5.1.1.1)
stringio
racc (1.7.2)
rack (2.2.4)
rack-codehighlighter (0.6.0)
nokogiri (>= 1.4.1)
rack (>= 2.0.0)
rack-protection (3.0.3)
rack
rack-protection (3.1.0)
rack (~> 2.2, >= 2.2.4)
rack-test (0.6.3)
rack (>= 1.0)
rake (12.3.3)
rake (13.1.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rchardet (1.8.0)
rdoc (6.5.0)
psych (>= 4.0.0)
redcarpet (2.3.0)
rerun (0.11.0)
rerun (0.14.0)
listen (~> 3.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
Expand All @@ -81,51 +143,59 @@ GEM
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby2_keywords (0.0.5)
ruby_dep (1.5.0)
rubyzip (1.3.0)
sass (3.4.23)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
sinatra (3.0.3)
semver2 (3.4.2)
sinatra (3.1.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.3)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sinatra-contrib (3.0.3)
sinatra-contrib (3.1.0)
multi_json
mustermann (~> 3.0)
rack-protection (= 3.0.3)
sinatra (= 3.0.3)
rack-protection (= 3.1.0)
sinatra (= 3.1.0)
tilt (~> 2.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
stringio (3.0.8)
temple (0.10.3)
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.3.0)
thread_safe (0.3.6)
tilt (2.0.11)
treetop (1.6.8)
polyglot (~> 0.3)
trollop (2.1.2)
tzinfo (1.2.10)
thread_safe (~> 0.1)
zeitwerk (2.6.12)

PLATFORMS
ruby

DEPENDENCIES
activesupport
backports (= 3.23.0)
backports
bootstrap-sass
coderay
deckrb (~> 0.5.2)
erector (~> 0.10.0)
ffi (= 1.15.5)
files (~> 0.3.0)
deckrb
erector!
ffi
files!
font-awesome-sass
i18n (~> 0.7)
i18n
jquery-cdn
nokogiri
rack-codehighlighter
Expand All @@ -137,13 +207,13 @@ DEPENDENCIES
rspec
rubyzip
sass
sinatra (~> 3.0.3)
sinatra-contrib (~> 3.0.3)
sinatra
sinatra-contrib
sprockets
thin (= 1.8.1)
thin

RUBY VERSION
ruby 2.7.6p219
ruby 3.2.2p53

BUNDLED WITH
2.3.26
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def render_deck

get "/:site/:name.zip" do
manifest_path = "#{site_dir}/#{params[:name]}.zip-manifest"
if File.exists?(manifest_path)
if File.exist?(manifest_path)
manifest_files = File.read(manifest_path).split("\n")
zip_path = File.join(Dir.tmpdir, "#{params[:name]}.zip")
FileUtils.rm_rf(zip_path)
Expand Down
2 changes: 0 additions & 2 deletions assets/stylesheets/font_awesome.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
$fa-font-path: '/fonts/font-awesome/';

@import 'font-awesome';
14 changes: 7 additions & 7 deletions lib/step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def insert file
## steps

%w[
steps explanation overview discussion hints challenge
steps explanation overview discussion hints challenge
tools_and_references requirements
].each do |type|
define_method type.to_sym do |&block|
Expand All @@ -87,7 +87,7 @@ def insert file
end
end

def step name = nil, options = {}
def step name = nil, options = {}, &block
num = next_step_number
a(name: "step#{current_anchor_num}")
a(name: options[:anchor_name]) if options[:anchor_name]
Expand All @@ -98,7 +98,7 @@ def step name = nil, options = {}
(!name.nil? ? I18n.t("general.step_title_suffix") : '')
text name
end
_render_inner_content &Proc.new if block_given?
_render_inner_content(&block) if block_given?
end
end

Expand Down Expand Up @@ -131,19 +131,19 @@ def next_step name
end
end

def situation name
def situation name, &block
h1 name
_render_inner_content &Proc.new if block_given?
_render_inner_content(&block) if block_given?
end

def option name
def option name, &block
num = next_step_number
a(:name => "step#{current_anchor_num}")
h1 :class => "option" do
span I18n.t("general.option", :num => num)
text name
end
_render_inner_content &Proc.new if block_given?
_render_inner_content(&block) if block_given?
end

def option_half title
Expand Down
2 changes: 1 addition & 1 deletion spec/app_deck_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ def app
expect(last_response.body).to include("/* Code ray css */")
end
end
end
end
3 changes: 2 additions & 1 deletion spec/site_syntax_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "cgi"
require "spec_helper"
require_relative "../app"

Expand Down Expand Up @@ -29,7 +30,7 @@ def app

site.docs.each do |doc|
it "renders #{doc.filename}" do
path = URI.escape "/#{site.name}/#{doc.name}"
path = CGI.escape "/#{site.name}/#{doc.name}"
get path, locale: locale
if (last_response.status != 200)
errors = last_response.errors
Expand Down