upsert 2.1.1 → 2.1.2

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: daedfd442f5d2ab0860de0da472d49f3a495ee16
4
- data.tar.gz: 2d0933c0b5c846f7960e1ffa8654da2762003f9d
3
+ metadata.gz: 6522186c1e008a4b2386d957052e532149fc2ea3
4
+ data.tar.gz: f80674428af81360e0d91c24626e86abde86ccd7
5
5
  SHA512:
6
- metadata.gz: c32e5e356d6c119e82f2c05044b1097478cd1506dac1388722beff49f9b2ba5d953da9f00c6e5337a1a2ace620a64500a151d6d7b39ab5eac2440ab6d9be6c95
7
- data.tar.gz: d5012449fb92e493ee360c631e16571fdd9660fdb816ff33f08ed48f49c1d7e1b8b31cc1f446b81cd44ff68f8b2ae3b859ba2ac128ab64032db976aa2db7eb34
6
+ metadata.gz: cb6e925f2c76a2bab2800a609f4ccbec4b596b1b854a13293143dda2a67be30fe82f8138ab778a958033fe9acef8fedacded0819ea367daa9b850765eaf35aef
7
+ data.tar.gz: eb93f41e68345199be249465046e7dcf66ea1481c33d9ed14384b8155b3e33a9dea84d86fb50bd0b56fa8205cc2f5d433450799fa2f5c45637854a596890be33
@@ -3,6 +3,7 @@ global:
3
3
  - USERNAME=travis
4
4
  PASSWORD=
5
5
  rvm:
6
+ - 2.3.0
6
7
  - 2.2.0
7
8
  - 2.1.0
8
9
  - 1.9.3
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ 2.1.2 / 2016-02-25
2
+
3
+ * Enhancements
4
+
5
+ * Test on Ruby 2.3 - thanks @Ch4s3 https://github.com/seamusabshere/upsert/pull/70
6
+
7
+ * Bug fixes
8
+
9
+ * Stop using Thread.exclusive - thanks @hpetru https://github.com/seamusabshere/upsert/pull/67
10
+
1
11
  2.1.1 / 2016-02-12
2
12
 
3
13
  * Enhancements
@@ -14,11 +14,12 @@ class Upsert
14
14
  # What logger to use.
15
15
  # @return [#info,#warn,#debug]
16
16
  attr_writer :logger
17
+ MUTEX_FOR_PERFORM = Mutex.new
17
18
 
18
19
  # The current logger
19
20
  # @return [#info,#warn,#debug]
20
21
  def logger
21
- @logger || Thread.exclusive do
22
+ @logger || MUTEX_FOR_PERFORM.synchronize do
22
23
  @logger ||= if defined?(::Rails) and (rails_logger = ::Rails.logger)
23
24
  rails_logger
24
25
  elsif defined?(::ActiveRecord) and ::ActiveRecord.const_defined?(:Base) and (ar_logger = ::ActiveRecord::Base.logger)
@@ -1,3 +1,3 @@
1
1
  class Upsert
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
3
3
  end
@@ -1,11 +1,12 @@
1
1
  require 'spec_helper'
2
2
  describe Upsert do
3
+ MUTEX_FOR_PERFORM = Mutex.new
3
4
  describe "logger" do
4
5
  it "logs where you tell it" do
5
6
  begin
6
7
  old_logger = Upsert.logger
7
8
  io = StringIO.new
8
- Thread.exclusive do
9
+ MUTEX_FOR_PERFORM.synchronize do
9
10
  Upsert.logger = Logger.new(io)
10
11
 
11
12
  Upsert.logger.warn "hello"
@@ -22,7 +23,7 @@ describe Upsert do
22
23
  begin
23
24
  old_logger = Upsert.logger
24
25
  io = StringIO.new
25
- Thread.exclusive do
26
+ MUTEX_FOR_PERFORM.synchronize do
26
27
  Upsert.logger = Logger.new(io)
27
28
 
28
29
  u = Upsert.new($conn, :pets)
@@ -46,6 +46,8 @@ Gem::Specification.new do |gem|
46
46
  gem.add_development_dependency 'activerecord-jdbcmysql-adapter'
47
47
  gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
48
48
  else
49
+ gem.add_development_dependency 'activerecord-mysql2-adapter'
50
+ gem.add_development_dependency 'activerecord-postgresql-adapter'
49
51
  gem.add_development_dependency 'sqlite3'
50
52
  gem.add_development_dependency 'mysql2'
51
53
  gem.add_development_dependency 'pg'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upsert
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-12 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -178,6 +178,34 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: activerecord-mysql2-adapter
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: activerecord-postgresql-adapter
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
181
209
  - !ruby/object:Gem::Dependency
182
210
  name: sqlite3
183
211
  requirement: !ruby/object:Gem::Requirement