bson 2.2.0-java → 2.2.1-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bson might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ada22ee89296a96c88b38de4f4dc595f21687565
4
- data.tar.gz: dad26ece03f57a45993feab6c409742d2ef81741
3
+ metadata.gz: dd3d7afd651d161d6a2de97fe9982b8972faada8
4
+ data.tar.gz: 9c9578ef230b8b24d6b671704c9926866361b162
5
5
  SHA512:
6
- metadata.gz: 744c86749ad6f9479c9a0d83b6b9025d170c3ecf79bc17daf2743a9b8080bd01ec27cb192fb7270df8a5f5c4eaebedadf744a32b013e1859a940be146d198ae6
7
- data.tar.gz: 0f22b1d3c37109dc5d5d92d7af4cf8787b08916d1da037566248b2b52b128b6eeb8bc70e6a82837c388794529cddd3f1d1dd20d7ecca52581d3565cb68c302e3
6
+ metadata.gz: 685e4965524a8f83524df4553625e19e4815c501182d759f968ac74f3ab2c65061be290700530d577510f2de714a403899088276d84c7938a26b73b9d133250b
7
+ data.tar.gz: 91df04208f8f84a5bc8d06f1229bbd5cc0050af98b36f60c110b68c41f4a19477b8c00d08464efbd5ab585ed6a6d964ab23bb1b7f7f584a9403de57b73ed1bed
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- �� g��7�W�M�!�$y� {�W�6��{����͘s<��#�9pA������lDE䢬������Bj���Nj �k��U���r�2����P5��?��7��^&D�ί���Swi�L"#�����I
2
- v��%��D)��{A��vn{]�ܑ���^�=�Q�WԵx�M:<K��?��2�lpv��
3
- {�|a�F-��
1
+ f!¯�L1�WO�����
2
+ ��!i�- ���ݘbwJ
@@ -1,6 +1,14 @@
1
1
  BSON Changelog
2
2
  ==============
3
3
 
4
+ ## 2.2.1
5
+
6
+ ### Bug Fixes
7
+
8
+ * [#15](http://github.com/mongodb/bson-ruby/pull/15):
9
+ `Date` and `DateTime` instances now return the `Time` value for the BSON
10
+ type, so that they can be serialized inside hashes and arrays. (Michael Sell)
11
+
4
12
  ## 2.2.0
5
13
 
6
14
  ### Dependency Changes
@@ -11,13 +19,16 @@ BSON Changelog
11
19
 
12
20
  ### Bug Fixes
13
21
 
14
- * \#14: Fixed all 1.8 errors related to `DateTime` serialization.
22
+ * [#14](http://github.com/mongodb/bson-ruby/pull/14):
23
+ Fixed all 1.8 errors related to `DateTime` serialization.
15
24
 
16
25
  ## 2.1.1
17
26
 
18
27
  ### Bug Fixes
19
28
 
20
- * \#13 / RUBY-714: Require time in `DateTime` modules when using outside of
29
+ * [#13](http://github.com/mongodb/bson-ruby/pull/13) /
30
+ [RUBY-714](http://jira.mongodb.org/browse/RUBY-714):
31
+ Require time in `DateTime` modules when using outside of
21
32
  environments that don't already have time included.
22
33
 
23
34
  ## 2.1.0
Binary file
@@ -35,6 +35,13 @@ module BSON
35
35
  def to_bson(encoded = ''.force_encoding(BINARY))
36
36
  ::Time.utc(year, month, day).to_bson(encoded)
37
37
  end
38
+
39
+ # Get the BSON type for the date.
40
+ #
41
+ # As the date is converted to a time, this returns the BSON type for time.
42
+ def bson_type
43
+ ::Time::BSON_TYPE
44
+ end
38
45
  end
39
46
 
40
47
  # Enrich the core Date class with this module.
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module BSON
16
- VERSION = "2.2.0"
16
+ VERSION = "2.2.1"
17
17
  end
@@ -16,6 +16,8 @@ require "spec_helper"
16
16
 
17
17
  describe Date do
18
18
 
19
+ it_behaves_like "a class which converts to Time"
20
+
19
21
  describe "#to_bson" do
20
22
 
21
23
  context "when the date is post epoch" do
@@ -16,6 +16,8 @@ require "spec_helper"
16
16
 
17
17
  describe DateTime do
18
18
 
19
+ it_behaves_like "a class which converts to Time"
20
+
19
21
  describe "#to_bson" do
20
22
 
21
23
  context "when the date time is post epoch" do
@@ -93,3 +93,10 @@ shared_examples_for "a document able to handle utf-8" do
93
93
  ).to eq(document)
94
94
  end
95
95
  end
96
+
97
+ shared_examples_for "a class which converts to Time" do
98
+
99
+ it "shares BSON type with Time" do
100
+ expect(described_class.new.bson_type).to eq(Time::BSON_TYPE)
101
+ end
102
+ 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: 2.2.0
4
+ version: 2.2.1
5
5
  platform: java
6
6
  authors:
7
7
  - Tyler Brock
@@ -14,9 +14,9 @@ bindir: bin
14
14
  cert_chain:
15
15
  - |
16
16
  -----BEGIN CERTIFICATE-----
17
- MIIDODCCAiCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
17
+ MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
18
18
  ZXItcnVieTEVMBMGCgmSJomT8ixkARkWBTEwZ2VuMRMwEQYKCZImiZPyLGQBGRYD
19
- Y29tMB4XDTEzMDIwMTE0MTEzN1oXDTE0MDIwMTE0MTEzN1owQjEUMBIGA1UEAwwL
19
+ Y29tMB4XDTE0MDIxOTE1MTEyNloXDTE1MDIxOTE1MTEyNlowQjEUMBIGA1UEAwwL
20
20
  ZHJpdmVyLXJ1YnkxFTATBgoJkiaJk/IsZAEZFgUxMGdlbjETMBEGCgmSJomT8ixk
21
21
  ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANFdSAa8fRm1
22
22
  bAM9za6Z0fAH4g02bqM1NGnw8zJQrE/PFrFfY6IFCT2AsLfOwr1maVm7iU1+kdVI
@@ -24,16 +24,17 @@ cert_chain:
24
24
  JxmcPYs5fDN6BgYc6XXgUjy3m+Kwha2pGctdciUOwEfOZ4RmNRlEZKCMLRHdFP8j
25
25
  4WTnJSGfXDiuoXICJb5yOPOZPuaapPSNXp93QkUdsqdKC32I+KMpKKYGBQ6yisfA
26
26
  5MyVPPCzLR1lP5qXVGJPnOqUAkvEUfCahg7EP9tI20qx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Q75tN
35
+ 9WUIAJ4AEtjwRg1Bz0OwDo3aucPCBpx77+/FWhv7JYY=
35
36
  -----END CERTIFICATE-----
36
- date: 2014-01-24 00:00:00.000000000 Z
37
+ date: 2014-02-19 00:00:00.000000000 Z
37
38
  dependencies: []
38
39
  description: A full featured BSON specification implementation, in Ruby
39
40
  email:
@@ -131,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
132
  version: 1.3.6
132
133
  requirements: []
133
134
  rubyforge_project: bson
134
- rubygems_version: 2.2.1
135
+ rubygems_version: 2.2.2
135
136
  signing_key:
136
137
  specification_version: 4
137
138
  summary: Ruby Implementation of the BSON specification
metadata.gz.sig CHANGED
Binary file