bson 4.2.1-java → 4.2.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/bson-ruby.jar +0 -0
- data/lib/bson/decimal128.rb +1 -0
- data/lib/bson/object_id.rb +5 -0
- data/lib/bson/version.rb +1 -1
- data/spec/bson/decimal128_spec.rb +2 -0
- data/spec/bson/int64_spec.rb +19 -5
- data/spec/bson/object_id_spec.rb +37 -0
- metadata +9 -9
- 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: 648a36ae43d7444b7734ae5207f455dc385763ef
         | 
| 4 | 
            +
              data.tar.gz: de8db45eca2fc5c599fc43563547f2ebfc3ab324
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b248993776b32d0f628053b89e474006f6777390ef0329a63fd30665d1240d4bb5b3801bd7873ff1cda33b7c5d66fa2ad6d3102fea9b78f53cb50ed6a9395c28
         | 
| 7 | 
            +
              data.tar.gz: ab739128803d604a4eec24ddedd2342d7916966234de8663b49f5174efb119347897472ba0209caf136b659c2fcf54bd80964d624dd2bb83064a77671bd0a15f
         | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | Binary file | 
    
        data.tar.gz.sig
    CHANGED
    
    | Binary file | 
    
        data/lib/bson-ruby.jar
    CHANGED
    
    | Binary file | 
    
        data/lib/bson/decimal128.rb
    CHANGED
    
    
    
        data/lib/bson/object_id.rb
    CHANGED
    
    
    
        data/lib/bson/version.rb
    CHANGED
    
    
| @@ -1257,6 +1257,8 @@ describe BSON::Decimal128 do | |
| 1257 1257 | 
             
                it "returns the decimal128 with $numberDecimal key" do
         | 
| 1258 1258 | 
             
                  expect(object.as_json).to eq({ "$numberDecimal" => object.to_s })
         | 
| 1259 1259 | 
             
                end
         | 
| 1260 | 
            +
             | 
| 1261 | 
            +
                it_behaves_like "a JSON serializable object"
         | 
| 1260 1262 | 
             
              end
         | 
| 1261 1263 |  | 
| 1262 1264 | 
             
              describe "::BSON_TYPE" do
         | 
    
        data/spec/bson/int64_spec.rb
    CHANGED
    
    | @@ -64,10 +64,10 @@ describe BSON::Int64 do | |
| 64 64 |  | 
| 65 65 | 
             
                context "when the integer is within the MRI Fixnum range" do
         | 
| 66 66 |  | 
| 67 | 
            -
                  let(:integer) {  | 
| 67 | 
            +
                  let(:integer) { 2**30 - 1 }
         | 
| 68 68 |  | 
| 69 69 | 
             
                  let(:bson) do
         | 
| 70 | 
            -
                    BSON::ByteBuffer.new(integer.to_bson.to_s)
         | 
| 70 | 
            +
                    BSON::ByteBuffer.new(BSON::Int64.new(integer).to_bson.to_s)
         | 
| 71 71 | 
             
                  end
         | 
| 72 72 |  | 
| 73 73 | 
             
                  context "when on JRuby", if: BSON::Environment.jruby? do
         | 
| @@ -77,15 +77,22 @@ describe BSON::Int64 do | |
| 77 77 | 
             
                    end
         | 
| 78 78 | 
             
                  end
         | 
| 79 79 |  | 
| 80 | 
            -
                  context "when using MRI",  | 
| 80 | 
            +
                  context "when using MRI < 2.4", if: (!BSON::Environment.jruby? && RUBY_VERSION < '2.4') do
         | 
| 81 81 |  | 
| 82 82 | 
             
                    it "deserializes to a Fixnum object" do
         | 
| 83 83 | 
             
                      expect(described_class.from_bson(bson).class).to be(Fixnum)
         | 
| 84 84 | 
             
                    end
         | 
| 85 85 | 
             
                  end
         | 
| 86 | 
            +
             | 
| 87 | 
            +
                  context "when using MRI >= 2.4", if: (!BSON::Environment.jruby? && RUBY_VERSION >= '2.4') do
         | 
| 88 | 
            +
             | 
| 89 | 
            +
                    it "deserializes to an Integer object" do
         | 
| 90 | 
            +
                      expect(described_class.from_bson(bson).class).to be(Integer)
         | 
| 91 | 
            +
                    end
         | 
| 92 | 
            +
                  end
         | 
| 86 93 | 
             
                end
         | 
| 87 94 |  | 
| 88 | 
            -
                context "when the 64-bit integer is the BSON max and thus larger than the MRI Fixnum range" do
         | 
| 95 | 
            +
                context "when the 64-bit integer is the BSON max and thus larger than the MRI Fixnum range on all architectures" do
         | 
| 89 96 |  | 
| 90 97 | 
             
                  let(:integer) { Integer::MAX_64BIT }
         | 
| 91 98 |  | 
| @@ -100,12 +107,19 @@ describe BSON::Int64 do | |
| 100 107 | 
             
                    end
         | 
| 101 108 | 
             
                  end
         | 
| 102 109 |  | 
| 103 | 
            -
                  context "when using MRI",  | 
| 110 | 
            +
                  context "when using MRI < 2.4", if: (!BSON::Environment.jruby? && RUBY_VERSION < '2.4') do
         | 
| 104 111 |  | 
| 105 112 | 
             
                    it "deserializes to a Bignum object" do
         | 
| 106 113 | 
             
                      expect(described_class.from_bson(bson).class).to be(Bignum)
         | 
| 107 114 | 
             
                    end
         | 
| 108 115 | 
             
                  end
         | 
| 116 | 
            +
             | 
| 117 | 
            +
                  context "when using MRI >= 2.4", if: (!BSON::Environment.jruby? && RUBY_VERSION >= '2.4') do
         | 
| 118 | 
            +
             | 
| 119 | 
            +
                    it "deserializes to an Integer object" do
         | 
| 120 | 
            +
                      expect(described_class.from_bson(bson).class).to be(Integer)
         | 
| 121 | 
            +
                    end
         | 
| 122 | 
            +
                  end
         | 
| 109 123 | 
             
                end
         | 
| 110 124 | 
             
              end
         | 
| 111 125 |  | 
    
        data/spec/bson/object_id_spec.rb
    CHANGED
    
    | @@ -392,6 +392,43 @@ describe BSON::ObjectId do | |
| 392 392 | 
             
                end
         | 
| 393 393 | 
             
              end
         | 
| 394 394 |  | 
| 395 | 
            +
              describe "#clone" do
         | 
| 396 | 
            +
             | 
| 397 | 
            +
                context "when the data has not been generated yet" do
         | 
| 398 | 
            +
             | 
| 399 | 
            +
                  let!(:object_id) do
         | 
| 400 | 
            +
                    described_class.new
         | 
| 401 | 
            +
                  end
         | 
| 402 | 
            +
             | 
| 403 | 
            +
                  let!(:clone) do
         | 
| 404 | 
            +
                    object_id.clone
         | 
| 405 | 
            +
                  end
         | 
| 406 | 
            +
             | 
| 407 | 
            +
                  it "generates and copies the data" do
         | 
| 408 | 
            +
                    expect(clone).to eq(object_id)
         | 
| 409 | 
            +
                  end
         | 
| 410 | 
            +
                end
         | 
| 411 | 
            +
             | 
| 412 | 
            +
                context "when the data has been generated" do
         | 
| 413 | 
            +
             | 
| 414 | 
            +
                  let!(:object_id) do
         | 
| 415 | 
            +
                    described_class.new
         | 
| 416 | 
            +
                  end
         | 
| 417 | 
            +
             | 
| 418 | 
            +
                  let(:clone) do
         | 
| 419 | 
            +
                    object_id.clone
         | 
| 420 | 
            +
                  end
         | 
| 421 | 
            +
             | 
| 422 | 
            +
                  before do
         | 
| 423 | 
            +
                    object_id.to_s
         | 
| 424 | 
            +
                  end
         | 
| 425 | 
            +
             | 
| 426 | 
            +
                  it "copies the data" do
         | 
| 427 | 
            +
                    expect(clone).to eq(object_id)
         | 
| 428 | 
            +
                  end
         | 
| 429 | 
            +
                end
         | 
| 430 | 
            +
              end
         | 
| 431 | 
            +
             | 
| 395 432 | 
             
              describe "#inspect" do
         | 
| 396 433 |  | 
| 397 434 | 
             
                let(:object_id) 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.2. | 
| 4 | 
            +
              version: 4.2.2
         | 
| 5 5 | 
             
            platform: java
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Tyler Brock
         | 
| @@ -16,7 +16,7 @@ cert_chain: | |
| 16 16 | 
             
              -----BEGIN CERTIFICATE-----
         | 
| 17 17 | 
             
              MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRQwEgYDVQQDDAtkcml2
         | 
| 18 18 | 
             
              ZXItcnVieTEVMBMGCgmSJomT8ixkARkWBTEwZ2VuMRMwEQYKCZImiZPyLGQBGRYD
         | 
| 19 | 
            -
               | 
| 19 | 
            +
              Y29tMB4XDTE3MDcwMzEyMTMyOVoXDTE4MDcwMzEyMTMyOVowQjEUMBIGA1UEAwwL
         | 
| 20 20 | 
             
              ZHJpdmVyLXJ1YnkxFTATBgoJkiaJk/IsZAEZFgUxMGdlbjETMBEGCgmSJomT8ixk
         | 
| 21 21 | 
             
              ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANFdSAa8fRm1
         | 
| 22 22 | 
             
              bAM9za6Z0fAH4g02bqM1NGnw8zJQrE/PFrFfY6IFCT2AsLfOwr1maVm7iU1+kdVI
         | 
| @@ -27,14 +27,14 @@ cert_chain: | |
| 27 27 | 
             
              u8KAcPHm5KkCAwEAAaN9MHswCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
         | 
| 28 28 | 
             
              BBYEFFt3WbF+9JpUjAoj62cQBgNb8HzXMCAGA1UdEQQZMBeBFWRyaXZlci1ydWJ5
         | 
| 29 29 | 
             
              QDEwZ2VuLmNvbTAgBgNVHRIEGTAXgRVkcml2ZXItcnVieUAxMGdlbi5jb20wDQYJ
         | 
| 30 | 
            -
               | 
| 31 | 
            -
               | 
| 32 | 
            -
               | 
| 33 | 
            -
               | 
| 34 | 
            -
               | 
| 35 | 
            -
               | 
| 30 | 
            +
              KoZIhvcNAQEFBQADggEBABQRiVDNfa+gKXHHgnJdafFGk6c3jzAGqc6YHq6ZIhol
         | 
| 31 | 
            +
              oxxpgDxd3IxQfca7zvs9AYQcOrQtH1xcw3yanJp+pBTTweqYzbwZNe6QTyetjM+L
         | 
| 32 | 
            +
              hhudM1vXidPJMo7ZzzZ3z0rOpE6aPjqZihSDPcoKYw0FIAqxgrRqitYYdDoq3dup
         | 
| 33 | 
            +
              YbzsDYb5G4lbzCmqX2pu0ravi0XF9qDOgvm4j7ss9BnGuwQhhb44nevlIEv+sTg4
         | 
| 34 | 
            +
              UgLdYyyGANc+TOKLFmx0eAJlCljAurbX7ctO2XI0f1AUdEYSqGzut+datXK/9nwQ
         | 
| 35 | 
            +
              FACf8zd11PEds/Opai2Qp4aOBgaxXhhFG357umy1vRs=
         | 
| 36 36 | 
             
              -----END CERTIFICATE-----
         | 
| 37 | 
            -
            date:  | 
| 37 | 
            +
            date: 2017-07-03 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 |