haml 5.2.1 → 5.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +36 -0
- data/CHANGELOG.md +8 -0
- data/README.md +19 -13
- data/REFERENCE.md +10 -3
- data/lib/haml/attribute_builder.rb +55 -0
- data/lib/haml/attribute_compiler.rb +4 -2
- data/lib/haml/buffer.rb +0 -56
- data/lib/haml/plugin.rb +18 -1
- data/lib/haml/railtie.rb +5 -0
- data/lib/haml/temple_engine.rb +2 -1
- data/lib/haml/version.rb +1 -1
- metadata +3 -3
- data/.travis.yml +0 -111
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec6cbb2e4023f397f1d7b6d84f06d78ab492a61e88c3f16496f39d0baeb47a83
|
4
|
+
data.tar.gz: 004c2dd34697cb61a8c12854bf4b99abb3cab5195f28922b813ee299225e7663
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7430b4e42cf809f847448a9e04623b4b58878e44facedef5e43714820e8068f0bb853772564d5545936cdad8346f0c33abfc11642a3737d91c9a1f6242b3e41
|
7
|
+
data.tar.gz: 8a91df0cb185014512ee473a21755ba41edb06e835b29740e8e46c76287a81405b2706d8a10ea148893a9429de306c67584ac1c286637c0812a5562cf149431b
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- main
|
6
|
+
pull_request:
|
7
|
+
types:
|
8
|
+
- opened
|
9
|
+
- synchronize
|
10
|
+
- reopened
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.rails }}'
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby: [2.6, 2.7, 3.0, jruby-9.2]
|
19
|
+
rails: [5.2.x, 6.0.x, 6.1.x, rails-edge]
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
- uses: actions/cache@v2
|
27
|
+
with:
|
28
|
+
path: vendor/bundle
|
29
|
+
key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
30
|
+
restore-keys: ${{ runner.os }}-gems-
|
31
|
+
- name: bundle install --gemfile=test/gemfiles/Gemfile.rails-${{matrix.rails}}.x
|
32
|
+
run: bundle config path vendor/bundle && bundle install -j$(nproc) --retry 3
|
33
|
+
- name: rake test
|
34
|
+
run: bundle exec rake test submodules
|
35
|
+
env:
|
36
|
+
RUBYOPT: "--enable-frozen-string-literal"
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Haml Changelog
|
2
2
|
|
3
|
+
## 5.2.2
|
4
|
+
Released on July 27, 2021
|
5
|
+
([diff](https://github.com/haml/haml/compare/v5.2.1...v5.2.2)).
|
6
|
+
|
7
|
+
* Support for adding Annotations to Haml output (a Rails feature 6.1+)
|
8
|
+
* Expanded test matrix to include Ruby 3.0 and Rails 6.1
|
9
|
+
* Only testing Ruby 2.7+ and Rails 5.2+
|
10
|
+
|
3
11
|
## 5.2.1
|
4
12
|
|
5
13
|
Released on November 30, 2020
|
data/README.md
CHANGED
@@ -10,6 +10,13 @@ more pleasant to write HTML documents, by eliminating redundancy, reflecting the
|
|
10
10
|
underlying structure that the document represents, and providing an elegant syntax
|
11
11
|
that's both powerful and easy to understand.
|
12
12
|
|
13
|
+
### Supported Versions
|
14
|
+
|
15
|
+
* Ruby 2.6+
|
16
|
+
* Rails 5.1+
|
17
|
+
|
18
|
+
Other versions may likely work, but we don't test against them.
|
19
|
+
|
13
20
|
## Basic Usage
|
14
21
|
|
15
22
|
Haml can be used from the command line or as part of a Ruby web framework. The
|
@@ -162,35 +169,34 @@ on a specific area:
|
|
162
169
|
ruby -Itest test/helper_test.rb -n test_buffer_access
|
163
170
|
~~~
|
164
171
|
|
165
|
-
Haml currently supports Ruby 2.
|
172
|
+
Haml currently supports Ruby 2.7.0 and higher, so please make sure your changes run on 2.7+.
|
166
173
|
|
167
174
|
## Team
|
168
175
|
|
169
176
|
### Current Maintainers
|
170
177
|
|
171
|
-
* [
|
172
|
-
* [Matt Wildig](https://github.com/mattwildig)
|
173
|
-
* [Tee Parham](https://github.com/teeparham)
|
178
|
+
* [Hampton Catlin](https://github.com/hcatlin)
|
174
179
|
* [Takashi Kokubun](https://github.com/k0kubun)
|
180
|
+
* [Akira Matsuda](https://github.com/amatsuda)
|
175
181
|
|
176
182
|
### Alumni
|
177
183
|
|
178
184
|
Haml was created by [Hampton Catlin](http://hamptoncatlin.com), the author of
|
179
|
-
the original implementation.
|
180
|
-
but still consults on language issues.
|
185
|
+
the original implementation.
|
181
186
|
|
182
|
-
[Natalie Weizenbaum](
|
187
|
+
[Natalie Weizenbaum](https://github.com/nex3) was for many years the primary developer
|
183
188
|
and architect of the "modern" Ruby implementation of Haml.
|
184
189
|
|
185
|
-
|
186
|
-
|
187
|
-
## License
|
190
|
+
This project's been around for many years, and we have many amazing people who kept the project
|
191
|
+
alive! as former maintainers like:
|
188
192
|
|
189
|
-
|
193
|
+
[Norman Clarke](http://github.com/norman)
|
194
|
+
[Matt Wildig](https://github.com/mattwildig)
|
195
|
+
[Tee Parham](https://github.com/teeparham)
|
190
196
|
|
191
|
-
|
197
|
+
## License
|
192
198
|
|
193
|
-
Copyright (c) 2006-
|
199
|
+
Copyright (c) 2006-2021 Hampton Catlin, Natalie Weizenbaum and the Haml team
|
194
200
|
|
195
201
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
196
202
|
this software and associated documentation files (the "Software"), to deal in
|
data/REFERENCE.md
CHANGED
@@ -107,13 +107,20 @@ output.
|
|
107
107
|
In Rails, options can be set by setting the {Haml::Template#options Haml::Template.options}
|
108
108
|
hash in an initializer:
|
109
109
|
|
110
|
-
|
111
|
-
|
110
|
+
```ruby
|
111
|
+
# config/initializers/haml.rb
|
112
|
+
Haml::Template.options[:format] = :html5
|
113
|
+
|
114
|
+
# Avoid escaping attributes which are already escaped
|
115
|
+
Haml::Template.options[:escape_attrs] = :once
|
116
|
+
```
|
112
117
|
|
113
118
|
Outside Rails, you can set them by configuring them globally in
|
114
119
|
Haml::Options.defaults:
|
115
120
|
|
116
|
-
|
121
|
+
```ruby
|
122
|
+
Haml::Options.defaults[:format] = :html5
|
123
|
+
```
|
117
124
|
|
118
125
|
In sinatra specifically, you can set them in global config with:
|
119
126
|
```ruby
|
@@ -6,6 +6,17 @@ module Haml
|
|
6
6
|
INVALID_ATTRIBUTE_NAME_REGEX = /[ \0"'>\/=]/
|
7
7
|
|
8
8
|
class << self
|
9
|
+
def build(class_id, obj_ref, is_html, attr_wrapper, escape_attrs, hyphenate_data_attrs, *attributes_hashes)
|
10
|
+
attributes = class_id
|
11
|
+
attributes_hashes.each do |old|
|
12
|
+
result = {}
|
13
|
+
old.each { |k, v| result[k.to_s] = v }
|
14
|
+
merge_attributes!(attributes, result)
|
15
|
+
end
|
16
|
+
merge_attributes!(attributes, parse_object_ref(obj_ref)) if obj_ref
|
17
|
+
build_attributes(is_html, attr_wrapper, escape_attrs, hyphenate_data_attrs, attributes)
|
18
|
+
end
|
19
|
+
|
9
20
|
def build_attributes(is_html, attr_wrapper, escape_attrs, hyphenate_data_attrs, attributes = {})
|
10
21
|
# @TODO this is an absolutely ridiculous amount of arguments. At least
|
11
22
|
# some of this needs to be moved into an instance method.
|
@@ -159,6 +170,50 @@ module Haml
|
|
159
170
|
hash.merge! flatten_data_attributes(v, joined, join_char, seen)
|
160
171
|
end
|
161
172
|
end
|
173
|
+
|
174
|
+
# Takes an array of objects and uses the class and id of the first
|
175
|
+
# one to create an attributes hash.
|
176
|
+
# The second object, if present, is used as a prefix,
|
177
|
+
# just like you can do with `dom_id()` and `dom_class()` in Rails
|
178
|
+
def parse_object_ref(ref)
|
179
|
+
prefix = ref[1]
|
180
|
+
ref = ref[0]
|
181
|
+
# Let's make sure the value isn't nil. If it is, return the default Hash.
|
182
|
+
return {} if ref.nil?
|
183
|
+
class_name =
|
184
|
+
if ref.respond_to?(:haml_object_ref)
|
185
|
+
ref.haml_object_ref
|
186
|
+
else
|
187
|
+
underscore(ref.class)
|
188
|
+
end
|
189
|
+
ref_id =
|
190
|
+
if ref.respond_to?(:to_key)
|
191
|
+
key = ref.to_key
|
192
|
+
key.join('_') unless key.nil?
|
193
|
+
else
|
194
|
+
ref.id
|
195
|
+
end
|
196
|
+
id = "#{class_name}_#{ref_id || 'new'}"
|
197
|
+
if prefix
|
198
|
+
class_name = "#{ prefix }_#{ class_name}"
|
199
|
+
id = "#{ prefix }_#{ id }"
|
200
|
+
end
|
201
|
+
|
202
|
+
{ 'id'.freeze => id, 'class'.freeze => class_name }
|
203
|
+
end
|
204
|
+
|
205
|
+
# Changes a word from camel case to underscores.
|
206
|
+
# Based on the method of the same name in Rails' Inflector,
|
207
|
+
# but copied here so it'll run properly without Rails.
|
208
|
+
def underscore(camel_cased_word)
|
209
|
+
word = camel_cased_word.to_s.dup
|
210
|
+
word.gsub!(/::/, '_')
|
211
|
+
word.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
212
|
+
word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
|
213
|
+
word.tr!('-', '_')
|
214
|
+
word.downcase!
|
215
|
+
word
|
216
|
+
end
|
162
217
|
end
|
163
218
|
end
|
164
219
|
end
|
@@ -51,7 +51,8 @@ module Haml
|
|
51
51
|
# @param dynamic_attributes [Haml::Parser::DynamicAttributes]
|
52
52
|
# @return [String] Attributes rendering code
|
53
53
|
def compile_runtime_build(attributes, object_ref, dynamic_attributes)
|
54
|
-
|
54
|
+
arguments = [@is_html, @attr_wrapper, @escape_attrs, @hyphenate_data_attrs].map(&method(:to_literal)).join(', ')
|
55
|
+
"::Haml::AttributeBuilder.build(#{to_literal(attributes)}, #{object_ref}, #{arguments}, #{dynamic_attributes.to_literal})"
|
55
56
|
end
|
56
57
|
|
57
58
|
# Build array of grouped values whose sort order may go back and forth, which is also sorted with key name.
|
@@ -106,7 +107,8 @@ module Haml
|
|
106
107
|
hash_content = values.group_by(&:key).map do |key, values_for_key|
|
107
108
|
"#{frozen_string(key)} => #{merged_value(key, values_for_key)}"
|
108
109
|
end.join(', ')
|
109
|
-
[
|
110
|
+
arguments = [@is_html, @attr_wrapper, @escape_attrs, @hyphenate_data_attrs].map(&method(:to_literal)).join(', ')
|
111
|
+
[:dynamic, "::Haml::AttributeBuilder.build({ #{hash_content} }, nil, #{arguments})"]
|
110
112
|
end
|
111
113
|
|
112
114
|
# Renders attribute values statically.
|
data/lib/haml/buffer.rb
CHANGED
@@ -130,18 +130,6 @@ module Haml
|
|
130
130
|
@real_tabs += tab_change
|
131
131
|
end
|
132
132
|
|
133
|
-
def attributes(class_id, obj_ref, *attributes_hashes)
|
134
|
-
attributes = class_id
|
135
|
-
attributes_hashes.each do |old|
|
136
|
-
result = {}
|
137
|
-
old.each { |k, v| result[k.to_s] = v }
|
138
|
-
AttributeBuilder.merge_attributes!(attributes, result)
|
139
|
-
end
|
140
|
-
AttributeBuilder.merge_attributes!(attributes, parse_object_ref(obj_ref)) if obj_ref
|
141
|
-
AttributeBuilder.build_attributes(
|
142
|
-
html?, @options[:attr_wrapper], @options[:escape_attrs], @options[:hyphenate_data_attrs], attributes)
|
143
|
-
end
|
144
|
-
|
145
133
|
# Remove the whitespace from the right side of the buffer string.
|
146
134
|
# Doesn't do anything if we're at the beginning of a capture_haml block.
|
147
135
|
def rstrip!
|
@@ -190,49 +178,5 @@ module Haml
|
|
190
178
|
tabs = [count + @tabulation, 0].max
|
191
179
|
@@tab_cache[tabs] ||= ' ' * tabs
|
192
180
|
end
|
193
|
-
|
194
|
-
# Takes an array of objects and uses the class and id of the first
|
195
|
-
# one to create an attributes hash.
|
196
|
-
# The second object, if present, is used as a prefix,
|
197
|
-
# just like you can do with `dom_id()` and `dom_class()` in Rails
|
198
|
-
def parse_object_ref(ref)
|
199
|
-
prefix = ref[1]
|
200
|
-
ref = ref[0]
|
201
|
-
# Let's make sure the value isn't nil. If it is, return the default Hash.
|
202
|
-
return {} if ref.nil?
|
203
|
-
class_name =
|
204
|
-
if ref.respond_to?(:haml_object_ref)
|
205
|
-
ref.haml_object_ref
|
206
|
-
else
|
207
|
-
underscore(ref.class)
|
208
|
-
end
|
209
|
-
ref_id =
|
210
|
-
if ref.respond_to?(:to_key)
|
211
|
-
key = ref.to_key
|
212
|
-
key.join('_') unless key.nil?
|
213
|
-
else
|
214
|
-
ref.id
|
215
|
-
end
|
216
|
-
id = "#{class_name}_#{ref_id || 'new'}"
|
217
|
-
if prefix
|
218
|
-
class_name = "#{ prefix }_#{ class_name}"
|
219
|
-
id = "#{ prefix }_#{ id }"
|
220
|
-
end
|
221
|
-
|
222
|
-
{ 'id'.freeze => id, 'class'.freeze => class_name }
|
223
|
-
end
|
224
|
-
|
225
|
-
# Changes a word from camel case to underscores.
|
226
|
-
# Based on the method of the same name in Rails' Inflector,
|
227
|
-
# but copied here so it'll run properly without Rails.
|
228
|
-
def underscore(camel_cased_word)
|
229
|
-
word = camel_cased_word.to_s.dup
|
230
|
-
word.gsub!(/::/, '_')
|
231
|
-
word.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
232
|
-
word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
|
233
|
-
word.tr!('-', '_')
|
234
|
-
word.downcase!
|
235
|
-
word
|
236
|
-
end
|
237
181
|
end
|
238
182
|
end
|
data/lib/haml/plugin.rb
CHANGED
@@ -4,6 +4,11 @@ module Haml
|
|
4
4
|
|
5
5
|
# This module makes Haml work with Rails using the template handler API.
|
6
6
|
class Plugin
|
7
|
+
class << self
|
8
|
+
attr_accessor :annotate_rendered_view_with_filenames
|
9
|
+
end
|
10
|
+
self.annotate_rendered_view_with_filenames = false
|
11
|
+
|
7
12
|
def handles_encoding?; true; end
|
8
13
|
|
9
14
|
def compile(template, source)
|
@@ -14,9 +19,21 @@ module Haml
|
|
14
19
|
options[:mime_type] = template.mime_type
|
15
20
|
end
|
16
21
|
options[:filename] = template.identifier
|
22
|
+
|
23
|
+
preamble = '@output_buffer = output_buffer ||= ActionView::OutputBuffer.new if defined?(ActionView::OutputBuffer);'
|
24
|
+
postamble = ''
|
25
|
+
|
26
|
+
if self.class.annotate_rendered_view_with_filenames
|
27
|
+
# short_identifier is only available in Rails 6+. On older versions, 'inspect' gives similar results.
|
28
|
+
ident = template.respond_to?(:short_identifier) ? template.short_identifier : template.inspect
|
29
|
+
preamble += "haml_concat '<!-- BEGIN #{ident} -->'.html_safe;"
|
30
|
+
postamble += "haml_concat '<!-- END #{ident} -->'.html_safe;"
|
31
|
+
end
|
32
|
+
|
17
33
|
Haml::Engine.new(source, options).compiler.precompiled_with_ambles(
|
18
34
|
[],
|
19
|
-
after_preamble:
|
35
|
+
after_preamble: preamble,
|
36
|
+
before_postamble: postamble
|
20
37
|
)
|
21
38
|
end
|
22
39
|
|
data/lib/haml/railtie.rb
CHANGED
@@ -42,6 +42,11 @@ module Haml
|
|
42
42
|
Haml::Filters::RailsErb.template_class = Haml::SafeErubisTemplate
|
43
43
|
end
|
44
44
|
Haml::Template.options[:filters] = { 'erb' => Haml::Filters::RailsErb }
|
45
|
+
|
46
|
+
if app.config.respond_to?(:action_view) &&
|
47
|
+
app.config.action_view.annotate_rendered_view_with_filenames
|
48
|
+
Haml::Plugin.annotate_rendered_view_with_filenames = true
|
49
|
+
end
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/haml/temple_engine.rb
CHANGED
@@ -65,7 +65,7 @@ module Haml
|
|
65
65
|
# (see {file:REFERENCE.md#encodings the `:encoding` option}).
|
66
66
|
#
|
67
67
|
# @return [String]
|
68
|
-
def precompiled_with_ambles(local_names, after_preamble: '')
|
68
|
+
def precompiled_with_ambles(local_names, after_preamble: '', before_postamble: '')
|
69
69
|
preamble = <<END.tr("\n", ';')
|
70
70
|
begin
|
71
71
|
extend Haml::Helpers
|
@@ -74,6 +74,7 @@ _erbout = _hamlout.buffer
|
|
74
74
|
#{after_preamble}
|
75
75
|
END
|
76
76
|
postamble = <<END.tr("\n", ';')
|
77
|
+
#{before_postamble}
|
77
78
|
#{precompiled_method_return_value}
|
78
79
|
ensure
|
79
80
|
@haml_buffer = @haml_buffer.upper if @haml_buffer
|
data/lib/haml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: temple
|
@@ -125,9 +125,9 @@ executables:
|
|
125
125
|
extensions: []
|
126
126
|
extra_rdoc_files: []
|
127
127
|
files:
|
128
|
+
- ".github/workflows/test.yml"
|
128
129
|
- ".gitignore"
|
129
130
|
- ".gitmodules"
|
130
|
-
- ".travis.yml"
|
131
131
|
- ".yardopts"
|
132
132
|
- CHANGELOG.md
|
133
133
|
- FAQ.md
|
data/.travis.yml
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
dist: trusty
|
3
|
-
language: ruby
|
4
|
-
cache:
|
5
|
-
bundler: true
|
6
|
-
rvm:
|
7
|
-
- ruby-head
|
8
|
-
- 2.7
|
9
|
-
- 2.6
|
10
|
-
- 2.5
|
11
|
-
- jruby-9.2
|
12
|
-
env:
|
13
|
-
- RUBYOPT="--enable-frozen-string-literal"
|
14
|
-
- RUBYOPT=""
|
15
|
-
gemfile:
|
16
|
-
- test/gemfiles/Gemfile.rails-6.0.x
|
17
|
-
- test/gemfiles/Gemfile.rails-5.2.x
|
18
|
-
- test/gemfiles/Gemfile.rails-5.1.x
|
19
|
-
- test/gemfiles/Gemfile.rails-5.0.x
|
20
|
-
- test/gemfiles/Gemfile.rails-5.0.x.erubi
|
21
|
-
- test/gemfiles/Gemfile.rails-4.2.x
|
22
|
-
- test/gemfiles/Gemfile.rails-4.1.x
|
23
|
-
- test/gemfiles/Gemfile.rails-4.0.x
|
24
|
-
matrix:
|
25
|
-
exclude:
|
26
|
-
- rvm: 2.5
|
27
|
-
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
28
|
-
- rvm: 2.5
|
29
|
-
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
30
|
-
- rvm: 2.5
|
31
|
-
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
32
|
-
- rvm: 2.5
|
33
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
34
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
35
|
-
- rvm: 2.5
|
36
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
37
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
38
|
-
- rvm: 2.5
|
39
|
-
gemfile: test/gemfiles/Gemfile.rails-5.1.x
|
40
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
41
|
-
- rvm: 2.6
|
42
|
-
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
43
|
-
- rvm: 2.6
|
44
|
-
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
45
|
-
- rvm: 2.6
|
46
|
-
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
47
|
-
- rvm: 2.6
|
48
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
49
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
50
|
-
- rvm: 2.6
|
51
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
52
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
53
|
-
- rvm: 2.6
|
54
|
-
gemfile: test/gemfiles/Gemfile.rails-5.1.x
|
55
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
56
|
-
- rvm: 2.7
|
57
|
-
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
58
|
-
- rvm: 2.7
|
59
|
-
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
60
|
-
- rvm: 2.7
|
61
|
-
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
62
|
-
- rvm: 2.7
|
63
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
64
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
65
|
-
- rvm: 2.7
|
66
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
67
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
68
|
-
- rvm: 2.7
|
69
|
-
gemfile: test/gemfiles/Gemfile.rails-5.1.x
|
70
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
71
|
-
- rvm: ruby-head
|
72
|
-
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
73
|
-
- rvm: ruby-head
|
74
|
-
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
75
|
-
- rvm: ruby-head
|
76
|
-
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
77
|
-
- rvm: jruby-9.2
|
78
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
79
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
80
|
-
- rvm: jruby-9.2
|
81
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
82
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
83
|
-
- rvm: jruby-9.2
|
84
|
-
gemfile: test/gemfiles/Gemfile.rails-5.1.x
|
85
|
-
env: RUBYOPT="--enable-frozen-string-literal"
|
86
|
-
include:
|
87
|
-
- rvm: 2.7
|
88
|
-
gemfile: test/gemfiles/Gemfile.rails-edge
|
89
|
-
allow_failures:
|
90
|
-
- rvm: ruby-head
|
91
|
-
- gemfile: test/gemfiles/Gemfile.rails-edge
|
92
|
-
- rvm: jruby-9.2
|
93
|
-
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
94
|
-
- rvm: jruby-9.2
|
95
|
-
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
96
|
-
- rvm: jruby-9.2
|
97
|
-
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
98
|
-
- rvm: jruby-9.2
|
99
|
-
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
100
|
-
fast_finish: true
|
101
|
-
before_install:
|
102
|
-
# install older versions of rubygems and bundler only on Ruby < 2.7
|
103
|
-
- if [ `echo "${TRAVIS_RUBY_VERSION:0:3} < 2.7" | bc` == 1 ]; then gem i rubygems-update -v '<3' && update_rubygems; fi; # https://github.com/travis-ci/travis-ci/issues/8974
|
104
|
-
- if [ `echo "${TRAVIS_RUBY_VERSION:0:3} < 2.7" | bc` == 1 ]; then gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true; fi;
|
105
|
-
- if [ `echo "${TRAVIS_RUBY_VERSION:0:3} < 2.7" | bc` == 1 ]; then gem i bundler -v '<2'; fi;
|
106
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
107
|
-
- chmod +x ./cc-test-reporter
|
108
|
-
- ./cc-test-reporter before-build
|
109
|
-
script: "bundle exec rake submodules test"
|
110
|
-
after_script:
|
111
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|