Permalink
Browse files

Removed jeweler dependency and rely on dynamic gemspecs

  • Loading branch information...
1 parent aac533c commit 1a3c7760145e75771dd5f3acbcb5ce953bfc2006 @nesquena nesquena committed Jun 2, 2010
View
@@ -29,7 +29,7 @@ def rake_command(command)
sh "#{Gem.ruby} -S rake #{command}", :verbose => true
end
-%w(install gemspec build).each do |task_name|
+%w(install gemspec package).each do |task_name|
desc "Run #{task_name} for all projects"
task task_name do
GEM_PATHS.each do |dir|
@@ -63,34 +63,6 @@ task :commit, [:message] do |t, args|
system("git commit -a -m \"#{args.message}\"")
end
-desc "Generate documentation for the Padrino framework"
-Rake::RDocTask.new do |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
- rdoc.title = "Padrino Framework Documentation"
- rdoc.main = 'padrino-core/README.rdoc'
- rdoc.rdoc_files.include('padrino-core/lib/{*.rb,padrino-core}/*.rb')
- rdoc.rdoc_files.include('padrino-core/lib/padrino-core/application/**/*.rb')
- rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/cli.rb')
- rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/support_lite.rb')
- rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/server.rb')
- rdoc.rdoc_files.include('padrino-core/README.rdoc')
- rdoc.rdoc_files.include('padrino-admin/lib/**/*.rb')
- rdoc.rdoc_files.exclude('padrino-admin/lib/padrino-admin/generators')
- rdoc.rdoc_files.include('padrino-admin/README.rdoc')
- rdoc.rdoc_files.include('padrino-helpers/lib/**/*.rb')
- rdoc.rdoc_files.include('padrino-helpers/README.rdoc')
- rdoc.rdoc_files.include('padrino-mailer/lib/**/*.rb')
- rdoc.rdoc_files.include('padrino-mailer/README.rdoc')
-end
-
-desc "Publish doc on padrino.github.com"
-task :pdoc => :rdoc do
- puts "Publishing doc on padrinorb.com ..."
- Rake::SshDirPublisher.new("root@lipsiasoft.biz", "/mnt/www/apps/padrino/public/api", "doc").upload
- FileUtils.rm_rf "doc"
-end
-
desc "Bumps the version number based on given version"
task :bump, [:version] do |t, args|
raise "Please specify version=x.x.x !" unless args.version
@@ -102,18 +74,18 @@ task :bump, [:version] do |t, args|
Rake::Task['commit'].invoke("Bumped version to #{args.version.to_s}")
end
+desc "Executes a fresh install removing all padrino version and then reinstall all gems"
+task :fresh => [:uninstall, :install, :clean]
+
desc "Release all padrino gems"
task :publish do
- puts "Pushing to Gemcutter..."
+ puts "Pushing to rubygems..."
GEM_PATHS.each do |dir|
- Dir.chdir(dir) { rake_command("gemcutter:release") }
+ Dir.chdir(dir) { rake_command("release") }
end
rake_command("clean")
end
-desc "Run tests for all padrino stack gems"
-task :default => :test
-
desc "Run tests for all padrino stack gems"
task :test do
# Omit the padrino metagem since no tests there
@@ -123,5 +95,34 @@ task :test do
end
end
-desc "Execute a fresh install removing all padrino version and then reinstall all gems"
-task :fresh => [:uninstall, :install, :clean]
+desc "Run tests for all padrino stack gems"
+task :default => :test
+
+desc "Generate documentation for the Padrino framework"
+Rake::RDocTask.new do |rdoc|
+ rdoc.rdoc_dir = 'doc'
+ rdoc.options << '--fmt' << 'shtml' # explictly set shtml generator
+ rdoc.title = "Padrino Framework Documentation"
+ rdoc.main = 'padrino-core/README.rdoc'
+ rdoc.rdoc_files.include('padrino-core/lib/{*.rb,padrino-core}/*.rb')
+ rdoc.rdoc_files.include('padrino-core/lib/padrino-core/application/**/*.rb')
+ rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/cli.rb')
+ rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/support_lite.rb')
+ rdoc.rdoc_files.exclude('padrino-core/lib/padrino-core/server.rb')
+ rdoc.rdoc_files.include('padrino-core/README.rdoc')
+ rdoc.rdoc_files.include('padrino-admin/lib/**/*.rb')
+ rdoc.rdoc_files.exclude('padrino-admin/lib/padrino-admin/generators')
+ rdoc.rdoc_files.include('padrino-admin/README.rdoc')
+ rdoc.rdoc_files.include('padrino-helpers/lib/**/*.rb')
+ rdoc.rdoc_files.include('padrino-helpers/README.rdoc')
+ rdoc.rdoc_files.include('padrino-mailer/lib/**/*.rb')
+ rdoc.rdoc_files.include('padrino-mailer/README.rdoc')
+end
+
+
+desc "Publish doc on padrino.github.com"
+task :pdoc => :rdoc do
+ puts "Publishing doc on padrinorb.com ..."
+ Rake::SshDirPublisher.new("root@lipsiasoft.biz", "/mnt/www/apps/padrino/public/api", "doc").upload
+ FileUtils.rm_rf "doc"
+end
View
@@ -1,54 +1,51 @@
+# coding:utf-8
+GEM_NAME = "padrino-admin"
+
require 'rubygems'
+require 'rubygems/specification'
require 'rake'
+
require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "padrino-admin"
- gem.summary = "Admin Dashboard for Padrino"
- gem.description = "Admin View for Padrino applications"
- gem.email = "padrinorb@gmail.com"
- gem.homepage = "http://github.com/padrino/padrino-framework/tree/master/padrino-admin"
- gem.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
- gem.rubyforge_project = 'padrino-admin'
- gem.version = Padrino.version
- gem.add_runtime_dependency "padrino-core", "= #{Padrino.version}"
- gem.add_runtime_dependency "padrino-gen", "= #{Padrino.version}"
- gem.add_runtime_dependency "padrino-helpers", "= #{Padrino.version}"
- gem.add_development_dependency "haml", ">= 2.2.1"
- gem.add_development_dependency "shoulda", ">= 0"
- gem.add_development_dependency "mocha", ">= 0.9.7"
- gem.add_development_dependency "rack-test", ">= 0.5.0"
- gem.add_development_dependency "webrat", ">= 0.5.1"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+def gemspec
+ @gemspec ||= begin
+ file = File.expand_path("../#{GEM_NAME}.gemspec", __FILE__)
+ eval(File.read(file), binding, file)
end
- Jeweler::GemcutterTasks.new
- Jeweler::RubyforgeTasks.new { |r| r.doc_task = :none }
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
-
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
- require 'rcov/rcovtask'
- Rcov::RcovTask.new do |rcov|
- rcov.libs << 'test'
- rcov.pattern = 'test/**/test_*.rb'
- rcov.verbose = true
- rcov.rcov_opts << ['--exclude /Gems/1.8/gems/,padrino-core,padrino-cache,padrino-gen,padrino-helpers,padrino-mailer']
- end
+ require 'rake/gempackagetask'
rescue LoadError
- task :rcov do
- abort "RCov is not available. In order to run rcov, you must: sudo gem install relevance-rcov"
+ task(:gem) { $stderr.puts '`gem install rake` to package gems' }
+else
+ Rake::GemPackageTask.new(gemspec) do |pkg|
+ pkg.gem_spec = gemspec
end
+ task :gem => :gemspec
+end
+
+desc "install the gem locally"
+task :install => :package do
+ sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
+end
+
+desc "validate the gemspec"
+task :gemspec do
+ gemspec.validate
+end
+
+desc "Release the gem"
+task :release => :package do
+ system "gem push pkg/#{GEM_NAME}-#{Padrino.version}.gem"
end
+task :package => :gemspec
task :default => :test
@@ -1,141 +1,28 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
+#
+require File.expand_path("../../padrino-core/lib/padrino-core/version.rb", __FILE__)
Gem::Specification.new do |s|
s.name = %q{padrino-admin}
- s.version = "0.9.10"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.rubyforge_project = %q{padrino-admin}
s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
- s.date = %q{2010-06-01}
- s.description = %q{Admin View for Padrino applications}
s.email = %q{padrinorb@gmail.com}
- s.extra_rdoc_files = [
- "README.rdoc"
- ]
- s.files = [
- ".document",
- ".gitignore",
- "LICENSE",
- "README.rdoc",
- "Rakefile",
- "lib/padrino-admin.rb",
- "lib/padrino-admin/access_control.rb",
- "lib/padrino-admin/generators/actions.rb",
- "lib/padrino-admin/generators/admin_app.rb",
- "lib/padrino-admin/generators/admin_page.rb",
- "lib/padrino-admin/generators/orm.rb",
- "lib/padrino-admin/generators/templates/account/activerecord.rb.tt",
- "lib/padrino-admin/generators/templates/account/couchrest.rb.tt",
- "lib/padrino-admin/generators/templates/account/datamapper.rb.tt",
- "lib/padrino-admin/generators/templates/account/mongoid.rb.tt",
- "lib/padrino-admin/generators/templates/account/mongomapper.rb.tt",
- "lib/padrino-admin/generators/templates/account/seeds.rb.tt",
- "lib/padrino-admin/generators/templates/account/sequel.rb.tt",
- "lib/padrino-admin/generators/templates/app/app.rb",
- "lib/padrino-admin/generators/templates/app/controllers/base.rb",
- "lib/padrino-admin/generators/templates/app/controllers/sessions.rb",
- "lib/padrino-admin/generators/templates/assets/stylesheets/base.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/amro/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec-green/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/blue/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/default/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/djime-cerulean/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/kathleene/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/olive/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/orange/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/reidb-greenish/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/ruby/style.css",
- "lib/padrino-admin/generators/templates/assets/stylesheets/themes/warehouse/style.css",
- "lib/padrino-admin/generators/templates/erb/app/base/_sidebar.erb.tt",
- "lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt",
- "lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt",
- "lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt",
- "lib/padrino-admin/generators/templates/erb/page/_form.erb.tt",
- "lib/padrino-admin/generators/templates/erb/page/edit.erb.tt",
- "lib/padrino-admin/generators/templates/erb/page/index.erb.tt",
- "lib/padrino-admin/generators/templates/erb/page/new.erb.tt",
- "lib/padrino-admin/generators/templates/haml/app/base/_sidebar.haml.tt",
- "lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt",
- "lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt",
- "lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt",
- "lib/padrino-admin/generators/templates/haml/page/_form.haml.tt",
- "lib/padrino-admin/generators/templates/haml/page/edit.haml.tt",
- "lib/padrino-admin/generators/templates/haml/page/index.haml.tt",
- "lib/padrino-admin/generators/templates/haml/page/new.haml.tt",
- "lib/padrino-admin/generators/templates/page/controller.rb.tt",
- "lib/padrino-admin/helpers/authentication_helpers.rb",
- "lib/padrino-admin/helpers/view_helpers.rb",
- "lib/padrino-admin/locale/admin/da.yml",
- "lib/padrino-admin/locale/admin/de.yml",
- "lib/padrino-admin/locale/admin/en.yml",
- "lib/padrino-admin/locale/admin/es.yml",
- "lib/padrino-admin/locale/admin/fr.yml",
- "lib/padrino-admin/locale/admin/it.yml",
- "lib/padrino-admin/locale/admin/pt_br.yml",
- "lib/padrino-admin/locale/admin/ru.yml",
- "lib/padrino-admin/locale/admin/tr.yml",
- "lib/padrino-admin/locale/admin/uk.yml",
- "lib/padrino-admin/locale/orm/da.yml",
- "lib/padrino-admin/locale/orm/de.yml",
- "lib/padrino-admin/locale/orm/en.yml",
- "lib/padrino-admin/locale/orm/es.yml",
- "lib/padrino-admin/locale/orm/fr.yml",
- "lib/padrino-admin/locale/orm/it.yml",
- "lib/padrino-admin/locale/orm/pt_br.yml",
- "lib/padrino-admin/locale/orm/ru.yml",
- "lib/padrino-admin/locale/orm/tr.yml",
- "lib/padrino-admin/locale/orm/uk.yml",
- "lib/padrino-admin/utils/crypt.rb",
- "padrino-admin.gemspec",
- "test/fixtures/data_mapper.rb",
- "test/generators/test_admin_app_generator.rb",
- "test/generators/test_admin_page_generator.rb",
- "test/helper.rb",
- "test/test_admin_application.rb"
- ]
+ s.summary = %q{Admin Dashboard for Padrino}
s.homepage = %q{http://github.com/padrino/padrino-framework/tree/master/padrino-admin}
+ s.description = %q{Admin View for Padrino applications}
+ s.required_rubygems_version = ">= 1.3.6"
+ s.version = Padrino.version
+ s.date = Time.now.strftime("%Y-%m-%d")
+ s.extra_rdoc_files = Dir["*.rdoc"]
+ s.files = %w(.document .gitignore LICENSE README.rdoc Rakefile padrino-admin.gemspec) + Dir.glob("{bin,lib,test}/**/*")
s.rdoc_options = ["--charset=UTF-8"]
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{padrino-admin}
- s.rubygems_version = %q{1.3.7}
- s.summary = %q{Admin Dashboard for Padrino}
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<padrino-core>, ["= 0.9.10"])
- s.add_runtime_dependency(%q<padrino-gen>, ["= 0.9.10"])
- s.add_runtime_dependency(%q<padrino-helpers>, ["= 0.9.10"])
- s.add_development_dependency(%q<haml>, [">= 2.2.1"])
- s.add_development_dependency(%q<shoulda>, [">= 0"])
- s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
- s.add_development_dependency(%q<rack-test>, [">= 0.5.0"])
- s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
- else
- s.add_dependency(%q<padrino-core>, ["= 0.9.10"])
- s.add_dependency(%q<padrino-gen>, ["= 0.9.10"])
- s.add_dependency(%q<padrino-helpers>, ["= 0.9.10"])
- s.add_dependency(%q<haml>, [">= 2.2.1"])
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0.9.7"])
- s.add_dependency(%q<rack-test>, [">= 0.5.0"])
- s.add_dependency(%q<webrat>, [">= 0.5.1"])
- end
- else
- s.add_dependency(%q<padrino-core>, ["= 0.9.10"])
- s.add_dependency(%q<padrino-gen>, ["= 0.9.10"])
- s.add_dependency(%q<padrino-helpers>, ["= 0.9.10"])
- s.add_dependency(%q<haml>, [">= 2.2.1"])
- s.add_dependency(%q<shoulda>, [">= 0"])
- s.add_dependency(%q<mocha>, [">= 0.9.7"])
- s.add_dependency(%q<rack-test>, [">= 0.5.0"])
- s.add_dependency(%q<webrat>, [">= 0.5.1"])
- end
+ s.require_path = 'lib'
+ s.add_runtime_dependency(%q<padrino-core>, ["= #{Padrino.version}"])
+ s.add_runtime_dependency(%q<padrino-gen>, ["= #{Padrino.version}"])
+ s.add_runtime_dependency(%q<padrino-helpers>, ["= #{Padrino.version}"])
+ s.add_development_dependency(%q<haml>, [">= 2.2.1"])
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
+ s.add_development_dependency(%q<mocha>, [">= 0.9.7"])
+ s.add_development_dependency(%q<rack-test>, [">= 0.5.0"])
+ s.add_development_dependency(%q<webrat>, [">= 0.5.1"])
end
-
Oops, something went wrong.

0 comments on commit 1a3c776

Please sign in to comment.