activerecord-pedantmysql2-adapter 1.0.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +17 -8
- data/README.md +19 -3
- data/activerecord-pedantmysql2-adapter.gemspec +6 -2
- data/gemfiles/Gemfile.activerecord-edge +4 -0
- data/gemfiles/Gemfile.activerecord52 +5 -0
- data/gemfiles/Gemfile.activerecord60 +5 -0
- data/lib/active_record/connection_adapters/pedant_mysql2_adapter.rb +43 -24
- data/lib/pedant_mysql2.rb +49 -16
- data/lib/pedant_mysql2/version.rb +1 -1
- data/spec/adapter_spec.rb +96 -16
- data/spec/support/database.rb +9 -10
- metadata +15 -17
- data/Gemfile.activerecord32 +0 -4
- data/Gemfile.activerecord40 +0 -4
- data/Gemfile.activerecord41 +0 -4
- data/Gemfile.activerecord42 +0 -4
- data/shipit.rubygems.yml +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0cdc8bc77345e0ed3428828757da42af2180846edbb81327efbad5a0ab28a48e
|
4
|
+
data.tar.gz: 6e90b36c37754b0accdaac56ff69d125b61262f7d79be7884fa79afd835dc010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20edfa621dd97dbd80a2b3a5cc3f31711a85074228a5a848b4bc9c987ace3e5d92ad979995560b220526e572aea9f6c3e586e89825e8386fbab6bb4d68578a72
|
7
|
+
data.tar.gz: 79fa48c21ae537ef22c88692c59ea5eaa6332953bc68f3666134373043b1eeb4d1e1e86160b4a7cb6442a0bf757cd9af206026da145460c9c9058ab75b417ec2
|
data/.travis.yml
CHANGED
@@ -1,15 +1,24 @@
|
|
1
|
+
services:
|
2
|
+
- mysql
|
3
|
+
|
1
4
|
rvm:
|
2
|
-
-
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
+
- '2.5'
|
6
|
+
- '2.6'
|
7
|
+
- '2.7'
|
5
8
|
|
6
9
|
gemfile:
|
7
|
-
- Gemfile.
|
8
|
-
- Gemfile.
|
9
|
-
- Gemfile.
|
10
|
-
|
10
|
+
- gemfiles/Gemfile.activerecord52
|
11
|
+
- gemfiles/Gemfile.activerecord60
|
12
|
+
- gemfiles/Gemfile.activerecord-edge
|
13
|
+
|
14
|
+
matrix:
|
15
|
+
exclude:
|
16
|
+
- rvm: '2.5'
|
17
|
+
gemfile: gemfiles/Gemfile.activerecord-edge
|
18
|
+
- rvm: '2.6'
|
19
|
+
gemfile: gemfiles/Gemfile.activerecord-edge
|
11
20
|
|
12
21
|
before_script:
|
13
|
-
- mysql -e 'create database pedant_mysql2_test;'
|
22
|
+
- mysql -u root -h 127.0.0.1 -e 'create database pedant_mysql2_test;'
|
14
23
|
|
15
24
|
sudo: false
|
data/README.md
CHANGED
@@ -26,6 +26,9 @@ Finally in your `database.yml`:
|
|
26
26
|
|
27
27
|
adapter: pedant_mysql2
|
28
28
|
|
29
|
+
Or if you're using `DATABASE_URL` or the url key in `database.yml`, you can use the `pedant-mysql2` URL scheme:
|
30
|
+
|
31
|
+
url: pedant-mysql2://host/database
|
29
32
|
|
30
33
|
## Usage
|
31
34
|
|
@@ -40,12 +43,16 @@ You can report them to your exception tracker:
|
|
40
43
|
or totally silence them:
|
41
44
|
|
42
45
|
```ruby
|
43
|
-
PedantMysql2.
|
46
|
+
PedantMysql2.silence_warnings!
|
44
47
|
```
|
45
48
|
|
46
|
-
|
49
|
+
and to restore it to raising warnings as errors:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
PedantMysql2.raise_warnings!
|
53
|
+
```
|
47
54
|
|
48
|
-
You can
|
55
|
+
You can easily whitelist some types of warnings:
|
49
56
|
|
50
57
|
```ruby
|
51
58
|
PedantMysql2.ignore(/Some warning I don't care about/i)
|
@@ -59,6 +66,15 @@ warnings = PedantMysql2.capture_warnings do
|
|
59
66
|
end
|
60
67
|
```
|
61
68
|
|
69
|
+
## Thread-safe
|
70
|
+
|
71
|
+
This gem is tested to be thread safe with a couple known exceptions.
|
72
|
+
|
73
|
+
`PedantMysql2.ignore` is not thread safe and should only be called during initialization of your app. Changing this within a thread while another is updating it could be problematic.
|
74
|
+
`PedantMysql2.on_warning=` is not thread safe, this should also be called only during initialization.
|
75
|
+
|
76
|
+
If you find any other parts that are not thread-safe, please create an issue or PR.
|
77
|
+
|
62
78
|
## Development
|
63
79
|
|
64
80
|
Setting up the development environment is very straightforward. In order to keep the test
|
@@ -13,14 +13,18 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = 'https://github.com/Shopify/activerecord-pedantmysql2-adapter'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
17
|
+
|
18
|
+
spec.required_ruby_version = '>= 2.2.2'
|
19
|
+
|
16
20
|
spec.files = `git ls-files -z`.split("\x0")
|
17
21
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
23
|
spec.require_paths = ['lib']
|
20
24
|
|
21
|
-
spec.add_dependency 'activerecord', '>=
|
25
|
+
spec.add_dependency 'activerecord', '>= 5.0'
|
22
26
|
spec.add_dependency 'mysql2', '>= 0.3.12'
|
23
|
-
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'bundler'
|
24
28
|
spec.add_development_dependency 'rake'
|
25
29
|
spec.add_development_dependency 'rspec', '>= 3.0'
|
26
30
|
spec.add_development_dependency 'rspec-its'
|
@@ -2,23 +2,44 @@ require 'active_record/connection_adapters/mysql2_adapter'
|
|
2
2
|
|
3
3
|
module ActiveRecord
|
4
4
|
module ConnectionHandling
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
if ConnectionAdapters::Mysql2Adapter.respond_to?(:new_client)
|
6
|
+
def pedant_mysql2_connection(config)
|
7
|
+
config = config.symbolize_keys
|
8
|
+
config[:flags] ||= 0
|
9
|
+
|
10
|
+
if config[:flags].kind_of? Array
|
11
|
+
config[:flags].push "FOUND_ROWS"
|
12
|
+
else
|
13
|
+
config[:flags] |= Mysql2::Client::FOUND_ROWS
|
14
|
+
end
|
15
|
+
|
16
|
+
ConnectionAdapters::PedantMysql2Adapter.new(
|
17
|
+
ConnectionAdapters::Mysql2Adapter.new_client(config),
|
18
|
+
logger,
|
19
|
+
nil,
|
20
|
+
config,
|
21
|
+
)
|
12
22
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
23
|
+
else
|
24
|
+
def pedant_mysql2_connection(config)
|
25
|
+
config = config.symbolize_keys
|
26
|
+
|
27
|
+
config[:username] = 'root' if config[:username].nil?
|
28
|
+
|
29
|
+
if Mysql2::Client.const_defined? :FOUND_ROWS
|
30
|
+
config[:flags] = Mysql2::Client::FOUND_ROWS
|
31
|
+
end
|
32
|
+
|
33
|
+
client = Mysql2::Client.new(config)
|
34
|
+
|
35
|
+
options = [config[:host], config[:username], config[:password], config[:database], config[:port], config[:socket], 0]
|
36
|
+
ActiveRecord::ConnectionAdapters::PedantMysql2Adapter.new(client, logger, options, config)
|
37
|
+
rescue Mysql2::Error => error
|
38
|
+
if error.message.include?("Unknown database") && defined?(ActiveRecord::NoDatabaseError)
|
39
|
+
raise ActiveRecord::NoDatabaseError.new(error.message)
|
40
|
+
else
|
41
|
+
raise
|
42
|
+
end
|
22
43
|
end
|
23
44
|
end
|
24
45
|
end
|
@@ -37,9 +58,6 @@ class MysqlWarning < StandardError
|
|
37
58
|
end
|
38
59
|
|
39
60
|
class ActiveRecord::ConnectionAdapters::PedantMysql2Adapter < ActiveRecord::ConnectionAdapters::Mysql2Adapter
|
40
|
-
|
41
|
-
alias_method :original_execute, :execute
|
42
|
-
|
43
61
|
def execute(sql, name = nil)
|
44
62
|
value = super
|
45
63
|
log_warnings(sql)
|
@@ -47,10 +65,9 @@ class ActiveRecord::ConnectionAdapters::PedantMysql2Adapter < ActiveRecord::Conn
|
|
47
65
|
end
|
48
66
|
|
49
67
|
def exec_delete(sql, name, binds)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
affected_rows
|
68
|
+
@affected_rows_before_logging = nil
|
69
|
+
value = super
|
70
|
+
@affected_rows_before_logging || value
|
54
71
|
end
|
55
72
|
|
56
73
|
alias :exec_update :exec_delete
|
@@ -60,10 +77,12 @@ class ActiveRecord::ConnectionAdapters::PedantMysql2Adapter < ActiveRecord::Conn
|
|
60
77
|
def log_warnings(sql)
|
61
78
|
return unless @connection.warning_count > 0
|
62
79
|
|
80
|
+
@affected_rows_before_logging = @connection.affected_rows
|
63
81
|
result = @connection.query('SHOW WARNINGS')
|
82
|
+
|
64
83
|
result.each do |level, code, message|
|
65
84
|
warning = MysqlWarning.new(message, code, level, sql)
|
66
|
-
::PedantMysql2.
|
85
|
+
::PedantMysql2.warn(warning)
|
67
86
|
end
|
68
87
|
end
|
69
88
|
end
|
data/lib/pedant_mysql2.rb
CHANGED
@@ -1,34 +1,42 @@
|
|
1
1
|
module PedantMysql2
|
2
2
|
class << self
|
3
|
-
attr_accessor :on_warning
|
4
|
-
|
5
3
|
def capture_warnings
|
6
|
-
|
7
|
-
|
8
|
-
Thread.current[:mysql_warnings] = []
|
9
|
-
self.on_warning = lambda { |warning| Thread.current[:mysql_warnings] << warning }
|
4
|
+
warnings = backup_warnings
|
5
|
+
setup_capture
|
10
6
|
yield
|
11
|
-
|
12
|
-
warnings
|
7
|
+
captured_warnings
|
13
8
|
ensure
|
14
|
-
|
15
|
-
self.on_warning = previous_callback
|
9
|
+
restore_warnings(warnings)
|
16
10
|
end
|
17
11
|
|
18
12
|
def raise_warnings!
|
19
|
-
self.on_warning =
|
13
|
+
self.on_warning = nil
|
20
14
|
end
|
21
15
|
|
22
16
|
def silence_warnings!
|
23
|
-
self.on_warning =
|
17
|
+
self.on_warning = lambda{ |warning| }
|
24
18
|
end
|
25
19
|
|
26
20
|
def ignore(*matchers)
|
27
21
|
self.whitelist.concat(matchers.flatten)
|
28
22
|
end
|
29
23
|
|
30
|
-
def
|
31
|
-
|
24
|
+
def warn(warning)
|
25
|
+
return if ignored?(warning)
|
26
|
+
|
27
|
+
if on_warning
|
28
|
+
on_warning.call(warning)
|
29
|
+
else
|
30
|
+
raise warning
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def on_warning
|
35
|
+
Thread.current[:__pedant_mysql2_on_warning] || @_on_warning
|
36
|
+
end
|
37
|
+
|
38
|
+
def on_warning=(new_proc)
|
39
|
+
@_on_warning = new_proc
|
32
40
|
end
|
33
41
|
|
34
42
|
protected
|
@@ -37,8 +45,33 @@ module PedantMysql2
|
|
37
45
|
@whitelist ||= []
|
38
46
|
end
|
39
47
|
|
40
|
-
|
48
|
+
def ignored?(warning)
|
49
|
+
whitelist.any? { |matcher| warning.message.match?(matcher) } || drop_table_warning(warning)
|
50
|
+
end
|
41
51
|
|
42
|
-
|
52
|
+
def drop_table_warning(warning)
|
53
|
+
warning.query.match?(/\ADROP TABLE IF EXISTS/) || warning.message.match?(/\AUnknown table/)
|
54
|
+
end
|
55
|
+
|
56
|
+
def setup_capture
|
57
|
+
Thread.current[:__pedant_mysql2_warnings] = []
|
58
|
+
self.thread_on_warning = lambda { |warning| Thread.current[:__pedant_mysql2_warnings] << warning }
|
59
|
+
end
|
43
60
|
|
61
|
+
def captured_warnings
|
62
|
+
Thread.current[:__pedant_mysql2_warnings]
|
63
|
+
end
|
64
|
+
|
65
|
+
def backup_warnings
|
66
|
+
[captured_warnings, Thread.current[:__pedant_mysql2_on_warning]]
|
67
|
+
end
|
68
|
+
|
69
|
+
def restore_warnings(warnings)
|
70
|
+
Thread.current[:__pedant_mysql2_warnings], self.thread_on_warning = *warnings
|
71
|
+
end
|
72
|
+
|
73
|
+
def thread_on_warning=(new_proc)
|
74
|
+
Thread.current[:__pedant_mysql2_on_warning] = new_proc
|
75
|
+
end
|
76
|
+
end
|
44
77
|
end
|
data/spec/adapter_spec.rb
CHANGED
@@ -7,6 +7,7 @@ describe PedantMysql2 do
|
|
7
7
|
before :each do
|
8
8
|
PedantMysql2.raise_warnings!
|
9
9
|
PedantMysql2.instance_variable_set(:@whitelist, nil)
|
10
|
+
PedantMysql2.ignore(/They will be merged with strict mode in a future release/)
|
10
11
|
connection.execute('SET SESSION binlog_format = "STATEMENT"')
|
11
12
|
if connection.execute('SHOW TABLES LIKE "comment"').size == 0
|
12
13
|
connection.execute('CREATE TABLE comment (id int)')
|
@@ -19,39 +20,76 @@ describe PedantMysql2 do
|
|
19
20
|
PedantMysql2.on_warning = @original_callback
|
20
21
|
end
|
21
22
|
|
23
|
+
def execute_with_warning(query = 'SELECT 1 + "foo"')
|
24
|
+
ActiveRecord::Base.connection.execute(query)
|
25
|
+
end
|
26
|
+
|
27
|
+
def wait_for(thread)
|
28
|
+
sleep 0.1 until thread.stop?
|
29
|
+
end
|
30
|
+
|
31
|
+
# Used by the thread-safe testing
|
32
|
+
def method_missing(method_name,*args)
|
33
|
+
if PedantMysql2.respond_to?(method_name, true)
|
34
|
+
PedantMysql2.send(method_name,*args)
|
35
|
+
else
|
36
|
+
super
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
22
40
|
it 'raises warnings by default' do
|
23
41
|
expect {
|
24
|
-
|
42
|
+
execute_with_warning
|
25
43
|
}.to raise_error(MysqlWarning, "Truncated incorrect DOUBLE value: 'foo'")
|
26
44
|
end
|
27
45
|
|
46
|
+
it 'does not raise when warning warns about unexisting table' do
|
47
|
+
expect {
|
48
|
+
execute_with_warning('DROP TABLE IF EXISTS `example_table`')
|
49
|
+
}.to_not raise_error
|
50
|
+
end
|
51
|
+
|
28
52
|
it 'can have a whitelist of warnings' do
|
29
53
|
PedantMysql2.ignore(/Truncated incorrect DOUBLE value/i)
|
30
54
|
expect {
|
31
|
-
|
55
|
+
execute_with_warning
|
32
56
|
}.to_not raise_error
|
33
57
|
end
|
34
58
|
|
35
59
|
it 'do not change the returned value' do
|
36
60
|
PedantMysql2.silence_warnings!
|
37
|
-
result =
|
61
|
+
result = execute_with_warning
|
38
62
|
expect(result.to_a).to be == [[1.0]]
|
39
63
|
end
|
40
64
|
|
41
|
-
it '
|
42
|
-
|
65
|
+
it 'does not change the returned value of exec_update' do
|
66
|
+
connection.execute('INSERT INTO comment VALUES (17)')
|
67
|
+
result = connection.update('UPDATE comment SET id = 1 ORDER BY id LIMIT 1')
|
68
|
+
expect(result).to be == 1
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'does not change the returned value of exec_update when there is warnings' do
|
72
|
+
PedantMysql2.silence_warnings!
|
73
|
+
result = connection.update('UPDATE comment SET id = 1 WHERE id > (42+"foo") ORDER BY id LIMIT 1')
|
43
74
|
expect(result).to be_zero
|
44
75
|
end
|
45
76
|
|
46
|
-
it '
|
47
|
-
|
77
|
+
it 'does not change the returned value of exec_delete' do
|
78
|
+
connection.execute('INSERT INTO comment VALUES (17)')
|
79
|
+
result = connection.delete('DELETE FROM comment ORDER BY id LIMIT 1')
|
80
|
+
expect(result).to be == 1
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'does not change the returned value of exec_delete when there is warnings' do
|
84
|
+
PedantMysql2.silence_warnings!
|
85
|
+
result = connection.delete('DELETE FROM comment WHERE id > (42+"foo") ORDER BY id LIMIT 1')
|
48
86
|
expect(result).to be_zero
|
49
87
|
end
|
50
88
|
|
51
89
|
it 'can easily be raised' do
|
52
90
|
PedantMysql2.on_warning = lambda { |warning| raise warning }
|
53
91
|
expect {
|
54
|
-
|
92
|
+
execute_with_warning
|
55
93
|
}.to raise_error(MysqlWarning)
|
56
94
|
end
|
57
95
|
|
@@ -59,22 +97,64 @@ describe PedantMysql2 do
|
|
59
97
|
warnings = nil
|
60
98
|
expect {
|
61
99
|
warnings = PedantMysql2.capture_warnings do
|
62
|
-
|
100
|
+
execute_with_warning
|
63
101
|
end
|
64
102
|
}.to_not raise_error
|
65
|
-
|
103
|
+
|
66
104
|
expect(warnings.size).to be == 1
|
67
105
|
expect(warnings.first).to be_a MysqlWarning
|
68
106
|
expect(warnings.first.message).to be == "Truncated incorrect DOUBLE value: 'foo'"
|
69
107
|
end
|
70
108
|
|
71
109
|
it 'restores the old value that was stored in the thread_local capture_warnings' do
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
110
|
+
warnings1 = nil
|
111
|
+
warnings2 = nil
|
112
|
+
|
113
|
+
warnings1 = PedantMysql2.capture_warnings do
|
114
|
+
execute_with_warning
|
115
|
+
warnings2 = PedantMysql2.capture_warnings do
|
116
|
+
execute_with_warning
|
117
|
+
execute_with_warning
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
expect(warnings1.size).to be == 1
|
122
|
+
expect(warnings2.size).to be == 2
|
123
|
+
expect(warnings2).to_not include(warnings1)
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'should be thread-safe to capture_warnings (when class instance variables were used this did not pass)' do
|
127
|
+
thread = Thread.new do
|
128
|
+
warnings = backup_warnings
|
129
|
+
Thread.stop
|
130
|
+
setup_capture
|
131
|
+
Thread.stop
|
132
|
+
execute_with_warning
|
133
|
+
expect(captured_warnings.size).to be == 1
|
134
|
+
restore_warnings(warnings)
|
76
135
|
end
|
77
|
-
|
136
|
+
|
137
|
+
wait_for(thread)
|
138
|
+
warnings = backup_warnings
|
139
|
+
thread.run
|
140
|
+
wait_for(thread)
|
141
|
+
setup_capture
|
142
|
+
execute_with_warning
|
143
|
+
expect(captured_warnings.size).to be == 1
|
144
|
+
restore_warnings(warnings)
|
145
|
+
thread.run
|
146
|
+
thread.join
|
147
|
+
end
|
148
|
+
|
149
|
+
it 'should inherit on_warning from parent thread' do
|
150
|
+
PedantMysql2.silence_warnings!
|
151
|
+
thread = Thread.new do
|
152
|
+
expect {
|
153
|
+
execute_with_warning
|
154
|
+
}.to_not raise_error
|
155
|
+
end
|
156
|
+
|
157
|
+
thread.join
|
78
158
|
end
|
79
159
|
|
80
160
|
describe MysqlWarning do
|
@@ -82,7 +162,7 @@ describe PedantMysql2 do
|
|
82
162
|
subject do
|
83
163
|
begin
|
84
164
|
PedantMysql2.on_warning = lambda { |warning| raise warning }
|
85
|
-
|
165
|
+
execute_with_warning
|
86
166
|
rescue MysqlWarning => exception
|
87
167
|
exception
|
88
168
|
end
|
data/spec/support/database.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
ActiveRecord::Base.
|
2
|
-
'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
ActiveRecord::Base.establish_connection(:test)
|
1
|
+
ActiveRecord::Base.establish_connection(
|
2
|
+
'adapter' => 'pedant_mysql2',
|
3
|
+
'database' => 'pedant_mysql2_test',
|
4
|
+
'username' => 'root',
|
5
|
+
'encoding' => 'utf8',
|
6
|
+
'host' => 'localhost',
|
7
|
+
'strict' => false,
|
8
|
+
'pool' => 5,
|
9
|
+
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-pedantmysql2-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,19 +120,17 @@ files:
|
|
120
120
|
- ".rspec"
|
121
121
|
- ".travis.yml"
|
122
122
|
- Gemfile
|
123
|
-
- Gemfile.activerecord32
|
124
|
-
- Gemfile.activerecord40
|
125
|
-
- Gemfile.activerecord41
|
126
|
-
- Gemfile.activerecord42
|
127
123
|
- LICENSE.txt
|
128
124
|
- README.md
|
129
125
|
- Rakefile
|
130
126
|
- activerecord-pedantmysql2-adapter.gemspec
|
127
|
+
- gemfiles/Gemfile.activerecord-edge
|
128
|
+
- gemfiles/Gemfile.activerecord52
|
129
|
+
- gemfiles/Gemfile.activerecord60
|
131
130
|
- lib/active_record/connection_adapters/pedant_mysql2_adapter.rb
|
132
131
|
- lib/activerecord-pedantmysql2-adapter.rb
|
133
132
|
- lib/pedant_mysql2.rb
|
134
133
|
- lib/pedant_mysql2/version.rb
|
135
|
-
- shipit.rubygems.yml
|
136
134
|
- spec/adapter_spec.rb
|
137
135
|
- spec/connection_spec.rb
|
138
136
|
- spec/spec_helper.rb
|
@@ -140,7 +138,8 @@ files:
|
|
140
138
|
homepage: https://github.com/Shopify/activerecord-pedantmysql2-adapter
|
141
139
|
licenses:
|
142
140
|
- MIT
|
143
|
-
metadata:
|
141
|
+
metadata:
|
142
|
+
allowed_push_host: https://rubygems.org
|
144
143
|
post_install_message:
|
145
144
|
rdoc_options: []
|
146
145
|
require_paths:
|
@@ -149,15 +148,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
148
|
requirements:
|
150
149
|
- - ">="
|
151
150
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
151
|
+
version: 2.2.2
|
153
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
153
|
requirements:
|
155
154
|
- - ">="
|
156
155
|
- !ruby/object:Gem::Version
|
157
156
|
version: '0'
|
158
157
|
requirements: []
|
159
|
-
|
160
|
-
rubygems_version: 2.2.2
|
158
|
+
rubygems_version: 3.0.3
|
161
159
|
signing_key:
|
162
160
|
specification_version: 4
|
163
161
|
summary: ActiveRecord adapter for MySQL that report warnings.
|
data/Gemfile.activerecord32
DELETED
data/Gemfile.activerecord40
DELETED
data/Gemfile.activerecord41
DELETED
data/Gemfile.activerecord42
DELETED
data/shipit.rubygems.yml
DELETED