activerecord-pedantmysql2-adapter 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/Gemfile.activerecord32 +4 -0
- data/Gemfile.activerecord40 +4 -0
- data/Gemfile.activerecord41 +4 -0
- data/Gemfile.activerecord42 +4 -0
- data/activerecord-pedantmysql2-adapter.gemspec +1 -1
- data/lib/active_record/connection_adapters/pedant_mysql2_adapter.rb +3 -1
- data/lib/pedant_mysql2/version.rb +1 -1
- data/spec/connection_spec.rb +2 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c3b963b0b4bb1c8128ec4b745fce6915796f65
|
4
|
+
data.tar.gz: d26e7b34382ec8108830e5145f5a4376c413a9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61634eb872f51c607c5dc2f50904fac8057522b88e94809f1094a068e704642b71868ef7d86b5c990b3a39212a4781b19ae34f1bb81daba96a70c7a45c9e800
|
7
|
+
data.tar.gz: 543e8afda7636bc01fdd9a72aeb588365bf9b2cbd68fbd5377fdbb4b45c872fcdf9c9c3d7c6003fcfbeae045850a1080362aae0430466e105805175c8b1b4b8d
|
data/.travis.yml
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'activerecord'
|
21
|
+
spec.add_dependency 'activerecord', '>= 3.2'
|
22
22
|
spec.add_dependency 'mysql2', '>= 0.3.12'
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
24
24
|
spec.add_development_dependency 'rake'
|
@@ -34,7 +34,6 @@ class MysqlWarning < StandardError
|
|
34
34
|
@level = level
|
35
35
|
@query = query
|
36
36
|
end
|
37
|
-
|
38
37
|
end
|
39
38
|
|
40
39
|
class ActiveRecord::ConnectionAdapters::PedantMysql2Adapter < ActiveRecord::ConnectionAdapters::Mysql2Adapter
|
@@ -67,5 +66,8 @@ class ActiveRecord::ConnectionAdapters::PedantMysql2Adapter < ActiveRecord::Conn
|
|
67
66
|
::PedantMysql2.on_warning.call(warning) unless PedantMysql2.ignored?(warning)
|
68
67
|
end
|
69
68
|
end
|
69
|
+
end
|
70
70
|
|
71
|
+
if ActiveRecord::VERSION::MAJOR == 3
|
72
|
+
ActiveRecord::Base.extend(ActiveRecord::ConnectionHandling)
|
71
73
|
end
|
data/spec/connection_spec.rb
CHANGED
@@ -10,9 +10,10 @@ end
|
|
10
10
|
describe ActiveRecord::ConnectionHandling do
|
11
11
|
|
12
12
|
it 'raises NoDatabaseError correctly' do
|
13
|
+
error_class = defined?(ActiveRecord::NoDatabaseError) ? ActiveRecord::NoDatabaseError : Mysql2::Error
|
13
14
|
expect {
|
14
15
|
Mock.new.pedant_mysql2_connection({host: 'localhost', database: 'nosuchthing'})
|
15
|
-
}.to raise_error(
|
16
|
+
}.to raise_error(error_class)
|
16
17
|
end
|
17
18
|
|
18
19
|
end
|
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.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-19 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: '3.2'
|
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: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mysql2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +120,10 @@ files:
|
|
120
120
|
- ".rspec"
|
121
121
|
- ".travis.yml"
|
122
122
|
- Gemfile
|
123
|
+
- Gemfile.activerecord32
|
124
|
+
- Gemfile.activerecord40
|
125
|
+
- Gemfile.activerecord41
|
126
|
+
- Gemfile.activerecord42
|
123
127
|
- LICENSE.txt
|
124
128
|
- README.md
|
125
129
|
- Rakefile
|