From c4b211c0185478a59ca5b6b94467d61b8121be4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20Barr=C3=A8re?= Date: Mon, 20 Jun 2011 02:10:31 +0200 Subject: [PATCH] Switch to bundler for gem publication and bump to 0.9.5.rc1. --- CHANGELOG | 35 +++++++----- Gemfile | 4 ++ HOW_TO_RELEASE | 21 ++++--- Rakefile | 91 ++----------------------------- adapter_extensions.gemspec | 39 +++++++------ lib/adapter_extensions/version.rb | 8 +-- 6 files changed, 64 insertions(+), 134 deletions(-) create mode 100644 Gemfile diff --git a/CHANGELOG b/CHANGELOG index 630e424..7b48f51 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,26 +1,31 @@ -0.1.0 - March 5, 2007 -* Initial release +0.9.5 - not yet released +* Add in REPLACE to LOAD DATA INFILE command (jayzes/kookster) +* Remove FasterCSV from dependencies (not used apparently) -0.1.1 - March 5, 2007 -* Bug fixes +0.5 - January 14, 2009 +* Updated dependencies for gem to current versions of ActiveRecord, ActiveSupport and Rake. May not be compatible with Rails versions less than 2.x. -0.1.2 - March 5, 2007 -* Bug fixes +0.4 - September 17, 2007 +* Added copy_table method that can copy the structure and data from one table to another. Currently implemented in MySQL (tested), PostgreSQL (tested) and SQL Server adapters (untested). +* Added support for SELECT..INTO for PostgreSQL. -0.2.0 - March 6, 2007 -* SQL Server adapter included (Seth Ladd) +0.3.1 - May 4, 2007 +* Added support for modifying SELECT statements to add an INSERT INTO. 0.3.0 - March 8, 2007 * PostgreSQL adapter included * Added tests for bulk loading * bulk_load method now handles table missing and file missing as error cases -0.3.1 - May 4, 2007 -* Added support for modifying SELECT statements to add an INSERT INTO. +0.2.0 - March 6, 2007 +* SQL Server adapter included (Seth Ladd) -0.4 - September 17, 2007 -* Added copy_table method that can copy the structure and data from one table to another. Currently implemented in MySQL (tested), PostgreSQL (tested) and SQL Server adapters (untested). -* Added support for SELECT..INTO for PostgreSQL. +0.1.2 - March 5, 2007 +* Bug fixes + +0.1.1 - March 5, 2007 +* Bug fixes + +0.1.0 - March 5, 2007 +* Initial release -0.5 - -* Updated dependencies for gem to current versions of ActiveRecord, ActiveSupport and Rake. May not be compatible with Rails versions less than 2.x. \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b811aa4 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "http://rubygems.org" + +# Specify your gem's dependencies in ..gemspec +gemspec diff --git a/HOW_TO_RELEASE b/HOW_TO_RELEASE index 9e2b676..f873077 100644 --- a/HOW_TO_RELEASE +++ b/HOW_TO_RELEASE @@ -1,8 +1,13 @@ -cd trunk -rake release -cd .. -svn cp trunk tags/release-x.y.z -cd tags/release-x.y.z -svn commit -cd ../../trunk -rake pdoc \ No newline at end of file +* update lib/adapter_extensions/version +* push your changes +* then use bundler to build + git tag + push to rubygems + + rake release + +* if you remain stuck at "Pushed git commits and tags", the task may silently wait for your password. Check this if it's the case: + + https://github.com/carlhuda/bundler/issues/980 + +* you can list changes using github: + + https://github.com/activewarehouse/adapter_extensions/compare/0.9.5.rc1...master \ No newline at end of file diff --git a/Rakefile b/Rakefile index 09e444a..899ee99 100644 --- a/Rakefile +++ b/Rakefile @@ -1,23 +1,8 @@ +require 'bundler' require 'rake' require 'rake/testtask' -require 'rake/rdoctask' -require 'rake/packagetask' -require 'rake/gempackagetask' -require 'rake/contrib/rubyforgepublisher' -require 'date' - -require File.join(File.dirname(__FILE__), 'lib/adapter_extensions', 'version') - -PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' -PKG_NAME = 'adapter_extensions' -PKG_VERSION = AdapterExtensions::VERSION::STRING + PKG_BUILD -PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" -PKG_DESTINATION = ENV["PKG_DESTINATION"] || "../#{PKG_NAME}" - -RELEASE_NAME = "REL #{PKG_VERSION}" - -RUBY_FORGE_PROJECT = "activewarehouse" -RUBY_FORGE_USER = "aeden" +require 'rdoc' +require 'rdoc/task' desc 'Default: run unit tests.' task :default => :test @@ -50,55 +35,6 @@ Rake::RDocTask.new(:rdoc) do |rdoc| rdoc.rdoc_files.include('lib/**/*.rb') end -PKG_FILES = FileList[ - 'CHANGELOG', - 'README', - 'LICENSE', - 'Rakefile', - 'doc/**/*', - 'lib/**/*', -] - [ 'test' ] - -spec = Gem::Specification.new do |s| - s.name = 'adapter_extensions' - s.version = PKG_VERSION - s.summary = "Extensions to Rails ActiveRecord adapters." - s.description = <<-EOF - Provides various extensions to the Rails ActiveRecord adapters. - EOF - - s.add_dependency('rake', '>= 0.8.3') - s.add_dependency('activesupport', '>= 2.1.0') - s.add_dependency('activerecord', '>= 2.1.0') - s.add_dependency('fastercsv', '>= 1.0.0') - - s.rdoc_options << '--exclude' << '.' - s.has_rdoc = false - - s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')} - s.require_path = 'lib' - - s.author = "Anthony Eden" - s.email = "anthonyeden@gmail.com" - s.homepage = "http://activewarehouse.rubyforge.org/adapter_extensions" - s.rubyforge_project = "activewarehouse" -end - -Rake::GemPackageTask.new(spec) do |pkg| - pkg.gem_spec = spec - pkg.need_tar = true - pkg.need_zip = true -end - -namespace :github do - desc "Update Github Gemspec" - task :update_gemspec do - File.open(File.join(File.dirname(__FILE__), "#{spec.name}.gemspec"), "w"){|f| f << spec.to_ruby} - end -end - - - desc "Generate code statistics" task :lines do lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 @@ -124,7 +60,7 @@ task :lines do puts "Total: Lines #{total_lines}, LOC #{total_codelines}" end -desc "Publish the release files to RubyForge." +desc "Publish the release files to RubyForge (UNTESTED CURRENTLY)" task :release => [ :package ] do `rubyforge login` @@ -135,24 +71,7 @@ task :release => [ :package ] do end end -desc "Publish the API documentation" +desc "Publish the API documentation (UNTESTED CURRENTLY)" task :pdoc => [:rdoc] do Rake::SshDirPublisher.new("aeden@rubyforge.org", "/var/www/gforge-projects/activewarehouse/adapter_extensions/rdoc", "rdoc").upload end - -desc "Install the gem from a local generated package" -task :install => [:package] do - windows = RUBY_PLATFORM =~ /mswin/ - sudo = windows ? '' : 'sudo' - gem = windows ? 'gem.bat' : 'gem' - `#{sudo} #{gem} install pkg/#{PKG_NAME}-#{PKG_VERSION}` -end - -desc "Reinstall the gem from a local package copy" -task :reinstall => [:package] do - windows = RUBY_PLATFORM =~ /mswin/ - sudo = windows ? '' : 'sudo' - gem = windows ? 'gem.bat' : 'gem' - `#{sudo} #{gem} uninstall #{PKG_NAME} -x` - `#{sudo} #{gem} install pkg/#{PKG_NAME}-#{PKG_VERSION}` -end \ No newline at end of file diff --git a/adapter_extensions.gemspec b/adapter_extensions.gemspec index 50fb683..40e0e0e 100644 --- a/adapter_extensions.gemspec +++ b/adapter_extensions.gemspec @@ -1,24 +1,27 @@ -Gem::Specification.new do |s| - s.name = %q{adapter_extensions} - s.version = "0.4.0.1" +# -*- encoding: utf-8 -*- +lib = File.expand_path('../lib/', __FILE__) +$:.unshift lib unless $:.include?(lib) - s.specification_version = 2 if s.respond_to? :specification_version= +require 'adapter_extensions/version' - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Anthony Eden"] - s.date = %q{2008-05-22} +Gem::Specification.new do |s| + s.name = %q{adapter_extensions} + s.version = AdapterExtensions::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ["Anthony Eden", "Thibaut Barrère"] + s.email = ["thibaut.barrere@gmail.com"] + s.homepage = "https://github.com/activewarehouse/adapter_extensions" + s.summary = %q{Extensions to Rails ActiveRecord adapters.} s.description = %q{Provides various extensions to the Rails ActiveRecord adapters.} - s.email = %q{anthonyeden@gmail.com} - s.files = ["CHANGELOG", "README", "LICENSE", "Rakefile", "lib/adapter_extensions", "lib/adapter_extensions.rb", "lib/adapter_extensions/connection_adapters", "lib/adapter_extensions/version.rb", "lib/adapter_extensions/connection_adapters/abstract_adapter.rb", "lib/adapter_extensions/connection_adapters/mysql_adapter.rb", "lib/adapter_extensions/connection_adapters/postgresql_adapter.rb", "lib/adapter_extensions/connection_adapters/sqlserver_adapter.rb"] - s.homepage = %q{http://activewarehouse.rubyforge.org/adapter_extensions} - s.rdoc_options = ["--exclude", "."] - s.require_paths = ["lib"] s.rubyforge_project = %q{activewarehouse} - s.rubygems_version = %q{1.1.1} - s.summary = %q{Extensions to Rails ActiveRecord adapters.} + + s.required_rubygems_version = ">= 1.3.6" + + s.add_runtime_dependency('rake', '>= 0.8.3') + s.add_runtime_dependency('activesupport', '>= 2.1.0') + s.add_runtime_dependency('activerecord', '>= 2.1.0') - s.add_dependency(%q, [">= 0.7.1"]) - s.add_dependency(%q, [">= 1.3.1"]) - s.add_dependency(%q, [">= 1.14.4"]) - s.add_dependency(%q, [">= 1.0.0"]) + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- {test}/*`.split("\n") + s.require_path = "lib" end diff --git a/lib/adapter_extensions/version.rb b/lib/adapter_extensions/version.rb index f45dd81..3c26a67 100644 --- a/lib/adapter_extensions/version.rb +++ b/lib/adapter_extensions/version.rb @@ -1,10 +1,4 @@ # Source file identifying the version of AdapterExtensions in this package module AdapterExtensions#:nodoc: - module VERSION #:nodoc: - MAJOR = 0 - MINOR = 5 - TINY = 0 - - STRING = [MAJOR, MINOR, TINY].join('.') - end + VERSION = "0.9.5.rc1" end