pk-merb_sequel 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -34,6 +34,17 @@ Sequel 2.12.0:: All pass except session spec failing due to Marshall issues.
34
34
  Sequel 3.0.0:: All pass except session spec failing due to Marshall issues.
35
35
 
36
36
 
37
+ == RSpec transactional examples
38
+
39
+ If you want to cut significantly runtime of your test suite which is using
40
+ Sequel you can enable transactional examples. Just add following line to
41
+ your spec_helper.rb or any spec you want to be transactional:
42
+
43
+ require 'merb_sequel/rspec/sequel'
44
+
45
+ Now <b>each example is wrapped in a Sequel transaction and when example finishes
46
+ Sequel::Error::Rollback is raised which cause transaction to rollback</b>.
47
+
37
48
  == Connection options
38
49
 
39
50
  Merb Sequel plug-in uses config/database.yml for connection configuration.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ GEM_EMAIL = "wayneeseguin@gmail.com, lancecarlson@gmail.com, email@loriholden.c
17
17
 
18
18
  GEM_NAME = "merb_sequel"
19
19
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
20
- GEM_VERSION = (Merb::MORE_VERSION rescue "1.0.2") + PKG_BUILD
20
+ GEM_VERSION = (Merb::MORE_VERSION rescue "1.0.3") + PKG_BUILD
21
21
 
22
22
  RELEASE_NAME = "REL #{GEM_VERSION}"
23
23
 
@@ -14,9 +14,9 @@ module Merb
14
14
  # Determine if we use Sequel 3 or not
15
15
  #
16
16
  # ==== Returns
17
- # Boolean:: True if using Sequel >= 2.12.0 or False
17
+ # Bool:: True if using Sequel >= 2.12.0 or False
18
18
  def new_sequel?
19
- /^(2.12|3)/ =~ ::Sequel.version
19
+ !!/^(2.12|3)/ =~ ::Sequel.version
20
20
  end
21
21
 
22
22
  def copy_sample_config
@@ -0,0 +1,5 @@
1
+ class Spec::Example::ExampleGroup
2
+ def execute(*args, &block)
3
+ Sequel::Model.db.transaction{super(*args, &block); raise Sequel::Error::Rollback}
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pk-merb_sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin, Lance Carlson, Lori Holden
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-04 00:00:00 -07:00
12
+ date: 2009-05-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -85,6 +85,8 @@ files:
85
85
  - lib/merb/session/sequel_session.rb
86
86
  - lib/merb_sequel
87
87
  - lib/merb_sequel/merbtasks.rb
88
+ - lib/merb_sequel/rspec
89
+ - lib/merb_sequel/rspec/sequel.rb
88
90
  - lib/merb_sequel.rb
89
91
  - lib/sequel_ext
90
92
  - lib/sequel_ext/model.rb