public
Description: Allows the caching of lookup data in your Rails models
Clone URL: git://github.com/vigetlabs/constant_cache.git
Search Repo:
constant_cache / Rakefile
100644 45 lines (37 sloc) 1.239 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'rubygems'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
 
require 'lib/constant_cache/version'
 
GEM = "constant_cache"
AUTHOR = "Patrick Reagan"
EMAIL = "patrick.reagan@viget.com"
HOMEPAGE = "http://www.viget.com/extend/"
SUMMARY = "Patches ActiveRecord::Base to add a caches_constants class method that will cache lookup data for your application."
 
spec = Gem::Specification.new do |s|
  s.name = GEM
  s.version = ConstantCache::VERSION::STRING
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  s.extra_rdoc_files = %w(README MIT-LICENSE HISTORY)
  s.summary = SUMMARY
  s.description = s.summary
  s.author = AUTHOR
  s.email = EMAIL
  s.homepage = HOMEPAGE
  
  s.add_dependency('activerecord', '>= 2.0.2')
  s.add_dependency('activesupport', '>= 2.0.2')
  
  s.require_path = 'lib'
  s.files = %w(MIT-LICENSE README Rakefile HISTORY) + Dir.glob("{lib,spec}/**/*")
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.gem_spec = spec
end
 
task :install => [:package] do
  sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
end
 
Spec::Rake::SpecTask.new do |t|
  t.spec_files = FileList['spec/examples/**/*_spec.rb']
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec']
  t.spec_opts = ['--format', 'specdoc']
end