Skip to content

Commit 278f85d

Browse files
authored
Merge pull request #184 from emilioforrer/rails7
Support for rails 7.0, and fix tests on CI
2 parents 222f784 + 8432568 commit 278f85d

File tree

8 files changed

+537
-10
lines changed

8 files changed

+537
-10
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
ruby:
19-
- 3.0
19+
- '3.0'
2020
- 2.7
2121
- 2.6
2222
- 2.5
23-
- jruby-9.2.17.0
23+
- jruby-9.2
24+
- jruby-9.3
2425
gemfile:
2526
- Gemfile-4-2-stable
2627
- Gemfile-5-0-stable
@@ -31,21 +32,43 @@ jobs:
3132
- Gemfile-6-0-sprockets-4
3233
- Gemfile-6-1-sprockets-3
3334
- Gemfile-6-1-sprockets-4
35+
- Gemfile-7-0-sprockets-3
36+
- Gemfile-7-0-sprockets-4
3437
exclude:
38+
- gemfile: Gemfile-4-2-stable
39+
ruby: jruby-9.2
40+
- gemfile: Gemfile-4-2-stable
41+
ruby: jruby-9.3
3542
- gemfile: Gemfile-4-2-stable
3643
ruby: 2.7
3744
- gemfile: Gemfile-4-2-stable
38-
ruby: 3.0
45+
ruby: '3.0'
3946
- gemfile: Gemfile-5-0-stable
40-
ruby: 3.0
47+
ruby: '3.0'
4148
- gemfile: Gemfile-5-1-sprockets-3
42-
ruby: 3.0
49+
ruby: '3.0'
4350
- gemfile: Gemfile-5-2-sprockets-3
44-
ruby: 3.0
51+
ruby: '3.0'
4552
- gemfile: Gemfile-5-1-sprockets-4
46-
ruby: 3.0
53+
ruby: '3.0'
4754
- gemfile: Gemfile-5-2-sprockets-4
48-
ruby: 3.0
55+
ruby: '3.0'
56+
- gemfile: Gemfile-7-0-sprockets-3
57+
ruby: 2.5
58+
- gemfile: Gemfile-7-0-sprockets-3
59+
ruby: 2.6
60+
- gemfile: Gemfile-7-0-sprockets-3
61+
ruby: jruby-9.2
62+
- gemfile: Gemfile-7-0-sprockets-3
63+
ruby: jruby-9.3
64+
- gemfile: Gemfile-7-0-sprockets-4
65+
ruby: 2.5
66+
- gemfile: Gemfile-7-0-sprockets-4
67+
ruby: 2.6
68+
- gemfile: Gemfile-7-0-sprockets-4
69+
ruby: jruby-9.2
70+
- gemfile: Gemfile-7-0-sprockets-4
71+
ruby: jruby-9.3
4972

5073
env:
5174
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ require 'rspec/core/rake_task'
77

88
# javascript tests
99
require 'rails/all'
10+
if defined?(Rails) && Rails.version >= '7.0.0'
11+
require 'sprockets/railtie'
12+
end
1013
load 'jasmine/tasks/jasmine.rake'
1114

1215
task default: [ 'spec:rspec', 'spec:javascript' ]

gemfiles/Gemfile-4-2-stable.lock

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
GIT
2+
remote: https://github.com/mathieujobin/rails
3+
revision: 43096a9305fb965e103a87d937d802a3821ba97a
4+
branch: rails4-2-bundler-2
5+
specs:
6+
actionmailer (4.2.11.3)
7+
actionpack (= 4.2.11.3)
8+
actionview (= 4.2.11.3)
9+
activejob (= 4.2.11.3)
10+
mail (~> 2.5, >= 2.5.4)
11+
rails-dom-testing (~> 1.0, >= 1.0.5)
12+
actionpack (4.2.11.3)
13+
actionview (= 4.2.11.3)
14+
activesupport (= 4.2.11.3)
15+
rack (~> 1.6)
16+
rack-test (~> 0.6.2)
17+
rails-dom-testing (~> 1.0, >= 1.0.5)
18+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
19+
actionview (4.2.11.3)
20+
activesupport (= 4.2.11.3)
21+
builder (~> 3.1)
22+
erubis (~> 2.7.0)
23+
rails-dom-testing (~> 1.0, >= 1.0.5)
24+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
25+
activejob (4.2.11.3)
26+
activesupport (= 4.2.11.3)
27+
globalid (>= 0.3.0)
28+
activemodel (4.2.11.3)
29+
activesupport (= 4.2.11.3)
30+
builder (~> 3.1)
31+
activerecord (4.2.11.3)
32+
activemodel (= 4.2.11.3)
33+
activesupport (= 4.2.11.3)
34+
arel (~> 6.0)
35+
activesupport (4.2.11.3)
36+
i18n (~> 0.7)
37+
minitest (~> 5.1)
38+
thread_safe (~> 0.3, >= 0.3.4)
39+
tzinfo (~> 1.1)
40+
rails (4.2.11.3)
41+
actionmailer (= 4.2.11.3)
42+
actionpack (= 4.2.11.3)
43+
actionview (= 4.2.11.3)
44+
activejob (= 4.2.11.3)
45+
activemodel (= 4.2.11.3)
46+
activerecord (= 4.2.11.3)
47+
activesupport (= 4.2.11.3)
48+
bundler (>= 1.15, < 2.3)
49+
railties (= 4.2.11.3)
50+
sprockets-rails
51+
railties (4.2.11.3)
52+
actionpack (= 4.2.11.3)
53+
activesupport (= 4.2.11.3)
54+
rake (>= 0.8.7)
55+
thor (>= 0.18.1, < 2.0)
56+
57+
PATH
58+
remote: ..
59+
specs:
60+
haml_coffee_assets (1.20.0)
61+
coffee-script (>= 2)
62+
railties (>= 4.2, < 7.1)
63+
sprockets (>= 3.7)
64+
65+
GEM
66+
remote: https://rubygems.org/
67+
specs:
68+
arel (6.0.4)
69+
builder (3.2.4)
70+
childprocess (1.0.0)
71+
coderay (1.1.3)
72+
coffee-rails (4.2.2)
73+
coffee-script (>= 2.2.0)
74+
railties (>= 4.0.0)
75+
coffee-script (2.4.1)
76+
coffee-script-source
77+
execjs
78+
coffee-script-source (1.12.2)
79+
concurrent-ruby (1.1.9)
80+
crass (1.0.6)
81+
diff-lcs (1.5.0)
82+
erubis (2.7.0)
83+
execjs (2.8.1)
84+
ffi (1.15.5)
85+
formatador (1.1.0)
86+
globalid (0.4.2)
87+
activesupport (>= 4.2.0)
88+
guard (2.18.0)
89+
formatador (>= 0.2.4)
90+
listen (>= 2.7, < 4.0)
91+
lumberjack (>= 1.0.12, < 2.0)
92+
nenv (~> 0.1)
93+
notiffany (~> 0.0)
94+
pry (>= 0.13.0)
95+
shellany (~> 0.0)
96+
thor (>= 0.18.1)
97+
guard-compat (1.2.1)
98+
guard-jasmine (3.1.0)
99+
childprocess (~> 1.0)
100+
guard (~> 2.14)
101+
guard-compat (~> 1.2)
102+
jasmine (~> 3.1)
103+
multi_json (~> 1.12)
104+
thor (~> 0.19)
105+
tilt
106+
guard-rspec (4.7.3)
107+
guard (~> 2.1)
108+
guard-compat (~> 1.1)
109+
rspec (>= 2.99.0, < 4.0)
110+
i18n (0.9.5)
111+
concurrent-ruby (~> 1.0)
112+
jasmine (3.8.0)
113+
jasmine-core (~> 3.8.0)
114+
phantomjs
115+
rack (>= 1.2.1)
116+
rake
117+
webrick
118+
jasmine-core (3.8.0)
119+
jasmine-rails (0.15.0)
120+
jasmine-core (>= 1.3, < 4.0)
121+
phantomjs (>= 1.9)
122+
railties (>= 3.2.0)
123+
sprockets-rails
124+
jquery-rails (4.4.0)
125+
rails-dom-testing (>= 1, < 3)
126+
railties (>= 4.2.0)
127+
thor (>= 0.14, < 2.0)
128+
libv8 (3.16.14.19)
129+
listen (3.7.1)
130+
rb-fsevent (~> 0.10, >= 0.10.3)
131+
rb-inotify (~> 0.9, >= 0.9.10)
132+
loofah (2.13.0)
133+
crass (~> 1.0.2)
134+
nokogiri (>= 1.5.9)
135+
lumberjack (1.2.8)
136+
mail (2.7.1)
137+
mini_mime (>= 0.1.1)
138+
method_source (1.0.0)
139+
mini_mime (1.1.2)
140+
mini_portile2 (2.6.1)
141+
minitest (5.15.0)
142+
multi_json (1.15.0)
143+
nenv (0.3.0)
144+
nio4r (2.5.8)
145+
nokogiri (1.12.5)
146+
mini_portile2 (~> 2.6.1)
147+
racc (~> 1.4)
148+
notiffany (0.1.3)
149+
nenv (~> 0.1)
150+
shellany (~> 0.0)
151+
phantomjs (2.1.1.0)
152+
pry (0.14.1)
153+
coderay (~> 1.1)
154+
method_source (~> 1.0)
155+
puma (5.6.1)
156+
nio4r (~> 2.0)
157+
racc (1.6.0)
158+
rack (1.6.13)
159+
rack-test (0.6.3)
160+
rack (>= 1.0)
161+
rails-deprecated_sanitizer (1.0.4)
162+
activesupport (>= 4.2.0.alpha)
163+
rails-dom-testing (1.0.9)
164+
activesupport (>= 4.2.0, < 5.0)
165+
nokogiri (~> 1.6)
166+
rails-deprecated_sanitizer (>= 1.0.1)
167+
rails-html-sanitizer (1.4.2)
168+
loofah (~> 2.3)
169+
rake (13.0.6)
170+
rb-fsevent (0.11.0)
171+
rb-inotify (0.10.1)
172+
ffi (~> 1.0)
173+
rb-readline (0.5.5)
174+
redcarpet (3.5.1)
175+
ref (2.0.0)
176+
rspec (3.10.0)
177+
rspec-core (~> 3.10.0)
178+
rspec-expectations (~> 3.10.0)
179+
rspec-mocks (~> 3.10.0)
180+
rspec-core (3.10.2)
181+
rspec-support (~> 3.10.0)
182+
rspec-expectations (3.10.2)
183+
diff-lcs (>= 1.2.0, < 2.0)
184+
rspec-support (~> 3.10.0)
185+
rspec-mocks (3.10.2)
186+
diff-lcs (>= 1.2.0, < 2.0)
187+
rspec-support (~> 3.10.0)
188+
rspec-support (3.10.3)
189+
shellany (0.0.1)
190+
sprockets (4.0.2)
191+
concurrent-ruby (~> 1.0)
192+
rack (> 1, < 3)
193+
sprockets-rails (3.2.2)
194+
actionpack (>= 4.0)
195+
activesupport (>= 4.0)
196+
sprockets (>= 3.0.0)
197+
therubyracer (0.12.3)
198+
libv8 (~> 3.16.14.15)
199+
ref
200+
thor (0.20.3)
201+
thread_safe (0.3.6)
202+
tilt (2.0.10)
203+
tzinfo (1.2.9)
204+
thread_safe (~> 0.1)
205+
webrick (1.7.0)
206+
yard (0.9.27)
207+
webrick (~> 1.7.0)
208+
209+
PLATFORMS
210+
ruby
211+
212+
DEPENDENCIES
213+
bundler
214+
coffee-rails
215+
guard
216+
guard-jasmine
217+
guard-rspec
218+
haml_coffee_assets!
219+
jasmine
220+
jasmine-rails
221+
jquery-rails
222+
kramdown
223+
pry
224+
puma
225+
rails!
226+
rake
227+
rb-readline
228+
redcarpet
229+
rspec
230+
therubyracer
231+
therubyrhino
232+
yard
233+
234+
BUNDLED WITH
235+
1.17.3

gemfiles/Gemfile-7-0-sprockets-3

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '..'
4+
5+
gem 'rails', '~> 7.0.1'
6+
gem 'sprockets', '~> 3.7.2'
7+
gem 'sprockets-rails'
8+
9+
platform :ruby do
10+
gem 'therubyracer'
11+
gem 'redcarpet'
12+
end
13+
14+
platform :jruby do
15+
gem 'therubyrhino'
16+
gem 'kramdown'
17+
end

gemfiles/Gemfile-7-0-sprockets-4

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec path: '..'
4+
5+
gem 'rails', '~> 7.0.1'
6+
gem 'sprockets', '~> 4.0'
7+
gem 'sprockets-rails'
8+
9+
platform :ruby do
10+
gem 'therubyracer'
11+
gem 'redcarpet'
12+
end
13+
14+
platform :jruby do
15+
gem 'therubyrhino'
16+
gem 'kramdown'
17+
end

haml_coffee_assets.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
1717
s.files = Dir.glob('{app,lib,vendor}/**/*') + %w[LICENSE README.md]
1818

1919
s.add_runtime_dependency 'coffee-script', '>= 2'
20-
s.add_runtime_dependency 'railties', '>= 4.2', "< 6.2"
20+
s.add_runtime_dependency 'railties', '>= 4.2', "< 7.1"
2121
s.add_runtime_dependency 'sprockets', '>= 3.7'
2222

2323
s.add_development_dependency 'bundler'

lib/haml_coffee_assets.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212

1313
require 'haml_coffee_assets/transformer'
1414

15-
if defined?(Rails) && Rails.version >= '3.0.0'
15+
if defined?(Rails) && Rails.version >= '7.0.0'
16+
require 'rails'
17+
require 'sprockets/railtie'
18+
require 'haml_coffee_assets/rails/engine'
19+
require 'haml_coffee_assets/action_view/patches'
20+
elsif defined?(Rails) && Rails.version >= '3.0.0'
1621
require 'rails'
1722
require 'haml_coffee_assets/rails/engine'
1823
require 'haml_coffee_assets/action_view/patches'

0 commit comments

Comments
 (0)