Sha256: b4ef5e9396d8df5e193f57825141a03d40b851374dca6de930a287682664c6b2

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

require "rake/testtask"

task :default => [:test]

Rake::TestTask.new do |test|
  test.libs << "test"
  test.test_files = Dir.glob("test/test_*.rb")
  test.verbose    =  true
end

desc "Generate gemspec file from template"
task :gemspec do
  require "erb"
  require "lib/kagemusha"

  name = "nayutaya-kagemusha"
  src  = File.open("#{name}.gemspec.erb", "rb") { |file| file.read }
  erb  = ERB.new(src, nil, "-")

  version = Kagemusha::VERSION
  date    = Time.now.strftime("%Y-%m-%d")

  files      = Dir.glob("**/*").select { |s| File.file?(s) }
  test_files = Dir.glob("test/**").select { |s| File.file?(s) }

  File.open("#{name}.gemspec", "wb") { |file|
    file.write(erb.result(binding))
  }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nayutaya-kagemusha-0.1.0 Rakefile