bson 4.1.1-java → 4.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/Rakefile +18 -3
  5. data/lib/bson-ruby.jar +0 -0
  6. data/lib/bson.rb +6 -4
  7. data/lib/bson/array.rb +1 -1
  8. data/lib/bson/binary.rb +4 -2
  9. data/lib/bson/code.rb +1 -1
  10. data/lib/bson/code_with_scope.rb +1 -1
  11. data/lib/bson/config.rb +1 -1
  12. data/lib/bson/date.rb +1 -1
  13. data/lib/bson/date_time.rb +1 -1
  14. data/lib/bson/decimal128.rb +318 -0
  15. data/lib/bson/decimal128/builder.rb +448 -0
  16. data/lib/bson/document.rb +2 -2
  17. data/lib/bson/environment.rb +13 -1
  18. data/lib/bson/false_class.rb +1 -1
  19. data/lib/bson/float.rb +1 -1
  20. data/lib/bson/hash.rb +1 -1
  21. data/lib/bson/int32.rb +46 -0
  22. data/lib/bson/int64.rb +46 -0
  23. data/lib/bson/integer.rb +1 -1
  24. data/lib/bson/max_key.rb +1 -1
  25. data/lib/bson/min_key.rb +1 -1
  26. data/lib/bson/object_id.rb +3 -2
  27. data/lib/bson/open_struct.rb +57 -0
  28. data/lib/bson/regexp.rb +87 -19
  29. data/lib/bson/registry.rb +1 -1
  30. data/lib/bson/specialized.rb +1 -1
  31. data/lib/bson/string.rb +1 -1
  32. data/lib/bson/symbol.rb +1 -1
  33. data/lib/bson/time.rb +1 -1
  34. data/lib/bson/timestamp.rb +2 -2
  35. data/lib/bson/true_class.rb +1 -1
  36. data/lib/bson/version.rb +2 -2
  37. data/spec/bson/array_spec.rb +1 -1
  38. data/spec/bson/binary_spec.rb +2 -1
  39. data/spec/bson/corpus_spec.rb +68 -0
  40. data/spec/bson/decimal128_spec.rb +1583 -0
  41. data/spec/bson/document_spec.rb +1 -1
  42. data/spec/bson/driver_bson_spec.rb +77 -0
  43. data/spec/bson/int32_spec.rb +58 -0
  44. data/spec/bson/int64_spec.rb +58 -0
  45. data/spec/bson/open_struct_spec.rb +144 -0
  46. data/spec/bson/raw_spec.rb +540 -0
  47. data/spec/bson/regexp_spec.rb +7 -7
  48. data/spec/bson/timestamp_spec.rb +1 -1
  49. data/spec/spec_helper.rb +5 -0
  50. data/spec/support/common_driver.rb +347 -0
  51. data/spec/support/corpus-tests/array.json +43 -0
  52. data/spec/support/corpus-tests/boolean.json +27 -0
  53. data/spec/support/corpus-tests/code.json +67 -0
  54. data/spec/support/corpus-tests/code_w_scope.json +78 -0
  55. data/spec/support/corpus-tests/document.json +36 -0
  56. data/spec/support/corpus-tests/double.json +69 -0
  57. data/spec/support/corpus-tests/failures/binary.json +69 -0
  58. data/spec/support/corpus-tests/failures/datetime.json +31 -0
  59. data/spec/support/corpus-tests/failures/dbpointer.json +42 -0
  60. data/spec/support/corpus-tests/failures/int64.json +38 -0
  61. data/spec/support/corpus-tests/failures/symbol.json +62 -0
  62. data/spec/support/corpus-tests/failures/undefined.json +13 -0
  63. data/spec/support/corpus-tests/int32.json +38 -0
  64. data/spec/support/corpus-tests/maxkey.json +12 -0
  65. data/spec/support/corpus-tests/minkey.json +12 -0
  66. data/spec/support/corpus-tests/null.json +12 -0
  67. data/spec/support/corpus-tests/oid.json +28 -0
  68. data/spec/support/corpus-tests/regex.json +37 -0
  69. data/spec/support/corpus-tests/string.json +67 -0
  70. data/spec/support/corpus-tests/timestamp.json +18 -0
  71. data/spec/support/corpus-tests/top.json +62 -0
  72. data/spec/support/corpus.rb +265 -0
  73. data/spec/support/driver-spec-tests/decimal128/decimal128-1.json +363 -0
  74. data/spec/support/driver-spec-tests/decimal128/decimal128-2.json +793 -0
  75. data/spec/support/driver-spec-tests/decimal128/decimal128-3.json +1771 -0
  76. data/spec/support/driver-spec-tests/decimal128/decimal128-4.json +165 -0
  77. data/spec/support/driver-spec-tests/decimal128/decimal128-5.json +402 -0
  78. data/spec/support/driver-spec-tests/decimal128/decimal128-6.json +131 -0
  79. data/spec/support/driver-spec-tests/decimal128/decimal128-7.json +327 -0
  80. data/spec/support/shared_examples.rb +1 -1
  81. metadata +77 -4
  82. metadata.gz.sig +0 -0
@@ -50,7 +50,7 @@ shared_examples_for "a deserializable bson element" do
50
50
  end
51
51
 
52
52
  let(:result) do
53
- described_class.from_bson(io)
53
+ (defined?(klass) ? klass : described_class).from_bson(io)
54
54
  end
55
55
 
56
56
  it "deserializes from bson" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bson
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Tyler Brock
@@ -34,7 +34,7 @@ cert_chain:
34
34
  yVPbgNJA2D/PnLe8ZFMhgJf+VIA1V4oybP/o+9aqlghTtNfYHJpRCAluUiaywwXl
35
35
  KzD4mmIBpxtbWrWB3hx7tsVJmWx5zgO9aDAfvWnXfoo=
36
36
  -----END CERTIFICATE-----
37
- date: 2016-04-27 00:00:00.000000000 Z
37
+ date: 2016-11-29 00:00:00.000000000 Z
38
38
  dependencies: []
39
39
  description: A full featured BSON specification implementation, in Ruby
40
40
  email:
@@ -59,6 +59,8 @@ files:
59
59
  - lib/bson/config.rb
60
60
  - lib/bson/date.rb
61
61
  - lib/bson/date_time.rb
62
+ - lib/bson/decimal128.rb
63
+ - lib/bson/decimal128/builder.rb
62
64
  - lib/bson/document.rb
63
65
  - lib/bson/environment.rb
64
66
  - lib/bson/false_class.rb
@@ -73,6 +75,7 @@ files:
73
75
  - lib/bson/nil_class.rb
74
76
  - lib/bson/object.rb
75
77
  - lib/bson/object_id.rb
78
+ - lib/bson/open_struct.rb
76
79
  - lib/bson/regexp.rb
77
80
  - lib/bson/registry.rb
78
81
  - lib/bson/specialized.rb
@@ -90,9 +93,12 @@ files:
90
93
  - spec/bson/code_spec.rb
91
94
  - spec/bson/code_with_scope_spec.rb
92
95
  - spec/bson/config_spec.rb
96
+ - spec/bson/corpus_spec.rb
93
97
  - spec/bson/date_spec.rb
94
98
  - spec/bson/date_time_spec.rb
99
+ - spec/bson/decimal128_spec.rb
95
100
  - spec/bson/document_spec.rb
101
+ - spec/bson/driver_bson_spec.rb
96
102
  - spec/bson/false_class_spec.rb
97
103
  - spec/bson/float_spec.rb
98
104
  - spec/bson/hash_spec.rb
@@ -105,6 +111,8 @@ files:
105
111
  - spec/bson/nil_class_spec.rb
106
112
  - spec/bson/object_id_spec.rb
107
113
  - spec/bson/object_spec.rb
114
+ - spec/bson/open_struct_spec.rb
115
+ - spec/bson/raw_spec.rb
108
116
  - spec/bson/regexp_spec.rb
109
117
  - spec/bson/registry_spec.rb
110
118
  - spec/bson/string_spec.rb
@@ -115,6 +123,36 @@ files:
115
123
  - spec/bson/undefined_spec.rb
116
124
  - spec/bson_spec.rb
117
125
  - spec/spec_helper.rb
126
+ - spec/support/common_driver.rb
127
+ - spec/support/corpus-tests/array.json
128
+ - spec/support/corpus-tests/boolean.json
129
+ - spec/support/corpus-tests/code.json
130
+ - spec/support/corpus-tests/code_w_scope.json
131
+ - spec/support/corpus-tests/document.json
132
+ - spec/support/corpus-tests/double.json
133
+ - spec/support/corpus-tests/failures/binary.json
134
+ - spec/support/corpus-tests/failures/datetime.json
135
+ - spec/support/corpus-tests/failures/dbpointer.json
136
+ - spec/support/corpus-tests/failures/int64.json
137
+ - spec/support/corpus-tests/failures/symbol.json
138
+ - spec/support/corpus-tests/failures/undefined.json
139
+ - spec/support/corpus-tests/int32.json
140
+ - spec/support/corpus-tests/maxkey.json
141
+ - spec/support/corpus-tests/minkey.json
142
+ - spec/support/corpus-tests/null.json
143
+ - spec/support/corpus-tests/oid.json
144
+ - spec/support/corpus-tests/regex.json
145
+ - spec/support/corpus-tests/string.json
146
+ - spec/support/corpus-tests/timestamp.json
147
+ - spec/support/corpus-tests/top.json
148
+ - spec/support/corpus.rb
149
+ - spec/support/driver-spec-tests/decimal128/decimal128-1.json
150
+ - spec/support/driver-spec-tests/decimal128/decimal128-2.json
151
+ - spec/support/driver-spec-tests/decimal128/decimal128-3.json
152
+ - spec/support/driver-spec-tests/decimal128/decimal128-4.json
153
+ - spec/support/driver-spec-tests/decimal128/decimal128-5.json
154
+ - spec/support/driver-spec-tests/decimal128/decimal128-6.json
155
+ - spec/support/driver-spec-tests/decimal128/decimal128-7.json
118
156
  - spec/support/shared_examples.rb
119
157
  homepage: http://bsonspec.org
120
158
  licenses:
@@ -126,12 +164,12 @@ require_paths:
126
164
  - lib
127
165
  required_ruby_version: !ruby/object:Gem::Requirement
128
166
  requirements:
129
- - - ">="
167
+ - - '>='
130
168
  - !ruby/object:Gem::Version
131
169
  version: 1.9.3
132
170
  required_rubygems_version: !ruby/object:Gem::Requirement
133
171
  requirements:
134
- - - ">="
172
+ - - '>='
135
173
  - !ruby/object:Gem::Version
136
174
  version: 1.3.6
137
175
  requirements: []
@@ -150,9 +188,12 @@ test_files:
150
188
  - spec/bson/code_spec.rb
151
189
  - spec/bson/code_with_scope_spec.rb
152
190
  - spec/bson/config_spec.rb
191
+ - spec/bson/corpus_spec.rb
153
192
  - spec/bson/date_spec.rb
154
193
  - spec/bson/date_time_spec.rb
194
+ - spec/bson/decimal128_spec.rb
155
195
  - spec/bson/document_spec.rb
196
+ - spec/bson/driver_bson_spec.rb
156
197
  - spec/bson/false_class_spec.rb
157
198
  - spec/bson/float_spec.rb
158
199
  - spec/bson/hash_spec.rb
@@ -165,6 +206,8 @@ test_files:
165
206
  - spec/bson/nil_class_spec.rb
166
207
  - spec/bson/object_id_spec.rb
167
208
  - spec/bson/object_spec.rb
209
+ - spec/bson/open_struct_spec.rb
210
+ - spec/bson/raw_spec.rb
168
211
  - spec/bson/regexp_spec.rb
169
212
  - spec/bson/registry_spec.rb
170
213
  - spec/bson/string_spec.rb
@@ -173,4 +216,34 @@ test_files:
173
216
  - spec/bson/timestamp_spec.rb
174
217
  - spec/bson/true_class_spec.rb
175
218
  - spec/bson/undefined_spec.rb
219
+ - spec/support/common_driver.rb
220
+ - spec/support/corpus.rb
176
221
  - spec/support/shared_examples.rb
222
+ - spec/support/corpus-tests/array.json
223
+ - spec/support/corpus-tests/boolean.json
224
+ - spec/support/corpus-tests/code.json
225
+ - spec/support/corpus-tests/code_w_scope.json
226
+ - spec/support/corpus-tests/document.json
227
+ - spec/support/corpus-tests/double.json
228
+ - spec/support/corpus-tests/int32.json
229
+ - spec/support/corpus-tests/maxkey.json
230
+ - spec/support/corpus-tests/minkey.json
231
+ - spec/support/corpus-tests/null.json
232
+ - spec/support/corpus-tests/oid.json
233
+ - spec/support/corpus-tests/regex.json
234
+ - spec/support/corpus-tests/string.json
235
+ - spec/support/corpus-tests/timestamp.json
236
+ - spec/support/corpus-tests/top.json
237
+ - spec/support/corpus-tests/failures/binary.json
238
+ - spec/support/corpus-tests/failures/datetime.json
239
+ - spec/support/corpus-tests/failures/dbpointer.json
240
+ - spec/support/corpus-tests/failures/int64.json
241
+ - spec/support/corpus-tests/failures/symbol.json
242
+ - spec/support/corpus-tests/failures/undefined.json
243
+ - spec/support/driver-spec-tests/decimal128/decimal128-1.json
244
+ - spec/support/driver-spec-tests/decimal128/decimal128-2.json
245
+ - spec/support/driver-spec-tests/decimal128/decimal128-3.json
246
+ - spec/support/driver-spec-tests/decimal128/decimal128-4.json
247
+ - spec/support/driver-spec-tests/decimal128/decimal128-5.json
248
+ - spec/support/driver-spec-tests/decimal128/decimal128-6.json
249
+ - spec/support/driver-spec-tests/decimal128/decimal128-7.json
metadata.gz.sig CHANGED
Binary file