Skip to content

Commit

Permalink
Align -plugins Rakefiles with those in -core and -more.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Aug 3, 2008
1 parent afa4528 commit 0652b5e
Show file tree
Hide file tree
Showing 8 changed files with 397 additions and 198 deletions.
63 changes: 41 additions & 22 deletions merb_activerecord/Rakefile
Original file line number Diff line number Diff line change
@@ -1,45 +1,64 @@
require 'rubygems'
require 'rake/gempackagetask'
require "extlib"
require 'merb-core/tasks/merb_rake_helper'
require "spec/rake/spectask"

NAME = "merb_activerecord"
GEM_VERSION = "0.9.4"
AUTHOR = "Duane Johnson"
EMAIL = "[email protected]"
HOMEPAGE = "http://merbivore.com/"
SUMMARY = "Merb plugin that provides ActiveRecord support for Merb"
##############################################################################
# Package && release
##############################################################################
RUBY_FORGE_PROJECT = "merb"
PROJECT_URL = "http://merbivore.com"
PROJECT_SUMMARY = "Merb plugin that provides ActiveRecord support for Merb"
PROJECT_DESCRIPTION = PROJECT_SUMMARY

GEM_AUTHOR = "Duane Johnson"
GEM_EMAIL = "[email protected]"

GEM_NAME = "merb_activerecord"
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD

RELEASE_NAME = "REL #{GEM_VERSION}"

require "extlib/tasks/release"

spec = Gem::Specification.new do |s|
s.rubyforge_project = 'merb'
s.name = NAME
s.rubyforge_project = RUBY_FORGE_PROJECT
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.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPAGE
s.add_dependency("merb-core", ">= 0.9.4")
s.require_path = "lib"
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,activerecord_generators}/**/*")
end
s.summary = PROJECT_SUMMARY
s.description = PROJECT_DESCRIPTION
s.author = GEM_AUTHOR
s.email = GEM_EMAIL
s.homepage = PROJECT_URL
s.add_dependency('merb-core', '>= 0.9.4')
s.require_path = 'lib'
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,activerecord_generators}/**/*") end

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

desc "Install merb_activerecord"
task :install => :package do
sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
desc "Install the gem"
task :install => [:package] do
sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
end

namespace :jruby do

desc "Run :package and install the resulting .gem with jruby"
task :install => :package do
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
end

end
end

desc "Run all specs"
Spec::Rake::SpecTask.new("specs") do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir["spec/**/*_spec.rb"].sort
end
89 changes: 59 additions & 30 deletions merb_helpers/Rakefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'spec/rake/spectask'
require "rake/rdoctask"
require "extlib"
require 'merb-core/tasks/merb_rake_helper'
require "spec/rake/spectask"

NAME = "merb_helpers"
GEM_VERSION = "0.9.4"
AUTHOR = "Yehuda Katz"
EMAIL = "[email protected]"
HOMEPAGE = "http://merbivore.com/"
SUMMARY = "Helper support for merb (similar to the Rails form helpers)"
##############################################################################
# Package && release
##############################################################################
RUBY_FORGE_PROJECT = "merb"
PROJECT_URL = "http://merbivore.com"
PROJECT_SUMMARY = "Helper support for merb (similar to the Rails form helpers)"
PROJECT_DESCRIPTION = PROJECT_SUMMARY

GEM_AUTHOR = "Yehuda Katz"
GEM_EMAIL = "[email protected]"

GEM_NAME = "merb_helpers"
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD

RELEASE_NAME = "REL #{GEM_VERSION}"

require "extlib/tasks/release"

spec = Gem::Specification.new do |s|
s.rubyforge_project = 'merb'
s.name = NAME
s.rubyforge_project = RUBY_FORGE_PROJECT
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.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPAGE
s.add_dependency("merb-core", ">=0.9.4")
s.summary = PROJECT_SUMMARY
s.description = PROJECT_DESCRIPTION
s.author = GEM_AUTHOR
s.email = GEM_EMAIL
s.homepage = PROJECT_URL
s.add_dependency('merb-core', '>= 0.9.4')
s.require_path = 'lib'
s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
end
Expand All @@ -32,24 +45,28 @@ Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end

desc "Run :package and install resulting .gem"
task :install => [:spec, :package] do
sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
##############################################################################
# Installation
##############################################################################
desc "Install the gem"
task :install => [:package] do
sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
end

Rake::RDocTask.new do |rdoc|
files = ['README', 'LICENSE',
'lib/**/*.rb']
rdoc.rdoc_files.add(files)
rdoc.main = 'README'
rdoc.title = 'Merb Helper Docs'
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers' << '--inline-source'
namespace :jruby do
desc "Run :package and install the resulting .gem with jruby"
task :install => :package do
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
end
end

Spec::Rake::SpecTask.new do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir['spec/**/*_spec.rb'].sort
##############################################################################
# Specs
##############################################################################
desc "Run all specs"
Spec::Rake::SpecTask.new("specs") do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir["spec/**/*_spec.rb"].sort
end

desc "Run all specs and generate an rcov report"
Expand All @@ -61,3 +78,15 @@ Spec::Rake::SpecTask.new('rcov') do |t|
t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
end

##############################################################################
# Documentation
##############################################################################
Rake::RDocTask.new do |rdoc|
files = ['README', 'LICENSE',
'lib/**/*.rb']
rdoc.rdoc_files.add(files)
rdoc.main = 'README'
rdoc.title = 'Merb Helper Docs'
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers' << '--inline-source'
end
79 changes: 56 additions & 23 deletions merb_laszlo/Rakefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,87 @@
require 'rubygems'
require 'rake/gempackagetask'
require 'rubygems/specification'
require 'date'
require 'rake/gempackagetask'
require "extlib"
require 'merb-core/tasks/merb_rake_helper'
require "spec/rake/spectask"

##############################################################################
# Package && release
##############################################################################
RUBY_FORGE_PROJECT = "merb"
PROJECT_URL = "http://merbivore.com"
PROJECT_SUMMARY = "Merb plugin that provides support for Laszlo."
PROJECT_DESCRIPTION = PROJECT_SUMMARY

GEM_AUTHOR = "Yehuda Katz"
GEM_EMAIL = "[email protected]"

GEM_NAME = "merb_laszlo"
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
GEM_VERSION = "0.5.0" + PKG_BUILD

NAME = "merb-laszlo"
GEM_VERSION = "0.5.0"
AUTHOR = "Yehuda Katz"
EMAIL = "[email protected]"
HOMEPAGE = "http://merbivore.com/"
SUMMARY = "Merb plugin that provides support for Laszlo"
RELEASE_NAME = "REL #{GEM_VERSION}"

require "extlib/tasks/release"

spec = Gem::Specification.new do |s|
s.rubyforge_project = 'merb'
s.name = NAME
s.rubyforge_project = RUBY_FORGE_PROJECT
s.name = GEM_NAME
s.version = GEM_VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = ["README", "LICENSE"]
s.summary = SUMMARY
s.description = s.summary
s.author = AUTHOR
s.email = EMAIL
s.homepage = HOMEPAGE
s.summary = PROJECT_SUMMARY
s.description = PROJECT_DESCRIPTION
s.author = GEM_AUTHOR
s.email = GEM_EMAIL
s.homepage = PROJECT_URL
s.add_dependency('merb-core', '>= 0.9.4')
s.require_path = 'lib'
s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,spec}/**/*")
s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
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 #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
end

desc "create a gemspec file"
task :make_spec do
File.open("#{NAME}.gemspec", "w") do |file|
file.puts spec.to_ruby
end
end

namespace :jruby do
##############################################################################
# Installation
##############################################################################

task :install => [:package] do
sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
end

desc "Run :package and install the resulting .gem with jruby"
namespace :jruby do
"Run :package and install the resulting .gem with jruby"
task :install => :package do
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
end
end

##############################################################################
# Specs
##############################################################################
desc "Run all specs"
Spec::Rake::SpecTask.new("specs") do |t|
t.spec_opts = ["--format", "specdoc", "--colour"]
t.spec_files = Dir["spec/**/*_spec.rb"].sort
end

desc "Run all specs and generate an rcov report"
Spec::Rake::SpecTask.new('rcov') do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ["--format", "specdoc", "--colour"]
t.rcov = true
t.rcov_dir = 'coverage'
t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
end
Loading

0 comments on commit 0652b5e

Please sign in to comment.