Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b871f00188
Fetching contributors…

Cannot retrieve contributors at this time

file 77 lines (69 sloc) 2.045 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
begin
  require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
  begin
    require 'rubygems'
    require 'bundler'
    Bundler.require
  rescue
    require File.expand_path('../config/environment', __FILE__)
  end
end

begin
  require 'rake/testtask'
  require 'rake/rdoctask'
  require 'spec/rake/spectask'
rescue MissingSourceFile
  STDERR.puts "Error, could not load rake/rspec tasks! (#{$!})\n\nDid you run `bundle install`?\n\n"
  exit 1
end

jt = Jeweler::Tasks.new do |gem|
  gem.name = "ngmoco-cache-money"
  gem.summary = "Write-through and Read-through Cacheing for ActiveRecord"
  gem.description = "Write-through and Read-through Cacheing for ActiveRecord"
  gem.email = "teamplatform@ngmoco.com"
  gem.homepage = "http://github.com/ngmoco/cache-money"
  gem.authors = ["Nick Kallen","Ashley Martens","Scott Mace","John O'Neill"]
  gem.has_rdoc = false
  gem.files = FileList[
    "README",
    "TODO",
    "UNSUPPORTED_FEATURES",
    "lib/**/*.rb",
    "rails/init.rb",
    "init.rb"
  ]
  gem.test_files = FileList[
    "config/*",
    "db/schema.rb",
    "spec/**/*.rb"
  ]
  gem.add_dependency("activerecord", [">= 2.2.0"])
  gem.add_dependency("activesupport", [">= 2.2.0"])
end
Jeweler::GemcutterTasks.new

Spec::Rake::SpecTask.new do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.spec_opts = ['--format', 'profile', '--color']
end

Spec::Rake::SpecTask.new(:coverage) do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.rcov = true
  t.rcov_opts = ['-x', 'spec,gems']
end

desc "Default task is to run specs"
task :default => :spec

namespace :britt do
  desc 'Removes trailing whitespace'
  task :space do
    sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
  end
end


desc "Push a new version to Gemcutter"
task :publish => [ :spec, :build ] do
  system "git tag v#{jt.jeweler.version}"
  system "git push origin v#{jt.jeweler.version}"
  system "git push origin master"
  system "gem push pkg/ngmoco-cache-money-#{jt.jeweler.version}.gem"
  system "git clean -fd"
end
Something went wrong with that request. Please try again.