transaction_isolation 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -2
- data/README.md +8 -0
- data/lib/transaction_isolation.rb +1 -4
- data/lib/transaction_isolation/version.rb +1 -1
- data/test/library_setup.rb +2 -0
- data/transaction-isolation.gemspec +5 -6
- metadata +13 -15
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -18,6 +18,14 @@ Then run:
|
|
18
18
|
|
19
19
|
bundle
|
20
20
|
|
21
|
+
__With Rails it works out of the box__.
|
22
|
+
|
23
|
+
If you have a standalone ActiveRecord-based project you'll need to call:
|
24
|
+
|
25
|
+
TransactionIsolation.apply_activerecord_patch # after connecting to the database
|
26
|
+
|
27
|
+
__after__ connecting to the database. This is because ActiveRecord loads adapters lazilly and only then they can be patched.
|
28
|
+
|
21
29
|
## Features
|
22
30
|
|
23
31
|
* Setting transaction isolation level (:read_uncommitted, :read_committed, :repeatable_read, :serializable)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "active_record"
|
1
2
|
require_relative 'transaction_isolation/version'
|
2
3
|
|
3
4
|
module TransactionIsolation
|
@@ -21,10 +22,6 @@ module TransactionIsolation
|
|
21
22
|
TransactionIsolation.apply_activerecord_patch
|
22
23
|
end
|
23
24
|
end
|
24
|
-
else
|
25
|
-
# Without Rails we can apply the patch outright. It is programmer responsibility
|
26
|
-
# to require the transaction_isolation gem *after* connecting to the database.
|
27
|
-
TransactionIsolation.apply_activerecord_patch
|
28
25
|
end
|
29
26
|
|
30
27
|
end
|
data/test/library_setup.rb
CHANGED
@@ -7,16 +7,15 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = TransactionIsolation::VERSION
|
8
8
|
s.authors = ["Piotr 'Qertoip' Włodarek"]
|
9
9
|
s.email = ["qertoip@gmail.com"]
|
10
|
-
s.homepage = ""
|
11
|
-
s.summary = %q{
|
12
|
-
s.description = %q{
|
13
|
-
|
14
|
-
s.rubyforge_project = "transaction_isolation"
|
10
|
+
s.homepage = "https://github.com/qertoip/transaction_isolation"
|
11
|
+
s.summary = %q{Set transaction isolation level in the ActiveRecord in a database agnostic way.}
|
12
|
+
s.description = %q{Set transaction isolation level in the ActiveRecord in a database agnostic way. Works with MySQL2, PostgreSQL and SQLite3 for all ANSI isolation levels: :serializable, :repeatable_read, :read_committed, :read_uncommitted.}
|
13
|
+
s.required_ruby_version = '>= 1.9.2'
|
15
14
|
|
16
15
|
s.files = `git ls-files`.split("\n")
|
17
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
17
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
18
|
s.require_paths = ["lib"]
|
20
19
|
|
21
|
-
s.add_runtime_dependency "activerecord"
|
20
|
+
s.add_runtime_dependency "activerecord", ">= 3.0.11"
|
22
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transaction_isolation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,17 +13,18 @@ date: 2012-02-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement: &
|
16
|
+
requirement: &16896100 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.0.11
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
26
|
-
|
24
|
+
version_requirements: *16896100
|
25
|
+
description: ! 'Set transaction isolation level in the ActiveRecord in a database
|
26
|
+
agnostic way. Works with MySQL2, PostgreSQL and SQLite3 for all ANSI isolation levels:
|
27
|
+
:serializable, :repeatable_read, :read_committed, :read_uncommitted.'
|
27
28
|
email:
|
28
29
|
- qertoip@gmail.com
|
29
30
|
executables: []
|
@@ -61,7 +62,7 @@ files:
|
|
61
62
|
- test/test_runner.rb
|
62
63
|
- tests
|
63
64
|
- transaction-isolation.gemspec
|
64
|
-
homepage:
|
65
|
+
homepage: https://github.com/qertoip/transaction_isolation
|
65
66
|
licenses: []
|
66
67
|
post_install_message:
|
67
68
|
rdoc_options: []
|
@@ -72,10 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
73
|
requirements:
|
73
74
|
- - ! '>='
|
74
75
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
segments:
|
77
|
-
- 0
|
78
|
-
hash: 1075603796640971358
|
76
|
+
version: 1.9.2
|
79
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
78
|
none: false
|
81
79
|
requirements:
|
@@ -84,12 +82,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
82
|
version: '0'
|
85
83
|
segments:
|
86
84
|
- 0
|
87
|
-
hash:
|
85
|
+
hash: 3266208517833567002
|
88
86
|
requirements: []
|
89
|
-
rubyforge_project:
|
87
|
+
rubyforge_project:
|
90
88
|
rubygems_version: 1.8.15
|
91
89
|
signing_key:
|
92
90
|
specification_version: 3
|
93
|
-
summary:
|
94
|
-
|
91
|
+
summary: Set transaction isolation level in the ActiveRecord in a database agnostic
|
92
|
+
way.
|
95
93
|
test_files: []
|