Skip to content
This repository
Browse code

Align -plugins Rakefiles with those in -core and -more.

  • Loading branch information...
commit 0652b5e085cba961f4fe3d8a0083d389348bb39a 1 parent afa4528
Michael Klishin michaelklishin authored
63 merb_activerecord/Rakefile
... ... @@ -1,45 +1,64 @@
1 1 require 'rubygems'
2 2 require 'rake/gempackagetask'
  3 +require "extlib"
3 4 require 'merb-core/tasks/merb_rake_helper'
  5 +require "spec/rake/spectask"
4 6
5   -NAME = "merb_activerecord"
6   -GEM_VERSION = "0.9.4"
7   -AUTHOR = "Duane Johnson"
8   -EMAIL = "canadaduane@gmail.com"
9   -HOMEPAGE = "http://merbivore.com/"
10   -SUMMARY = "Merb plugin that provides ActiveRecord support for Merb"
  7 +##############################################################################
  8 +# Package && release
  9 +##############################################################################
  10 +RUBY_FORGE_PROJECT = "merb"
  11 +PROJECT_URL = "http://merbivore.com"
  12 +PROJECT_SUMMARY = "Merb plugin that provides ActiveRecord support for Merb"
  13 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  14 +
  15 +GEM_AUTHOR = "Duane Johnson"
  16 +GEM_EMAIL = "canadaduane@gmail.com"
  17 +
  18 +GEM_NAME = "merb_activerecord"
  19 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  20 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  21 +
  22 +RELEASE_NAME = "REL #{GEM_VERSION}"
  23 +
  24 +require "extlib/tasks/release"
11 25
12 26 spec = Gem::Specification.new do |s|
13   - s.rubyforge_project = 'merb'
14   - s.name = NAME
  27 + s.rubyforge_project = RUBY_FORGE_PROJECT
  28 + s.name = GEM_NAME
15 29 s.version = GEM_VERSION
16 30 s.platform = Gem::Platform::RUBY
17 31 s.has_rdoc = true
18 32 s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
19   - s.summary = SUMMARY
20   - s.description = s.summary
21   - s.author = AUTHOR
22   - s.email = EMAIL
23   - s.homepage = HOMEPAGE
24   - s.add_dependency("merb-core", ">= 0.9.4")
25   - s.require_path = "lib"
26   - s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,activerecord_generators}/**/*")
27   -end
  33 + s.summary = PROJECT_SUMMARY
  34 + s.description = PROJECT_DESCRIPTION
  35 + s.author = GEM_AUTHOR
  36 + s.email = GEM_EMAIL
  37 + s.homepage = PROJECT_URL
  38 + s.add_dependency('merb-core', '>= 0.9.4')
  39 + s.require_path = 'lib'
  40 + s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,activerecord_generators}/**/*") end
28 41
29 42 Rake::GemPackageTask.new(spec) do |pkg|
30 43 pkg.gem_spec = spec
31 44 end
32 45
33   -desc "Install merb_activerecord"
34   -task :install => :package do
35   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  46 +desc "Install the gem"
  47 +task :install => [:package] do
  48 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
36 49 end
37 50
38 51 namespace :jruby do
39 52
40 53 desc "Run :package and install the resulting .gem with jruby"
41 54 task :install => :package do
42   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  55 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
43 56 end
44 57
45   -end
  58 +end
  59 +
  60 +desc "Run all specs"
  61 +Spec::Rake::SpecTask.new("specs") do |t|
  62 + t.spec_opts = ["--format", "specdoc", "--colour"]
  63 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
  64 +end
89 merb_helpers/Rakefile
... ... @@ -1,29 +1,42 @@
1 1 require 'rubygems'
2 2 require 'rake/gempackagetask'
3   -require 'rake/rdoctask'
4   -require 'spec/rake/spectask'
  3 +require "rake/rdoctask"
  4 +require "extlib"
5 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
6 7
7   -NAME = "merb_helpers"
8   -GEM_VERSION = "0.9.4"
9   -AUTHOR = "Yehuda Katz"
10   -EMAIL = "wycats@gmail.com"
11   -HOMEPAGE = "http://merbivore.com/"
12   -SUMMARY = "Helper support for merb (similar to the Rails form helpers)"
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Helper support for merb (similar to the Rails form helpers)"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Yehuda Katz"
  17 +GEM_EMAIL = "ykatz@engineyard.com"
  18 +
  19 +GEM_NAME = "merb_helpers"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
13 26
14 27 spec = Gem::Specification.new do |s|
15   - s.rubyforge_project = 'merb'
16   - s.name = NAME
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
17 30 s.version = GEM_VERSION
18 31 s.platform = Gem::Platform::RUBY
19 32 s.has_rdoc = true
20 33 s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
21   - s.summary = SUMMARY
22   - s.description = s.summary
23   - s.author = AUTHOR
24   - s.email = EMAIL
25   - s.homepage = HOMEPAGE
26   - s.add_dependency("merb-core", ">=0.9.4")
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
  39 + s.add_dependency('merb-core', '>= 0.9.4')
27 40 s.require_path = 'lib'
28 41 s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
29 42 end
@@ -32,24 +45,28 @@ Rake::GemPackageTask.new(spec) do |pkg|
32 45 pkg.gem_spec = spec
33 46 end
34 47
35   -desc "Run :package and install resulting .gem"
36   -task :install => [:spec, :package] do
37   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  48 +##############################################################################
  49 +# Installation
  50 +##############################################################################
  51 +desc "Install the gem"
  52 +task :install => [:package] do
  53 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
38 54 end
39 55
40   -Rake::RDocTask.new do |rdoc|
41   - files = ['README', 'LICENSE',
42   - 'lib/**/*.rb']
43   - rdoc.rdoc_files.add(files)
44   - rdoc.main = 'README'
45   - rdoc.title = 'Merb Helper Docs'
46   - rdoc.rdoc_dir = 'doc/rdoc'
47   - rdoc.options << '--line-numbers' << '--inline-source'
  56 +namespace :jruby do
  57 + desc "Run :package and install the resulting .gem with jruby"
  58 + task :install => :package do
  59 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  60 + end
48 61 end
49 62
50   -Spec::Rake::SpecTask.new do |t|
51   - t.spec_opts = ["--format", "specdoc", "--colour"]
52   - t.spec_files = Dir['spec/**/*_spec.rb'].sort
  63 +##############################################################################
  64 +# Specs
  65 +##############################################################################
  66 +desc "Run all specs"
  67 +Spec::Rake::SpecTask.new("specs") do |t|
  68 + t.spec_opts = ["--format", "specdoc", "--colour"]
  69 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
53 70 end
54 71
55 72 desc "Run all specs and generate an rcov report"
@@ -61,3 +78,15 @@ Spec::Rake::SpecTask.new('rcov') do |t|
61 78 t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
62 79 end
63 80
  81 +##############################################################################
  82 +# Documentation
  83 +##############################################################################
  84 +Rake::RDocTask.new do |rdoc|
  85 + files = ['README', 'LICENSE',
  86 + 'lib/**/*.rb']
  87 + rdoc.rdoc_files.add(files)
  88 + rdoc.main = 'README'
  89 + rdoc.title = 'Merb Helper Docs'
  90 + rdoc.rdoc_dir = 'doc/rdoc'
  91 + rdoc.options << '--line-numbers' << '--inline-source'
  92 +end
79 merb_laszlo/Rakefile
... ... @@ -1,42 +1,51 @@
1 1 require 'rubygems'
2   -require 'rake/gempackagetask'
3 2 require 'rubygems/specification'
4 3 require 'date'
  4 +require 'rake/gempackagetask'
  5 +require "extlib"
5 6 require 'merb-core/tasks/merb_rake_helper'
  7 +require "spec/rake/spectask"
  8 +
  9 +##############################################################################
  10 +# Package && release
  11 +##############################################################################
  12 +RUBY_FORGE_PROJECT = "merb"
  13 +PROJECT_URL = "http://merbivore.com"
  14 +PROJECT_SUMMARY = "Merb plugin that provides support for Laszlo."
  15 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  16 +
  17 +GEM_AUTHOR = "Yehuda Katz"
  18 +GEM_EMAIL = "ykatz@engineyard.com"
  19 +
  20 +GEM_NAME = "merb_laszlo"
  21 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  22 +GEM_VERSION = "0.5.0" + PKG_BUILD
6 23
7   -NAME = "merb-laszlo"
8   -GEM_VERSION = "0.5.0"
9   -AUTHOR = "Yehuda Katz"
10   -EMAIL = "wycats@gmail.com"
11   -HOMEPAGE = "http://merbivore.com/"
12   -SUMMARY = "Merb plugin that provides support for Laszlo"
  24 +RELEASE_NAME = "REL #{GEM_VERSION}"
  25 +
  26 +require "extlib/tasks/release"
13 27
14 28 spec = Gem::Specification.new do |s|
15   - s.rubyforge_project = 'merb'
16   - s.name = NAME
  29 + s.rubyforge_project = RUBY_FORGE_PROJECT
  30 + s.name = GEM_NAME
17 31 s.version = GEM_VERSION
18 32 s.platform = Gem::Platform::RUBY
19 33 s.has_rdoc = true
20 34 s.extra_rdoc_files = ["README", "LICENSE"]
21   - s.summary = SUMMARY
22   - s.description = s.summary
23   - s.author = AUTHOR
24   - s.email = EMAIL
25   - s.homepage = HOMEPAGE
  35 + s.summary = PROJECT_SUMMARY
  36 + s.description = PROJECT_DESCRIPTION
  37 + s.author = GEM_AUTHOR
  38 + s.email = GEM_EMAIL
  39 + s.homepage = PROJECT_URL
26 40 s.add_dependency('merb-core', '>= 0.9.4')
27 41 s.require_path = 'lib'
28   - s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,spec}/**/*")
  42 + s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
29 43 end
30 44
31 45 Rake::GemPackageTask.new(spec) do |pkg|
32 46 pkg.gem_spec = spec
33 47 end
34 48
35   -desc "install the plugin locally"
36   -task :install => [:package] do
37   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
38   -end
39   -
40 49 desc "create a gemspec file"
41 50 task :make_spec do
42 51 File.open("#{NAME}.gemspec", "w") do |file|
@@ -44,11 +53,35 @@ task :make_spec do
44 53 end
45 54 end
46 55
47   -namespace :jruby do
  56 +##############################################################################
  57 +# Installation
  58 +##############################################################################
  59 +
  60 +task :install => [:package] do
  61 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
  62 +end
48 63
49   - desc "Run :package and install the resulting .gem with jruby"
  64 +namespace :jruby do
  65 +"Run :package and install the resulting .gem with jruby"
50 66 task :install => :package do
51   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  67 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
52 68 end
  69 +end
  70 +
  71 +##############################################################################
  72 +# Specs
  73 +##############################################################################
  74 +desc "Run all specs"
  75 +Spec::Rake::SpecTask.new("specs") do |t|
  76 + t.spec_opts = ["--format", "specdoc", "--colour"]
  77 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
  78 +end
53 79
  80 +desc "Run all specs and generate an rcov report"
  81 +Spec::Rake::SpecTask.new('rcov') do |t|
  82 + t.spec_files = FileList['spec/**/*_spec.rb']
  83 + t.spec_opts = ["--format", "specdoc", "--colour"]
  84 + t.rcov = true
  85 + t.rcov_dir = 'coverage'
  86 + t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
54 87 end
87 merb_param_protection/Rakefile
... ... @@ -1,62 +1,87 @@
1 1 require 'rubygems'
  2 +require 'rubygems/specification'
2 3 require 'rake/gempackagetask'
3   -require 'spec/rake/spectask'
  4 +require "extlib"
4 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
5 7
6   -NAME = "merb_param_protection"
7   -GEM_VERSION = "0.9.4"
8   -AUTHOR = "Lance Carlson"
9   -EMAIL = "lancecarlson@gmail.com"
10   -HOMEPAGE = "http://merbivore.com/"
11   -SUMMARY = "Merb plugin that provides params_accessible and params_protected class methods"
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Merb plugin that provides params_accessible and params_protected class methods"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Lance Carlson"
  17 +GEM_EMAIL = "lancecarlson@gmail.com"
  18 +
  19 +GEM_NAME = "merb_param_protection"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
12 26
13 27 spec = Gem::Specification.new do |s|
14   - s.rubyforge_project = 'merb'
15   - s.name = NAME
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
16 30 s.version = GEM_VERSION
17 31 s.platform = Gem::Platform::RUBY
18 32 s.has_rdoc = true
19   - s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
20   - s.summary = SUMMARY
21   - s.description = s.summary
22   - s.author = AUTHOR
23   - s.email = EMAIL
24   - s.homepage = HOMEPAGE
  33 + s.extra_rdoc_files = ["README", "LICENSE"]
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
25 39 s.add_dependency('merb-core', '>= 0.9.4')
26 40 s.require_path = 'lib'
27   - s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs}/**/*")
  41 + s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
28 42 end
29 43
30 44 Rake::GemPackageTask.new(spec) do |pkg|
31 45 pkg.gem_spec = spec
32 46 end
33 47
34   -desc "install merb_param_protection"
35   -task :install => [:specs, :package] do
36   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  48 +desc "create a gemspec file"
  49 +task :make_spec do
  50 + File.open("#{NAME}.gemspec", "w") do |file|
  51 + file.puts spec.to_ruby
  52 + end
37 53 end
38 54
39   -namespace :jruby do
  55 +##############################################################################
  56 +# Installation
  57 +##############################################################################
40 58
41   - desc "Run :package and install the resulting .gem with jruby"
  59 +desc "Install the gem"
  60 +task :install => [:package] do
  61 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
  62 +end
  63 +
  64 +namespace :jruby do
  65 +"Run :package and install the resulting .gem with jruby"
42 66 task :install => :package do
43   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  67 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
44 68 end
45   -
46 69 end
47 70
  71 +##############################################################################
  72 +# Specs
  73 +##############################################################################
48 74 desc "Run all specs"
49   -Spec::Rake::SpecTask.new('specs') do |t|
  75 +Spec::Rake::SpecTask.new("specs") do |t|
50 76 t.spec_opts = ["--format", "specdoc", "--colour"]
51   - t.spec_files = Dir['spec/**/*_spec.rb'].sort
  77 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
52 78 end
53 79
54   -desc "RCov"
55   -Spec::Rake::SpecTask.new("rcov") do |t|
56   - t.rcov_opts = ["--exclude", "gems", "--exclude", "spec"]
  80 +desc "Run all specs and generate an rcov report"
  81 +Spec::Rake::SpecTask.new('rcov') do |t|
  82 + t.spec_files = FileList['spec/**/*_spec.rb']
57 83 t.spec_opts = ["--format", "specdoc", "--colour"]
58   - t.rcov_opts = ["--exclude","gems", "--exclude", "spec"]
59   - t.spec_files = Dir["spec/**/*_spec.rb"].sort
60   - t.libs = ["lib", "server/lib" ]
61 84 t.rcov = true
  85 + t.rcov_dir = 'coverage'
  86 + t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
62 87 end
70 merb_screw_unit/Rakefile
... ... @@ -1,29 +1,42 @@
1 1 require 'rubygems'
  2 +require 'rubygems/specification'
2 3 require 'rake/gempackagetask'
3   -require 'spec/rake/spectask'
4   -require 'merb-core/version'
5   -require 'merb-core/test/tasks/spectasks'
  4 +require "extlib"
6 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
7 7
8   -NAME = "merb_screw_unit"
9   -AUTHOR = "Yehuda Katz"
10   -EMAIL = "wycats@gmail.com"
11   -HOMEPAGE = "http://merbivore.com/"
12   -SUMMARY = "Merb Slice that provides support for Screw.Unit testing"
13   -GEM_VERSION = "0.9.4"
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Merb Slice that provides support for Screw.Unit testing"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Yehuda Katz"
  17 +GEM_EMAIL = "ykatz@engineyard.com"
  18 +
  19 +GEM_NAME = "merb_screw_unit"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
14 26
15 27 spec = Gem::Specification.new do |s|
16   - s.rubyforge_project = 'merb'
17   - s.name = NAME
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
18 30 s.version = GEM_VERSION
19 31 s.platform = Gem::Platform::RUBY
20 32 s.has_rdoc = true
21   - s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
22   - s.summary = SUMMARY
23   - s.description = s.summary
24   - s.author = AUTHOR
25   - s.email = EMAIL
26   - s.homepage = HOMEPAGE
  33 + s.extra_rdoc_files = ["README", "LICENSE"]
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
  39 + s.add_dependency('merb-core', '>= 0.9.4')
27 40 s.add_dependency('merb-slices', '>= 0.9.4')
28 41 s.require_path = 'lib'
29 42 s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,spec,app,public,stubs}/**/*")
@@ -33,16 +46,25 @@ Rake::GemPackageTask.new(spec) do |pkg|
33 46 pkg.gem_spec = spec
34 47 end
35 48
36   -desc "Install MerbScrewUnit as a gem"
  49 +desc "create a gemspec file"
  50 +task :make_spec do
  51 + File.open("#{NAME}.gemspec", "w") do |file|
  52 + file.puts spec.to_ruby
  53 + end
  54 +end
  55 +
  56 +##############################################################################
  57 +# Installation
  58 +##############################################################################
  59 +
  60 +desc "Install the gem"
37 61 task :install => [:package] do
38   - sh %{#{sudo} gem install pkg/#{NAME}-#{GEM_VERSION} --no-update-sources}
  62 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
39 63 end
40 64
41 65 namespace :jruby do
42   -
43   - desc "Run :package and install the resulting .gem with jruby"
  66 +"Run :package and install the resulting .gem with jruby"
44 67 task :install => :package do
45   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  68 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
46 69 end
47   -
48   -end
  70 +end
86 merb_sequel/Rakefile
... ... @@ -1,47 +1,79 @@
1   -require "rubygems"
2   -require "rake/gempackagetask"
  1 +require 'rubygems'
  2 +require 'rake/gempackagetask'
  3 +require "rake/rdoctask"
  4 +require "extlib"
3 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
4 7
5   -NAME = "merb_sequel"
6   -GEM_VERSION = "0.9.4"
7   -AUTHOR = "Wayne E. Seguin, Lance Carlson"
8   -EMAIL = "wayneeseguin@gmail.com, lancecarlson@gmail.com"
9   -HOMEPAGE = "http://merbivore.com/"
10   -SUMMARY = "Merb plugin that provides support for Sequel and Sequel::Model"
11   -
12   -specification = Gem::Specification.new do |s|
13   - s.rubyforge_project = 'merb'
14   - s.name = NAME
15   - s.email = EMAIL
16   - s.author = AUTHOR
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Merb plugin that provides support for Sequel and Sequel::Model"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Wayne E. Seguin, Lance Carlson"
  17 +GEM_EMAIL = "wayneeseguin@gmail.com, lancecarlson@gmail.com"
  18 +
  19 +GEM_NAME = "merb_sequel"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
  26 +
  27 +spec = Gem::Specification.new do |s|
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
17 30 s.version = GEM_VERSION
18   - s.summary = SUMMARY
19 31 s.platform = Gem::Platform::RUBY
20 32 s.has_rdoc = true
21   - s.homepage = HOMEPAGE
22   - s.description = SUMMARY
23   - s.require_path = "lib"
24 33 s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
25   -
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
26 39 s.add_dependency("merb-core", ">= 0.9.4")
27 40 s.add_dependency("sequel", ">= 1.4.0")
28 41 s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,sequel_generators}/**/*")
29 42 end
30 43
31   -Rake::GemPackageTask.new(specification) do |package|
32   - package.gem_spec = specification
  44 +Rake::GemPackageTask.new(spec) do |pkg|
  45 + pkg.gem_spec = spec
33 46 end
34 47
35   -desc "Install merb_sequel"
36   -task :install => :package do
37   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  48 +##############################################################################
  49 +# Installation
  50 +##############################################################################
  51 +desc "Install the gem"
  52 +task :install => [:package] do
  53 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
38 54 end
39 55
40 56 namespace :jruby do
41   -
42 57 desc "Run :package and install the resulting .gem with jruby"
43 58 task :install => :package do
44   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  59 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
45 60 end
  61 +end
46 62
47   -end
  63 +##############################################################################
  64 +# Specs
  65 +##############################################################################
  66 +desc "Run all specs"
  67 +Spec::Rake::SpecTask.new("specs") do |t|
  68 + t.spec_opts = ["--format", "specdoc", "--colour"]
  69 + t.spec_files = Dir["spec/**/*_spec.rb"].sort
  70 +end
  71 +
  72 +desc "Run all specs and generate an rcov report"
  73 +Spec::Rake::SpecTask.new('rcov') do |t|
  74 + t.spec_files = FileList['spec/**/*_spec.rb']
  75 + t.spec_opts = ["--format", "specdoc", "--colour"]
  76 + t.rcov = true
  77 + t.rcov_dir = 'coverage'
  78 + t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
  79 +end
55 merb_stories/Rakefile
... ... @@ -1,46 +1,61 @@
1 1 require 'rubygems'
2 2 require 'rake/gempackagetask'
  3 +require "rake/rdoctask"
  4 +require "extlib"
3 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
4 7
5   -NAME = "merb_stories"
6   -GEM_VERSION = "0.9.4"
7   -AUTHOR = "Yehuda Katz"
8   -EMAIL = "ykatz@engineyard.com"
9   -HOMEPAGE = "http://merbivore.com/"
10   -SUMMARY = "Merb plugin that provides RSpec support"
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Merb plugin that provides RSpec stories support"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Yehuda Katz"
  17 +GEM_EMAIL = "ykatz@engineyard.com"
  18 +
  19 +GEM_NAME = "merb_stories"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
11 26
12 27 spec = Gem::Specification.new do |s|
13   - s.rubyforge_project = 'merb'
14   - s.name = NAME
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
15 30 s.version = GEM_VERSION
16 31 s.platform = Gem::Platform::RUBY
17 32 s.has_rdoc = true
18 33 s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
19   - s.summary = SUMMARY
20   - s.description = s.summary
21   - s.author = AUTHOR
22   - s.email = EMAIL
23   - s.homepage = HOMEPAGE
24   - s.add_dependency('merb-core', '>= 0.9.4')
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
25 39 s.add_dependency('rspec', '>= 1.1.3')
26 40 s.require_path = 'lib'
27   - s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,rspec_generators}/**/*")
  41 + s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,specs,rspec_generators}/**/*")
28 42 end
29 43
30 44 Rake::GemPackageTask.new(spec) do |pkg|
31 45 pkg.gem_spec = spec
32 46 end
33 47
34   -desc "Install merb_rspec"
  48 +##############################################################################
  49 +# Installation
  50 +##############################################################################
  51 +desc "Install the gem"
35 52 task :install => [:package] do
36   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  53 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
37 54 end
38 55
39 56 namespace :jruby do
40   -
41 57 desc "Run :package and install the resulting .gem with jruby"
42 58 task :install => :package do
43   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  59 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
44 60 end
45   -
46 61 end
66 merb_test_unit/Rakefile
... ... @@ -1,45 +1,69 @@
1 1 require 'rubygems'
  2 +require 'rubygems/specification'
2 3 require 'rake/gempackagetask'
  4 +require "extlib"
3 5 require 'merb-core/tasks/merb_rake_helper'
  6 +require "spec/rake/spectask"
4 7
5   -NAME = "merb_test_unit"
6   -GEM_VERSION = "0.9.4"
7   -AUTHOR = "Yehuda Katz"
8   -EMAIL = "ykatz@engineyard.com"
9   -HOMEPAGE = "http://merbivore.com/"
10   -SUMMARY = "Merb plugin that provides Test::Unit support"
  8 +##############################################################################
  9 +# Package && release
  10 +##############################################################################
  11 +RUBY_FORGE_PROJECT = "merb"
  12 +PROJECT_URL = "http://merbivore.com"
  13 +PROJECT_SUMMARY = "Merb plugin that provides Test::Unit support"
  14 +PROJECT_DESCRIPTION = PROJECT_SUMMARY
  15 +
  16 +GEM_AUTHOR = "Yehuda Katz"
  17 +GEM_EMAIL = "ykatz@engineyard.com"
  18 +
  19 +GEM_NAME = "merb_test_unit"
  20 +PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
  21 +GEM_VERSION = (Merb::MORE_VERSION rescue "0.9.4") + PKG_BUILD
  22 +
  23 +RELEASE_NAME = "REL #{GEM_VERSION}"
  24 +
  25 +require "extlib/tasks/release"
11 26
12 27 spec = Gem::Specification.new do |s|
13   - s.rubyforge_project = 'merb'
14   - s.name = NAME
  28 + s.rubyforge_project = RUBY_FORGE_PROJECT
  29 + s.name = GEM_NAME
15 30 s.version = GEM_VERSION
16 31 s.platform = Gem::Platform::RUBY
17 32 s.has_rdoc = true
18   - s.extra_rdoc_files = ["README", "LICENSE", 'TODO']
19   - s.summary = SUMMARY
20   - s.description = s.summary
21   - s.author = AUTHOR
22   - s.email = EMAIL
23   - s.homepage = HOMEPAGE
  33 + s.extra_rdoc_files = ["README", "LICENSE"]
  34 + s.summary = PROJECT_SUMMARY
  35 + s.description = PROJECT_DESCRIPTION
  36 + s.author = GEM_AUTHOR
  37 + s.email = GEM_EMAIL
  38 + s.homepage = PROJECT_URL
24 39 s.add_dependency('merb-core', '>= 0.9.4')
25 40 s.require_path = 'lib'
26   - s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,test_unit_generators}/**/*")
  41 + s.files = %w(LICENSE README Rakefile TODO) + Dir.glob("{lib,test_unit_generators}/**/*")
27 42 end
28 43
29 44 Rake::GemPackageTask.new(spec) do |pkg|
30 45 pkg.gem_spec = spec
31 46 end
32 47
33   -desc "Install merb_test_unit"
  48 +desc "create a gemspec file"
  49 +task :make_spec do
  50 + File.open("#{NAME}.gemspec", "w") do |file|
  51 + file.puts spec.to_ruby
  52 + end
  53 +end
  54 +
  55 +##############################################################################
  56 +# Installation
  57 +##############################################################################
  58 +
  59 +desc "Install the gem"
34 60 task :install => [:package] do
35   - sh %{#{sudo} gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri --no-update-sources}
  61 + sh %{#{sudo} gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION} --no-update-sources}
36 62 end
37 63
38 64 namespace :jruby do
39   -
40   - desc "Run :package and install the resulting .gem with jruby"
  65 +"Run :package and install the resulting .gem with jruby"
41 66 task :install => :package do
42   - sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
  67 + sh %{#{sudo} jruby -S gem install #{install_home} pkg/#{GEM_NAME}-#{GEM_VERSION}.gem --no-rdoc --no-ri}
43 68 end
44   -
45 69 end

0 comments on commit 0652b5e

Please sign in to comment.
Something went wrong with that request. Please try again.