Skip to content

Commit 528644b

Browse files
authored
CON-805: Upgrade Ruby to 3.4.7 (#193)
* 865: Update API docs * CON 805: Upgrade Ruby to 3.4.7 * CON 805: Upgrade to Ruby 4.0.1 * CON 805: Bump nokogiri * CON 805: Revert back to 3.4.7 * CON 805: Revert back to 3.4.7
1 parent 6a766d0 commit 528644b

File tree

9 files changed

+77
-45
lines changed

9 files changed

+77
-45
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
ruby-version: [3.1]
15+
ruby-version: ['3.4']
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Set up Ruby
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
ruby-version: ${{ matrix.ruby-version }}
2323

24-
- uses: actions/cache@v3
24+
- uses: actions/cache@v4
2525
with:
2626
path: vendor/bundle
2727
key: gems-${{ runner.os }}-${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111

1212
runs-on: ubuntu-latest
1313
env:
14-
ruby-version: 2.6
14+
ruby-version: '3.4'
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Set up Ruby
1919
uses: ruby/setup-ruby@v1
2020
with:
2121
ruby-version: ${{ env.ruby-version }}
2222

23-
- uses: actions/cache@v3
23+
- uses: actions/cache@v4
2424
with:
2525
path: vendor/bundle
2626
key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}

.github/workflows/dev_deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
steps:
1212
- name: Check out the repo
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Set up QEMU
1616
uses: docker/setup-qemu-action@v1
@@ -53,16 +53,16 @@ jobs:
5353

5454
runs-on: ubuntu-latest
5555
env:
56-
ruby-version: 2.6
56+
ruby-version: '3.4'
5757

5858
steps:
59-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
6060
- name: Set up Ruby
6161
uses: ruby/setup-ruby@v1
6262
with:
6363
ruby-version: ${{ env.ruby-version }}
6464

65-
- uses: actions/cache@v3
65+
- uses: actions/cache@v4
6666
with:
6767
path: vendor/bundle
6868
key: gems-${{ runner.os }}-${{ env.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.4.3
1+
3.4.7

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ gem 'middleman', '~> 4.4'
1010
gem 'middleman-syntax', '~> 3.2'
1111
gem 'middleman-autoprefixer', '~> 3.0'
1212
gem 'middleman-sprockets', '~> 4.1'
13+
gem 'sprockets', '~> 3.7'
1314
gem 'middleman-data_source'
1415
gem 'rouge', '~> 3.21'
1516
gem 'redcarpet', '~> 3.6.0'

Gemfile.lock

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,74 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.8)
4+
activesupport (7.0.10)
5+
base64
6+
benchmark (>= 0.3)
7+
bigdecimal
58
concurrent-ruby (~> 1.0, >= 1.0.2)
9+
drb
610
i18n (>= 1.6, < 2)
11+
logger (>= 1.4.2)
712
minitest (>= 5.1)
13+
mutex_m
14+
securerandom (>= 0.3)
815
tzinfo (~> 2.0)
9-
addressable (2.8.6)
10-
public_suffix (>= 2.0.2, < 6.0)
16+
addressable (2.8.9)
17+
public_suffix (>= 2.0.2, < 8.0)
1118
autoprefixer-rails (10.3.1.0)
1219
execjs (~> 2)
13-
backports (3.24.1)
20+
backports (3.25.3)
1421
base64 (0.3.0)
22+
benchmark (0.5.0)
1523
bigdecimal (4.0.1)
1624
borrower (0.10.0)
1725
coffee-script (2.4.1)
1826
coffee-script-source
1927
execjs
2028
coffee-script-source (1.12.2)
21-
concurrent-ruby (1.2.3)
22-
contracts (0.16.1)
23-
dotenv (2.8.1)
29+
concurrent-ruby (1.3.6)
30+
contracts (0.17.3)
31+
dotenv (3.2.0)
32+
drb (2.2.3)
2433
erubis (2.7.0)
25-
execjs (2.9.1)
34+
execjs (2.10.0)
2635
fast_blank (1.0.1)
27-
fastimage (2.3.0)
28-
ffi (1.16.3)
29-
haml (6.3.0)
30-
temple (>= 0.8.2)
31-
thor
36+
fastimage (2.4.0)
37+
ffi (1.17.3)
38+
ffi (1.17.3-x86_64-linux-gnu)
39+
haml (5.2.2)
40+
temple (>= 0.8.0)
3241
tilt
3342
hamster (3.0.0)
3443
concurrent-ruby (~> 1.0)
3544
hashie (3.6.0)
3645
i18n (1.6.0)
3746
concurrent-ruby (~> 1.0)
38-
kramdown (2.4.0)
39-
rexml
40-
listen (3.8.0)
47+
kramdown (2.5.2)
48+
rexml (>= 3.4.4)
49+
listen (3.10.0)
50+
logger
4151
rb-fsevent (~> 0.10, >= 0.10.3)
4252
rb-inotify (~> 0.9, >= 0.9.10)
53+
logger (1.7.0)
4354
memoist (0.16.2)
44-
middleman (4.5.1)
55+
middleman (4.4.3)
4556
coffee-script (~> 2.2)
46-
haml (>= 4.0.5)
57+
haml (>= 4.0.5, < 6.0)
4758
kramdown (>= 2.3.0)
48-
middleman-cli (= 4.5.1)
49-
middleman-core (= 4.5.1)
59+
middleman-cli (= 4.4.3)
60+
middleman-core (= 4.4.3)
5061
middleman-autoprefixer (3.0.0)
5162
autoprefixer-rails (~> 10.0)
5263
middleman-core (>= 4.0.0)
53-
middleman-cli (4.5.1)
54-
thor (>= 0.17.0, < 1.3.0)
55-
middleman-core (4.5.1)
64+
middleman-cli (4.4.3)
65+
thor (>= 0.17.0, < 2.0)
66+
middleman-core (4.4.3)
5667
activesupport (>= 6.1, < 7.1)
5768
addressable (~> 2.4)
5869
backports (~> 3.6)
5970
bundler (~> 2.0)
60-
contracts (~> 0.13, < 0.17)
71+
contracts (~> 0.13)
6172
dotenv
6273
erubis
6374
execjs (~> 2.0)
@@ -88,7 +99,9 @@ GEM
8899
middleman-core (>= 3.2)
89100
rouge (~> 3.2)
90101
mini_portile2 (2.8.9)
91-
minitest (5.21.2)
102+
minitest (6.0.2)
103+
drb (~> 2.0)
104+
prism (~> 1.5)
92105
mutex_m (0.3.0)
93106
nokogiri (1.18.10)
94107
mini_portile2 (~> 2.8.2)
@@ -100,18 +113,19 @@ GEM
100113
padrino-support (= 0.15.3)
101114
tilt (>= 1.4.1, < 3)
102115
padrino-support (0.15.3)
103-
parallel (1.24.0)
116+
parallel (1.27.0)
104117
parslet (2.0.0)
105-
public_suffix (5.0.4)
118+
prism (1.9.0)
119+
public_suffix (7.0.2)
106120
racc (1.8.1)
107-
rack (2.2.8)
121+
rack (2.2.22)
108122
rack-test (0.6.3)
109123
rack (>= 1.0)
110124
rb-fsevent (0.11.2)
111-
rb-inotify (0.10.1)
125+
rb-inotify (0.11.1)
112126
ffi (~> 1.0)
113127
redcarpet (3.6.1)
114-
rexml (3.2.6)
128+
rexml (3.4.4)
115129
rouge (3.30.0)
116130
sass (3.7.4)
117131
sass-listen (~> 4.0.0)
@@ -120,12 +134,14 @@ GEM
120134
rb-inotify (~> 0.9, >= 0.9.7)
121135
sassc (2.4.0)
122136
ffi (~> 1.9)
137+
securerandom (0.4.1)
123138
servolux (0.13.0)
124-
sprockets (3.7.2)
139+
sprockets (3.7.5)
140+
base64
125141
concurrent-ruby (~> 1.0)
126142
rack (> 1, < 3)
127-
temple (0.10.3)
128-
thor (1.2.2)
143+
temple (0.10.4)
144+
thor (1.5.0)
129145
tilt (2.0.11)
130146
toml (0.3.0)
131147
parslet (>= 1.8.0, < 3.0.0)
@@ -152,6 +168,7 @@ DEPENDENCIES
152168
redcarpet (~> 3.6.0)
153169
rouge (~> 3.21)
154170
sass
171+
sprockets (~> 3.7)
155172
webrick
156173

157174
RUBY VERSION

config.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Monkey-patch File.exists? removed in Ruby 3.2, needed by the borrower gem
2+
class << ::File
3+
alias_method :exists?, :exist? unless method_defined?(:exists?)
4+
end
5+
16
# Unique header generation
27
# Fix for issue with header titles that are duplicated in different sections of the ToC
38
# from: https://github.com/slatedocs/slate/issues/738#issuecomment-406353752

config/borrower_patch.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This is a monkey patch to fix the File.exists? method that was removed in newer Ruby versions
2+
# The borrower gem (v0.10.0) uses this deprecated method, but in Ruby 3.4+ it's been removed
3+
# This patch adds back the method by redirecting to the new File.exist? method
4+
5+
class File
6+
def self.exists?(path)
7+
exist?(path)
8+
end
9+
end

source/data/tables.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CREATE TABLE event_imports ("id" integer, "event_import_batch_id" integer, "impo
5151
DROP TABLE IF EXISTS event_types;
5252
CREATE TABLE event_types ("id" bigint, "organisation_id" bigint, "name" CHARACTER VARYING(max), "localized_names" CHARACTER VARYING(max), "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "crm_settings" CHARACTER VARYING(max));
5353
DROP TABLE IF EXISTS events;
54-
CREATE TABLE events ("id" integer, "title" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "start_at" timestamp without time zone, "end_at" timestamp without time zone, "location_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "organisation_id" integer, "calendar_id" integer, "admin_status" CHARACTER VARYING(max), "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "max_attendees_count" integer, "locale" CHARACTER VARYING(max), "target_id" integer, "thank_attendee_email_content" CHARACTER VARYING(max), "approaching_event_attendee_email_content" CHARACTER VARYING(max), "notify_changes_to_attendees" boolean, "sharing_disabled" boolean, "host_address" CHARACTER VARYING(max), "cancel_reason" CHARACTER VARYING(max), "cancelled_at" timestamp without time zone, "local_chapter_id" integer, "launched_at" timestamp without time zone, "hidden_address" boolean, "promoted_from_waitlist_email_content" CHARACTER VARYING(max), "petition_id" integer, "extra_location_info" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "time_zone" CHARACTER VARYING(max), "hidden_at" timestamp without time zone, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "forum_enabled" boolean, "reviewer_id" integer, "event_type_id" integer, "region_id" bigint, "settings" CHARACTER VARYING(max), "campaigner_contactable" boolean, "crm_settings" CHARACTER VARYING(max), "created_by_id" bigint, "reviewer_type" CHARACTER VARYING(max), "mentor_id" bigint, "redirect_to" CHARACTER VARYING(max), "web_conference_url" CHARACTER VARYING(max), "virtual" boolean, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "featured" boolean, "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "location_venue" CHARACTER VARYING(max), "unconfirmed_location" boolean, "staff_led_organiser_type" CHARACTER VARYING(max), "staff_led_organiser_id" bigint, "unlisted_at" timestamp(6) without time zone, "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max));
54+
CREATE TABLE events ("id" integer, "title" CHARACTER VARYING(max), "slug" CHARACTER VARYING(max), "start_at" timestamp without time zone, "end_at" timestamp without time zone, "location_id" integer, "created_at" timestamp without time zone, "updated_at" timestamp without time zone, "user_id" integer, "organisation_id" integer, "calendar_id" integer, "admin_status" CHARACTER VARYING(max), "admin_reason" CHARACTER VARYING(max), "administered_at" timestamp without time zone, "max_attendees_count" integer, "locale" CHARACTER VARYING(max), "target_id" integer, "thank_attendee_email_content" CHARACTER VARYING(max), "approaching_event_attendee_email_content" CHARACTER VARYING(max), "notify_changes_to_attendees" boolean, "sharing_disabled" boolean, "host_address" CHARACTER VARYING(max), "cancel_reason" CHARACTER VARYING(max), "cancelled_at" timestamp without time zone, "local_chapter_id" integer, "launched_at" timestamp without time zone, "hidden_address" boolean, "promoted_from_waitlist_email_content" CHARACTER VARYING(max), "petition_id" integer, "extra_location_info" CHARACTER VARYING(max), "external_action_id" CHARACTER VARYING(max), "request_referer" CHARACTER VARYING(max), "time_zone" CHARACTER VARYING(max), "hidden_at" timestamp without time zone, "daisy_chain_id" bigint, "new_member_daisy_chain_id" bigint, "forum_enabled" boolean, "reviewer_id" integer, "event_type_id" integer, "region_id" bigint, "settings" CHARACTER VARYING(max), "campaigner_contactable" boolean, "crm_settings" CHARACTER VARYING(max), "created_by_id" bigint, "reviewer_type" CHARACTER VARYING(max), "mentor_id" bigint, "redirect_to" CHARACTER VARYING(max), "web_conference_url" CHARACTER VARYING(max), "virtual" boolean, "content_updated_at" timestamp without time zone, "external_ids" CHARACTER VARYING(max), "featured" boolean, "theme_id" bigint, "utm_params" CHARACTER VARYING(max), "location_venue" CHARACTER VARYING(max), "unconfirmed_location" boolean, "staff_led_organiser_type" CHARACTER VARYING(max), "staff_led_organiser_id" bigint, "unlisted_at" timestamp(6) without time zone, "send_prompt_to_repeat" boolean, "prompt_to_repeat_sent_at" timestamp(6) without time zone, "predecessor_event_id" bigint, "user_ip" CHARACTER VARYING(max), "user_agent" CHARACTER VARYING(max));
5555
DROP TABLE IF EXISTS export_download_logs;
5656
CREATE TABLE export_download_logs ("id" bigint, "user_id" bigint, "data_export_id" bigint, "created_at" timestamp without time zone);
5757
DROP TABLE IF EXISTS external_events;

0 commit comments

Comments
 (0)