monetdb 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDM4MTYxZDU3NDFmMzBmZTAyNzVlNGVkYzk4YjRkNzAzYmQzOTg5NQ==
5
- data.tar.gz: !binary |-
6
- OGNjYTFhMmE1Y2MwY2Y0NjY1Y2I2YTZmZDRiMTVlMWI3MmI0MjMyYg==
2
+ SHA1:
3
+ metadata.gz: b65376c8c44ab25d53fb11a3ea71eccdefdf17af
4
+ data.tar.gz: c1cc54f229f805c5b881afe0f407a99ee4c74399
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NTUzYjJkOWQ4ZjUxMDViNDA1YmQ4NDZhYjQ0NWU4ZTMwN2IzODY3ZjA0MTZi
10
- ZTZhOWQ5NGM5YWQ5ZDRmOTFkMGQzNTZkYTk5MDhiZDU1NDdjZTY1NzJiNzUx
11
- NmY1NjQ1YjNiNzc3ZWI5MmIyNzc3ZTZiMDRiZWY1NjI3ZDEzY2U=
12
- data.tar.gz: !binary |-
13
- ZTQ4MzQzMjRhM2E3NTVjMjI3ZTMwNjY0NzZjMWFmNTA5MTY4NThhZjEyMjcw
14
- MTZhMzQ3Y2VhZmY5ODZjNzBkZGU1Yjg5MmNjNDgzMDBlMGZjYTA3NzRmNTAw
15
- ODQ4ZDEzNGY4NWMwYWQ4ZmQ5ZDgyMWI4YWUzODI4MGI3MTM2ZmQ=
6
+ metadata.gz: 982b33bae2e5b601f4e6e687cba94ec8904e61bb531a8b8534ebc555d7927c68969dcecb600be613640d03fd7dac6e068b25ba4d3c92a679c642476998c3ce93
7
+ data.tar.gz: bb80bdfc4bc714da1cae585fa7144aae2b88531413227c0c29e1dc8956d247aef4f1136b9b06f62270588ffb04b70338c722f5209a1c331413b07d0fe16f6c14
@@ -1,5 +1,9 @@
1
1
  = MonetDB CHANGELOG
2
2
 
3
+ == Version 0.2.9 (July 3, 2015)
4
+
5
+ * Support for UTF-8 and extra data types (credits to https://github.com/dlorson)
6
+
3
7
  == Version 0.2.8 (November 27, 2014)
4
8
 
5
9
  * Supporting :wrd and :serial data types
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.8
1
+ 0.2.9
@@ -37,7 +37,7 @@ module MonetDB
37
37
  chunks = message.scan(/.{1,#{MAX_MSG_SIZE}}/m)
38
38
  chunks.each_with_index.to_a.collect do |chunk, index|
39
39
  last_bit = (index == chunks.size - 1) ? 1 : 0
40
- length = [(chunk.size << 1) | last_bit].pack("v")
40
+ length = [(chunk.bytes.to_a.size << 1) | last_bit].pack("v").force_encoding('utf-8')
41
41
  "#{length}#{chunk}"
42
42
  end.freeze
43
43
  end
@@ -36,7 +36,7 @@ module MonetDB
36
36
  def parse_value(type, value)
37
37
  unless value == "NULL"
38
38
  case type
39
- when :varchar, :text
39
+ when :varchar, :text, :string, :clob
40
40
  parse_string_value value
41
41
  when :int, :smallint, :bigint, :serial, :wrd
42
42
  parse_integer_value value
@@ -46,7 +46,7 @@ module MonetDB
46
46
  parse_date_value value
47
47
  when :timestamp
48
48
  parse_date_time_value value
49
- when :tinyint
49
+ when :tinyint, :boolean
50
50
  parse_boolean_value value
51
51
  else
52
52
  raise NotImplementedError, "Cannot parse value of type #{type.inspect}"
@@ -1,7 +1,7 @@
1
1
  module MonetDB
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- TINY = 8
4
+ TINY = 9
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].join(".")
7
7
  end
@@ -1,3 +1,5 @@
1
+ #encoding: UTF-8
2
+
1
3
  require_relative "../../test_helper"
2
4
 
3
5
  module Unit
@@ -66,10 +68,13 @@ module Unit
66
68
  describe "#pack" do
67
69
  it "returns chunks provided with a length header" do
68
70
  message = "BIG:monetdb:{MD5}6432e841c9943d524b9b922ee1e5924a:sql:test_drive:"
69
- assert_equal ["#{[131].pack("v")}#{message}"], @connection.send(:pack, message)
71
+ assert_equal ["#{[131].pack("v").force_encoding('utf-8')}#{message}"], @connection.send(:pack, message)
70
72
 
71
73
  message = "hKszBZEmQ1uOPYrpVFEc:merovingian:9:RIPEMD160,SHA256,SHA1,MD5:LIT:SHA512:"
72
- assert_equal ["#{[145].pack("v")}#{message}"], @connection.send(:pack, message)
74
+ assert_equal ["#{[145].pack("v").force_encoding('utf-8')}#{message}"], @connection.send(:pack, message)
75
+
76
+ message = "Message with multibyte chars: ✷"
77
+ assert_equal ["#{[67].pack("v").force_encoding('utf-8')}#{message}"], @connection.send(:pack, message)
73
78
 
74
79
  message.expects(:scan).with(/.{1,#{MonetDB::Connection::MAX_MSG_SIZE}}/m).returns(%w(foobar bazqux paul))
75
80
  assert_equal [
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monetdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Engel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-27 00:00:00.000000000 Z
11
+ date: 2015-07-02 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
  - !ruby/object:Gem::Dependency
28
28
  name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mocha
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: A pure Ruby database driver for MonetDB (monetdb5-sql)
@@ -101,8 +101,8 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - .gitignore
105
- - .travis.yml
104
+ - ".gitignore"
105
+ - ".travis.yml"
106
106
  - CHANGELOG.rdoc
107
107
  - Gemfile
108
108
  - MIT-LICENSE
@@ -141,17 +141,17 @@ require_paths:
141
141
  - lib
142
142
  required_ruby_version: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ! '>='
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ! '>='
149
+ - - ">="
150
150
  - !ruby/object:Gem::Version
151
151
  version: '0'
152
152
  requirements: []
153
153
  rubyforge_project:
154
- rubygems_version: 2.1.11
154
+ rubygems_version: 2.2.2
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: A pure Ruby database driver for MonetDB (monetdb5-sql)