bson 1.10.0.rc1-java → 1.10.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/VERSION +1 -1
- data/bson.gemspec +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 +7 -7
- 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: 68f1dd1c80bbfb085eb0950749e322e9021fd0e9
|
4
|
+
data.tar.gz: 43fe699bf2db1795393f30342bae75aa3ac523a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da4e255ae275dceda9f324dba4b43ca4c595cad8e2c144f4b74ef1d05b168695a43198b844ffd5fc2f82dae61d03cb8cb6635e9f1646f3933044a079f92104a1
|
7
|
+
data.tar.gz: 16525cbf708da551ac927f99b46c3e8e423ba78f72d94f8972a479a78dbb65e2f0077cbf52ee01a2853fcdb1c9eb300900293e58d0a50f945943886f5f111576
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.10.
|
1
|
+
1.10.1
|
data/bson.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'bson'
|
3
3
|
|
4
4
|
s.version = File.read(File.join(File.dirname(__FILE__), 'VERSION'))
|
5
|
-
s.authors = ['
|
5
|
+
s.authors = ['Emily Stolfo', 'Durran Jordan', 'Gary Murakami', 'Tyler Brock', 'Brandon Black']
|
6
6
|
s.email = 'mongodb-dev@googlegroups.com'
|
7
7
|
s.homepage = 'http://www.mongodb.org'
|
8
8
|
s.summary = 'Ruby implementation of BSON'
|
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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
|
-
- Tyler Brock
|
8
|
-
- Gary Murakami
|
9
7
|
- Emily Stolfo
|
10
|
-
- Brandon Black
|
11
8
|
- Durran Jordan
|
9
|
+
- Gary Murakami
|
10
|
+
- Tyler Brock
|
11
|
+
- Brandon Black
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain:
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
JrZM8w8wGbIOeLtoQqa7HB/jOYbTahH7KMNh2LHAbOR93hNIJxVRa4iwxiMQ75tN
|
35
35
|
9WUIAJ4AEtjwRg1Bz0OwDo3aucPCBpx77+/FWhv7JYY=
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2014-
|
37
|
+
date: 2014-05-16 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: A Ruby BSON implementation for MongoDB. For more information about Mongo, see http://www.mongodb.org. For more information on BSON, see http://www.bsonspec.org.
|
40
40
|
email: mongodb-dev@googlegroups.com
|
@@ -82,9 +82,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- - '
|
85
|
+
- - '>='
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: '0'
|
88
88
|
requirements: []
|
89
89
|
rubyforge_project: bson
|
90
90
|
rubygems_version: 2.2.2
|
metadata.gz.sig
CHANGED
Binary file
|