swift-db-mysql 0.3.2 → 0.3.3

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: 8a2d227f864cd0f0d15c9050a6e104beeefd1dad
4
- data.tar.gz: 8256f77e0afc725c942c62891e7bddd9f96940c1
3
+ metadata.gz: d3ba088b6da6cd2dfac3811a5da2489388459ae2
4
+ data.tar.gz: 554a7971fd00cc335b4a20a8c060761ce5ef3c3e
5
5
  SHA512:
6
- metadata.gz: 9a5a1167f11e31bfd55ea063d7b6970f368d7e8c8e4a0a56eec536b3883df123b1a30d9778e608e0a61877a5aa212fa928732550b60542af8a0b6deea7234518
7
- data.tar.gz: 278dffe6b9df5136b01165d5fe40103a0671e93d754ff94e0dce40210e76561d5dad4ee61309ab56ebae77a432ca3d758eb95504b818d43840375e773c048ff2
6
+ metadata.gz: 1130346cb2f9a3c209938d556369d94696f37f2b467dd65ffdeed1aa2d85f62d0ee8db9869df6620ce762c8cdc35daf01d2edfaa388f05c5d3359bf905a1bdec
7
+ data.tar.gz: 83abec1d19a0d2759a158900882a94b5e4d354036abc0f94e59f2d4f1069e8168613bc89bef79b595b8c4a56e01bffa927add5ec1c964a943d497a3db4c869d6
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.3 (2018-06-16)
2
+
3
+ * Update mysql include paths to use mysql_config if available.
4
+
1
5
  == 0.3.2 (2015-07-18)
2
6
 
3
7
  * Update mysql include paths.
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Swift MySQL adapter
2
2
 
3
- MRI adapter for MySQL
3
+ Ruby MRI adapter for MySQL.
4
+
5
+ NOTE: This has nothing to do with Swift programming language (OSX, iOS)
4
6
 
5
7
  ## Features
6
8
 
@@ -156,3 +158,5 @@ swift select 0.260000 0.010000 0.270000 ( 0.282307)
156
158
  ## License
157
159
 
158
160
  MIT
161
+
162
+ https://spdx.org/licenses/MIT.html
@@ -26,6 +26,16 @@ lib_paths = %w(
26
26
  /usr/lib32/mysql
27
27
  )
28
28
 
29
+ if File.exists?(%x{which mysql_config}.strip)
30
+ %x{mysql_config --include}.strip.gsub(/-I/, '').split(/\s+/).each do |dir|
31
+ inc_paths.unshift dir
32
+ end
33
+
34
+ %x{mysql_config --libs}.strip.scan(/-L([^ ]+)/).flatten.each do |dir|
35
+ lib_paths.unshift dir
36
+ end
37
+ end
38
+
29
39
  uuid_inc, uuid_lib = dir_config('uuid', '/usr/include/uuid', '/usr/lib')
30
40
  mysql_inc, mysql_lib = dir_config('mysql')
31
41
 
@@ -99,7 +99,7 @@ void init_swift_db_mysql_typecast() {
99
99
  fnew = rb_intern("new");
100
100
  fto_date = rb_intern("to_date");
101
101
  fstrftime = rb_intern("strftime");
102
- dtformat = rb_str_new2("%F %T.%N %z");
102
+ dtformat = rb_str_new2("%F %T.%N");
103
103
 
104
104
  rb_global_variable(&dtformat);
105
105
  }
@@ -37,8 +37,8 @@ describe 'mysql adapter' do
37
37
  row = result.first
38
38
  assert_equal 1, row[:id]
39
39
  assert_equal 'test', row[:name]
40
- assert_equal nil, row[:age]
41
- assert_equal now.to_i, row[:created_at].to_time.to_i
40
+ assert_nil row[:age]
41
+ assert_equal now.to_f.round(0), row[:created_at].to_time.to_i
42
42
 
43
43
  result = db.execute('delete from users where id = 0')
44
44
  assert_equal 0, result.selected_rows
@@ -67,6 +67,7 @@ describe 'mysql adapter' do
67
67
  assert db.execute("insert into users (name, created_at) values (?, ?)", "test", Time.now)
68
68
  assert s = db.prepare("select * from users where id > ? and created_at <= ?")
69
69
 
70
+ sleep 0.5
70
71
  assert_equal 0, s.execute(1, Time.now).selected_rows
71
72
  assert_equal 1, s.execute(0, Time.now).selected_rows
72
73
 
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swift-db-mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bharanee Rathna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-18 00:00:00.000000000 Z
11
+ date: 2018-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Swift adapter for MySQL database
@@ -57,7 +57,8 @@ files:
57
57
  - test/test_encoding.rb
58
58
  - test/test_ssl.rb
59
59
  homepage: http://github.com/deepfryed/swift-db-mysql
60
- licenses: []
60
+ licenses:
61
+ - MIT
61
62
  metadata: {}
62
63
  post_install_message:
63
64
  rdoc_options: []
@@ -76,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 2.2.0
80
+ rubygems_version: 2.6.13
80
81
  signing_key:
81
82
  specification_version: 4
82
83
  summary: Swift mysql adapter
83
84
  test_files: []
84
- has_rdoc: