Skip to content

Commit 3eb4240

Browse files
committedJul 21, 2020
Bump middleman from 4.2.0 to 4.3.7
- Also bump autoprefixer from 2.7.1 to 2.10.1 - Remove compass, protect-emails and livereload - Extract protect emails code into a helper method and JS script
1 parent 966cf1f commit 3eb4240

File tree

13 files changed

+79
-102
lines changed

13 files changed

+79
-102
lines changed
 

‎Gemfile

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
source 'https://rubygems.org'
22

3-
gem 'middleman', '~> 4.2.0'
4-
gem 'middleman-autoprefixer', '~> 2.7.1'
3+
gem 'middleman', '~> 4.3.7'
4+
gem 'middleman-autoprefixer', '~> 2.10.1'
55
gem 'middleman-blog', '~> 4.0.1'
6-
gem 'middleman-compass', '~> 4.0.1'
7-
gem 'middleman-livereload', '~> 3.4.6'
86
gem 'middleman-minify-html', '~> 3.4.1'
9-
gem 'middleman-protect-emails', '~> 0.4.0'
107
gem 'middleman-robots', '~> 1.2.3'
118

129
# gem 'middleman-deploy', '~> 1.0.0' # FIXME: wait for new release
@@ -15,6 +12,6 @@ gem 'middleman-deploy', git: 'https://github.com/middleman-contrib/middl
1512
# gem 'middleman-sitemap', '~> 0.0.13' # FIXME: wait for this PR to be merged https://github.com/statonjr/middleman-sitemap/pull/10
1613
gem 'middleman-sitemap', git: 'https://github.com/matsu911/middleman-sitemap', branch: 'master'
1714

18-
gem 'builder', '~> 3.2.2' # for feed.xml.builder
15+
gem 'builder', '~> 3.2.2' # for feed.xml.builder
1916
gem 'nokogiri', '~> 1.10.8' # for feed.xml builder
2017
gem 'slim', '~> 3.0.6'

‎Gemfile.lock

+45-78
Original file line numberDiff line numberDiff line change
@@ -19,84 +19,62 @@ GIT
1919
GEM
2020
remote: https://rubygems.org/
2121
specs:
22-
activesupport (5.0.2)
22+
activesupport (5.2.4.3)
2323
concurrent-ruby (~> 1.0, >= 1.0.2)
24-
i18n (~> 0.7)
24+
i18n (>= 0.7, < 2)
2525
minitest (~> 5.1)
2626
tzinfo (~> 1.1)
27-
addressable (2.5.0)
28-
public_suffix (~> 2.0, >= 2.0.2)
29-
autoprefixer-rails (6.7.7.1)
27+
addressable (2.7.0)
28+
public_suffix (>= 2.0.2, < 5.0)
29+
autoprefixer-rails (9.8.5)
3030
execjs
31-
backports (3.6.8)
31+
backports (3.18.1)
3232
builder (3.2.3)
33-
chunky_png (1.3.8)
3433
coffee-script (2.4.1)
3534
coffee-script-source
3635
execjs
3736
coffee-script-source (1.12.2)
38-
compass (1.0.3)
39-
chunky_png (~> 1.2)
40-
compass-core (~> 1.0.2)
41-
compass-import-once (~> 1.0.5)
42-
rb-fsevent (>= 0.9.3)
43-
rb-inotify (>= 0.9)
44-
sass (>= 3.3.13, < 3.5)
45-
compass-core (1.0.3)
46-
multi_json (~> 1.0)
47-
sass (>= 3.3.0, < 3.5)
48-
compass-import-once (1.0.5)
49-
sass (>= 3.2, < 3.5)
50-
concurrent-ruby (1.0.5)
37+
concurrent-ruby (1.1.6)
5138
contracts (0.13.0)
52-
dotenv (2.2.0)
53-
em-websocket (0.5.1)
54-
eventmachine (>= 0.12.9)
55-
http_parser.rb (~> 0.6.0)
39+
dotenv (2.7.6)
5640
erubis (2.7.0)
57-
eventmachine (1.2.3)
5841
execjs (2.7.0)
5942
fast_blank (1.0.0)
60-
fastimage (2.1.0)
61-
ffi (1.9.25)
43+
fastimage (2.1.7)
44+
ffi (1.13.1)
6245
haml (4.0.7)
6346
tilt
6447
hamster (3.0.0)
6548
concurrent-ruby (~> 1.0)
66-
hashie (3.5.5)
49+
hashie (3.6.0)
6750
htmlcompressor (0.2.0)
68-
http_parser.rb (0.6.0)
69-
i18n (0.7.0)
70-
kramdown (1.13.2)
51+
i18n (0.9.5)
52+
concurrent-ruby (~> 1.0)
53+
kramdown (1.17.0)
7154
listen (3.0.8)
7255
rb-fsevent (~> 0.9, >= 0.9.4)
7356
rb-inotify (~> 0.9, >= 0.9.7)
74-
memoist (0.15.0)
75-
middleman (4.2.1)
57+
memoist (0.16.2)
58+
middleman (4.3.7)
7659
coffee-script (~> 2.2)
77-
compass-import-once (= 1.0.5)
7860
haml (>= 4.0.5)
7961
kramdown (~> 1.2)
80-
middleman-cli (= 4.2.1)
81-
middleman-core (= 4.2.1)
82-
sass (>= 3.4.0, < 4.0)
83-
middleman-autoprefixer (2.7.1)
84-
autoprefixer-rails (>= 6.5.2, < 7.0.0)
62+
middleman-cli (= 4.3.7)
63+
middleman-core (= 4.3.7)
64+
middleman-autoprefixer (2.10.1)
65+
autoprefixer-rails (~> 9.1)
8566
middleman-core (>= 3.3.3)
8667
middleman-blog (4.0.1)
8768
addressable (~> 2.3)
8869
middleman-core (>= 4.0.0)
8970
tzinfo (>= 0.3.0)
90-
middleman-cli (4.2.1)
71+
middleman-cli (4.3.7)
9172
thor (>= 0.17.0, < 2.0)
92-
middleman-compass (4.0.1)
93-
compass (>= 1.0.0, < 2.0.0)
94-
middleman-core (>= 4.0.0)
95-
middleman-core (4.2.1)
96-
activesupport (>= 4.2, < 5.1)
73+
middleman-core (4.3.7)
74+
activesupport (>= 4.2, < 6.0)
9775
addressable (~> 2.3)
9876
backports (~> 3.6)
99-
bundler (~> 1.1)
77+
bundler
10078
contracts (~> 0.13.0)
10179
dotenv
10280
erubis
@@ -105,81 +83,70 @@ GEM
10583
fastimage (~> 2.0)
10684
hamster (~> 3.0)
10785
hashie (~> 3.4)
108-
i18n (~> 0.7.0)
86+
i18n (~> 0.9.0)
10987
listen (~> 3.0.0)
11088
memoist (~> 0.14)
11189
padrino-helpers (~> 0.13.0)
11290
parallel
11391
rack (>= 1.4.5, < 3)
114-
sass (>= 3.4)
92+
sassc (~> 2.0)
11593
servolux
116-
tilt (~> 2.0)
94+
tilt (~> 2.0.9)
11795
uglifier (~> 3.0)
118-
middleman-livereload (3.4.6)
119-
em-websocket (~> 0.5.1)
120-
middleman-core (>= 3.3)
121-
rack-livereload (~> 0.3.15)
12296
middleman-minify-html (3.4.1)
12397
htmlcompressor (~> 0.2.0)
12498
middleman-core (>= 3.2)
125-
middleman-protect-emails (0.4.0)
126-
middleman-core (>= 3.4)
12799
middleman-robots (1.2.3)
128100
middleman (>= 4.0)
129101
mini_portile2 (2.4.0)
130-
minitest (5.10.1)
131-
multi_json (1.12.1)
102+
minitest (5.14.1)
132103
net-sftp (2.1.2)
133104
net-ssh (>= 2.6.5)
134105
net-ssh (4.1.0)
135106
nokogiri (1.10.8)
136107
mini_portile2 (~> 2.4.0)
137-
padrino-helpers (0.13.3.3)
108+
padrino-helpers (0.13.3.4)
138109
i18n (~> 0.6, >= 0.6.7)
139-
padrino-support (= 0.13.3.3)
110+
padrino-support (= 0.13.3.4)
140111
tilt (>= 1.4.1, < 3)
141-
padrino-support (0.13.3.3)
112+
padrino-support (0.13.3.4)
142113
activesupport (>= 3.1)
143-
parallel (1.11.1)
114+
parallel (1.19.2)
144115
ptools (1.3.3)
145-
public_suffix (2.0.5)
116+
public_suffix (4.0.5)
146117
rack (2.2.3)
147-
rack-livereload (0.3.16)
148-
rack
149-
rb-fsevent (0.9.8)
150-
rb-inotify (0.9.8)
151-
ffi (>= 0.5.0)
152-
sass (3.4.23)
118+
rb-fsevent (0.10.4)
119+
rb-inotify (0.10.1)
120+
ffi (~> 1.0)
121+
sassc (2.4.0)
122+
ffi (~> 1.9)
153123
servolux (0.13.0)
154124
slim (3.0.7)
155125
temple (~> 0.7.6)
156126
tilt (>= 1.3.3, < 2.1)
157127
temple (0.7.7)
158-
thor (0.19.4)
128+
thor (1.0.1)
159129
thread_safe (0.3.6)
160-
tilt (2.0.7)
161-
tzinfo (1.2.3)
130+
tilt (2.0.10)
131+
tzinfo (1.2.7)
162132
thread_safe (~> 0.1)
163-
uglifier (3.1.10)
133+
uglifier (3.2.0)
164134
execjs (>= 0.3.0, < 3)
165135

166136
PLATFORMS
167137
ruby
168138

169139
DEPENDENCIES
170140
builder (~> 3.2.2)
171-
middleman (~> 4.2.0)
172-
middleman-autoprefixer (~> 2.7.1)
141+
middleman (~> 4.3.7)
142+
middleman-autoprefixer (~> 2.10.1)
173143
middleman-blog (~> 4.0.1)
174-
middleman-compass (~> 4.0.1)
175144
middleman-deploy!
176-
middleman-livereload (~> 3.4.6)
177145
middleman-minify-html (~> 3.4.1)
178-
middleman-protect-emails (~> 0.4.0)
179146
middleman-robots (~> 1.2.3)
180147
middleman-sitemap!
181148
nokogiri (~> 1.10.8)
182149
slim (~> 3.0.6)
183150

184151
BUNDLED WITH
185-
1.17.1
152+
1.17.3

‎config.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
::Sass.load_paths << File.join(root, 'node_modules')
1+
::SassC.load_paths << File.join(root, 'node_modules')
22

33
Time.zone = 'Paris'
44

@@ -8,7 +8,6 @@
88
set :js_dir, 'assets/javascripts'
99

1010
activate :autoprefixer
11-
activate :protect_emails
1211

1312
activate :external_pipeline,
1413
name: :webpack,

‎helpers/email_helper.rb

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module EmailHelper
2+
def protect_email(email)
3+
rotated_email = email.tr('A-Za-z', 'N-ZA-Mn-za-m')
4+
5+
"#email-protection-#{rotated_email}"
6+
end
7+
end

‎source/assets/javascripts/all.js

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ import 'foundation-sites';
88
// Components
99
import './components/foundation';
1010
import './components/smooth_scroll';
11+
12+
// Email protection
13+
!function(){try{var a,b,c,d,g=document.getElementsByTagName("a"); for(c=0;g.length-c;c++)try{b=g[c].getAttribute("href"),b&&b.indexOf("#email-protection-")>-1&&b.length>19&&(a="",d=19+b.indexOf("#email-protection-"),b.length>d&&(a=b.substr(18).replace(/[a-zA-Z]/g,function(a){return String.fromCharCode(("Z">=a?90:122)>=(a=a.charCodeAt(0)+13)?a:a-26)})),(g[c].getAttribute("href") == g[c].innerHTML ? g[c].innerHTML = a : g[c].innerHTML = g[c].innerHTML),g[c].setAttribute("href","mailto:"+a))}catch(h){}}catch(h){}}();

‎source/assets/stylesheets/all.css.scss

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// ... nothing ...
99

1010
// Vendors
11-
@import 'compass';
12-
1311
@import "vendors-settings/foundation";
1412
@import "foundation-sites/scss/foundation";
1513
@include foundation-everything(true);
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
@include keyframes(bounce) {
2-
0%, 20%, 50%, 80%, 100% {
3-
@include transform(translateY(0));
1+
@keyframes bounce {
2+
0%,
3+
20%,
4+
50%,
5+
80%,
6+
100% {
7+
-webkit-transform:translateY(0);
8+
transform:translateY(0)
49
}
510
40% {
6-
@include transform(translateY(rem-calc(-10)));
11+
-webkit-transform:translateY(-0.625rem);
12+
transform:translateY(-0.625rem)
713
}
814
60% {
9-
@include transform(translateY(rem-calc(-5)));
15+
-webkit-transform:translateY(-0.3125rem);
16+
transform:translateY(-0.3125rem)
1017
}
11-
}
18+
}

‎source/assets/stylesheets/pages/_error.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
width: 100%;
1111
z-index: 1;
1212

13-
@include background-image(
13+
background-image:
1414
linear-gradient(
1515
to bottom,
1616
rgba($primary-color, 0.5) 0%,
1717
rgba($primary-color, 0.8) 40%,
1818
rgba($primary-color, 0.8) 70%,
1919
rgba($primary-color, 0.5) 100%
2020
)
21-
);
21+
;
2222
}
2323

2424
.p-error-content {

‎source/assets/stylesheets/pages/_style_guide.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
margin-bottom: rem-calc(20);
1313

1414
.bouncing {
15-
@include animation(bounce 3s infinite);
15+
animation: bounce 3s infinite;
1616
display: block;
1717
}
1818
}

‎source/assets/stylesheets/pages/home/_hero.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
margin-bottom: rem-calc(10);
6464

6565
i {
66-
@include animation(bounce 3s infinite);
67-
66+
animation: bounce 3s infinite;
6867
display: block;
6968
font-size: rem-calc(40);
7069
margin-left: rem-calc(-15);

‎source/home/_current_ride.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
= data.rides.current.period
1111
p class="maul"
1212
| 🙌 🙌 🙌
13-
= mail_to data.site.mail, "Let's meet!", class: "button ghost"
13+
= link_to "Let's meet!", protect_email(data.site.mail), class: "button ghost"

‎source/layouts/shared/_footer.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ div class="l-footer"
1212
li class="l-footer--link" = link_to "About", "/about.html"
1313
li class="l-footer--link" = link_to "Riders", "/riders"
1414
li class="l-footer--link" = link_to "Blog", "/blog"
15-
li class="l-footer--link" = mail_to data.site.mail, "Contact"
15+
li class="l-footer--link" = link_to "Contact", protect_email(data.site.mail)
1616
li class="l-footer--link" = link_to "@#{data.site.twitter}", "https://twitter.com/#{data.site.twitter}/"

‎source/layouts/shared/_join_us.html.slim

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ div class="l-join-us"
33
div class="small-12 medium-12 columns l-join-us-container"
44
p class="l-join-us-title" But what about YOU?!
55
p class="l-join-us-subtitle" We'd love to meet you and go for a ride.
6-
= mail_to data.site.mail, 'Join us', class: "button ghost l-join-us-link"
6+
= link_to 'Join us', protect_email(data.site.mail), class: "button ghost l-join-us-link"

0 commit comments

Comments
 (0)
Please sign in to comment.