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 +4 -4
- data/.travis.yml +1 -0
- data/CHANGELOG +10 -0
- data/lib/upsert.rb +2 -1
- data/lib/upsert/version.rb +1 -1
- data/spec/logger_spec.rb +3 -2
- data/upsert.gemspec +2 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6522186c1e008a4b2386d957052e532149fc2ea3
|
4
|
+
data.tar.gz: f80674428af81360e0d91c24626e86abde86ccd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb6e925f2c76a2bab2800a609f4ccbec4b596b1b854a13293143dda2a67be30fe82f8138ab778a958033fe9acef8fedacded0819ea367daa9b850765eaf35aef
|
7
|
+
data.tar.gz: eb93f41e68345199be249465046e7dcf66ea1481c33d9ed14384b8155b3e33a9dea84d86fb50bd0b56fa8205cc2f5d433450799fa2f5c45637854a596890be33
|
data/.travis.yml
CHANGED
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
|
data/lib/upsert.rb
CHANGED
@@ -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 ||
|
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)
|
data/lib/upsert/version.rb
CHANGED
data/spec/logger_spec.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
26
|
+
MUTEX_FOR_PERFORM.synchronize do
|
26
27
|
Upsert.logger = Logger.new(io)
|
27
28
|
|
28
29
|
u = Upsert.new($conn, :pets)
|
data/upsert.gemspec
CHANGED
@@ -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.
|
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-
|
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
|