pg_array_parser 0.0.4 → 0.0.5
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.
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# 0.0.5
|
2
|
+
* Prevents attempt to build C extension in JRuby
|
3
|
+
|
4
|
+
# 0.0.4
|
5
|
+
* Fixes bad release
|
6
|
+
|
1
7
|
# 0.0.3
|
2
8
|
* Refactored Java to ensure thread safety - [mauricio](https://github.com/mauricio) -
|
3
9
|
Merged at [a30aba](https://github.com/dockyard/pg_array_parser/commit/a30aba4885812290f83c693e6b68c697b0dac675)
|
@@ -104,7 +104,7 @@ public class PgArrayParserEngine extends RubyObject {
|
|
104
104
|
private static void addItem( ThreadContext context, RubyArray items, StringBuilder builder, boolean quoted ) {
|
105
105
|
String value = builder.toString();
|
106
106
|
|
107
|
-
if ( value.length() == 0 ) {
|
107
|
+
if ( !quoted && value.length() == 0 ) {
|
108
108
|
return;
|
109
109
|
}
|
110
110
|
|
data/lib/pg_array_parser.jar
CHANGED
Binary file
|
data/spec/parser_spec.rb
CHANGED
@@ -46,6 +46,11 @@ describe 'PgArrayParser' do
|
|
46
46
|
parser.parse_pg_array(%[{1,"2\\\\",3,4}]).should eq ['1','2\\','3','4']
|
47
47
|
parser.parse_pg_array(%[{1,"2\\\\\\",3",4}]).should eq ['1','2\\",3','4']
|
48
48
|
end
|
49
|
+
|
50
|
+
it 'returns an array containing empty strings' do
|
51
|
+
parser.parse_pg_array(%[{1,"",3,""}]).should eq ['1', '', '3', '']
|
52
|
+
end
|
53
|
+
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
@@ -74,6 +79,9 @@ describe 'PgArrayParser' do
|
|
74
79
|
it 'returns an array of strings with a sub array and a quoted { and escaped quote' do
|
75
80
|
parser.parse_pg_array(%[{1,{"2\\",{3"},4}]).should eq ['1',['2",{3'],'4']
|
76
81
|
end
|
82
|
+
it 'returns an array of strings with a sub array with empty strings' do
|
83
|
+
parser.parse_pg_array(%[{1,{""},4,{""}}]).should eq ['1',[''],'4',['']]
|
84
|
+
end
|
77
85
|
end
|
78
86
|
end
|
79
87
|
context 'three dimensional arrays' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_array_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|