Rakefile in shvets-google_translate-0.5.4 vs Rakefile in shvets-google_translate-0.5.5
- old
+ new
@@ -1,16 +1,18 @@
-# Rakefile for Scriptlandia-R
+# Rakefile for google_translate
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'spec/rake/spectask'
require 'rake/rdoctask'
require 'rcov/rcovtask'
-SPEC = Gem::Specification.load('google_translate.gemspec')
+spec_name = 'google_translate.gemspec'
+SPEC = Gem::Specification.load(spec_name)
+
Rake::GemPackageTask.new(SPEC) do |pkg|
pkg.need_tar = true
pkg.need_zip = true
end
@@ -37,10 +39,10 @@
desc "test gem compatibility with github"
task :"github:validate" do
require 'yaml'
require 'rubygems/specification'
- data = File.read("google_translate.gemspec")
+ data = File.read(spec_name)
spec = nil
if data !~ %r{!ruby/object:Gem::Specification}
Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join
else