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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
# encoding: utf-8
# -*- ruby -*-
$:.unshift File.join(File.dirname(__FILE__), "lib")
require 'rubygems'
require 'bundler/setup'
require "rake"
require "rake/clean"
require "fileutils"
require "i18n-inflector"
require 'i18n-inflector-rails/version'
require 'hoe'
task :default => [:test]
desc "install by setup.rb"
task :install do
sh "sudo ruby setup.rb install"
end
### Gem
if !defined?(YAML::ENGINE).nil? && YAML::ENGINE.respond_to?(:yamler)
YAML::ENGINE.yamler = 'syck'
end
Hoe.plugin :bundler
Hoe.plugin :yard
Hoe.spec 'i18n-inflector-rails' do
developer I18n::Inflector::Rails::DEVELOPER, I18n::Inflector::Rails::EMAIL
self.version = I18n::Inflector::Rails::VERSION
self.rubyforge_name = I18n::Inflector::Rails::NAME
self.summary = I18n::Inflector::Rails::SUMMARY
self.description = I18n::Inflector::Rails::DESCRIPTION
self.url = I18n::Inflector::Rails::URL
self.remote_rdoc_dir = ''
self.rsync_args << '--chmod=a+rX'
self.readme_file = 'README.rdoc'
self.history_file = 'docs/HISTORY'
extra_deps << ['i18n-inflector', '~> 2.6'] <<
['railties', '>= 3.0.0'] <<
['actionpack', '>= 3.0.0']
extra_dev_deps << ['rspec', '>= 2.6.0'] <<
['yard', '>= 0.7.2'] <<
['rdoc', '>= 3.8.0'] <<
['bundler', '>= 1.0.10'] <<
['hoe-bundler', '>= 1.1.0']
unless extra_dev_deps.flatten.include?('hoe-yard')
extra_dev_deps << ['hoe-yard', '>= 0.1.2']
end
end
task 'Manifest.txt' do
puts 'generating Manifest.txt from git'
sh %{git ls-files | grep -v gitignore > Manifest.txt}
sh %{git add Manifest.txt}
end
task 'ChangeLog' do
sh %{git log > ChangeLog}
end
desc "Fix documentation's file permissions"
task :docperm do
sh %{chmod -R a+rX doc}
end
### Sign & Publish
desc "Create signed tag in Git"
task :tag do
sh %{git tag -s v#{I18n::Inflector::Rails::VERSION} -m 'version #{I18n::Inflector::Rails::VERSION}'}
end
desc "Create external GnuPG signature for Gem"
task :gemsign do
sh %{gpg -u #{I18n::Inflector::Rails::EMAIL} -ab pkg/#{I18n::Inflector::Rails::NAME}-#{I18n::Inflector::Rails::VERSION}.gem \
-o pkg/#{I18n::Inflector::Rails::NAME}-#{I18n::Inflector::Rails::VERSION}.gem.sig}
end
|