Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Bundler instead of Jeweler

  • Loading branch information...
commit e46eb547a24c2b92f6858962bcad79c296ff3db5 1 parent 2b20d69
Kouhei Sutou kou authored
1  .gitignore
View
@@ -1,5 +1,4 @@
/pkg/
-/*.gemspec
/.yardoc/
/doc/po/*.pot
/doc/reference/
1  .yardopts
View
@@ -0,0 +1 @@
+--markup textile
13 Gemfile
View
@@ -16,15 +16,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-gem "rails"
-gem "test-unit"
-gem "test-unit-notify"
-gem "test-unit-capybara"
-gem "test-unit-rr"
+source :rubygems
-group :development do
- gem "rake"
- gem "jeweler"
- gem "yard"
- gem "packnga"
-end
+gemspec
49 Rakefile
View
@@ -16,63 +16,30 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-require 'pathname'
-
require './lib/test/unit/rails/version'
require 'rubygems'
require 'rubygems/package_task'
require 'yard'
-require 'jeweler'
+require 'bundler/gem_helper'
require 'packnga'
-def cleanup_white_space(entry)
- entry.gsub(/(\A\n+|\n+\z)/, '') + "\n"
-end
-
-ENV["VERSION"] ||= Test::Unit::Rails::VERSION
-version = ENV["VERSION"].dup
-spec = nil
-Jeweler::Tasks.new do |_spec|
- spec = _spec
- spec.name = "test-unit-rails"
- spec.version = version
- spec.rubyforge_project = "test-unit"
- spec.homepage = "http://test-unit.rubyforge.org/#test-unit-rails"
- spec.authors = ["Kouhei Sutou"]
- spec.email = ["kou@clear-code.com"]
- entries = File.read("README.textile").split(/^h2\.\s(.*)$/)
- description = cleanup_white_space(entries[entries.index("Description") + 1])
- spec.summary, spec.description, = description.split(/\n\n+/, 3)
- spec.license = "LGPLv2 or later"
- spec.files = FileList["{lib,benchmark,misc}/**/*.rb",
- "bin/*",
- "doc/text/*",
- "README.textile",
- "COPYING",
- "Rakefile",
- "Gemfile"]
- spec.test_files = FileList["test/**/*.rb"]
+class Bundler::GemHelper
+ def version_tag
+ "#{version}"
+ end
end
-Rake::Task["release"].prerequisites.clear
-Jeweler::RubygemsDotOrgTasks.new do
-end
+helper = Bundler::GemHelper.new(base_dir)
+helper.install
+spec = helper.gemspec
Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar_gz = true
end
document_task = Packnga::DocumentTask.new(spec) do |t|
- t.yard do |yard_task|
- yard_task.options += ["--markup", "textile"]
- end
end
Packnga::ReleaseTask.new(spec) do |task|
end
-
-desc "Tag the current revision."
-task :tag do
- sh("git tag -a #{version} -m 'release #{version}!!!'")
-end
53 test-unit-rails.gemspec
View
@@ -0,0 +1,53 @@
+# -*- coding: utf-8; mode: ruby -*-
+#
+# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+require "./lib/test/unit/rails/version"
+
+clean_white_space = lambda do |entry|
+ entry.gsub(/(\A\n+|\n+\z)/, "") + "\n"
+end
+
+ENV["VERSION"] ||= Test::Unit::ActiveSupport::VERSION
+version = ENV["VERSION"].dup
+
+Gem::Specification.new do |spec|
+ spec.name = "test-unit-rails"
+ spec.version = version
+ spec.rubyforge_project = "test-unit"
+ spec.authors = ["Kouhei Sutou"]
+ spec.email = ["kou@clear-code.com"]
+ spec.homepage = "http://test-unit.rubyforge.org/#test-unit-rails"
+ entries = File.read("README.textile").split(/^h2\.\s(.*)$/)
+ description = clean_white_space.call(entries[entries.index("Description") + 1])
+ spec.summary, spec.description, = description.split(/\n\n+/, 3)
+ spec.license = "LGPLv2 or later"
+ spec.files = ["COPYING", "Gemfile", "Rakefile", "README.textile"]
+ spec.files += Dir.glob("lib/**/*.rb")
+ spec.files += Dir.glob("doc/text/**/*.textile")
+ spec.test_files = Dir.glob("test/**/*.rb")
+
+ spec.add_runtime_dependency("rails")
+ spec.add_runtime_dependency("test-unit")
+ spec.add_runtime_dependency("test-unit-notify")
+ spec.add_runtime_dependency("test-unit-capybara")
+ spec.add_runtime_dependency("test-unit-rr")
+ spec.add_development_dependency("bundler")
+ spec.add_development_dependency("rake")
+ spec.add_development_dependency("packnga")
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.