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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd4ef6536b6cbaf1ac49aedd74d3172b59fba19d
4
- data.tar.gz: c05a8e46772fdaf931c1621a93a8194066f4bd6c
3
+ metadata.gz: 68f1dd1c80bbfb085eb0950749e322e9021fd0e9
4
+ data.tar.gz: 43fe699bf2db1795393f30342bae75aa3ac523a6
5
5
  SHA512:
6
- metadata.gz: 7955df7f2e6961288c346a8b10a0fe2145f37bd16bcdcf14396a8db22c2947aa225116f73d2264a5c9c91c8cbaca16dd02c0142accd18d360122d5cd9b392b7a
7
- data.tar.gz: a5d11d03c2c00f306799bd8456e65b98f612e054447499982231ec0822d63402f777de45d8dd465a1defaf4547c153203d62b1fd42ba1f3645f40e2ded8dbcbf
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.0.rc1
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 = ['Tyler Brock', 'Gary Murakami', 'Emily Stolfo', 'Brandon Black', 'Durran Jordan']
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'
@@ -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
 
@@ -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(&block)
146
- clone = self.clone
147
- return clone unless block_given?
148
- clone.delete_if(&block)
149
- end
150
-
151
- def reject!(&block)
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
- changed ? self : nil
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
 
@@ -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.
@@ -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
@@ -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
@@ -32,7 +32,7 @@ module BSON
32
32
  # Create a new regexp.
33
33
  #
34
34
  # @param pattern [String]
35
- # @param options [Array, String]
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.0.rc1
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-03-17 00:00:00.000000000 Z
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: 1.3.1
87
+ version: '0'
88
88
  requirements: []
89
89
  rubyforge_project: bson
90
90
  rubygems_version: 2.2.2
metadata.gz.sig CHANGED
Binary file