-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
36 lines (29 loc) · 868 Bytes
/
Rakefile
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
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rspec/core/rake_task'
require "active_support"
require "mongoid"
require "mongoid_voteable"
task :default => :spec
desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end
desc "Show version"
task :version do
puts Mongoid::Voteable::VERSION
end
desc "Build gem"
task :build do
system "gem build mongoid_voteable.gemspec"
end
desc "Install gem"
task :install => :build do
system "sudo gem install mongoid_voteable-#{Mongoid::Voteable::VERSION}.gem"
end
desc "Release gem"
task :release => :build do
puts "Tagging #{Mongoid::Voteable::VERSION}"
system "git tag -a #{Mongoid::Voteable::VERSION} -m 'Tagging #{Mongoid::Voteable::VERSION}'"
puts "Releasing to Gemcutter"
system "gem push mongoid_voteable-#{Mongoid::Voteable::VERSION}.gem"
end