bson 1.5.0.rc0 → 1.5.0
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.
Potentially problematic release.
This version of bson might be problematic. Click here for more details.
- data/lib/bson.rb +2 -2
 - metadata +39 -49
 - data/test/bson/bson_string_test.rb +0 -30
 
    
        data/lib/bson.rb
    CHANGED
    
    | 
         @@ -18,10 +18,10 @@ 
     | 
|
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
            $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
            MINIMUM_BSON_EXT_VERSION = "1.5.0 
     | 
| 
      
 21 
     | 
    
         
            +
            MINIMUM_BSON_EXT_VERSION = "1.5.0"
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
            module BSON
         
     | 
| 
       24 
     | 
    
         
            -
              VERSION = "1.5.0 
     | 
| 
      
 24 
     | 
    
         
            +
              VERSION = "1.5.0"
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
              if defined? Mongo::DEFAULT_MAX_BSON_SIZE
         
     | 
| 
       27 
27 
     | 
    
         
             
                DEFAULT_MAX_BSON_SIZE = Mongo::DEFAULT_MAX_BSON_SIZE
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,95 +1,85 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: bson
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
               
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.5.0
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
     | 
    
         
            -
            authors: 
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
       8 
8 
     | 
    
         
             
            - Jim Menard
         
     | 
| 
       9 
9 
     | 
    
         
             
            - Mike Dirolf
         
     | 
| 
       10 
10 
     | 
    
         
             
            - Kyle Banker
         
     | 
| 
       11 
11 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       13 
13 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            date: 2011-11-18 00:00:00 -05:00
         
     | 
| 
       16 
     | 
    
         
            -
            default_executable: 
         
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2011-11-28 00:00:00.000000000Z
         
     | 
| 
       17 
15 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
      
 16 
     | 
    
         
            +
            description: A Ruby BSON implementation for MongoDB. For more information about Mongo,
         
     | 
| 
      
 17 
     | 
    
         
            +
              see http://www.mongodb.org. For more information on BSON, see http://www.bsonspec.org.
         
     | 
| 
       20 
18 
     | 
    
         
             
            email: mongodb-dev@googlegroups.com
         
     | 
| 
       21 
     | 
    
         
            -
            executables: 
     | 
| 
      
 19 
     | 
    
         
            +
            executables:
         
     | 
| 
       22 
20 
     | 
    
         
             
            - b2json
         
     | 
| 
       23 
21 
     | 
    
         
             
            - j2bson
         
     | 
| 
       24 
22 
     | 
    
         
             
            extensions: []
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
23 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 24 
     | 
    
         
            +
            files:
         
     | 
| 
       29 
25 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
       30 
26 
     | 
    
         
             
            - lib/bson.rb
         
     | 
| 
       31 
     | 
    
         
            -
            - lib/bson/bson_c.rb
         
     | 
| 
       32 
27 
     | 
    
         
             
            - lib/bson/bson_java.rb
         
     | 
| 
       33 
     | 
    
         
            -
            - lib/bson/bson_ruby.rb
         
     | 
| 
       34 
     | 
    
         
            -
            - lib/bson/byte_buffer.rb
         
     | 
| 
       35 
     | 
    
         
            -
            - lib/bson/exceptions.rb
         
     | 
| 
       36 
     | 
    
         
            -
            - lib/bson/ordered_hash.rb
         
     | 
| 
       37 
28 
     | 
    
         
             
            - lib/bson/types/binary.rb
         
     | 
| 
       38 
     | 
    
         
            -
            - lib/bson/types/code.rb
         
     | 
| 
       39 
     | 
    
         
            -
            - lib/bson/types/dbref.rb
         
     | 
| 
       40 
29 
     | 
    
         
             
            - lib/bson/types/min_max_keys.rb
         
     | 
| 
       41 
     | 
    
         
            -
            - lib/bson/types/object_id.rb
         
     | 
| 
       42 
30 
     | 
    
         
             
            - lib/bson/types/timestamp.rb
         
     | 
| 
      
 31 
     | 
    
         
            +
            - lib/bson/types/code.rb
         
     | 
| 
      
 32 
     | 
    
         
            +
            - lib/bson/types/object_id.rb
         
     | 
| 
      
 33 
     | 
    
         
            +
            - lib/bson/types/dbref.rb
         
     | 
| 
      
 34 
     | 
    
         
            +
            - lib/bson/exceptions.rb
         
     | 
| 
      
 35 
     | 
    
         
            +
            - lib/bson/bson_c.rb
         
     | 
| 
      
 36 
     | 
    
         
            +
            - lib/bson/ordered_hash.rb
         
     | 
| 
      
 37 
     | 
    
         
            +
            - lib/bson/byte_buffer.rb
         
     | 
| 
      
 38 
     | 
    
         
            +
            - lib/bson/bson_ruby.rb
         
     | 
| 
       43 
39 
     | 
    
         
             
            - bin/b2json
         
     | 
| 
       44 
40 
     | 
    
         
             
            - bin/j2bson
         
     | 
| 
       45 
41 
     | 
    
         
             
            - test/bson/binary_test.rb
         
     | 
| 
       46 
     | 
    
         
            -
            - test/bson/bson_string_test.rb
         
     | 
| 
       47 
     | 
    
         
            -
            - test/bson/bson_test.rb
         
     | 
| 
       48 
     | 
    
         
            -
            - test/bson/byte_buffer_test.rb
         
     | 
| 
       49 
     | 
    
         
            -
            - test/bson/hash_with_indifferent_access_test.rb
         
     | 
| 
       50 
42 
     | 
    
         
             
            - test/bson/json_test.rb
         
     | 
| 
       51 
     | 
    
         
            -
            - test/bson/ 
     | 
| 
      
 43 
     | 
    
         
            +
            - test/bson/byte_buffer_test.rb
         
     | 
| 
       52 
44 
     | 
    
         
             
            - test/bson/ordered_hash_test.rb
         
     | 
| 
      
 45 
     | 
    
         
            +
            - test/bson/object_id_test.rb
         
     | 
| 
       53 
46 
     | 
    
         
             
            - test/bson/test_helper.rb
         
     | 
| 
      
 47 
     | 
    
         
            +
            - test/bson/bson_test.rb
         
     | 
| 
       54 
48 
     | 
    
         
             
            - test/bson/timestamp_test.rb
         
     | 
| 
      
 49 
     | 
    
         
            +
            - test/bson/hash_with_indifferent_access_test.rb
         
     | 
| 
       55 
50 
     | 
    
         
             
            - test/support/hash_with_indifferent_access.rb
         
     | 
| 
       56 
     | 
    
         
            -
            has_rdoc: true
         
     | 
| 
       57 
51 
     | 
    
         
             
            homepage: http://www.mongodb.org
         
     | 
| 
       58 
52 
     | 
    
         
             
            licenses: []
         
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
53 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       61 
54 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 55 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       64 
56 
     | 
    
         
             
            - lib
         
     | 
| 
       65 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 57 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       66 
58 
     | 
    
         
             
              none: false
         
     | 
| 
       67 
     | 
    
         
            -
              requirements: 
     | 
| 
       68 
     | 
    
         
            -
              - -  
     | 
| 
       69 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       70 
     | 
    
         
            -
                  version:  
     | 
| 
       71 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 59 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 60 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 61 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 62 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 63 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       72 
64 
     | 
    
         
             
              none: false
         
     | 
| 
       73 
     | 
    
         
            -
              requirements: 
     | 
| 
       74 
     | 
    
         
            -
              - -  
     | 
| 
       75 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       76 
     | 
    
         
            -
                  version:  
     | 
| 
      
 65 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 67 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       77 
69 
     | 
    
         
             
            requirements: []
         
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
70 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       80 
     | 
    
         
            -
            rubygems_version: 1. 
     | 
| 
      
 71 
     | 
    
         
            +
            rubygems_version: 1.8.10
         
     | 
| 
       81 
72 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       82 
73 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       83 
74 
     | 
    
         
             
            summary: Ruby implementation of BSON
         
     | 
| 
       84 
     | 
    
         
            -
            test_files: 
     | 
| 
      
 75 
     | 
    
         
            +
            test_files:
         
     | 
| 
       85 
76 
     | 
    
         
             
            - test/bson/binary_test.rb
         
     | 
| 
       86 
     | 
    
         
            -
            - test/bson/bson_string_test.rb
         
     | 
| 
       87 
     | 
    
         
            -
            - test/bson/bson_test.rb
         
     | 
| 
       88 
     | 
    
         
            -
            - test/bson/byte_buffer_test.rb
         
     | 
| 
       89 
     | 
    
         
            -
            - test/bson/hash_with_indifferent_access_test.rb
         
     | 
| 
       90 
77 
     | 
    
         
             
            - test/bson/json_test.rb
         
     | 
| 
       91 
     | 
    
         
            -
            - test/bson/ 
     | 
| 
      
 78 
     | 
    
         
            +
            - test/bson/byte_buffer_test.rb
         
     | 
| 
       92 
79 
     | 
    
         
             
            - test/bson/ordered_hash_test.rb
         
     | 
| 
      
 80 
     | 
    
         
            +
            - test/bson/object_id_test.rb
         
     | 
| 
       93 
81 
     | 
    
         
             
            - test/bson/test_helper.rb
         
     | 
| 
      
 82 
     | 
    
         
            +
            - test/bson/bson_test.rb
         
     | 
| 
       94 
83 
     | 
    
         
             
            - test/bson/timestamp_test.rb
         
     | 
| 
      
 84 
     | 
    
         
            +
            - test/bson/hash_with_indifferent_access_test.rb
         
     | 
| 
       95 
85 
     | 
    
         
             
            - test/support/hash_with_indifferent_access.rb
         
     | 
| 
         @@ -1,30 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # encoding:utf-8
         
     | 
| 
       2 
     | 
    
         
            -
            require './test/bson/test_helper'
         
     | 
| 
       3 
     | 
    
         
            -
            require 'complex'
         
     | 
| 
       4 
     | 
    
         
            -
            require 'bigdecimal'
         
     | 
| 
       5 
     | 
    
         
            -
            require 'rational'
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            class BSONTest < Test::Unit::TestCase
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
              include BSON
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
              def setup
         
     | 
| 
       12 
     | 
    
         
            -
                @encoder = BSON::BSON_CODER
         
     | 
| 
       13 
     | 
    
         
            -
              end
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
              def assert_doc_pass(doc, options={})
         
     | 
| 
       16 
     | 
    
         
            -
                bson = @encoder.serialize(doc)
         
     | 
| 
       17 
     | 
    
         
            -
                if options[:debug]
         
     | 
| 
       18 
     | 
    
         
            -
                  puts "DEBUGGING DOC:"
         
     | 
| 
       19 
     | 
    
         
            -
                  p bson.to_a
         
     | 
| 
       20 
     | 
    
         
            -
                  puts "DESERIALIZES TO:"
         
     | 
| 
       21 
     | 
    
         
            -
                end
         
     | 
| 
       22 
     | 
    
         
            -
                assert_equal @encoder.serialize(doc).to_a, bson.to_a
         
     | 
| 
       23 
     | 
    
         
            -
                assert_equal doc, @encoder.deserialize(bson)
         
     | 
| 
       24 
     | 
    
         
            -
              end
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
              def test_string
         
     | 
| 
       27 
     | 
    
         
            -
                assert_doc_pass({:a => "hello"})
         
     | 
| 
       28 
     | 
    
         
            -
              end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
            end
         
     |