sandthorn_driver_sequel 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 332d041179b372bf297b8a1304c85fcde1828f17
4
- data.tar.gz: 2afb8f68fc1135ff0bc40b037dacb69565056d5c
3
+ metadata.gz: 906dc7ee0774059ef789a16481e505f1a8d8bceb
4
+ data.tar.gz: 40e2cbffb0b5538137ee0eaec2eed54b869a64fd
5
5
  SHA512:
6
- metadata.gz: 229130697764cc334af52475539104b5b1b73943dca95dc3ed82d6c1bc17e2749c4c01c3e0a9e6992d0640ba93219ec4677355b974d04f32a230b8d7a12c6101
7
- data.tar.gz: e26eac7e1df9887f0fa83f6661a8eb6e9e107c250b26afa543abf0faf05e6007181bdf2797ab6fb0c61bc5adbee777dc0dfb88ae579218c3de5a7877a6a39a9d
6
+ metadata.gz: 78b32d22e9a0cbbd7f96c273f8d3dd99c37f288311e3fdefbc16a3685e5fb48095386440b1db94dc94c39375071cba4cd01ee0ef74c576ffb36980638ae8f461
7
+ data.tar.gz: a4585c75b94eaab75ce465b9996527f68b30a5504ffcda81cf96c4bcb963759ad02f61200d5746845e4ce38bc9f072b615501b7b1d1daed81934b3f94bece93d
@@ -5,16 +5,16 @@ module SandthornDriverSequel
5
5
  def initialize args = {}
6
6
  @url = args.fetch(:url)
7
7
  Sequel.default_timezone = :utc
8
+ @db = Sequel.connect(@url, :connection_handling => :stack)
8
9
  end
9
10
  def execute &block
10
- Sequel.connect(@url) { |db| return block.call db}
11
+ return block.call @db
11
12
  end
12
13
  def execute_in_transaction &block
13
- Sequel.connect(@url) do |db|
14
- db.transaction do
15
- return block.call db
16
- end
17
- end
18
- end
14
+ @db.transaction {|tr|
15
+ return block.call @db
16
+ }
17
+ end
18
+
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module SandthornDriverSequel
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sandthorn_driver_sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Krantz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-10 00:00:00.000000000 Z
12
+ date: 2014-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler