Skip to content

Commit

Permalink
Revert "Update Ruby to 3.0.5" (#52597)
Browse files Browse the repository at this point in the history
* Revert "Update Ruby to 3.0.5 (#50743)"

This reverts commit 13ca817.

* continue to support both Ruby 2.7 and 3.0, since some of our servers have already upgraded to the latter
  • Loading branch information
Hamms committed Jul 4, 2023
1 parent e0aa3b3 commit ef6057b
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 74 deletions.
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ steps:

- name: unit-tests
# see: docker/dockerfiles/Dockerfile
image: codedotorg/code-dot-org:1.8.0
image: codedotorg/code-dot-org:1.7.1
pull: always
volumes:
- name: rbenv
Expand Down Expand Up @@ -144,7 +144,7 @@ steps:

- name: ui-tests
# see: docker/dockerfiles/Dockerfile
image: codedotorg/code-dot-org:1.8.0
image: codedotorg/code-dot-org:1.7.1
pull: always
volumes:
- name: rbenv
Expand Down Expand Up @@ -210,6 +210,6 @@ trigger:
- pull_request
---
kind: signature
hmac: ee33dc81e40d2147f9e941e7d82c98bf9894cd3f2f018e734a42bf81ea87de30
hmac: 94bb1f9096ebcdb4965c265590a1b3496492e1a71bbb65b24169ceedc2b6036f

...
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.5
2.7.5
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ gem 'thwait'
# validation; manually target a later version to pick up https://github.com/ruby/cgi/pull/29
gem 'cgi', '~> 0.3.6'

# Ruby 3.0 no longer provides sorted_set by default, so install it manually
# see https://github.com/ruby/set/pull/2
gem 'sorted_set'

# Force HTTPS for github-source gems.
# This is a temporary workaround - remove when bundler version is >=2.0
# @see https://github.com/bundler/bundler/issues/4978
Expand Down
87 changes: 35 additions & 52 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
acts_as_list (1.1.0)
acts_as_list (1.0.4)
activerecord (>= 4.2)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
Expand Down Expand Up @@ -265,10 +265,10 @@ GEM
backports (3.11.3)
bcrypt (3.1.13)
benchmark-ips (2.7.2)
better_errors (2.10.1)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bindata (2.4.10)
bindex (0.8.1)
bootsnap (1.16.0)
Expand Down Expand Up @@ -321,14 +321,13 @@ GEM
cucumber-wire (0.0.1)
daemons (1.4.1)
dalli (2.7.6)
dalli-elasticache (1.0.1)
dalli (>= 2.0.0)
datapackage (1.1.1)
dalli-elasticache (0.2.0)
dalli (>= 1.0.0)
datapackage (0.0.4)
colorize
json
json-schema
ruby_dig
rubyzip
tableschema
rest-client
date (3.3.3)
declarative (0.0.20)
devise (4.7.3)
Expand All @@ -340,14 +339,15 @@ GEM
devise_invitable (2.0.6)
actionmailer (>= 5.0)
devise (>= 4.6)
diff-lcs (1.5.0)
diff-lcs (1.3)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotiw (4.0.1)
actionpack (>= 4)
i18n
e2mmap (0.1.0)
erubi (1.12.0)
erubis (2.7.0)
eventmachine (1.2.7)
execjs (2.7.0)
exifr (1.2.5)
Expand All @@ -372,7 +372,7 @@ GEM
railties (>= 5.0.0)
fakeredis (0.6.0)
redis (~> 3.2)
faraday (1.10.3)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand Down Expand Up @@ -406,7 +406,7 @@ GEM
json
firebase_token_generator (2.0.0)
fspath (3.1.0)
gemoji (4.1.0)
gemoji (2.1.0)
geocoder (1.6.4)
get_process_mem (0.2.3)
gherkin (5.1.0)
Expand Down Expand Up @@ -446,10 +446,11 @@ GEM
haml (5.2.2)
temple (>= 0.8.0)
tilt
haml-rails (2.1.0)
haml-rails (2.0.1)
actionpack (>= 5.1)
activesupport (>= 5.1)
haml (>= 4.0.6)
haml (>= 4.0.6, < 6.0)
html2haml (>= 1.0.1)
railties (>= 5.1)
haml_lint (0.37.1)
haml (>= 4.0, < 5.3)
Expand All @@ -462,6 +463,11 @@ GEM
hashie (3.6.0)
highline (1.6.21)
honeybadger (4.12.1)
html2haml (2.2.0)
erubis (~> 2.7.0)
haml (>= 4.0, < 6)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
http-cookie (1.0.3)
domain_name (~> 0.5)
httparty (0.21.0)
Expand Down Expand Up @@ -505,16 +511,14 @@ GEM
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
macaddr (1.7.2)
systemu (~> 2.6.5)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
memoist (0.16.2)
memory_profiler (1.0.1)
memory_profiler (0.9.10)
metaclass (0.0.4)
method_source (1.0.0)
mime-types (3.4.1)
Expand All @@ -525,7 +529,7 @@ GEM
mini_portile2 (2.8.2)
mini_racer (0.3.1)
libv8 (~> 8.4.255)
minitest (5.18.0)
minitest (5.17.0)
minitest-around (0.5.0)
minitest (~> 5.0)
minitest-reporters (1.2.0)
Expand All @@ -542,10 +546,10 @@ GEM
multipart-post (2.2.3)
mustermann (2.0.2)
ruby2_keywords (~> 0.0.1)
mysql2 (0.5.5)
mysql2 (0.5.4)
nakayoshi_fork (0.0.4)
naturally (2.1.0)
net-http-persistent (4.0.2)
net-http-persistent (3.0.0)
connection_pool (~> 2.2)
net-imap (0.3.4)
date
Expand Down Expand Up @@ -596,9 +600,6 @@ GEM
actionpack (>= 4.2)
omniauth (>= 1.3.1)
open-uri (0.1.0)
stringio
time
uri
open_uri_redirections (0.2.1)
openid_connect (1.0.3)
activemodel
Expand Down Expand Up @@ -663,7 +664,7 @@ GEM
rack-ssl-enforcer (0.2.9)
rack-test (2.0.2)
rack (>= 1.3)
rack_csrf (2.7.0)
rack_csrf (2.5.0)
rack (>= 1.1.0)
rails (6.1.7.3)
actioncable (= 6.1.7.3)
Expand Down Expand Up @@ -698,11 +699,10 @@ GEM
rainbow (3.0.0)
raindrops (0.20.0)
rake (12.3.3)
rambling-trie (2.3.1)
rambling-trie (2.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtree (0.4.6)
recaptcha (4.6.3)
json
redcarpet (3.3.4)
Expand All @@ -717,9 +717,9 @@ GEM
require_all (2.0.0)
rerun (0.13.0)
listen (~> 3.0)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
Expand All @@ -729,7 +729,6 @@ GEM
rexml (3.2.5)
rinku (2.0.4)
rmagick (4.2.5)
rouge (4.1.2)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
Expand Down Expand Up @@ -768,7 +767,8 @@ GEM
ruby-progressbar (1.11.0)
ruby-rc4 (0.1.5)
ruby2_keywords (0.0.5)
ruby_dig (0.0.2)
ruby_parser (3.18.1)
sexp_processor (~> 4.16)
rubyzip (2.3.2)
sass (3.7.4)
sass-listen (~> 4.0.0)
Expand All @@ -791,12 +791,12 @@ GEM
scss_lint (0.60.0)
sass (~> 3.5, >= 3.5.5)
sd_notify (0.1.1)
selenium-webdriver (4.10.0)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sequel (5.67.0)
set (1.0.3)
sexp_processor (4.16.0)
shotgun (0.9.1)
rack (>= 1.0)
signet (0.17.0)
Expand All @@ -809,9 +809,6 @@ GEM
rack (~> 2.2)
rack-protection (= 2.2.3)
tilt (~> 2.0)
sorted_set (1.0.3)
rbtree
set (~> 1.0)
spring (3.1.1)
spring-commands-testunit (1.0.1)
spring (>= 0.9.1)
Expand All @@ -825,34 +822,24 @@ GEM
net-ssh (>= 2.8.0)
state_machine (1.2.0)
stringex (2.5.2)
stringio (3.0.7)
swd (1.0.1)
activesupport (>= 3)
attr_required (>= 0.0.5)
httpclient (>= 2.4)
i18n
json (>= 1.4.3)
sysexits (1.2.0)
systemu (2.6.5)
tableschema (1.0.4)
activesupport
json-schema (~> 2.8.0)
tod (~> 2.1.0)
uuid (~> 2.3.8)
temple (0.8.2)
thin (1.8.2)
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (1.2.1)
thwait (0.2.0)
e2mmap
tilt (2.0.11)
time (0.2.2)
date
timecop (0.8.1)
timeout (0.3.2)
tod (2.1.1)
trailblazer-option (0.1.2)
ttfunk (1.7.0)
twilio-ruby (5.77.0)
Expand All @@ -869,10 +856,7 @@ GEM
unf_ext (0.0.7.2)
unicode-display_width (2.1.0)
unicode_utils (1.4.0)
uri (0.12.1)
user_agent_parser (2.3.0)
uuid (2.3.9)
macaddr (~> 1.0)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
Expand Down Expand Up @@ -1066,7 +1050,6 @@ DEPENDENCIES
shotgun
sinatra (= 2.2.3)
sort_alphabetical!
sorted_set
spring (~> 3.1.1)
spring-commands-testunit
sprockets!
Expand All @@ -1090,7 +1073,7 @@ DEPENDENCIES
youtube-dl.rb

RUBY VERSION
ruby 3.0.5p211
ruby 2.7.5p203

BUNDLED WITH
2.3.22
4 changes: 2 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can do Code.org development using OSX, Ubuntu, or Windows (running Ubuntu in
- *Important*: When done, check for correct versions of these dependencies:

```sh
ruby --version # --> ruby 3.0.5
ruby --version # --> ruby 2.7.5
node --version # --> v18.16.0
yarn --version # --> 1.22.5
```
Expand Down Expand Up @@ -70,7 +70,7 @@ You can do Code.org development using OSX, Ubuntu, or Windows (running Ubuntu in
- `ALTER DATABASE dashboard_test CHARACTER SET utf8 COLLATE utf8_unicode_ci;`

1. `bundle exec rake build`
- This may fail if you are on a Mac and your OSX XCode Command Line Tools were not installed properly. See [Bundle Install Tips](#bundle-install-tips) for more information.
- This may fail if your are on a Mac and your OSX XCode Command Line Tools were not installed properly. See [Bundle Install Tips](#bundle-install-tips) for more information.
- This may fail for external contributors who don't have permissions to access Code.org AWS Secrets. Assign placeholder values to any configuration settings that are [ordinarily populated in Development environments from AWS Secrets](https://github.com/code-dot-org/code-dot-org/blob/staging/config/development.yml.erb) as indicated in this example: https://github.com/code-dot-org/code-dot-org/blob/5b3baed4a9c2e7226441ca4492a3bca23a4d7226/locals.yml.default#L136-L139

1. Run the website `bin/dashboard-server`
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.5
2.7.5
2 changes: 1 addition & 1 deletion cookbooks/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ DEPENDENCIES
test-kitchen

RUBY VERSION
ruby 3.0.5p211
ruby 2.7.5p203

BUNDLED WITH
2.3.22
2 changes: 1 addition & 1 deletion cookbooks/cdo-ruby/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default['cdo-ruby'] = {
version: '3.0.5',
version: '2.7.5',
rubygems_version: '3.3.22',
bundler_version: '2.3.22',
rake_version: '13.0.1'
Expand Down
4 changes: 2 additions & 2 deletions dashboard/lib/tasks/seed.rake
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ namespace :seed do
# optionally, only process modified scripts to speed up seed time
scripts_seeded_mtime = (opts[:incremental] && File.exist?(SEEDED)) ?
File.mtime(SEEDED) : Time.at(0)
FileUtils.touch(SEEDED) # touch seeded "early" to reduce race conditions
touch SEEDED # touch seeded "early" to reduce race conditions
script_files = opts[:script_files] || SCRIPTS_GLOB
begin
custom_scripts = script_files.select {|script| File.mtime(script) > scripts_seeded_mtime}
Expand Down Expand Up @@ -227,7 +227,7 @@ namespace :seed do
DSLS_GLOB = DSL_TYPES.map {|x| Dir.glob("config/scripts/**/*.#{x.underscore}*").sort}.flatten.freeze
file 'config/scripts/.dsls_seeded' => DSLS_GLOB do |t|
Rake::Task['seed:dsls'].invoke
FileUtils.touch(t.name)
touch t.name
end

# explicit execution of "seed:dsls"
Expand Down

0 comments on commit ef6057b

Please sign in to comment.