active_record_mutex 2.3.6 → 2.3.7

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: 8611eb79731403f90f4a426423bb167e11b5e760
4
- data.tar.gz: 79b34aac00d8af5c5ac29f1e15698fd4c0289b7b
3
+ metadata.gz: 686d0cc0cb5deb244a9fe68ed6578c007a5d5a5c
4
+ data.tar.gz: 530e542da37141df4d92ba7488276e853c75034a
5
5
  SHA512:
6
- metadata.gz: 15ac9f3efd8d22a921105f86a07206f6d75d9f178520866ad01b2ede3682332cd107817dc9ce75683d4c3a62fa7f6780616f9aae59d689163ad8a0b8cdf86660
7
- data.tar.gz: 7642c503108b5b4e9892a208ea2cff81080f8dea1b8ba63cf5fc6eb862861730ffd5859864b57e26773c98f82bb7b73f5c812d7df4a54f3f0e65005fd32cd3be
6
+ metadata.gz: fbc11293f1d454c08aa26e63dc6db721c2c4e84e9b1fe8422c23c4cd1aa285df1032ec0da9b6138d98e47bd9ea352ab6d01bcfa30784b36853afa2b0a3cbabb3
7
+ data.tar.gz: efed2a868ccb21f108f7444d13aca5f9d3ada747b7437d200ac82e50478344e6ecb886063f64e79914ddb5c998141b2926ce7236e6c3977c100dcbc5f9291bf9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.6
1
+ 2.3.7
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: active_record_mutex 2.3.6 ruby lib
2
+ # stub: active_record_mutex 2.3.7 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "active_record_mutex"
6
- s.version = "2.3.6"
6
+ s.version = "2.3.7"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Florian Frank"]
11
- s.date = "2016-08-25"
11
+ s.date = "2016-09-06"
12
12
  s.description = "Mutex that can be used to synchronise ruby processes via an ActiveRecord datababase connection. (Only Mysql is supported at the moment.)"
13
13
  s.email = "flori@ping.de"
14
14
  s.extra_rdoc_files = ["README.md", "lib/active_record/database_mutex.rb", "lib/active_record/database_mutex/implementation.rb", "lib/active_record/database_mutex/version.rb", "lib/active_record/mutex.rb", "lib/active_record_mutex.rb"]
@@ -8,6 +8,8 @@ module ActiveRecord
8
8
  # Creates a mutex with the name given with the option :name.
9
9
  def initialize(opts = {})
10
10
  @name = opts[:name] or raise ArgumentError, "mutex requires a :name argument"
11
+ query %{ SET @old_autocommit = @@autocommit }
12
+ query %{ SET autocommit = 1 }
11
13
  query %{
12
14
  CREATE TEMPORARY TABLE IF NOT EXISTS mutex_counters
13
15
  (
@@ -16,6 +18,7 @@ module ActiveRecord
16
18
  PRIMARY KEY (name(128))
17
19
  ) DEFAULT CHARSET=utf8mb4
18
20
  }
21
+ query %{ SET autocommit = @old_autocommit }
19
22
  end
20
23
 
21
24
  def db
@@ -1,6 +1,6 @@
1
1
  module ActiveRecord::DatabaseMutex
2
2
  # ActiveRecord::DatabaseMutex version
3
- VERSION = '2.3.6'
3
+ VERSION = '2.3.7'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_mutex
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.6
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-25 00:00:00.000000000 Z
11
+ date: 2016-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar