Sha256: c6688c28fd2d92492b95aa4f231c527446fa13cdb1f77001e92fdc459c7ffe41
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require 'rake/gempackagetask' require 'pathname' require 'yaml' def gem RUBY_1_9 ? 'gem19' : 'gem' end def all_except(paths) Dir['**/*'] - paths.map {|path| path.strip.gsub(/^\//,'').gsub(/\/$/,'') } end spec = Gem::Specification.new do |s| s.name = 'every' s.version = '0.6' s.summary = "Symbol#to_proc's hot cousin. Simple and elegant alternative to using &:method with enumerables." s.description = "Symbol#to_proc's hot cousin. Simple and elegant alternative to using &:method with enumerables." s.author = "Martin Aumont" s.email = 'mynyml@gmail.com' s.homepage = '' s.has_rdoc = true s.require_path = "lib" s.files = Dir['**/*'] end Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec end desc "Remove package products" task :clean => :clobber_package desc "Update the gemspec for GitHub's gem server" task :gemspec do Pathname("#{spec.name}.gemspec").open('w') {|f| f << YAML.dump(spec) } end desc "Install gem" task :install => [:clobber, :package] do sh "#{SUDO} #{gem} install pkg/#{spec.full_name}.gem" end desc "Uninstall gem" task :uninstall => :clean do sh "#{SUDO} #{gem} uninstall -v #{spec.version} -x #{spec.name}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mynyml-every-0.6 | Rakefile |