mysql2 0.3.14 → 0.3.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +65 -25
- data/ext/mysql2/client.c +20 -15
- data/ext/mysql2/client.h +4 -2
- data/ext/mysql2/infile.c +119 -0
- data/ext/mysql2/infile.h +1 -0
- data/ext/mysql2/mysql2_ext.h +1 -0
- data/ext/mysql2/result.c +14 -13
- data/lib/mysql2/error.rb +72 -6
- data/lib/mysql2/version.rb +1 -1
- data/spec/mysql2/client_spec.rb +114 -20
- data/spec/mysql2/error_spec.rb +57 -47
- data/spec/mysql2/result_spec.rb +131 -94
- data/spec/spec_helper.rb +9 -0
- data/spec/test_data +1 -0
- metadata +6 -2
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,15 @@ require 'yaml'
|
|
7
7
|
DatabaseCredentials = YAML.load_file('spec/configuration.yml')
|
8
8
|
|
9
9
|
RSpec.configure do |config|
|
10
|
+
def with_internal_encoding(encoding)
|
11
|
+
old_enc = Encoding.default_internal
|
12
|
+
Encoding.default_internal = encoding
|
13
|
+
|
14
|
+
yield
|
15
|
+
ensure
|
16
|
+
Encoding.default_internal = old_enc
|
17
|
+
end
|
18
|
+
|
10
19
|
config.before :each do
|
11
20
|
@client = Mysql2::Client.new DatabaseCredentials['root']
|
12
21
|
end
|
data/spec/test_data
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
\N Hello World
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -78,6 +78,8 @@ files:
|
|
78
78
|
- ext/mysql2/client.c
|
79
79
|
- ext/mysql2/client.h
|
80
80
|
- ext/mysql2/extconf.rb
|
81
|
+
- ext/mysql2/infile.c
|
82
|
+
- ext/mysql2/infile.h
|
81
83
|
- ext/mysql2/mysql2_ext.c
|
82
84
|
- ext/mysql2/mysql2_ext.h
|
83
85
|
- ext/mysql2/mysql_enc_name_to_ruby.h
|
@@ -104,6 +106,7 @@ files:
|
|
104
106
|
- spec/mysql2/result_spec.rb
|
105
107
|
- spec/rcov.opts
|
106
108
|
- spec/spec_helper.rb
|
109
|
+
- spec/test_data
|
107
110
|
homepage: http://github.com/brianmario/mysql2
|
108
111
|
licenses:
|
109
112
|
- MIT
|
@@ -140,3 +143,4 @@ test_files:
|
|
140
143
|
- spec/mysql2/result_spec.rb
|
141
144
|
- spec/rcov.opts
|
142
145
|
- spec/spec_helper.rb
|
146
|
+
- spec/test_data
|