bson 3.1.0-java → 3.1.1-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 +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +6 -0
- data/lib/bson-ruby.jar +0 -0
- data/lib/bson/document.rb +13 -3
- data/lib/bson/regexp.rb +1 -1
- data/lib/bson/version.rb +1 -1
- data/spec/bson/regexp_spec.rb +6 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4582887945e5c40e4bc5208f20c7f5fd8a68aed
|
4
|
+
data.tar.gz: 318fdcb621f419e89793067ea91e80f5a3b9002e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901c1929736f122089bef49179bd32f4a3da19ee815c83275b290c01a9defa7aaa20d6f24dcb2ebedc7c174cdc701f458af39d9d764b9262bdb392963f300357
|
7
|
+
data.tar.gz: 4520cc3824ad2a5d130ba0f484e9cd93f8195aba1aedbef35c4474e4d4bcc7cad8075beaee9b377d890b223836f2f6e5de9e1fc1cb827e2f2bb1713d68344a79
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/lib/bson-ruby.jar
CHANGED
Binary file
|
data/lib/bson/document.rb
CHANGED
@@ -50,7 +50,7 @@ module BSON
|
|
50
50
|
#
|
51
51
|
# @since 2.0.0
|
52
52
|
def [](key)
|
53
|
-
super(key
|
53
|
+
super(convert_key(key))
|
54
54
|
end
|
55
55
|
|
56
56
|
# Set a value on the document. Will normalize symbol keys into strings.
|
@@ -65,7 +65,7 @@ module BSON
|
|
65
65
|
#
|
66
66
|
# @since 3.0.0
|
67
67
|
def []=(key, value)
|
68
|
-
super(key
|
68
|
+
super(convert_key(key), convert_value(value))
|
69
69
|
end
|
70
70
|
|
71
71
|
# Instantiate a new Document. Valid parameters for instantiation is a hash
|
@@ -110,12 +110,22 @@ module BSON
|
|
110
110
|
# @since 3.0.0
|
111
111
|
def merge!(other)
|
112
112
|
other.each_pair do |key, value|
|
113
|
-
value = yield(key
|
113
|
+
value = yield(convert_key(key), self[key], convert_value(value)) if block_given?
|
114
114
|
self[key] = value
|
115
115
|
end
|
116
116
|
self
|
117
117
|
end
|
118
118
|
|
119
119
|
alias :update :merge!
|
120
|
+
|
121
|
+
private
|
122
|
+
|
123
|
+
def convert_key(key)
|
124
|
+
key.to_bson_normalized_key
|
125
|
+
end
|
126
|
+
|
127
|
+
def convert_value(value)
|
128
|
+
value.to_bson_normalized_value
|
129
|
+
end
|
120
130
|
end
|
121
131
|
end
|
data/lib/bson/regexp.rb
CHANGED
data/lib/bson/version.rb
CHANGED
data/spec/bson/regexp_spec.rb
CHANGED
@@ -40,8 +40,12 @@ describe Regexp do
|
|
40
40
|
StringIO.new(bson)
|
41
41
|
end
|
42
42
|
|
43
|
+
let(:regex) do
|
44
|
+
described_class.from_bson(io)
|
45
|
+
end
|
46
|
+
|
43
47
|
let(:result) do
|
44
|
-
|
48
|
+
regex.compile
|
45
49
|
end
|
46
50
|
|
47
51
|
it_behaves_like "a bson element"
|
@@ -58,7 +62,7 @@ describe Regexp do
|
|
58
62
|
it_behaves_like "a serializable bson element"
|
59
63
|
|
60
64
|
it "runs the method on the Regexp object" do
|
61
|
-
expect(
|
65
|
+
expect(regex.match('6')).not_to be_nil
|
62
66
|
end
|
63
67
|
end
|
64
68
|
|
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.1.
|
4
|
+
version: 3.1.1
|
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-06-
|
37
|
+
date: 2015-06-23 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
Binary file
|