Skip to content

Commit

Permalink
support rails 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chamnap committed Aug 18, 2014
1 parent edf6773 commit 23d24fb
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ tmp
*.o
*.a
mkmf.log
spec/dummy/log/*
gemfiles/*.lock
31 changes: 24 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
require 'bundler/gem_tasks'
require 'rspec/core'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'
task default: 'spec:all'

namespace :spec do
%w(rails_41 rails_40).each do |gemfile|
desc "Run Tests against #{gemfile}"
task gemfile do
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake spec"
end
end

Bundler::GemHelper.install_tasks
desc "Run Tests against rails versions"
task :all do
%w(rails_41 rails_40).each do |gemfile|
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake spec"
end
end
end
11 changes: 11 additions & 0 deletions gemfiles/rails_40.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'

gem 'rails', '~> 4.0.8'
gem 'rspec-rails', '~> 2.14.2'
gem 'capybara', '~> 2.4.1'
gem 'pry-rails'
gem 'coveralls'
gem 'simplecov'
gem 'guard-rspec'

gemspec path: '../'
11 changes: 11 additions & 0 deletions gemfiles/rails_41.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
source 'https://rubygems.org'

gem 'rails', '~> 4.1.4'
gem 'rspec-rails', '~> 2.14.2'
gem 'capybara', '~> 2.4.1'
gem 'pry-rails'
gem 'coveralls'
gem 'simplecov'
gem 'guard-rspec'

gemspec path: '../'
17 changes: 9 additions & 8 deletions liquid-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'liquid-rails/version'

Gem::Specification.new do |spec|
spec.name = "liquid-rails"
spec.name = 'liquid-rails'
spec.version = Liquid::Rails::VERSION
spec.authors = ["Chamnap Chhorn"]
spec.email = ["[email protected]"]
spec.authors = ['Chamnap Chhorn']
spec.email = ['[email protected]']
spec.summary = %q{Liquid with Rails support}
spec.description = %q{Liquid with Rails support}
spec.homepage = ""
spec.license = "MIT"
spec.homepage = ''
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.require_paths = ['lib']

spec.add_dependency "rails", "~> 4.0.8"
spec.add_dependency "liquid", "~> 3.0.0.rc1"
spec.add_dependency 'rails', '>= 4.0.8'
spec.add_dependency 'liquid', '~> 3.0.0.rc1'
spec.add_dependency 'thor'
end

0 comments on commit 23d24fb

Please sign in to comment.