Skip to content

Commit e8b76e1

Browse files
committed
Upgrade to Bridgetown 2.1 beta
1 parent 1ac98db commit e8b76e1

File tree

5 files changed

+117
-110
lines changed

5 files changed

+117
-110
lines changed

Gemfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
source "https://rubygems.org"
2-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
32

43
####
54
# Welcome to your project's Gemfile, used by Rubygems & Bundler.
@@ -19,18 +18,18 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
1918

2019
# If you need to upgrade/switch Bridgetown versions, change the line below
2120
# and then run `bundle update bridgetown`
22-
gem "bridgetown", "~>2", git: "https://github.com/bridgetownrb/bridgetown.git"
23-
gem "bridgetown-seo-tag"
21+
source "https://gems.bridgetownrb.com" do
22+
gem "bridgetown", "~> 2.1.0.beta1"
23+
gem "bridgetown-seo-tag"
24+
end
2425
gem "puma"
2526
gem "kramdown"
2627
gem "nokogiri"
2728
gem "debug"
2829

2930
group :test, optional: true do
3031
gem "minitest"
31-
gem "minitest-profile"
3232
gem "minitest-reporters"
33-
gem "shoulda"
3433
gem "rails-dom-testing"
3534
gem "pretty-diffs"
3635
end

Gemfile.lock

Lines changed: 94 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,24 @@
1-
GIT
2-
remote: https://github.com/bridgetownrb/bridgetown.git
3-
revision: 2568daf68439197dd35a0bd919bf0b333380c61c
4-
specs:
5-
bridgetown (2.0.1)
6-
bridgetown-builder (= 2.0.1)
7-
bridgetown-core (= 2.0.1)
8-
bridgetown-foundation (= 2.0.1)
9-
bridgetown-paginate (= 2.0.1)
10-
111
GEM
12-
remote: https://rubygems.org/
2+
remote: https://gems.bridgetownrb.com/
133
specs:
14-
activesupport (7.2.2.2)
15-
base64
16-
benchmark (>= 0.3)
17-
bigdecimal
18-
concurrent-ruby (~> 1.0, >= 1.3.1)
19-
connection_pool (>= 2.2.5)
20-
drb
21-
i18n (>= 1.6, < 2)
22-
logger (>= 1.4.2)
23-
minitest (>= 5.1)
24-
securerandom (>= 0.3)
25-
tzinfo (~> 2.0, >= 2.0.5)
26-
addressable (2.8.7)
27-
public_suffix (>= 2.0.2, < 7.0)
28-
amazing_print (1.8.1)
29-
ansi (1.5.0)
30-
base64 (0.3.0)
31-
benchmark (0.4.1)
32-
bigdecimal (3.3.1)
33-
bridgetown-builder (2.0.1)
34-
bridgetown-core (= 2.0.1)
35-
bridgetown-core (2.0.1)
36-
activesupport (>= 6.0, < 8.0)
4+
bridgetown (2.1.0.beta1)
5+
bridgetown-builder (= 2.1.0.beta1)
6+
bridgetown-core (= 2.1.0.beta1)
7+
bridgetown-foundation (= 2.1.0.beta1)
8+
bridgetown-paginate (= 2.1.0.beta1)
9+
bridgetown-builder (2.1.0.beta1)
10+
bridgetown-core (= 2.1.0.beta1)
11+
bridgetown-core (2.1.0.beta1)
3712
addressable (~> 2.4)
3813
amazing_print (~> 1.2)
39-
bridgetown-foundation (= 2.0.1)
14+
base64 (>= 0.3)
15+
bigdecimal (>= 3.2)
16+
bridgetown-foundation (= 2.1.0.beta1)
4017
csv (~> 3.2)
41-
dry-inflector (>= 1.0)
4218
erubi (~> 1.9)
4319
faraday (~> 2.0)
4420
faraday-follow_redirects (~> 0.3)
21+
freyia (>= 0.5)
4522
i18n (~> 1.0)
4623
irb (>= 1.14)
4724
kramdown (~> 2.1)
@@ -53,40 +30,69 @@ GEM
5330
rake (>= 13.0)
5431
roda (~> 3.46)
5532
rouge (>= 3.0, < 5.0)
56-
serbea (~> 2.1)
33+
samovar (>= 2.4)
34+
securerandom (~> 0.4)
35+
serbea (>= 2.4.1)
5736
signalize (~> 1.3)
5837
streamlined (>= 0.6.0)
59-
thor (~> 1.1)
6038
tilt (~> 2.0)
61-
zeitwerk (~> 2.5)
62-
bridgetown-foundation (2.0.1)
39+
zeitwerk (>= 2.7.3)
40+
bridgetown-foundation (2.1.0.beta1)
41+
dry-inflector (>= 1.0)
6342
hash_with_dot_access (~> 2.0)
6443
inclusive (~> 1.0)
6544
zeitwerk (~> 2.5)
66-
bridgetown-paginate (2.0.1)
67-
bridgetown-core (= 2.0.1)
68-
bridgetown-seo-tag (7.0.0)
45+
bridgetown-paginate (2.1.0.beta1)
46+
bridgetown-core (= 2.1.0.beta1)
47+
bridgetown-seo-tag (7.0.1)
6948
bridgetown (>= 1.3)
49+
50+
GEM
51+
remote: https://rubygems.org/
52+
specs:
53+
activesupport (8.1.1)
54+
base64
55+
bigdecimal
56+
concurrent-ruby (~> 1.0, >= 1.3.1)
57+
connection_pool (>= 2.2.5)
58+
drb
59+
i18n (>= 1.6, < 2)
60+
json
61+
logger (>= 1.4.2)
62+
minitest (>= 5.1)
63+
securerandom (>= 0.3)
64+
tzinfo (~> 2.0, >= 2.0.5)
65+
uri (>= 0.13.1)
66+
addressable (2.8.8)
67+
public_suffix (>= 2.0.2, < 8.0)
68+
amazing_print (1.8.1)
69+
ansi (1.5.0)
70+
base64 (0.3.0)
71+
bigdecimal (3.3.1)
7072
builder (3.3.0)
7173
concurrent-ruby (1.3.5)
72-
connection_pool (2.5.4)
74+
connection_pool (3.0.2)
75+
console (1.34.2)
76+
fiber-annotation
77+
fiber-local (~> 1.1)
78+
json
7379
csv (3.3.5)
74-
date (3.4.1)
75-
debug (1.10.0)
80+
date (3.5.0)
81+
debug (1.11.0)
7682
irb (~> 1.10)
7783
reline (>= 0.3.8)
7884
drb (2.2.3)
7985
dry-inflector (1.2.0)
80-
erb (5.1.1)
86+
erb (6.0.0)
8187
erubi (1.13.1)
8288
faraday (2.14.0)
8389
faraday-net_http (>= 2.0, < 3.5)
8490
json
8591
logger
8692
faraday-follow_redirects (0.4.0)
8793
faraday (>= 1, < 3)
88-
faraday-net_http (3.4.1)
89-
net-http (>= 0.5.0)
94+
faraday-net_http (3.4.2)
95+
net-http (~> 0.5)
9096
ffi (1.17.2-aarch64-linux-gnu)
9197
ffi (1.17.2-aarch64-linux-musl)
9298
ffi (1.17.2-arm-linux-gnu)
@@ -95,16 +101,21 @@ GEM
95101
ffi (1.17.2-x86_64-darwin)
96102
ffi (1.17.2-x86_64-linux-gnu)
97103
ffi (1.17.2-x86_64-linux-musl)
104+
fiber-annotation (0.2.0)
105+
fiber-local (1.1.0)
106+
fiber-storage
107+
fiber-storage (1.0.1)
108+
freyia (0.5.3)
98109
hash_with_dot_access (2.2.0)
99110
i18n (1.14.7)
100111
concurrent-ruby (~> 1.0)
101112
inclusive (1.1.0)
102113
io-console (0.8.1)
103-
irb (1.15.2)
114+
irb (1.15.3)
104115
pp (>= 0.6.0)
105116
rdoc (>= 4.0.0)
106117
reline (>= 0.4.2)
107-
json (2.15.1)
118+
json (2.17.1)
108119
kramdown (2.5.1)
109120
rexml (>= 3.3.9)
110121
kramdown-parser-gfm (1.1.0)
@@ -114,31 +125,31 @@ GEM
114125
rb-fsevent (~> 0.10, >= 0.10.3)
115126
rb-inotify (~> 0.9, >= 0.9.10)
116127
logger (1.7.0)
117-
minitest (5.26.0)
118-
minitest-profile (0.0.2)
128+
mapping (1.1.3)
129+
minitest (5.26.2)
119130
minitest-reporters (1.7.1)
120131
ansi
121132
builder
122133
minitest (>= 5.0)
123134
ruby-progressbar
124-
net-http (0.6.0)
125-
uri
126-
nio4r (2.7.4)
127-
nokogiri (1.18.8-aarch64-linux-gnu)
135+
net-http (0.8.0)
136+
uri (>= 0.11.1)
137+
nio4r (2.7.5)
138+
nokogiri (1.18.10-aarch64-linux-gnu)
128139
racc (~> 1.4)
129-
nokogiri (1.18.8-aarch64-linux-musl)
140+
nokogiri (1.18.10-aarch64-linux-musl)
130141
racc (~> 1.4)
131-
nokogiri (1.18.8-arm-linux-gnu)
142+
nokogiri (1.18.10-arm-linux-gnu)
132143
racc (~> 1.4)
133-
nokogiri (1.18.8-arm-linux-musl)
144+
nokogiri (1.18.10-arm-linux-musl)
134145
racc (~> 1.4)
135-
nokogiri (1.18.8-arm64-darwin)
146+
nokogiri (1.18.10-arm64-darwin)
136147
racc (~> 1.4)
137-
nokogiri (1.18.8-x86_64-darwin)
148+
nokogiri (1.18.10-x86_64-darwin)
138149
racc (~> 1.4)
139-
nokogiri (1.18.8-x86_64-linux-gnu)
150+
nokogiri (1.18.10-x86_64-linux-gnu)
140151
racc (~> 1.4)
141-
nokogiri (1.18.8-x86_64-linux-musl)
152+
nokogiri (1.18.10-x86_64-linux-musl)
142153
racc (~> 1.4)
143154
pp (0.6.3)
144155
prettyprint
@@ -147,54 +158,50 @@ GEM
147158
psych (5.2.6)
148159
date
149160
stringio
150-
public_suffix (6.0.2)
151-
puma (6.6.0)
161+
public_suffix (7.0.0)
162+
puma (7.1.0)
152163
nio4r (~> 2.0)
153164
racc (1.8.1)
154-
rack (3.2.3)
155-
rackup (2.2.1)
165+
rack (3.2.4)
166+
rackup (2.3.1)
156167
rack (>= 3)
157168
rails-dom-testing (2.3.0)
158169
activesupport (>= 5.0.0)
159170
minitest
160171
nokogiri (>= 1.6)
161-
rake (13.3.0)
172+
rake (13.3.1)
162173
rb-fsevent (0.11.2)
163174
rb-inotify (0.11.1)
164175
ffi (~> 1.0)
165-
rdoc (6.15.0)
176+
rdoc (6.17.0)
166177
erb
167178
psych (>= 4.0.0)
168179
tsort
169-
reline (0.6.2)
180+
reline (0.6.3)
170181
io-console (~> 0.5)
171182
rexml (3.4.4)
172-
roda (3.97.0)
183+
roda (3.98.0)
173184
rack
174185
rouge (4.6.1)
175186
ruby-progressbar (1.13.0)
187+
samovar (2.4.1)
188+
console (~> 1.0)
189+
mapping (~> 1.0)
176190
securerandom (0.4.1)
177-
serbea (2.3.0)
178-
erubi (>= 1.11)
179-
tilt (>= 2.1)
180-
shoulda (4.0.0)
181-
shoulda-context (~> 2.0)
182-
shoulda-matchers (~> 4.0)
183-
shoulda-context (2.0.0)
184-
shoulda-matchers (4.5.1)
185-
activesupport (>= 4.2.0)
191+
serbea (2.4.1)
192+
erubi (>= 1.13)
193+
tilt (>= 2.6)
186194
signalize (1.3.1)
187195
concurrent-ruby (~> 1.2)
188-
streamlined (0.6.1)
196+
streamlined (0.6.2)
189197
serbea (>= 2.1)
190198
zeitwerk (~> 2.5)
191-
stringio (3.1.7)
192-
thor (1.4.0)
199+
stringio (3.1.9)
193200
tilt (2.6.1)
194201
tsort (0.2.0)
195202
tzinfo (2.0.6)
196203
concurrent-ruby (~> 1.0)
197-
uri (1.0.4)
204+
uri (1.1.1)
198205
zeitwerk (2.7.3)
199206

200207
PLATFORMS
@@ -208,18 +215,16 @@ PLATFORMS
208215
x86_64-linux-musl
209216

210217
DEPENDENCIES
211-
bridgetown (~> 2)!
212-
bridgetown-seo-tag
218+
bridgetown (~> 2.1.0.beta1)!
219+
bridgetown-seo-tag!
213220
debug
214221
kramdown
215222
minitest
216-
minitest-profile
217223
minitest-reporters
218224
nokogiri
219225
pretty-diffs
220226
puma
221227
rails-dom-testing
222-
shoulda
223228

224229
BUNDLED WITH
225230
2.6.7

plugins/curriculum_parser.rb

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def extract_title_and_intro(markdown_string)
2929
.split(/\n(?=## )/, 2)
3030
.then { |title_and_intro, content|
3131
title, intro = title_and_intro.strip.split("\n", 2)
32-
title = title&.delete_prefix("# ")&.strip&.presence
33-
intro = intro&.strip&.presence
32+
title = title&.delete_prefix("# ")&.strip
33+
intro = intro&.strip
34+
intro = nil if intro && intro.empty?
3435

3536
{
3637
title:,
@@ -102,7 +103,11 @@ def recursive_parse(content, heading_strings_and_procs:, exclude_sections: [])
102103
next_heading_proc.call(formatted_heading)
103104
}
104105
.reject { |k, v| exclude_sections.include?(k.downcase) }
105-
.transform_values { it&.strip&.presence }
106+
.transform_values {
107+
value = it&.strip
108+
value = nil if value && value.empty?
109+
value
110+
}
106111
.each { |heading, content_under|
107112
raise "No content under \"#{heading}\"" if content_under.nil?
108113
}
@@ -181,15 +186,19 @@ def parse_list(markdown_string)
181186
\z}x
182187
)
183188
&.named_captures
184-
&.transform_values { it&.strip&.presence }
189+
&.transform_values {
190+
value = it&.strip
191+
value = nil if value && value.empty?
192+
value
193+
}
185194
&.transform_keys(&:to_sym) ||
186195
(raise(ParsingError, "Could not parse: #{line}") \
187196
if line.strip.start_with?("- "))
188197
}
189198
.compact
190199
.each { |item|
191200
item[:url] ||= item[:description].match(/\[.+?\]\((.+?)\)/)&.captures&.first
192-
item[:free] = item[:free].blank?
201+
item[:free] = !item[:free] || item[:free].empty?
193202

194203
ItemFormatter.new(item).format_item_for_site!
195204
}

test/helper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
require "nokogiri"
22
require "minitest/autorun"
33
require "minitest/reporters"
4-
require "minitest/profile"
5-
require "shoulda"
64
require "rails-dom-testing"
75
require "pretty_diffs"
6+
require "bridgetown"
87

98
module Minitest
109
class Test

0 commit comments

Comments
 (0)