Sha256: 8ad5789bf60770ed46ec6f24aed5013e7bc3da93e6619f3ec757f48609e625dd

Contents?: true

Size: 1.07 KB

Versions: 11

Compression:

Stored size: 1.07 KB

Contents

require 'bundler/gem_tasks'

task :spec do
  sh "rspec spec"
end

task :default do
  sh "RAILS=2.3.14 && (bundle || bundle install) && bundle exec rake spec"
  sh "RAILS=3.0.9 && (bundle || bundle install) && bundle exec rake spec"
  sh "RAILS=3.1.0 && (bundle || bundle install) && bundle exec rake spec"
end

# extracted from https://github.com/grosser/project_template
rule /^version:bump:.*/ do |t|
  sh "git status | grep 'nothing to commit'" # ensure we are not dirty
  index = ['major', 'minor','patch'].index(t.name.split(':').last)
  file = 'lib/gettext_i18n_rails/version.rb'

  version_file = File.read(file)
  old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
  version_parts[index] = version_parts[index].to_i + 1
  version_parts[2] = 0 if index < 2 # remove patch for minor
  version_parts[1] = 0 if index < 1 # remove minor for major
  new_version = version_parts * '.'
  File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }

  sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
gettext_i18n_rails-0.6.1 Rakefile
gettext_i18n_rails-0.5.4 Rakefile
nulogy-gettext_i18n_rails-0.5.3.2 Rakefile
nulogy-gettext_i18n_rails-0.5.3.1 Rakefile
gettext_i18n_rails-0.5.3 Rakefile
nulogy-gettext_i18n_rails-0.5.0.3 Rakefile
gettext_i18n_rails-0.5.2 Rakefile
nulogy-gettext_i18n_rails-0.5.0.2 Rakefile
gettext_i18n_rails-0.5.1 Rakefile
nulogy-gettext_i18n_rails-0.5.0.1 Rakefile
gettext_i18n_rails-0.5.0 Rakefile