bson 1.10.0.rc1 → 1.10.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/VERSION +1 -1
- data/lib/bson/bson_java.rb +1 -1
- data/lib/bson/ordered_hash.rb +18 -13
- data/lib/bson/support/hash_with_indifferent_access.rb +10 -0
- data/lib/bson/types/binary.rb +1 -1
- data/lib/bson/types/code.rb +1 -1
- data/lib/bson/types/dbref.rb +2 -2
- data/lib/bson/types/regex.rb +1 -1
- metadata +4 -4
- 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: 3b7e536f90a97d0a1e1edc2102c09e815427ef9e
|
4
|
+
data.tar.gz: dadc82a3b6a17b7a32467cffa9d99f1349db0e2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94cab5d278b393045e3a42b91fad6790094bfaa3346bed05f33f5baaa75dafdd7a0e33877c8949560216c8fd1aa952e0bc4d88c62d70bd3201e1136749a4b0f3
|
7
|
+
data.tar.gz: 1e715b96ced5464c999a9e74a9bbcad82b77a96c409b321e459a9b5a06a8dc2456fb9a869397cb350b455b45ec580c27eedd88e90f803dca71c113a5e50c0091
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.10.0
|
1
|
+
1.10.0
|
data/lib/bson/bson_java.rb
CHANGED
@@ -16,7 +16,7 @@ require 'jruby'
|
|
16
16
|
|
17
17
|
include Java
|
18
18
|
|
19
|
-
jar_dir = File.join(File.dirname(__FILE__), '../../ext/jbson')
|
19
|
+
jar_dir = File.expand_path(File.join(File.dirname(__FILE__), '../../ext/jbson'))
|
20
20
|
require File.join(jar_dir, 'lib/java-bson.jar')
|
21
21
|
require File.join(jar_dir, 'target/jbson.jar')
|
22
22
|
|
data/lib/bson/ordered_hash.rb
CHANGED
@@ -41,6 +41,16 @@ module BSON
|
|
41
41
|
instance_of?(BSON::OrderedHash)
|
42
42
|
end
|
43
43
|
|
44
|
+
def reject
|
45
|
+
return to_enum(:reject) unless block_given?
|
46
|
+
dup.tap {|hash| hash.reject!{|k, v| yield k, v}}
|
47
|
+
end
|
48
|
+
|
49
|
+
def select
|
50
|
+
return to_enum(:select) unless block_given?
|
51
|
+
dup.tap {|hash| hash.reject!{|k, v| ! yield k, v}}
|
52
|
+
end
|
53
|
+
|
44
54
|
# We only need the body of this class if the RUBY_VERSION is before 1.9
|
45
55
|
if RUBY_VERSION < '1.9'
|
46
56
|
attr_accessor :ordered_keys
|
@@ -142,21 +152,16 @@ module BSON
|
|
142
152
|
self
|
143
153
|
end
|
144
154
|
|
145
|
-
def reject
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
changed = false
|
153
|
-
self.each do |k,v|
|
154
|
-
if yield k, v
|
155
|
-
changed = true
|
156
|
-
delete(k)
|
155
|
+
def reject!
|
156
|
+
return to_enum(:reject!) unless block_given?
|
157
|
+
raise "can't modify frozen BSON::OrderedHash" if frozen?
|
158
|
+
keys = @ordered_keys.dup
|
159
|
+
@ordered_keys.each do |k|
|
160
|
+
if yield k, self[k]
|
161
|
+
keys.delete(k)
|
157
162
|
end
|
158
163
|
end
|
159
|
-
|
164
|
+
keys == @ordered_keys ? nil : @ordered_keys = keys
|
160
165
|
end
|
161
166
|
|
162
167
|
def clear
|
@@ -49,6 +49,16 @@ module ActiveSupport
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
def reject
|
53
|
+
return to_enum(:reject) unless block_given?
|
54
|
+
dup.tap {|hash| hash.reject!{|k, v| yield k, v}}
|
55
|
+
end
|
56
|
+
|
57
|
+
def select
|
58
|
+
return to_enum(:select) unless block_given?
|
59
|
+
dup.tap {|hash| hash.reject!{|k, v| ! yield k, v}}
|
60
|
+
end
|
61
|
+
|
52
62
|
alias_method :regular_writer, :[]= unless method_defined?(:regular_writer)
|
53
63
|
alias_method :regular_update, :update unless method_defined?(:regular_update)
|
54
64
|
|
data/lib/bson/types/binary.rb
CHANGED
@@ -35,7 +35,7 @@ module BSON
|
|
35
35
|
#
|
36
36
|
# @param [Array, String] data to story as BSON binary. If a string is given, the on
|
37
37
|
# Ruby 1.9 it will be forced to the binary encoding.
|
38
|
-
# @param [Fixnum] one of four values specifying a BSON binary subtype. Possible values are
|
38
|
+
# @param [Fixnum] subtype one of four values specifying a BSON binary subtype. Possible values are
|
39
39
|
# SUBTYPE_BYTES, SUBTYPE_UUID, SUBTYPE_MD5, and SUBTYPE_USER_DEFINED.
|
40
40
|
#
|
41
41
|
# @see http://www.mongodb.org/display/DOCS/BSON#BSON-noteondatabinary BSON binary subtypes.
|
data/lib/bson/types/code.rb
CHANGED
@@ -23,7 +23,7 @@ module BSON
|
|
23
23
|
# Wrap code to be evaluated by MongoDB.
|
24
24
|
#
|
25
25
|
# @param [String] code the JavaScript code.
|
26
|
-
# @param [Hash] a document mapping identifiers to values, which
|
26
|
+
# @param [Hash] scope a document mapping identifiers to values, which
|
27
27
|
# represent the scope in which the code is to be executed.
|
28
28
|
def initialize(code, scope={})
|
29
29
|
@code = code
|
data/lib/bson/types/dbref.rb
CHANGED
@@ -21,8 +21,8 @@ module BSON
|
|
21
21
|
|
22
22
|
# Create a DBRef. Use this class in conjunction with DB#dereference.
|
23
23
|
#
|
24
|
-
# @param [String] a collection name
|
25
|
-
# @param [ObjectId] an object id
|
24
|
+
# @param [String] namespace a collection name.
|
25
|
+
# @param [ObjectId] object_id an object id.
|
26
26
|
def initialize(namespace, object_id)
|
27
27
|
@namespace = namespace
|
28
28
|
@object_id = object_id
|
data/lib/bson/types/regex.rb
CHANGED
@@ -32,7 +32,7 @@ module BSON
|
|
32
32
|
# Create a new regexp.
|
33
33
|
#
|
34
34
|
# @param pattern [String]
|
35
|
-
# @param
|
35
|
+
# @param opts [Array, String]
|
36
36
|
def initialize(pattern, *opts)
|
37
37
|
@pattern = pattern
|
38
38
|
@options = opts.first.is_a?(Fixnum) ? opts.first : str_opts_to_int(opts.join)
|
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: 1.10.0
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Brock
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
JrZM8w8wGbIOeLtoQqa7HB/jOYbTahH7KMNh2LHAbOR93hNIJxVRa4iwxiMQ75tN
|
35
35
|
9WUIAJ4AEtjwRg1Bz0OwDo3aucPCBpx77+/FWhv7JYY=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2014-03
|
37
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A Ruby BSON implementation for MongoDB. For more information about Mongo,
|
40
40
|
see http://www.mongodb.org. For more information on BSON, see http://www.bsonspec.org.
|
@@ -81,9 +81,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
81
|
version: '0'
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - "
|
84
|
+
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
86
|
+
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project: bson
|
89
89
|
rubygems_version: 2.2.2
|
metadata.gz.sig
CHANGED
Binary file
|