-
Notifications
You must be signed in to change notification settings - Fork 34
/
Rakefile
41 lines (30 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
37
38
39
40
41
#!/usr/bin/env rake
$LOAD_PATH.unshift File.expand_path("lib", File.dirname(__FILE__))
require "rspec/core/rake_task"
require "google_translate/version"
require "gemspec_deps_gen/gemspec_deps_gen"
version = GoogleTranslate::VERSION
project_name = File.basename(Dir.pwd)
task :gen do
generator = GemspecDepsGen.new
generator.generate_dependencies "spec", "#{project_name}.gemspec.erb", "#{project_name}.gemspec"
end
task :build => :gen do
system "gem build #{project_name}.gemspec"
end
task :install do
system "gem install #{project_name}-#{version}.gem"
end
task :uninstall do
system "gem uninstall #{project_name}"
end
task :release => :build do
system "gem push #{project_name}-#{version}.gem"
end
RSpec::Core::RakeTask.new do |task|
task.pattern = 'spec/**/*_spec.rb'
task.verbose = false
end
task :test do
puts `bin/t en:ru hello`
end