liquid-c 4.0.0.rc1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/liquid.yml +23 -0
- data/Gemfile +1 -2
- data/ext/liquid_c/extconf.rb +8 -2
- data/ext/liquid_c/parser.c +2 -3
- data/ext/liquid_c/tokenizer.c +1 -0
- data/lib/liquid/c/version.rb +1 -1
- data/liquid-c.gemspec +4 -2
- data/test/liquid_test.rb +2 -2
- metadata +11 -11
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4e8ca00871b405a80337964e8d16fbd9e2c7eebc1174e04149193ed2b6dec69e
|
4
|
+
data.tar.gz: 6beb1f9af62e04c208735e733536631b0bb48a734f6f25a79e69e0032a71b6df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f6eb35fdd601a8ecc6d1f00beb3ef4d06ecb51c0de7fe5e9efbe9795d9ddc9828f5b0a4fe65cb719d91b322d3162a61e561c45b03f6cafebdc773a1f6bf2b7e
|
7
|
+
data.tar.gz: d2c21226bb648cdd9b062997fede49f6b0a2bc8896c216c5e66554b4962cd9524fe0a09b25450f8a1ac76bce2cf7f61ccdec039bc35079ce28cb0770c4a6cfbf
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Liquid
|
2
|
+
on: [push, pull_request]
|
3
|
+
jobs:
|
4
|
+
test:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
strategy:
|
7
|
+
matrix:
|
8
|
+
entry:
|
9
|
+
- { ruby: 2.7 }
|
10
|
+
- { ruby: 3.2 }
|
11
|
+
name: test (${{ matrix.entry.ruby }})
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
17
|
+
- uses: actions/cache@v1
|
18
|
+
with:
|
19
|
+
path: vendor/bundle
|
20
|
+
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }}
|
21
|
+
restore-keys: ${{ runner.os }}-gems-
|
22
|
+
- run: bundle install --jobs=3 --retry=3 --path=vendor/bundle
|
23
|
+
- run: bundle exec rake
|
data/Gemfile
CHANGED
data/ext/liquid_c/extconf.rb
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
require 'mkmf'
|
2
|
-
$CFLAGS << ' -
|
2
|
+
$CFLAGS << ' -std=c99 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers'
|
3
|
+
# In Ruby 2.6 and earlier, the Ruby headers did not have struct timespec defined
|
4
|
+
valid_headers = RbConfig::CONFIG['host_os'] !~ /linux/ || Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7")
|
5
|
+
pedantic = !ENV['LIQUID_C_PEDANTIC'].to_s.empty?
|
6
|
+
if pedantic && valid_headers
|
7
|
+
$CFLAGS << ' -Werror'
|
8
|
+
end
|
3
9
|
compiler = RbConfig::MAKEFILE_CONFIG['CC']
|
4
10
|
if ENV['DEBUG'] == 'true' && compiler =~ /gcc|g\+\+/
|
5
11
|
$CFLAGS << ' -fbounds-check'
|
6
12
|
end
|
7
|
-
$warnflags.gsub!(/-Wdeclaration-after-statement/, "")
|
13
|
+
$warnflags.gsub!(/-Wdeclaration-after-statement/, "") if $warnflags
|
8
14
|
create_makefile("liquid_c")
|
data/ext/liquid_c/parser.c
CHANGED
@@ -120,9 +120,8 @@ static VALUE parse_variable(parser_t *p)
|
|
120
120
|
}
|
121
121
|
|
122
122
|
if (RARRAY_LEN(lookups) == 0) {
|
123
|
-
VALUE
|
124
|
-
|
125
|
-
if (literal != undefined) return literal;
|
123
|
+
VALUE literal = rb_hash_lookup2(vLiquidExpressionLiterals, name, Qundef);
|
124
|
+
if (literal != Qundef) return literal;
|
126
125
|
}
|
127
126
|
|
128
127
|
VALUE args[4] = {Qfalse, name, lookups, INT2FIX(command_flags)};
|
data/ext/liquid_c/tokenizer.c
CHANGED
data/lib/liquid/c/version.rb
CHANGED
data/liquid-c.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Justin Li", "Dylan Thacker-Smith"]
|
10
10
|
spec.email = ["gems@shopify.com"]
|
11
11
|
spec.summary = "Liquid performance extension in C"
|
12
|
-
spec.homepage = ""
|
12
|
+
spec.homepage = "https://github.com/shopify/liquid-c"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.extensions = ['ext/liquid_c/extconf.rb']
|
@@ -18,9 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
22
|
+
|
21
23
|
spec.add_dependency 'liquid', '>= 3.0.0'
|
22
24
|
|
23
|
-
spec.add_development_dependency "bundler", "
|
25
|
+
spec.add_development_dependency "bundler", ">= 1.5"
|
24
26
|
spec.add_development_dependency "rake"
|
25
27
|
spec.add_development_dependency 'rake-compiler'
|
26
28
|
spec.add_development_dependency 'minitest'
|
data/test/liquid_test.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
liquid_lib_dir = $LOAD_PATH.detect{ |p| File.
|
1
|
+
liquid_lib_dir = $LOAD_PATH.detect{ |p| File.exist?(File.join(p, 'liquid.rb')) }
|
2
2
|
liquid_test_dir = File.join(File.dirname(liquid_lib_dir), 'test')
|
3
3
|
$LOAD_PATH << liquid_test_dir
|
4
4
|
|
5
5
|
require 'test_helper'
|
6
6
|
require 'liquid/c'
|
7
7
|
|
8
|
-
test_files =
|
8
|
+
test_files = Dir[File.join(liquid_test_dir, "integration/**/*_test.rb")]
|
9
9
|
test_files.each do |test_file|
|
10
10
|
require test_file
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid-c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Li
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: liquid
|
@@ -29,14 +29,14 @@ dependencies:
|
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.5'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.5'
|
42
42
|
- !ruby/object:Gem::Dependency
|
@@ -103,8 +103,8 @@ extensions:
|
|
103
103
|
- ext/liquid_c/extconf.rb
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
|
+
- ".github/workflows/liquid.yml"
|
106
107
|
- ".gitignore"
|
107
|
-
- ".travis.yml"
|
108
108
|
- Gemfile
|
109
109
|
- LICENSE.txt
|
110
110
|
- README.md
|
@@ -130,10 +130,11 @@ files:
|
|
130
130
|
- test/test_helper.rb
|
131
131
|
- test/unit/tokenizer_test.rb
|
132
132
|
- test/unit/variable_test.rb
|
133
|
-
homepage:
|
133
|
+
homepage: https://github.com/shopify/liquid-c
|
134
134
|
licenses:
|
135
135
|
- MIT
|
136
|
-
metadata:
|
136
|
+
metadata:
|
137
|
+
allowed_push_host: https://rubygems.org
|
137
138
|
post_install_message:
|
138
139
|
rdoc_options: []
|
139
140
|
require_paths:
|
@@ -145,12 +146,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
146
|
version: '0'
|
146
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
148
|
requirements:
|
148
|
-
- - "
|
149
|
+
- - ">="
|
149
150
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
151
|
+
version: '0'
|
151
152
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.4.5
|
153
|
+
rubygems_version: 3.3.3
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Liquid performance extension in C
|