bson 3.2.4-java → 3.2.6-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -2
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +14 -0
- data/Rakefile +7 -5
- data/lib/bson-ruby.jar +0 -0
- data/lib/bson/document.rb +1 -1
- data/lib/bson/regexp.rb +32 -7
- data/lib/bson/version.rb +1 -1
- data/spec/bson/document_spec.rb +12 -2
- metadata +2 -2
- metadata.gz.sig +2 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b54a207fcf892998eddef3722b31d1007cb2d2ed
|
4
|
+
data.tar.gz: b2f341d0bd70e96f9fde14f70fcb41aa13603c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19645bb9a29de8bf44f8494a487c42aa8d5305ac37ef1ef5ce3cb9201c1b242a0c2c2bcf9e19872b7a0e49257c4dd46ef1f5968616cac1606296a6f5ce4deaf1
|
7
|
+
data.tar.gz: 5e402c6f0af5a8a9960cf757717ae1827b5ffe130eda593065d600e64217b822d7540ddcff683233102645cf954f318f997a5596bef18ea7aceaeb07d41988f7
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
F�
|
2
|
-
�O��0ղ�sQ�ƶ��I�+X�G6&d�y��x�u tDj)�G�A��-��a�dO����T�%�/q��gC ��@�YP�â�������_"�@���ͳ嶑�%�٬�҆6F�^T��R�A{O~*&�owu���)�ˇ�L������VA�)x�?P?����K��q��l�I�{|�"պ��s������!�F'�*0���\�i��Y�7^V���_{7�!z�p�s�f�%A�
|
1
|
+
��[�^��烍�����hLpU�q�D4����m!EF�ާ�)��d5�h%�?�Ҏ���4ʄ�%�p��hYFT4���Xɠ�V):�I��������������bI٤ ҥg�a[(3jۋӑ�v�%:�X�?!�q�cjo���O0�YJ�)?ݠ���U�P�*|�\��^2�s�X�d�>96�$U���O,�ǧ��?���]�AP�Wvnh۾��k���X-mIݱ�4��:Yj@�ky_�$�%e��
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
BSON Changelog
|
2
2
|
==============
|
3
3
|
|
4
|
+
## 3.2.6
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* [#44](https://github.com/mongodb/bson-ruby/pull/44) Fixed regexp deserialization in
|
9
|
+
conjunction with SSL io. (Niels Ganser)
|
10
|
+
|
11
|
+
## 3.2.5
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* [RUBY-1024](https://jira.mongodb.org/browse/RUBY-1024) Fixed Hash#merge only to yield when keys
|
16
|
+
exist in both hashes. (Agis Anastasopoulos)
|
17
|
+
|
4
18
|
## 3.2.4
|
5
19
|
|
6
20
|
### Bug Fixes
|
data/Rakefile
CHANGED
@@ -47,11 +47,7 @@ def extension
|
|
47
47
|
RUBY_PLATFORM =~ /darwin/ ? "bundle" : "so"
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
|
-
require "perf/bench"
|
52
|
-
else
|
53
|
-
require_relative "perf/bench"
|
54
|
-
end
|
50
|
+
require_relative "perf/bench" unless jruby?
|
55
51
|
|
56
52
|
RSpec::Core::RakeTask.new(:spec)
|
57
53
|
RSpec::Core::RakeTask.new(:rspec)
|
@@ -114,6 +110,12 @@ namespace :benchmark do
|
|
114
110
|
require "bson"
|
115
111
|
benchmark!
|
116
112
|
end
|
113
|
+
|
114
|
+
task :profile => :compile do
|
115
|
+
puts "Profiling with native extensions..."
|
116
|
+
require "bson"
|
117
|
+
profile!
|
118
|
+
end
|
117
119
|
end
|
118
120
|
|
119
121
|
task :default => [ :clean_all, :spec, :ext_spec ]
|
data/lib/bson-ruby.jar
CHANGED
Binary file
|
data/lib/bson/document.rb
CHANGED
@@ -110,7 +110,7 @@ module BSON
|
|
110
110
|
# @since 3.0.0
|
111
111
|
def merge!(other)
|
112
112
|
other.each_pair do |key, value|
|
113
|
-
value = yield(convert_key(key), self[key], convert_value(value)) if block_given?
|
113
|
+
value = yield(convert_key(key), self[key], convert_value(value)) if block_given? && self[key]
|
114
114
|
self[key] = value
|
115
115
|
end
|
116
116
|
self
|
data/lib/bson/regexp.rb
CHANGED
@@ -28,6 +28,31 @@ module BSON
|
|
28
28
|
# @since 2.0.0
|
29
29
|
BSON_TYPE = 11.chr.force_encoding(BINARY).freeze
|
30
30
|
|
31
|
+
# Extended value constant.
|
32
|
+
#
|
33
|
+
# @since 3.2.6
|
34
|
+
EXTENDED_VALUE = 'x'.freeze
|
35
|
+
|
36
|
+
# Ignore case constant.
|
37
|
+
#
|
38
|
+
# @since 3.2.6
|
39
|
+
IGNORECASE_VALUE = 'i'.freeze
|
40
|
+
|
41
|
+
# Multiline constant.
|
42
|
+
#
|
43
|
+
# @since 3.2.6
|
44
|
+
MULTILINE_VALUE = 'm'.freeze
|
45
|
+
|
46
|
+
# Newline constant.
|
47
|
+
#
|
48
|
+
# @since 3.2.6
|
49
|
+
NEWLINE_VALUE = 's'.freeze
|
50
|
+
|
51
|
+
# Ruby multiline constant.
|
52
|
+
#
|
53
|
+
# @since 3.2.6
|
54
|
+
RUBY_MULTILINE_VALUE = 'ms'.freeze
|
55
|
+
|
31
56
|
# Get the regexp as JSON hash data.
|
32
57
|
#
|
33
58
|
# @example Get the regexp as a JSON hash.
|
@@ -71,15 +96,15 @@ module BSON
|
|
71
96
|
end
|
72
97
|
|
73
98
|
def bson_extended
|
74
|
-
(options & ::Regexp::EXTENDED != 0) ?
|
99
|
+
(options & ::Regexp::EXTENDED != 0) ? EXTENDED_VALUE : NO_VALUE
|
75
100
|
end
|
76
101
|
|
77
102
|
def bson_ignorecase
|
78
|
-
(options & ::Regexp::IGNORECASE != 0) ?
|
103
|
+
(options & ::Regexp::IGNORECASE != 0) ? IGNORECASE_VALUE : NO_VALUE
|
79
104
|
end
|
80
105
|
|
81
106
|
def bson_multiline
|
82
|
-
(options & ::Regexp::MULTILINE != 0) ?
|
107
|
+
(options & ::Regexp::MULTILINE != 0) ? RUBY_MULTILINE_VALUE : NO_VALUE
|
83
108
|
end
|
84
109
|
|
85
110
|
# Represents the raw values for the regular expression.
|
@@ -153,13 +178,13 @@ module BSON
|
|
153
178
|
def from_bson(bson)
|
154
179
|
pattern = bson.gets(NULL_BYTE).from_bson_string.chop!
|
155
180
|
options = 0
|
156
|
-
while (option = bson.readbyte) !=
|
181
|
+
while (option = bson.readbyte.chr) != NULL_BYTE
|
157
182
|
case option
|
158
|
-
when
|
183
|
+
when IGNORECASE_VALUE
|
159
184
|
options |= ::Regexp::IGNORECASE
|
160
|
-
when
|
185
|
+
when MULTILINE_VALUE, NEWLINE_VALUE
|
161
186
|
options |= ::Regexp::MULTILINE
|
162
|
-
when
|
187
|
+
when EXTENDED_VALUE
|
163
188
|
options |= ::Regexp::EXTENDED
|
164
189
|
end
|
165
190
|
end
|
data/lib/bson/version.rb
CHANGED
data/spec/bson/document_spec.rb
CHANGED
@@ -439,7 +439,7 @@ describe BSON::Document do
|
|
439
439
|
it "executes the block on each merged element" do
|
440
440
|
expect(merged[:a]).to eq(0)
|
441
441
|
expect(merged[:b]).to eq(3)
|
442
|
-
expect(merged[:c]).to eq(
|
442
|
+
expect(merged[:c]).to eq(7)
|
443
443
|
end
|
444
444
|
end
|
445
445
|
end
|
@@ -488,7 +488,17 @@ describe BSON::Document do
|
|
488
488
|
it "executes the block on each merged element" do
|
489
489
|
expect(other[:a]).to eq(0)
|
490
490
|
expect(other[:b]).to eq(3)
|
491
|
-
expect(other[:c]).to eq(
|
491
|
+
expect(other[:c]).to eq(7)
|
492
|
+
end
|
493
|
+
end
|
494
|
+
|
495
|
+
context "and the documents have no common keys" do
|
496
|
+
before { other[:a] = 1 }
|
497
|
+
|
498
|
+
it "does not execute the block" do
|
499
|
+
expect(other.merge(b: 1) { |key, old, new| old + new }).to eq(
|
500
|
+
BSON::Document.new(a: 1, b: 1)
|
501
|
+
)
|
492
502
|
end
|
493
503
|
end
|
494
504
|
end
|
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: 3.2.
|
4
|
+
version: 3.2.6
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Tyler Brock
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
XZOS48LlWh15EG4yZo/gRzqNAW2LUIkYA5eMS2Kp6r+KV8IBUO/LaHdrXbdilpa8
|
35
35
|
BRsuCo7UZDbFVRns04HLyjVvkj+K/ywIcdKdS0csz5M=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2015-
|
37
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A full featured BSON specification implementation, in Ruby
|
40
40
|
email:
|
metadata.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
J:�`I�5��J����w����4�_R��VЂWJG�)���)M:-�Nğ�%��A��W�*�FF�"Do
|
4
|
-
EkW͓���W���!I~��T��w��s�/쯼
|
1
|
+
��0$)w<�w���p�`,��'[\�Y�٣���n�Dg�`�@�?�F�!����1Y=�
|
2
|
+
sR�������E�/��oyS�{�Á-��Y���}��y�ˡ��]�P��ߴ��M7��LyŊd�7c���
|