liquid-c 4.0.0.rc1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c625a10bf29068a8d124df52ea012868d936f2ea
4
- data.tar.gz: 537c2e49a4a6b65c693e7f51d2432d0f969dcb3f
2
+ SHA256:
3
+ metadata.gz: 4e8ca00871b405a80337964e8d16fbd9e2c7eebc1174e04149193ed2b6dec69e
4
+ data.tar.gz: 6beb1f9af62e04c208735e733536631b0bb48a734f6f25a79e69e0032a71b6df
5
5
  SHA512:
6
- metadata.gz: 5390b71dc89234cd139d6e3234473cc00c200e37380ba8a140c1e49c58fe1d7db68dd98ee79d8d023cf4994c9c7b472031504bde9b2bc27312f9f0bb04a56902
7
- data.tar.gz: 99565b5eb0e6458afa0b9d7608b67160b1972892c6fa2bf2a4850eca80428b25f49743a57e9380ce6294448442f462109c917c7a702f647597a78d4443215402
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
@@ -2,8 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'liquid', github: 'Shopify/liquid', branch: 'master'
6
-
5
+ gem 'liquid', github: 'Shopify/liquid', branch: '4-0-stable'
7
6
 
8
7
  group :test do
9
8
  gem 'spy', '0.4.1'
@@ -1,8 +1,14 @@
1
1
  require 'mkmf'
2
- $CFLAGS << ' -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers'
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")
@@ -120,9 +120,8 @@ static VALUE parse_variable(parser_t *p)
120
120
  }
121
121
 
122
122
  if (RARRAY_LEN(lookups) == 0) {
123
- VALUE undefined = FIXNUM_P(-1);
124
- VALUE literal = rb_hash_lookup2(vLiquidExpressionLiterals, name, undefined);
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)};
@@ -88,6 +88,7 @@ void tokenizer_next(tokenizer_t *tokenizer, token_t *token)
88
88
  tokenizer->lstrip_flag = 0;
89
89
  goto found;
90
90
  }
91
+ tokenizer->lstrip_flag = 0;
91
92
  token->type = TOKEN_INVALID;
92
93
  token->lstrip = token->rstrip;
93
94
  token->rstrip = 0;
@@ -1,5 +1,5 @@
1
1
  module Liquid
2
2
  module C
3
- VERSION = "4.0.0.rc1"
3
+ VERSION = "4.0.1"
4
4
  end
5
5
  end
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", "~> 1.5"
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.exists?(File.join(p, 'liquid.rb')) }
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 = FileList[File.join(liquid_test_dir, 'integration/**/*_test.rb')]
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.0.rc1
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: 2016-09-13 00:00:00.000000000 Z
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: 1.3.1
151
+ version: '0'
151
152
  requirements: []
152
- rubyforge_project:
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
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- - ruby-head
8
-
9
- sudo: false
10
-
11
- notifications:
12
- disable: true