canard.gemspec in canard-0.4.1 vs canard.gemspec in canard-0.4.2.pre
- old
+ new
@@ -1,8 +1,9 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "canard/version"
+require 'rails'
Gem::Specification.new do |s|
s.name = "canard"
s.version = Canard::VERSION
s.date = `git log -1 --format="%cd" --date=short lib/canard/version.rb`
@@ -26,8 +27,13 @@
s.add_development_dependency "mongoid", "~> 2.0"
else
s.add_development_dependency "mongoid", "~> 3.0"
end
- s.add_runtime_dependency "cancan"
+ s.requirements << 'cancan for Rails3 and earlier or the Rails4 compatible cancancan fork.'
+ if Rails.version > '3'
+ s.add_runtime_dependency "cancancan"
+ else
+ s.add_runtime_dependency "cancan"
+ end
s.add_runtime_dependency "role_model"
end