Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: master
...
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 6 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
10 CHANGELOG
@@ -1,3 +1,13 @@
+== 1.0.10 "??" ???
+
+* Updating README to match latest state
+
+== 1.0.9 "Get official" 2009-11-10
+
+* Moved to gihub.com/merb and to merb_sequel
+* Added Merb::Sequel::VERSION constant
+* Moved to jeweler to match with Merb
+
== 1.0.8
* Dropped support for Sequel versions < 2.7.0
View
44 README.rdoc
@@ -2,18 +2,22 @@
A plug-in for the Merb framework that provides support for Sequel models.
-This is fork of the code in the official merb-plugins
-(http://github.com/wycats/merb-plugins) repository. I did separate repository
-and Gem to allow faster and more independent release cycle to keep up with the
-Sequel monthly releases.
+If you use my fork on github.com/pk/merb_sequel <b>please use again the official
+repository</b> on github.com/merb/merb_sequel. I'm now updating the official repository.
-Plug-in is compatible with Merb 0.9.9 and higher and Sequel 1.4.0 and
+Plug-in is compatible with Merb 0.9.9 and higher and Sequel 2.7.0 and
higher including 2.x.x and <b>3.x.x</b>.
-<b>Any issues please report to http://github.com/pk/merb_sequel/issues</b>.
+<b>Any issues please report to https://merb.lighthouseapp.com/projects/7588-merb-plugins</b>.
== Install
+<b>Since 1.0.9 you can install official Merb gem</b>:
+
+gem install merb_sequel --source http://gemcutter.org
+
+=== Following gems are RETIRED!!!
+
Since version 1.0.6 I've moved gem hosting to Gemcutter. So now you need
to install gem with:
@@ -25,26 +29,14 @@ gem install pk-merb_sequel --source http://gems.github.com
=== Merb < 1.1
-Add pk-merb_sequel as a dependency to your <b>config/dependencies.rb</b>:
-
-dependency 'pk-merb_sequel', :require_as => 'merb_sequel'
-
-<b>Because of Merb < 1.1 ORM plugin loading mechanism you neeed to change init.rb</b>:
-
-use_orm :sequel
+Add merb_sequel as a dependency to your <b>config/dependencies.rb</b>:
-to
-
-Merb.orm = :sequel
-
-If you don't do this Merb will complain that there is no merb_sequel gem also
-if you have merb_sequel installed it will load your system wide gem instead of
-the pk-merb_sequel gem.
+dependency 'merb_sequel'
=== Merb >= 1.1, add it as a dependency to your <b>Gemfile</b>:
-gem 'pk-merb_sequel', :require_as => 'merb_sequel'
+gem 'merb_sequel'
Add Sequel as you ORM of choice to init.rb:
@@ -58,12 +50,14 @@ Sequel 2.11.0:: All pass
Sequel 2.12.0:: All pass
Sequel 3.0.0:: All pass
Sequel 3.5.0:: All pass
+Sequel 3.6.0:: All pass
=== Ruby 1.9.1:
-Sequel 2.11.0:: All pass except session spec failing due to Marshall issues.
-Sequel 2.12.0:: All pass except session spec failing due to Marshall issues.
-Sequel 3.0.0:: All pass except session spec failing due to Marshall issues.
-Sequel 3.5.0:: All pass except session spec failing due to Marshall issues.
+Sequel 2.11.0:: All pass
+Sequel 2.12.0:: All pass
+Sequel 3.0.0:: All pass
+Sequel 3.5.0:: All pass
+Sequel 3.6.0:: All pass
=== ActiveModel compatibility
In Merb > 1.0.13 we use ActiveModel interface for the ORM plugins. merb_sequel
View
104 Rakefile
@@ -1,74 +1,48 @@
-require 'rubygems'
-require 'rake/gempackagetask'
-require "rake/rdoctask"
-require 'merb-core/tasks/merb_rake_helper'
-require "spec/rake/spectask"
-
-##############################################################################
-# Package && release
-##############################################################################
-RUBY_FORGE_PROJECT = "pk-merb_sequel"
-PROJECT_URL = "http://github.com/pk/merb_sequel"
-PROJECT_SUMMARY = "Merb plugin that provides support for Sequel and Sequel::Model"
-PROJECT_DESCRIPTION = PROJECT_SUMMARY
-
-GEM_AUTHOR = "Wayne E. Seguin, Lance Carlson, Lori Holden, Pavel Kunc"
-GEM_EMAIL = "wayneeseguin@gmail.com, lancecarlson@gmail.com, email@loriholden.com, pavel.kunc@gmail.com"
-
-GEM_NAME = "pk-merb_sequel"
-PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
-GEM_VERSION = "1.0.8" + PKG_BUILD
-
-RELEASE_NAME = "REL #{GEM_VERSION}"
-
-spec = Gem::Specification.new do |s|
- s.rubyforge_project = RUBY_FORGE_PROJECT
- s.name = GEM_NAME
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["README.rdoc", "LICENSE", 'TODO']
- s.summary = PROJECT_SUMMARY
- s.description = PROJECT_DESCRIPTION
- s.author = GEM_AUTHOR
- s.email = GEM_EMAIL
- s.homepage = PROJECT_URL
- s.add_dependency("merb-core", ">= 0.9.9")
- s.add_dependency("sequel", ">= 2.7.0")
- s.files = %w(CHANGELOG LICENSE README.rdoc Rakefile TODO Generators) + Dir.glob("{lib}/**/*")
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
+require "rubygems"
+require "rake"
+
+# Assume a typical dev checkout to fetch the current merb-core version
+require File.expand_path('../../merb/merb-core/lib/merb-core/version', __FILE__)
+
+# Load this library's version information
+require File.expand_path('../lib/merb_sequel/version', __FILE__)
+
+begin
+ require 'jeweler'
+
+ Jeweler::Tasks.new do |gemspec|
+ gemspec.version = Merb::Sequel::VERSION
+ gemspec.name = "merb_sequel"
+ gemspec.description = "Merb plugin that provides support for Sequel"
+ gemspec.summary = "Merb plugin that provides support for Sequel"
+ gemspec.authors = [ "Wayne E. Seguin", "Lance Carlson", "Lori Holden", "Pavel Kunc" ]
+ gemspec.email = "wayneeseguin@gmail.com, lancecarlson@gmail.com, email@loriholden.com, pavel.kunc@gmail.com"
+ gemspec.homepage = "http://github.com/merb/merb_sequel"
+ gemspec.files = %w(CHANGELOG LICENSE Rakefile README.rdoc TODO Generators) + Dir['{lib,spec}/**/*']
+ # Runtime dependencies
+ gemspec.add_dependency "merb-core", ">= 0.9.9"
+ gemspec.add_dependency "sequel", ">= 2.7.0"
+ # Development dependencies
+ gemspec.add_development_dependency "rspec", ">= 1.2.9"
+ end
-desc "Install the gem"
-task :install do
- Merb::RakeHelper.install(GEM_NAME, :version => GEM_VERSION)
-end
+ Jeweler::GemcutterTasks.new
-desc "Uninstall the gem"
-task :uninstall do
- Merb::RakeHelper.uninstall(GEM_NAME, :version => GEM_VERSION)
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-desc "Create a gemspec file"
-task :gemspec do
- File.open("#{GEM_NAME}.gemspec", "w") do |file|
- file.puts spec.to_ruby
- end
+require 'spec/rake/spectask'
+Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
end
-desc "Run all examples (or a specific spec with TASK=xxxx)"
-Spec::Rake::SpecTask.new('spec') do |t|
- t.spec_opts = ["-cfs"]
- t.spec_files = begin
- if ENV["TASK"]
- ENV["TASK"].split(',').map { |task| "spec/**/#{task}_spec.rb" }
- else
- FileList['spec/**/*_spec.rb']
- end
- end
+Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
end
desc 'Default: run spec examples'
View
5 lib/merb_sequel/version.rb
@@ -0,0 +1,5 @@
+module Merb
+ module Sequel
+ VERSION = "1.0.9".freeze
+ end
+end
View
93 merb_sequel.gemspec
@@ -0,0 +1,93 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{merb_sequel}
+ s.version = "1.0.9"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Wayne E. Seguin", "Lance Carlson", "Lori Holden", "Pavel Kunc"]
+ s.date = %q{2009-11-10}
+ s.description = %q{Merb plugin that provides support for Sequel}
+ s.email = %q{wayneeseguin@gmail.com, lancecarlson@gmail.com, email@loriholden.com, pavel.kunc@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.rdoc"
+ ]
+ s.files = [
+ "CHANGELOG",
+ "Generators",
+ "LICENSE",
+ "README.rdoc",
+ "Rakefile",
+ "TODO",
+ "lib/generators/migration.rb",
+ "lib/generators/model.rb",
+ "lib/generators/resource_controller.rb",
+ "lib/generators/session_migration.rb",
+ "lib/generators/templates/migration/schema/migrations/%file_name%.rb",
+ "lib/generators/templates/model/app/models/%file_name%.rb",
+ "lib/generators/templates/resource_controller/app/controllers/%file_name%.rb",
+ "lib/generators/templates/resource_controller/app/views/%file_name%/edit.html.erb",
+ "lib/generators/templates/resource_controller/app/views/%file_name%/index.html.erb",
+ "lib/generators/templates/resource_controller/app/views/%file_name%/new.html.erb",
+ "lib/generators/templates/resource_controller/app/views/%file_name%/show.html.erb",
+ "lib/generators/templates/session_migration/schema/migrations/%version%_sessions.rb",
+ "lib/merb/orms/sequel/connection.rb",
+ "lib/merb/orms/sequel/database.yml.sample",
+ "lib/merb/orms/sequel/model.rb",
+ "lib/merb/session/sequel_session.rb",
+ "lib/merb_sequel.rb",
+ "lib/merb_sequel/merbtasks.rb",
+ "lib/merb_sequel/rspec/sequel.rb",
+ "lib/merb_sequel/version.rb",
+ "spec/config/database.yml",
+ "spec/log/merb_test.log",
+ "spec/log/test.log",
+ "spec/merb_sequel_session_spec.rb",
+ "spec/merb_sequel_spec.rb",
+ "spec/rspec/sequel_spec.rb",
+ "spec/sequel_ext_spec.rb",
+ "spec/spec.opts",
+ "spec/spec_controller.rb",
+ "spec/spec_helper.rb",
+ "spec/spec_model.rb",
+ "spec/test.db"
+ ]
+ s.homepage = %q{http://github.com/merb/merb_sequel}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.5}
+ s.summary = %q{Merb plugin that provides support for Sequel}
+ s.test_files = [
+ "spec/merb_sequel_session_spec.rb",
+ "spec/merb_sequel_spec.rb",
+ "spec/rspec/sequel_spec.rb",
+ "spec/sequel_ext_spec.rb",
+ "spec/spec_controller.rb",
+ "spec/spec_helper.rb",
+ "spec/spec_model.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_runtime_dependency(%q<sequel>, [">= 2.7.0"])
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
+ else
+ s.add_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_dependency(%q<sequel>, [">= 2.7.0"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+ else
+ s.add_dependency(%q<merb-core>, [">= 0.9.9"])
+ s.add_dependency(%q<sequel>, [">= 2.7.0"])
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
+ end
+end
+
View
35 pk-merb_sequel.gemspec
@@ -1,35 +0,0 @@
-# -*- encoding: utf-8 -*-
-
-Gem::Specification.new do |s|
- s.name = %q{pk-merb_sequel}
- s.version = "1.0.8"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Wayne E. Seguin, Lance Carlson, Lori Holden, Pavel Kunc"]
- s.date = %q{2009-10-17}
- s.description = %q{Merb plugin that provides support for Sequel and Sequel::Model}
- s.email = %q{wayneeseguin@gmail.com, lancecarlson@gmail.com, email@loriholden.com, pavel.kunc@gmail.com}
- s.extra_rdoc_files = ["README.rdoc", "LICENSE", "TODO"]
- s.files = ["CHANGELOG", "LICENSE", "README.rdoc", "Rakefile", "TODO", "Generators", "lib/generators", "lib/generators/migration.rb", "lib/generators/model.rb", "lib/generators/resource_controller.rb", "lib/generators/session_migration.rb", "lib/generators/templates", "lib/generators/templates/migration", "lib/generators/templates/migration/schema", "lib/generators/templates/migration/schema/migrations", "lib/generators/templates/migration/schema/migrations/%file_name%.rb", "lib/generators/templates/model", "lib/generators/templates/model/app", "lib/generators/templates/model/app/models", "lib/generators/templates/model/app/models/%file_name%.rb", "lib/generators/templates/resource_controller", "lib/generators/templates/resource_controller/app", "lib/generators/templates/resource_controller/app/controllers", "lib/generators/templates/resource_controller/app/controllers/%file_name%.rb", "lib/generators/templates/resource_controller/app/views", "lib/generators/templates/resource_controller/app/views/%file_name%", "lib/generators/templates/resource_controller/app/views/%file_name%/edit.html.erb", "lib/generators/templates/resource_controller/app/views/%file_name%/index.html.erb", "lib/generators/templates/resource_controller/app/views/%file_name%/new.html.erb", "lib/generators/templates/resource_controller/app/views/%file_name%/show.html.erb", "lib/generators/templates/session_migration", "lib/generators/templates/session_migration/schema", "lib/generators/templates/session_migration/schema/migrations", "lib/generators/templates/session_migration/schema/migrations/%version%_sessions.rb", "lib/merb", "lib/merb/orms", "lib/merb/orms/sequel", "lib/merb/orms/sequel/connection.rb", "lib/merb/orms/sequel/database.yml.sample", "lib/merb/orms/sequel/model.rb", "lib/merb/session", "lib/merb/session/sequel_session.rb", "lib/merb_sequel", "lib/merb_sequel/merbtasks.rb", "lib/merb_sequel/rspec", "lib/merb_sequel/rspec/sequel.rb", "lib/merb_sequel.rb"]
- s.homepage = %q{http://github.com/pk/merb_sequel}
- s.require_paths = ["lib"]
- s.rubyforge_project = %q{pk-merb_sequel}
- s.rubygems_version = %q{1.3.5}
- s.summary = %q{Merb plugin that provides support for Sequel and Sequel::Model}
-
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
-
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<merb-core>, [">= 0.9.9"])
- s.add_runtime_dependency(%q<sequel>, [">= 2.7.0"])
- else
- s.add_dependency(%q<merb-core>, [">= 0.9.9"])
- s.add_dependency(%q<sequel>, [">= 2.7.0"])
- end
- else
- s.add_dependency(%q<merb-core>, [">= 0.9.9"])
- s.add_dependency(%q<sequel>, [">= 2.7.0"])
- end
-end
View
8 spec/sequel_ext_spec.rb
@@ -7,13 +7,17 @@ class SpecModel < Sequel::Model; end
describe "active model" do
it "should load active model plugin when > 3.5" do
- SpecModel.plugins.should include(Sequel::Plugins::ActiveModel)
+ begin
+ SpecModel.plugins.should include(Sequel::Plugins::ActiveModel)
+ rescue NoMethodError
+ pending("For this SPEC to run and pass you need to install Sequel >= 3.5")
+ end
end
it "should include ActiveModelCompatibility module if plugin is not available" do
begin
Sequel::Model.plugin :active_model
- pending("For this SPEC to run and pass we need to install Sequel < 3.5")
+ pending("For this SPEC to run and pass you need to install Sequel < 3.5")
rescue LoadError, NoMethodError
SpecModel.ancestors.should include(Merb::Orms::Sequel::Model::ActiveModelCompatibility)
end
View
20 spec/spec_helper.rb
@@ -1,14 +1,18 @@
-$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'rubygems'
-require 'merb-core'
-require 'spec'
-require 'sequel'
-require 'merb_sequel'
-Merb.start(:environment => 'test',
- :adapter => 'runner',
+# Use current merb-core sources if running from a typical dev checkout.
+lib = File.expand_path('../../../merb/merb-core/lib', __FILE__)
+$LOAD_PATH.unshift(lib) if File.directory?(lib)
+require "merb-core"
+require "sequel"
+require "merb_sequel"
+
+Merb.start(:adapter => 'runner',
+ :log_level => :error,
+ :merb_root => File.dirname(__FILE__),
:session_store => 'sequel',
- :merb_root => File.dirname(__FILE__))
+ :environment => 'test'
+ )
# Load extensions if we use new versions of Sequel
require 'sequel/extensions/migration' if Merb::Orms::Sequel.new_sequel?

No commit comments for this range

Something went wrong with that request. Please try again.