activerecord-pedantmysql2-adapter 1.0.0 → 1.0.1

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: ae59f56c8a3de9383b3b3adf3dac205a6f78f7be
4
- data.tar.gz: 481ff991e458d0637294de4b8c410e23f4198df4
3
+ metadata.gz: 37c3b963b0b4bb1c8128ec4b745fce6915796f65
4
+ data.tar.gz: d26e7b34382ec8108830e5145f5a4376c413a9c4
5
5
  SHA512:
6
- metadata.gz: 25ca80f3663d71ae4fec636c74de5b832828136fff457c01c35de5c21cf5f403734a3759b13936ca84aa52aaf366b60b51c2c30d37c0affa0981127c4a6820a3
7
- data.tar.gz: e1824ac53a863b29d8f0da7104dfc1157d92c246a822d6ed4b8e72b8d7791ea6f5097c5feef35889df9c9ce07fe5879ae055be16a0dc8cd5fe8b98f97c12f633
6
+ metadata.gz: a61634eb872f51c607c5dc2f50904fac8057522b88e94809f1094a068e704642b71868ef7d86b5c990b3a39212a4781b19ae34f1bb81daba96a70c7a45c9e800
7
+ data.tar.gz: 543e8afda7636bc01fdd9a72aeb588365bf9b2cbd68fbd5377fdbb4b45c872fcdf9c9c3d7c6003fcfbeae045850a1080362aae0430466e105805175c8b1b4b8d
data/.travis.yml CHANGED
@@ -3,5 +3,13 @@ rvm:
3
3
  - 2.0.0
4
4
  - 2.1.2
5
5
 
6
+ gemfile:
7
+ - Gemfile.activerecord32
8
+ - Gemfile.activerecord40
9
+ - Gemfile.activerecord41
10
+ - Gemfile.activerecord42
11
+
6
12
  before_script:
7
13
  - mysql -e 'create database pedant_mysql2_test;'
14
+
15
+ sudo: false
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'activerecord', '~> 3.2.0'
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'activerecord', '~> 4.0.0'
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'activerecord', '~> 4.1.0'
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ gem 'activerecord', '~> 4.2.0.rc1'
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PedantMysql2
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -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(ActiveRecord::NoDatabaseError)
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.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-03 00:00:00.000000000 Z
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: '0'
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: '0'
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