mirror of
https://github.com/kemko/liquid.git
synced 2026-01-06 02:05:41 +03:00
Merge pull request #596 from Shopify/liquid_c_tests
Run tests with latest liquid/c gem
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
# This configuration was generated by `rubocop --auto-gen-config`
|
||||
# on 2015-06-04 22:53:26 -0400 using RuboCop version 0.31.0.
|
||||
# on 2015-06-08 18:16:16 +0000 using RuboCop version 0.32.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 5
|
||||
Lint/NestedMethodDefinition:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 53
|
||||
Metrics/AbcSize:
|
||||
Max: 58
|
||||
@@ -18,7 +22,7 @@ Metrics/ClassLength:
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 15
|
||||
|
||||
# Offense count: 552
|
||||
# Offense count: 553
|
||||
# Configuration parameters: AllowURI, URISchemes.
|
||||
Metrics/LineLength:
|
||||
Max: 294
|
||||
|
||||
@@ -14,7 +14,7 @@ matrix:
|
||||
allow_failures:
|
||||
- rvm: jruby-head
|
||||
|
||||
script: "rake"
|
||||
script: "bundle exec rake"
|
||||
|
||||
notifications:
|
||||
disable: true
|
||||
|
||||
4
Gemfile
4
Gemfile
@@ -7,4 +7,8 @@ group :test do
|
||||
gem 'spy', '0.4.1'
|
||||
gem 'benchmark-ips'
|
||||
gem 'rubocop'
|
||||
|
||||
platform :mri do
|
||||
gem 'liquid-c', github: 'Shopify/liquid-c', ref: '35e9aee48d639ae1d3ac9ba77616aca9800eab7d'
|
||||
end
|
||||
end
|
||||
|
||||
13
Rakefile
13
Rakefile
@@ -27,9 +27,22 @@ desc 'runs test suite with both strict and lax parsers'
|
||||
task :test do
|
||||
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||
Rake::Task['base_test'].invoke
|
||||
|
||||
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
||||
Rake::Task['base_test'].reenable
|
||||
Rake::Task['base_test'].invoke
|
||||
|
||||
if RUBY_ENGINE == 'ruby'
|
||||
ENV['LIQUID-C'] = '1'
|
||||
|
||||
ENV['LIQUID_PARSER_MODE'] = 'lax'
|
||||
Rake::Task['base_test'].reenable
|
||||
Rake::Task['base_test'].invoke
|
||||
|
||||
ENV['LIQUID_PARSER_MODE'] = 'strict'
|
||||
Rake::Task['base_test'].reenable
|
||||
Rake::Task['base_test'].invoke
|
||||
end
|
||||
end
|
||||
|
||||
task gem: :build
|
||||
|
||||
@@ -15,6 +15,11 @@ if env_mode = ENV['LIQUID_PARSER_MODE']
|
||||
end
|
||||
Liquid::Template.error_mode = mode
|
||||
|
||||
if ENV['LIQUID-C'] == '1'
|
||||
puts "-- LIQUID C"
|
||||
require 'liquid/c'
|
||||
end
|
||||
|
||||
if Minitest.const_defined?('Test')
|
||||
# We're on Minitest 5+. Nothing to do here.
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user