Sha256: e7cd1ed9df83cb988787e76cf422dbed0008da3779d29d632a1a23fd6358929f

Contents?: true

Size: 1.85 KB

Versions: 1

Compression:

Stored size: 1.85 KB

Contents

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "humanize"
    gem.summary = %Q{Generates long winded string versions of numbers}
    gem.description = %Q{Generates long winded string versions of numbers}
    gem.email = "radarlistener@gmail.com"
    gem.homepage = "http://github.com/radar/"
    gem.authors = ["Ryan Bigg"]
    gem.add_development_dependency "rspec"
    # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end


begin
  require 'spec'
rescue LoadError
  require 'rubygems'
  require 'spec'
end

require 'rake/rdoctask'
require 'spec/rake/spectask'
desc 'Default: run unit tests.'
task :default => :test

desc "Run the specs under spec"
Spec::Rake::SpecTask.new do |t|
  t.spec_files = FileList['spec/**/*_spec.rb']
  t.libs = %w(lib spec)
  t.spec_opts << "-c"
  t.ruby_opts << "-rubygems"
end

desc 'Generate documentation for the humanize plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'ByStar'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

task :bump => ["version:bump", :gemspec]

namespace :version do
  task :read do
    unless defined? GEM_VERSION
      GEM_VERSION = File.read("VERSION")
    end
  end
  
  task :bump => :read do
    if ENV['VERSION']
      GEM_VERSION.replace ENV['VERSION']
    else
      GEM_VERSION.sub!(/\d+$/) { |num| num.to_i + 1 }
    end
    
    File.open("VERSION", 'w') { |v| v.write GEM_VERSION }
  end
end

task :release => :bump do
  system %(git add VERSION *.gemspec && git commit -m "release v#{GEM_VERSION}")
  system %(git tag -am "release v#{GEM_VERSION}" v#{GEM_VERSION})
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
humanize-0.0.1 Rakefile