Rakefile in filegen-0.0.1 vs Rakefile in filegen-0.1.1
- old
+ new
@@ -1,59 +1,118 @@
-require "bundler/gem_tasks"
+#!/usr/bin/env rake
+
+require 'fedux_org/stdlib/rake'
+
+require 'filegen/version'
+
+def software
+ 'filegen'
+end
+
+def version
+ Filegen::VERSION
+end
+
+def root_directory
+ File.expand_path('../', __FILE__)
+end
+
+def tar_file
+ File.join(pkg_directory, "#{software}-#{version}.tar.gz")
+end
+
+def tmp_directory
+ File.join(root_directory, 'tmp', "#{software}-#{version}")
+end
+
+def gem_file
+ File.join(root_directory, 'pkg', "#{software}-#{version}.gem")
+end
+
+def pkg_directory
+ File.join(root_directory, 'pkg')
+end
+
+task :default => 'gem:build'
+
+file gem_file => 'gem:build'
+
+file tmp_directory do
+ FileUtils.mkdir_p tmp_directory
+end
+
+namespace :gem do
+ desc 'build tar file'
+ task :package => [gem_file, tmp_directory] do
+ FileUtils.mv File.join(pkg_directory,"#{software}-#{version}.gem"), tmp_directory
+
+ Dir.chdir('tmp') do
+ sh "tar -czf #{tar_file} #{File.basename tmp_directory}"
+ end
+ end
+end
+
+require 'coveralls/rake/task'
+Coveralls::RakeTask.new
+
+namespace :test do
+ desc 'Test with coveralls'
+ task :coveralls => ['test:rspec', 'test:cucumber', 'coveralls:push']
+end