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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c4d3274a71610f319ef7e1b0cb48e1cdfaef262
4
- data.tar.gz: 9bb3b68125bdc55caa633e202ec43c510e020955
3
+ metadata.gz: a4582887945e5c40e4bc5208f20c7f5fd8a68aed
4
+ data.tar.gz: 318fdcb621f419e89793067ea91e80f5a3b9002e
5
5
  SHA512:
6
- metadata.gz: 9b099548252a4939b3449aa38f28063c25df21e3ffa9aab273d4e24e22dbbaec0790863eff78e59fab4b62d96f7e82e99afef7fb6c68f9b8e0617d99ed8f8ab1
7
- data.tar.gz: 55d34df5d46136ffea946cd6fae2518db7ecdbc9517fad6daa77461d6e7ad28bf43a117ffc810e3840f53c9300517a3e22e94871b8ce48fd6512286805446c81
6
+ metadata.gz: 901c1929736f122089bef49179bd32f4a3da19ee815c83275b290c01a9defa7aaa20d6f24dcb2ebedc7c174cdc701f458af39d9d764b9262bdb392963f300357
7
+ data.tar.gz: 4520cc3824ad2a5d130ba0f484e9cd93f8195aba1aedbef35c4474e4d4bcc7cad8075beaee9b377d890b223836f2f6e5de9e1fc1cb827e2f2bb1713d68344a79
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,12 @@
1
1
  BSON Changelog
2
2
  ==============
3
3
 
4
+ ## 3.1.1
5
+
6
+ ### Bug Fixes
7
+
8
+ * Fixed argument errors when delegating to regex objects. (Tom Scott)
9
+
4
10
  ## 3.1.0
5
11
 
6
12
  ### New Features
Binary file
@@ -50,7 +50,7 @@ module BSON
50
50
  #
51
51
  # @since 2.0.0
52
52
  def [](key)
53
- super(key.to_bson_normalized_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.to_bson_normalized_key, value.to_bson_normalized_value)
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.to_bson_normalized_key, self[key], value.to_bson_normalized_value) if block_given?
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
@@ -135,7 +135,7 @@ module BSON
135
135
 
136
136
  def method_missing(method, *arguments)
137
137
  return super unless respond_to?(method)
138
- compile.send(method)
138
+ compile.send(method, *arguments)
139
139
  end
140
140
  end
141
141
 
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "3.1.0"
16
+ VERSION = "3.1.1"
17
17
  end
@@ -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
- described_class.from_bson(io).compile
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(result.match('6')).not_to be_nil
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.0
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-11 00:00:00.000000000 Z
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