Permalink
Browse files

Created sequel wrapper gem. Bundles sequel_core and sequel_model as d…

…ependencies. In preparation for release 1.0.
  • Loading branch information...
ciconia committed Jan 1, 2008
1 parent 79dc455 commit f2eeba7e7a3829b9daf4cfcb605686ab9d2e2917
View
@@ -1,5 +1,7 @@
=== SVN
+* Changed name to sequel_core.
+
* 100% code coverage.
* Fixed error behavior when sequel_model is not available.
View
@@ -8,8 +8,8 @@ include FileUtils
##############################################################################
# Configuration
##############################################################################
-NAME = "sequel"
-VERS = "0.5.0.2"
+NAME = "sequel_core"
+VERS = "1.0"
CLEAN.include ["**/.*.sw?", "pkg/*", ".config", "doc/*", "coverage/*"]
RDOC_OPTS = [
"--quiet",
@@ -42,7 +42,7 @@ task :package => [:clean]
spec = Gem::Specification.new do |s|
s.name = NAME
- s.rubyforge_project = NAME
+ s.rubyforge_project = 'sequel'
s.version = VERS
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
View
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
require 'rubygems'
-require 'sequel'
+require 'sequel_core'
usage = <<END
Usage: sequel <connection URI>
File renamed without changes.
View
@@ -1,5 +1,5 @@
require 'rubygems'
-require File.join(File.dirname(__FILE__), "../lib/sequel")
+require File.join(File.dirname(__FILE__), "../lib/sequel_core")
class MockDataset < Sequel::Dataset
def insert(*args)
View
@@ -1,5 +1,7 @@
=== SVN
+* Changed dependency to sequel_core.
+
* Removed examples from sequel core.
* Additional specs. We're now at 100% coverage.
View
@@ -9,7 +9,7 @@ include FileUtils
# Configuration
##############################################################################
NAME = "sequel_model"
-VERS = "0.1"
+VERS = "0.2"
CLEAN.include ["**/.*.sw?", "pkg/*", ".config", "doc/*", "coverage/*"]
RDOC_OPTS = [
"--quiet",
@@ -42,7 +42,7 @@ task :package => [:clean]
spec = Gem::Specification.new do |s|
s.name = NAME
- s.rubyforge_project = NAME
+ s.rubyforge_project = 'sequel'
s.version = VERS
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
@@ -65,7 +65,7 @@ spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
end
- s.add_dependency("sequel", '>= 0.5')
+ s.add_dependency("sequel_core", '>= 0.5')
s.add_dependency("validatable")
s.files = %w(COPYING README Rakefile) + Dir.glob("{doc,spec,lib}/**/*")
@@ -1,5 +1,7 @@
-gem 'sequel', '>= 0.5'
-require 'sequel'
+unless Object.const_defined?('Sequel')
+ gem 'sequel_core', '>= 0.5'
+ require 'sequel_core'
+end
module Sequel
# == Sequel Models
View
@@ -0,0 +1,3 @@
+=== SVN
+
+* Created sequel wrapper gem. Bundles sequel_core and sequel_model as dependencies.
View
@@ -0,0 +1,74 @@
+require "rake"
+require "rake/clean"
+require "rake/gempackagetask"
+require "fileutils"
+include FileUtils
+
+##############################################################################
+# Configuration
+##############################################################################
+NAME = "sequel"
+VERS = "1.0"
+CLEAN.include ["**/.*.sw?", "pkg/*", ".config", "doc/*", "coverage/*"]
+
+##############################################################################
+# Gem packaging
+##############################################################################
+desc "Packages up Sequel."
+task :default => [:package]
+task :package => [:clean]
+
+spec = Gem::Specification.new do |s|
+ s.name = NAME
+ s.rubyforge_project = 'sequel'
+ s.version = VERS
+ s.platform = Gem::Platform::RUBY
+ s.summary = "Database access for Ruby"
+ s.description = s.summary
+ s.author = "Sharon Rosner"
+ s.email = "ciconia@gmail.com"
+ s.homepage = "http://sequel.rubyforge.org"
+ s.required_ruby_version = ">= 1.8.4"
+
+ s.add_dependency("sequel_core")
+ s.add_dependency("sequel_model")
+
+ s.files = %w(Rakefile) + Dir.glob("{lib}/**/*")
+ s.require_path = "lib"
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+ p.need_tar = true
+ p.gem_spec = spec
+end
+
+##############################################################################
+# installation & removal
+##############################################################################
+task :install do
+ sh %{rake package}
+ sh %{sudo gem install pkg/#{NAME}-#{VERS}}
+end
+
+task :install_no_docs do
+ sh %{rake package}
+ sh %{sudo gem install pkg/#{NAME}-#{VERS} --no-rdoc --no-ri}
+end
+
+task :uninstall => [:clean] do
+ sh %{sudo gem uninstall #{NAME}}
+end
+
+task :tag do
+ cwd = FileUtils.pwd
+ sh %{cd ../.. && svn copy #{cwd} tags/#{NAME}-#{VERS} && svn commit -m "#{NAME}-#{VERS} tag." tags}
+end
+
+##############################################################################
+# gem release
+##############################################################################
+task :release => [:package] do
+ sh %{rubyforge login}
+ sh %{rubyforge add_release sequel #{NAME} #{VERS} pkg/#{NAME}-#{VERS}.tgz}
+ sh %{rubyforge add_file sequel #{NAME} #{VERS} pkg/#{NAME}-#{VERS}.gem}
+end
View
@@ -0,0 +1,2 @@
+require 'sequel_core'
+require 'sequel_model'

0 comments on commit f2eeba7

Please sign in to comment.