forked from clbustos/statsample
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Rakefile
44 lines (37 loc) · 1.06 KB
/
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
38
39
40
41
42
43
44
$:.unshift File.expand_path("../lib/", __FILE__)
lib_folder = File.expand_path("../lib", __FILE__)
require 'statsample/version'
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'bundler/gem_tasks'
# Setup the necessary gems, specified in the gemspec.
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
Rake::TestTask.new do |t|
t.pattern = "test/test_*.rb"
end
RDoc::Task.new do |rdoc|
rdoc.main = "README.md"
rdoc.rdoc_files.include("README.md", "lib", "History.txt", "LICENSE.txt", "references.txt")
end
desc "Update pot/po files."
task "gettext:updatepo" do
require 'gettext/tools'
GetText.update_pofiles("statsample", Dir.glob("{lib,bin}/**/*.{rb,rhtml}"), "statsample #{Statsample::VERSION}")
end
desc "Create mo-files"
task "gettext:makemo" do
require 'gettext/tools'
GetText.create_mofiles()
end
desc 'Run pry'
task :pry do |task|
sh "pry -r #{lib_folder}/statsample.rb"
end