forked from dhirajbhandari/polar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (30 loc) · 851 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
37
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rspec/core/rake_task'
require 'polar'
GEM_NAME = "polar-renren"
GEM_VERSION = Polar.version
desc 'Default: run specs.'
task :default => :spec
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
end
desc "Generate code coverage"
RSpec::Core::RakeTask.new(:coverage) do |t|
t.rcov = true
t.rcov_opts = ['--exclude', 'spec']
end
desc "Build the Gem"
task :build do
system "gem build #{GEM_NAME}.gemspec"
end
desc "Release to ruby gems"
task :release => :build do
system "git tag -a #{GEM_VERSION} -m \"Release tag\""
system "git push origin --tags"
system "gem push #{GEM_NAME}-#{GEM_VERSION}.gem"
system "rm #{GEM_NAME}-#{GEM_VERSION}.gem"
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -I lib -r #{GEM_NAME}.rb"
end