mysql2 0.3.11 → 0.3.12b1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.rbenv-version +1 -0
- data/Gemfile.lock +61 -0
- data/README.md +58 -0
- data/ext/mysql2/client.c +320 -61
- data/ext/mysql2/client.h +5 -3
- data/ext/mysql2/extconf.rb +6 -5
- data/ext/mysql2/result.c +91 -40
- data/ext/mysql2/result.h +1 -0
- data/lib/mysql2.rb +18 -2
- data/lib/mysql2/client.rb +39 -12
- data/lib/mysql2/em.rb +13 -3
- data/lib/mysql2/version.rb +1 -1
- data/spec/configuration.yml.example +11 -0
- data/spec/em/em_spec.rb +63 -3
- data/spec/mysql2/client_spec.rb +114 -12
- data/spec/mysql2/error_spec.rb +2 -2
- data/spec/mysql2/result_spec.rb +57 -5
- data/spec/spec_helper.rb +3 -1
- data/tasks/rspec.rake +11 -1
- metadata +149 -149
data/spec/mysql2/client_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Mysql2::Client do
|
5
5
|
before(:each) do
|
6
|
-
@client = Mysql2::Client.new
|
6
|
+
@client = Mysql2::Client.new DatabaseCredentials['root']
|
7
7
|
end
|
8
8
|
|
9
9
|
if defined? Encoding
|
@@ -92,6 +92,22 @@ describe Mysql2::Client do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
context "#query" do
|
95
|
+
it "should let you query again if iterating is finished when streaming" do
|
96
|
+
@client.query("SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false).each {}
|
97
|
+
|
98
|
+
expect {
|
99
|
+
@client.query("SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false)
|
100
|
+
}.to_not raise_exception(Mysql2::Error)
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should not let you query again if iterating is not finished when streaming" do
|
104
|
+
@client.query("SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false).first
|
105
|
+
|
106
|
+
expect {
|
107
|
+
@client.query("SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false)
|
108
|
+
}.to raise_exception(Mysql2::Error)
|
109
|
+
end
|
110
|
+
|
95
111
|
it "should only accept strings as the query parameter" do
|
96
112
|
lambda {
|
97
113
|
@client.query ["SELECT 'not right'"]
|
@@ -131,8 +147,21 @@ describe Mysql2::Client do
|
|
131
147
|
}.should raise_error(Mysql2::Error)
|
132
148
|
end
|
133
149
|
|
150
|
+
it "should describe the thread holding the active query" do
|
151
|
+
thr = Thread.new { @client.query("SELECT 1", :async => true) }
|
152
|
+
|
153
|
+
thr.join
|
154
|
+
begin
|
155
|
+
@client.query("SELECT 1")
|
156
|
+
rescue Mysql2::Error => e
|
157
|
+
message = e.message
|
158
|
+
end
|
159
|
+
re = Regexp.escape(thr.inspect)
|
160
|
+
message.should match(Regexp.new(re))
|
161
|
+
end
|
162
|
+
|
134
163
|
it "should timeout if we wait longer than :read_timeout" do
|
135
|
-
client = Mysql2::Client.new(:read_timeout => 1)
|
164
|
+
client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:read_timeout => 1))
|
136
165
|
lambda {
|
137
166
|
client.query("SELECT sleep(2)")
|
138
167
|
}.should raise_error(Mysql2::Error)
|
@@ -184,14 +213,14 @@ describe Mysql2::Client do
|
|
184
213
|
end
|
185
214
|
rescue Timeout::Error
|
186
215
|
end
|
187
|
-
|
216
|
+
|
188
217
|
lambda {
|
189
218
|
@client.query("SELECT 1")
|
190
219
|
}.should raise_error(Mysql2::Error, 'closed MySQL connection')
|
191
220
|
end
|
192
221
|
|
193
222
|
it "should handle Timeouts without leaving the connection hanging if reconnect is true" do
|
194
|
-
client = Mysql2::Client.new(:reconnect => true)
|
223
|
+
client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:reconnect => true))
|
195
224
|
begin
|
196
225
|
Timeout.timeout(1) do
|
197
226
|
client.query("SELECT sleep(2)")
|
@@ -206,7 +235,9 @@ describe Mysql2::Client do
|
|
206
235
|
|
207
236
|
it "threaded queries should be supported" do
|
208
237
|
threads, results = [], {}
|
209
|
-
connect = lambda{
|
238
|
+
connect = lambda{
|
239
|
+
Mysql2::Client.new(DatabaseCredentials['root'])
|
240
|
+
}
|
210
241
|
Timeout.timeout(0.7) do
|
211
242
|
5.times {
|
212
243
|
threads << Thread.new do
|
@@ -238,6 +269,38 @@ describe Mysql2::Client do
|
|
238
269
|
result = @client.async_result
|
239
270
|
result.class.should eql(Mysql2::Result)
|
240
271
|
end
|
272
|
+
|
273
|
+
it "should not allow options to be set on an open connection" do
|
274
|
+
lambda {
|
275
|
+
@client.escape ""
|
276
|
+
@client.query("SELECT 1")
|
277
|
+
@client.options(0, 0)
|
278
|
+
}.should raise_error(Mysql2::Error)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
|
282
|
+
context "Multiple results sets" do
|
283
|
+
before(:each) do
|
284
|
+
@multi_client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:flags => Mysql2::Client::MULTI_STATEMENTS))
|
285
|
+
end
|
286
|
+
|
287
|
+
it "returns multiple result sets" do
|
288
|
+
@multi_client.query( "select 1 as 'set_1'; select 2 as 'set_2'").first.should == { 'set_1' => 1 }
|
289
|
+
|
290
|
+
@multi_client.next_result.should == true
|
291
|
+
@multi_client.store_result.first.should == { 'set_2' => 2 }
|
292
|
+
|
293
|
+
@multi_client.next_result.should == false
|
294
|
+
end
|
295
|
+
|
296
|
+
it "does not interfere with other statements" do
|
297
|
+
@multi_client.query( "select 1 as 'set_1'; select 2 as 'set_2'")
|
298
|
+
while( @multi_client.next_result )
|
299
|
+
@multi_client.store_result
|
300
|
+
end
|
301
|
+
|
302
|
+
@multi_client.query( "select 3 as 'next'").first.should == { 'next' => 3 }
|
303
|
+
end
|
241
304
|
end
|
242
305
|
end
|
243
306
|
|
@@ -345,7 +408,7 @@ describe Mysql2::Client do
|
|
345
408
|
Encoding.default_internal = nil
|
346
409
|
@client.info[:version].encoding.should eql(Encoding.find('utf-8'))
|
347
410
|
|
348
|
-
client2 = Mysql2::Client.new
|
411
|
+
client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => 'ascii'))
|
349
412
|
client2.info[:version].encoding.should eql(Encoding.find('us-ascii'))
|
350
413
|
end
|
351
414
|
|
@@ -384,7 +447,7 @@ describe Mysql2::Client do
|
|
384
447
|
Encoding.default_internal = nil
|
385
448
|
@client.server_info[:version].encoding.should eql(Encoding.find('utf-8'))
|
386
449
|
|
387
|
-
client2 = Mysql2::Client.new
|
450
|
+
client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => 'ascii'))
|
388
451
|
client2.server_info[:version].encoding.should eql(Encoding.find('us-ascii'))
|
389
452
|
end
|
390
453
|
|
@@ -403,7 +466,7 @@ describe Mysql2::Client do
|
|
403
466
|
}.should raise_error(Mysql2::Error)
|
404
467
|
|
405
468
|
lambda {
|
406
|
-
good_client = Mysql2::Client.new
|
469
|
+
good_client = Mysql2::Client.new DatabaseCredentials['root']
|
407
470
|
}.should_not raise_error(Mysql2::Error)
|
408
471
|
end
|
409
472
|
|
@@ -451,15 +514,54 @@ describe Mysql2::Client do
|
|
451
514
|
@client.should respond_to(:ping)
|
452
515
|
end
|
453
516
|
|
517
|
+
context "select_db" do
|
518
|
+
before(:each) do
|
519
|
+
2.times do |i|
|
520
|
+
@client.query("CREATE DATABASE test_selectdb_#{i}")
|
521
|
+
@client.query("USE test_selectdb_#{i}")
|
522
|
+
@client.query("CREATE TABLE test#{i} (`id` int NOT NULL PRIMARY KEY)")
|
523
|
+
end
|
524
|
+
end
|
525
|
+
|
526
|
+
after(:each) do
|
527
|
+
2.times do |i|
|
528
|
+
@client.query("DROP DATABASE test_selectdb_#{i}")
|
529
|
+
end
|
530
|
+
end
|
531
|
+
|
532
|
+
it "should respond to #select_db" do
|
533
|
+
@client.should respond_to(:select_db)
|
534
|
+
end
|
535
|
+
|
536
|
+
it "should switch databases" do
|
537
|
+
@client.select_db("test_selectdb_0")
|
538
|
+
@client.query("SHOW TABLES").first.values.first.should eql("test0")
|
539
|
+
@client.select_db("test_selectdb_1")
|
540
|
+
@client.query("SHOW TABLES").first.values.first.should eql("test1")
|
541
|
+
@client.select_db("test_selectdb_0")
|
542
|
+
@client.query("SHOW TABLES").first.values.first.should eql("test0")
|
543
|
+
end
|
544
|
+
|
545
|
+
it "should raise a Mysql2::Error when the database doesn't exist" do
|
546
|
+
lambda {
|
547
|
+
@client.select_db("nopenothere")
|
548
|
+
}.should raise_error(Mysql2::Error)
|
549
|
+
end
|
550
|
+
|
551
|
+
it "should return the database switched to" do
|
552
|
+
@client.select_db("test_selectdb_1").should eq("test_selectdb_1")
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
454
556
|
it "#thread_id should return a boolean" do
|
455
557
|
@client.ping.should eql(true)
|
456
558
|
@client.close
|
457
559
|
@client.ping.should eql(false)
|
458
560
|
end
|
459
561
|
|
460
|
-
if RUBY_VERSION =~ /1.9/
|
461
|
-
|
462
|
-
|
562
|
+
if RUBY_VERSION =~ /1.9/
|
563
|
+
it "should respond to #encoding" do
|
564
|
+
@client.should respond_to(:encoding)
|
565
|
+
end
|
463
566
|
end
|
464
567
|
end
|
465
|
-
end
|
data/spec/mysql2/error_spec.rb
CHANGED
@@ -3,14 +3,14 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Mysql2::Error do
|
5
5
|
before(:each) do
|
6
|
-
@client = Mysql2::Client.new
|
6
|
+
@client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => "utf8"))
|
7
7
|
begin
|
8
8
|
@client.query("HAHAHA")
|
9
9
|
rescue Mysql2::Error => e
|
10
10
|
@error = e
|
11
11
|
end
|
12
12
|
|
13
|
-
@client2 = Mysql2::Client.new
|
13
|
+
@client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => "big5"))
|
14
14
|
begin
|
15
15
|
@client2.query("HAHAHA")
|
16
16
|
rescue Mysql2::Error => e
|
data/spec/mysql2/result_spec.rb
CHANGED
@@ -3,13 +3,42 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Mysql2::Result do
|
5
5
|
before(:each) do
|
6
|
-
@client = Mysql2::Client.new
|
6
|
+
@client = Mysql2::Client.new DatabaseCredentials['root']
|
7
7
|
end
|
8
8
|
|
9
9
|
before(:each) do
|
10
10
|
@result = @client.query "SELECT 1"
|
11
11
|
end
|
12
12
|
|
13
|
+
it "should maintain a count while streaming" do
|
14
|
+
result = @client.query('SELECT 1')
|
15
|
+
|
16
|
+
result.count.should eql(1)
|
17
|
+
result.each { |r| }
|
18
|
+
result.count.should eql(1)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should set the actual count of rows after streaming" do
|
22
|
+
@client.query "USE test"
|
23
|
+
result = @client.query("SELECT * FROM mysql2_test", :stream => true, :cache_rows => false)
|
24
|
+
result.count.should eql(0)
|
25
|
+
result.each {|r| }
|
26
|
+
result.count.should eql(1)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should not yield nil at the end of streaming" do
|
30
|
+
result = @client.query('SELECT * FROM mysql2_test', :stream => true)
|
31
|
+
result.each { |r| r.should_not be_nil}
|
32
|
+
end
|
33
|
+
|
34
|
+
it "#count should be zero for rows after streaming when there were no results " do
|
35
|
+
@client.query "USE test"
|
36
|
+
result = @client.query("SELECT * FROM mysql2_test WHERE null_test IS NOT NULL", :stream => true, :cache_rows => false)
|
37
|
+
result.count.should eql(0)
|
38
|
+
result.each {|r| }
|
39
|
+
result.count.should eql(0)
|
40
|
+
end
|
41
|
+
|
13
42
|
it "should have included Enumerable" do
|
14
43
|
Mysql2::Result.ancestors.include?(Enumerable).should be_true
|
15
44
|
end
|
@@ -73,6 +102,25 @@ describe Mysql2::Result do
|
|
73
102
|
result = @client.query "SELECT 1", :cache_rows => false
|
74
103
|
result.first.object_id.should_not eql(result.first.object_id)
|
75
104
|
end
|
105
|
+
|
106
|
+
it "should yield different value for #first if streaming" do
|
107
|
+
result = @client.query "SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false
|
108
|
+
result.first.should_not eql(result.first)
|
109
|
+
end
|
110
|
+
|
111
|
+
it "should yield the same value for #first if streaming is disabled" do
|
112
|
+
result = @client.query "SELECT 1 UNION SELECT 2", :stream => false
|
113
|
+
result.first.should eql(result.first)
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should throw an exception if we try to iterate twice when streaming is enabled" do
|
117
|
+
result = @client.query "SELECT 1 UNION SELECT 2", :stream => true, :cache_rows => false
|
118
|
+
|
119
|
+
expect {
|
120
|
+
result.each {}
|
121
|
+
result.each {}
|
122
|
+
}.to raise_exception(Mysql2::Error)
|
123
|
+
end
|
76
124
|
end
|
77
125
|
|
78
126
|
context "#fields" do
|
@@ -127,13 +175,17 @@ describe Mysql2::Result do
|
|
127
175
|
id1 = @client.last_id
|
128
176
|
@client.query 'INSERT INTO mysql2_test (bool_cast_test) VALUES (0)'
|
129
177
|
id2 = @client.last_id
|
178
|
+
@client.query 'INSERT INTO mysql2_test (bool_cast_test) VALUES (-1)'
|
179
|
+
id3 = @client.last_id
|
130
180
|
|
131
181
|
result1 = @client.query 'SELECT bool_cast_test FROM mysql2_test WHERE bool_cast_test = 1 LIMIT 1', :cast_booleans => true
|
132
182
|
result2 = @client.query 'SELECT bool_cast_test FROM mysql2_test WHERE bool_cast_test = 0 LIMIT 1', :cast_booleans => true
|
183
|
+
result3 = @client.query 'SELECT bool_cast_test FROM mysql2_test WHERE bool_cast_test = -1 LIMIT 1', :cast_booleans => true
|
133
184
|
result1.first['bool_cast_test'].should be_true
|
134
185
|
result2.first['bool_cast_test'].should be_false
|
186
|
+
result3.first['bool_cast_test'].should be_true
|
135
187
|
|
136
|
-
@client.query "DELETE from mysql2_test WHERE id IN(#{id1},#{id2})"
|
188
|
+
@client.query "DELETE from mysql2_test WHERE id IN(#{id1},#{id2},#{id3})"
|
137
189
|
end
|
138
190
|
|
139
191
|
it "should return Fixnum for a SMALLINT value" do
|
@@ -255,7 +307,7 @@ describe Mysql2::Result do
|
|
255
307
|
result = @client.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
256
308
|
result['enum_test'].encoding.should eql(Encoding.find('utf-8'))
|
257
309
|
|
258
|
-
client2 = Mysql2::Client.new
|
310
|
+
client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => 'ascii'))
|
259
311
|
client2.query "USE test"
|
260
312
|
result = client2.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
261
313
|
result['enum_test'].encoding.should eql(Encoding.find('us-ascii'))
|
@@ -284,7 +336,7 @@ describe Mysql2::Result do
|
|
284
336
|
result = @client.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
285
337
|
result['set_test'].encoding.should eql(Encoding.find('utf-8'))
|
286
338
|
|
287
|
-
client2 = Mysql2::Client.new
|
339
|
+
client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => 'ascii'))
|
288
340
|
client2.query "USE test"
|
289
341
|
result = client2.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
290
342
|
result['set_test'].encoding.should eql(Encoding.find('us-ascii'))
|
@@ -366,7 +418,7 @@ describe Mysql2::Result do
|
|
366
418
|
result = @client.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
367
419
|
result[field].encoding.should eql(Encoding.find('utf-8'))
|
368
420
|
|
369
|
-
client2 = Mysql2::Client.new
|
421
|
+
client2 = Mysql2::Client.new(DatabaseCredentials['root'].merge(:encoding => 'ascii'))
|
370
422
|
client2.query "USE test"
|
371
423
|
result = client2.query("SELECT * FROM mysql2_test ORDER BY id DESC LIMIT 1").first
|
372
424
|
result[field].encoding.should eql(Encoding.find('us-ascii'))
|
data/spec/spec_helper.rb
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
require 'rspec'
|
4
4
|
require 'mysql2'
|
5
5
|
require 'timeout'
|
6
|
+
require 'yaml'
|
7
|
+
DatabaseCredentials = YAML.load_file('spec/configuration.yml')
|
6
8
|
|
7
9
|
RSpec.configure do |config|
|
8
10
|
config.before(:all) do
|
9
|
-
client = Mysql2::Client.new
|
11
|
+
client = Mysql2::Client.new DatabaseCredentials['root']
|
10
12
|
client.query %[
|
11
13
|
CREATE TABLE IF NOT EXISTS mysql2_test (
|
12
14
|
id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
data/tasks/rspec.rake
CHANGED
@@ -13,4 +13,14 @@ begin
|
|
13
13
|
task :default => :spec
|
14
14
|
rescue LoadError
|
15
15
|
puts "rspec, or one of its dependencies, is not available. Install it with: sudo gem install rspec"
|
16
|
-
end
|
16
|
+
end
|
17
|
+
|
18
|
+
file 'spec/configuration.yml' => 'spec/configuration.yml.example' do |task|
|
19
|
+
CLEAN.exclude task.name
|
20
|
+
src_path = File.expand_path("../../#{task.prerequisites.first}", __FILE__)
|
21
|
+
dst_path = File.expand_path("../../#{task.name}", __FILE__)
|
22
|
+
cp src_path, dst_path
|
23
|
+
sh "sed -i 's/LOCALUSERNAME/#{ENV['USER']}/' #{dst_path}"
|
24
|
+
end
|
25
|
+
|
26
|
+
Rake::Task[:spec].prerequisites << :'spec/configuration.yml'
|
metadata
CHANGED
@@ -1,168 +1,175 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 11
|
10
|
-
version: 0.3.11
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.12b1
|
5
|
+
prerelease: 6
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Brian Lopez
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-08-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: eventmachine
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rake-compiler
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake-compiler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
|
-
requirements:
|
34
|
+
requirements:
|
41
35
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 13
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
- 7
|
47
|
-
- 7
|
36
|
+
- !ruby/object:Gem::Version
|
48
37
|
version: 0.7.7
|
49
38
|
type: :development
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rake
|
53
39
|
prerelease: false
|
54
|
-
|
55
|
-
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.7.7
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
64
53
|
version: 0.8.7
|
65
54
|
type: :development
|
66
|
-
version_requirements: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rspec
|
69
55
|
prerelease: false
|
70
|
-
|
71
|
-
none: false
|
72
|
-
requirements:
|
73
|
-
- -
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.8.7
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
79
70
|
type: :development
|
80
|
-
version_requirements: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: activerecord
|
83
71
|
prerelease: false
|
84
|
-
|
85
|
-
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: activerecord
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
93
86
|
type: :development
|
94
|
-
version_requirements: *id005
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: mysql
|
97
87
|
prerelease: false
|
98
|
-
|
99
|
-
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: mysql
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
107
102
|
type: :development
|
108
|
-
version_requirements: *id006
|
109
|
-
- !ruby/object:Gem::Dependency
|
110
|
-
name: do_mysql
|
111
103
|
prerelease: false
|
112
|
-
|
113
|
-
none: false
|
114
|
-
requirements:
|
115
|
-
- -
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: do_mysql
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
121
118
|
type: :development
|
122
|
-
version_requirements: *id007
|
123
|
-
- !ruby/object:Gem::Dependency
|
124
|
-
name: sequel
|
125
119
|
prerelease: false
|
126
|
-
|
127
|
-
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: sequel
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
135
134
|
type: :development
|
136
|
-
version_requirements: *id008
|
137
|
-
- !ruby/object:Gem::Dependency
|
138
|
-
name: faker
|
139
135
|
prerelease: false
|
140
|
-
|
141
|
-
none: false
|
142
|
-
requirements:
|
143
|
-
- -
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: faker
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
149
150
|
type: :development
|
150
|
-
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
151
158
|
description:
|
152
159
|
email: seniorlopez@gmail.com
|
153
160
|
executables: []
|
154
|
-
|
155
|
-
extensions:
|
161
|
+
extensions:
|
156
162
|
- ext/mysql2/extconf.rb
|
157
163
|
extra_rdoc_files: []
|
158
|
-
|
159
|
-
files:
|
164
|
+
files:
|
160
165
|
- .gitignore
|
166
|
+
- .rbenv-version
|
161
167
|
- .rspec
|
162
168
|
- .rvmrc
|
163
169
|
- .travis.yml
|
164
170
|
- CHANGELOG.md
|
165
171
|
- Gemfile
|
172
|
+
- Gemfile.lock
|
166
173
|
- MIT-LICENSE
|
167
174
|
- README.md
|
168
175
|
- Rakefile
|
@@ -192,6 +199,7 @@ files:
|
|
192
199
|
- lib/mysql2/result.rb
|
193
200
|
- lib/mysql2/version.rb
|
194
201
|
- mysql2.gemspec
|
202
|
+
- spec/configuration.yml.example
|
195
203
|
- spec/em/em_spec.rb
|
196
204
|
- spec/mysql2/client_spec.rb
|
197
205
|
- spec/mysql2/error_spec.rb
|
@@ -202,43 +210,35 @@ files:
|
|
202
210
|
- tasks/compile.rake
|
203
211
|
- tasks/rspec.rake
|
204
212
|
- tasks/vendor_mysql.rake
|
205
|
-
has_rdoc: true
|
206
213
|
homepage: http://github.com/brianmario/mysql2
|
207
214
|
licenses: []
|
208
|
-
|
209
215
|
post_install_message:
|
210
|
-
rdoc_options:
|
216
|
+
rdoc_options:
|
211
217
|
- --charset=UTF-8
|
212
|
-
require_paths:
|
218
|
+
require_paths:
|
213
219
|
- lib
|
214
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
220
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
215
221
|
none: false
|
216
|
-
requirements:
|
217
|
-
- -
|
218
|
-
- !ruby/object:Gem::Version
|
219
|
-
|
220
|
-
|
221
|
-
- 0
|
222
|
-
version: "0"
|
223
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ! '>='
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '0'
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
224
227
|
none: false
|
225
|
-
requirements:
|
226
|
-
- -
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
|
229
|
-
segments:
|
230
|
-
- 0
|
231
|
-
version: "0"
|
228
|
+
requirements:
|
229
|
+
- - ! '>'
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: 1.3.1
|
232
232
|
requirements: []
|
233
|
-
|
234
233
|
rubyforge_project:
|
235
|
-
rubygems_version: 1.
|
234
|
+
rubygems_version: 1.8.23
|
236
235
|
signing_key:
|
237
236
|
specification_version: 3
|
238
237
|
summary: A simple, fast Mysql library for Ruby, binding to libmysql
|
239
|
-
test_files:
|
238
|
+
test_files:
|
240
239
|
- examples/eventmachine.rb
|
241
240
|
- examples/threaded.rb
|
241
|
+
- spec/configuration.yml.example
|
242
242
|
- spec/em/em_spec.rb
|
243
243
|
- spec/mysql2/client_spec.rb
|
244
244
|
- spec/mysql2/error_spec.rb
|