activerecord-pedantmysql2-adapter 0.1.0 → 0.1.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: 9d97c6c15fa963892eb43e540db0991eb1faa0f4
4
- data.tar.gz: 126aac6ba50510b2b98019e78ab7a2a7d0b4b1a6
3
+ metadata.gz: e590eeb3922b4dec13eb497568619d252decce72
4
+ data.tar.gz: 4fe690e1ea1684d749c0c97e0c9a7b6dc5bc1bdb
5
5
  SHA512:
6
- metadata.gz: 94478f4e513f574c69832141987a3c78131a93e20d076aa8cadf78affc2dd17ef237e9dba84a2fc854f8aac24177299d1859182dc99cc3f9a3c9ee3f6a70bb38
7
- data.tar.gz: 30a1e65591898dc7dd60352e603386db1a3f16ecbc4b35fbff7fcaa7321cf29a915b61e630264d45c0bfd39e55695bfda1699845a074b732764629dcc821859d
6
+ metadata.gz: 6808c691edaf9a7c01ee54180b5fc48a4fd4d390046c0898841a4645f8ff6bf7f0de62f10fd1a0a22b8531db42f3f30205a0f8bed97feb9c18059b50662fbed9
7
+ data.tar.gz: e1a521d2c7b817059695f6442839daaf77c66cb7208e06e6bac97ba255fbf59a4b9c04c034c649bde00ec21c7ec49d15b9d397ec2d114ef01cfbf6567a4c186f
@@ -16,7 +16,7 @@ module ActiveRecord
16
16
  ActiveRecord::ConnectionAdapters::PedantMysql2Adapter.new(client, logger, options, config)
17
17
  rescue Mysql2::Error => error
18
18
  if error.message.include?("Unknown database") && defined?(ActiveRecord::NoDatabaseError)
19
- raise ActiveRecord::NoDatabaseError.new(error.message, error)
19
+ raise ActiveRecord::NoDatabaseError.new(error.message)
20
20
  else
21
21
  raise
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module PedantMysql2
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
data/shipit.rubygems.yml CHANGED
@@ -1 +1,2 @@
1
- # using the default shipit config
1
+ fetch:
2
+ - fetch-gem-version activerecord-pedantmysql2-adapter Shopify/activerecord-pedantmysql2-adapter
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ class Mock
4
+ include ActiveRecord::ConnectionHandling
5
+ def logger
6
+ nil
7
+ end
8
+ end
9
+
10
+ describe ActiveRecord::ConnectionHandling do
11
+
12
+ it 'raises NoDatabaseError correctly' do
13
+ expect {
14
+ Mock.new.pedant_mysql2_connection({host: 'localhost', database: 'nosuchthing'})
15
+ }.to raise_error(ActiveRecord::NoDatabaseError)
16
+ end
17
+
18
+ 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: 0.1.0
4
+ version: 0.1.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-06-10 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -130,6 +130,7 @@ files:
130
130
  - lib/pedant_mysql2/version.rb
131
131
  - shipit.rubygems.yml
132
132
  - spec/adapter_spec.rb
133
+ - spec/connection_spec.rb
133
134
  - spec/spec_helper.rb
134
135
  - spec/support/database.rb
135
136
  homepage: https://github.com/Shopify/activerecord-pedantmysql2-adapter
@@ -152,11 +153,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  requirements: []
154
155
  rubyforge_project:
155
- rubygems_version: 2.2.1
156
+ rubygems_version: 2.2.2
156
157
  signing_key:
157
158
  specification_version: 4
158
159
  summary: ActiveRecord adapter for MySQL that report warnings.
159
160
  test_files:
160
161
  - spec/adapter_spec.rb
162
+ - spec/connection_spec.rb
161
163
  - spec/spec_helper.rb
162
164
  - spec/support/database.rb