mysql2 0.4.10 → 0.5.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.
@@ -1,5 +1,3 @@
1
- # encoding: UTF-8
2
-
3
1
  require 'rspec'
4
2
  require 'mysql2'
5
3
  require 'timeout'
@@ -36,6 +34,12 @@ RSpec.configure do |config|
36
34
  end
37
35
  end
38
36
 
37
+ def num_classes
38
+ # rubocop:disable Lint/UnifiedInteger
39
+ 0.class == Integer ? [Integer] : [Fixnum, Bignum]
40
+ # rubocop:enable Lint/UnifiedInteger
41
+ end
42
+
39
43
  config.before :each do
40
44
  @client = new_client
41
45
  end
@@ -45,8 +45,8 @@ mysql_to_rb = {
45
45
  "eucjpms" => "eucJP-ms",
46
46
  }
47
47
 
48
- client = Mysql2::Client.new(:username => user, :password => pass, :host => host, :port => port.to_i)
49
- collations = client.query "SHOW COLLATION", :as => :array
48
+ client = Mysql2::Client.new(username: user, password: pass, host: host, port: port.to_i)
49
+ collations = client.query "SHOW COLLATION", as: :array
50
50
  encodings = Array.new(collations.to_a.last[2].to_i)
51
51
  encodings_with_nil = Array.new(encodings.size)
52
52
 
@@ -40,7 +40,7 @@ mysql_to_rb = {
40
40
  "eucjpms" => "eucJP-ms",
41
41
  }
42
42
 
43
- puts <<-header
43
+ puts <<-HEADER
44
44
  %readonly-tables
45
45
  %enum
46
46
  %define lookup-function-name mysql2_mysql_enc_name_to_rb
@@ -48,13 +48,13 @@ puts <<-header
48
48
  %struct-type
49
49
  struct mysql2_mysql_enc_name_to_rb_map { const char *name; const char *rb_name; }
50
50
  %%
51
- header
51
+ HEADER
52
52
 
53
53
  mysql_to_rb.each do |mysql, ruby|
54
- if ruby.nil?
55
- name = "NULL"
54
+ name = if ruby.nil?
55
+ "NULL"
56
56
  else
57
- name = "\"#{ruby}\""
57
+ "\"#{ruby}\""
58
58
  end
59
59
 
60
60
  puts "#{mysql}, #{name}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Lopez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-14 00:00:00.000000000 Z
12
+ date: 2018-04-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -75,10 +75,11 @@ files:
75
75
  - support/libmysql.def
76
76
  - support/mysql_enc_to_ruby.rb
77
77
  - support/ruby_enc_to_mysql.rb
78
- homepage: http://github.com/brianmario/mysql2
78
+ homepage: https://github.com/brianmario/mysql2
79
79
  licenses:
80
80
  - MIT
81
- metadata: {}
81
+ metadata:
82
+ msys2_mingw_dependencies: libmariadbclient
82
83
  post_install_message:
83
84
  rdoc_options:
84
85
  - "--charset=UTF-8"
@@ -88,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
89
  requirements:
89
90
  - - ">="
90
91
  - !ruby/object:Gem::Version
91
- version: '0'
92
+ version: 2.0.0
92
93
  required_rubygems_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - ">="