Skip to content

Commit

Permalink
Updated Rakefile and incremented version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
genki committed Jan 2, 2009
1 parent 7bb3b16 commit 9d4cf72
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
*/.DS_Store
*/.DS_Store
pkg
49 changes: 19 additions & 30 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,61 +1,50 @@
require 'rubygems'
require 'rake/gempackagetask'
require 'rubygems/specification'
require 'date'
require "spec/rake/spectask"

PLUGIN = "merb_babel"
NAME = "merb_babel"
GEM_VERSION = "0.1.0"
require 'merb-core'
require 'merb-core/tasks/merb'

GEM_NAME = "merb_babel"
GEM_VERSION = "0.1.0.1"
AUTHOR = "Matt Aimonetti"
EMAIL = "mattaimonetti@gmail.com"
HOMEPAGE = "http://github.com/mattetti/merb_babel/"
SUMMARY = "Merb plugin that provides simple localization/internationalisation"

spec = Gem::Specification.new do |s|
s.name = NAME
s.rubyforge_project = 'merb'
s.name = GEM_NAME
s.version = GEM_VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
s.extra_rdoc_files = ["README.markdown", "LICENSE", 'TODO']
s.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPAGE
s.add_dependency('merb-core', '~> 1.0.0')
s.add_dependency('merb', '>= 1.0.7.1')
s.require_path = 'lib'
s.autorequire = PLUGIN
s.files = %w(LICENSE README.markdown Rakefile TODO) + Dir.glob("{lib,spec}/**/*")
end

Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end

desc "install the plugin locally"
task :install => [:package] do
sh %{sudo gem install pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
desc "install the plugin as a gem"
task :install do
Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
end

desc "create a gemspec file"
task :make_spec do
File.open("#{GEM}.gemspec", "w") do |file|
file.puts spec.to_ruby
end
desc "Uninstall the gem"
task :uninstall do
Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
end

namespace :jruby do

desc "Run :package and install the resulting .gem with jruby"
task :install => :package do
sh %{#{SUDO} jruby -S gem install pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
desc "Create a gemspec file"
task :gemspec do
File.open("#{GEM_NAME}.gemspec", "w") do |file|
file.puts spec.to_ruby
end

end

desc "Run the specs"
Spec::Rake::SpecTask.new("specs") do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir["spec/**/*_spec.rb"].sort
end
33 changes: 33 additions & 0 deletions merb_babel.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{merb_babel}
s.version = "0.1.0.1"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Matt Aimonetti"]
s.date = %q{2009-01-02}
s.description = %q{Merb plugin that provides simple localization/internationalisation}
s.email = %q{mattaimonetti@gmail.com}
s.extra_rdoc_files = ["README.markdown", "LICENSE", "TODO"]
s.files = ["LICENSE", "README.markdown", "Rakefile", "TODO", "lib/merb_babel", "lib/merb_babel/core_ext.rb", "lib/merb_babel/m_i18n.rb", "lib/merb_babel/m_l10n.rb", "lib/merb_babel/m_locale.rb", "lib/merb_babel/merbtasks.rb", "lib/merb_babel.rb", "spec/lang", "spec/lang/en-UK.yml", "spec/lang/en-US.yml", "spec/lang/en.yml", "spec/m_i18n_spec.rb", "spec/m_l10n_spec.rb", "spec/merb_babel_spec.rb", "spec/other_lang_dir", "spec/other_lang_dir/fr.yml", "spec/spec_helper.rb"]
s.has_rdoc = true
s.homepage = %q{http://github.com/mattetti/merb_babel/}
s.require_paths = ["lib"]
s.rubyforge_project = %q{merb}
s.rubygems_version = %q{1.3.1}
s.summary = %q{Merb plugin that provides simple localization/internationalisation}

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 2

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<merb>, [">= 1.0.7.1"])
else
s.add_dependency(%q<merb>, [">= 1.0.7.1"])
end
else
s.add_dependency(%q<merb>, [">= 1.0.7.1"])
end
end

0 comments on commit 9d4cf72

Please sign in to comment.