bson 1.1.1 → 1.1.2

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.

@@ -175,18 +175,7 @@
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
178
+ Copyright 2008-2010 10gen, Inc.
190
179
 
191
180
  Licensed under the Apache License, Version 2.0 (the "License");
192
181
  you may not use this file except in compliance with the License.
@@ -199,4 +188,3 @@
199
188
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
189
  See the License for the specific language governing permissions and
201
190
  limitations under the License.
202
-
data/Rakefile CHANGED
@@ -169,7 +169,7 @@ task :ydoc do
169
169
  require File.join(File.dirname(__FILE__), 'lib', 'mongo')
170
170
  out = File.join('ydoc', Mongo::VERSION)
171
171
  FileUtils.rm_rf('ydoc')
172
- system "yardoc lib/**/*.rb lib/mongo/**/*.rb lib/bson/**/*.rb -e docs/yard_ext.rb -p docs/templates -o #{out} --title MongoRuby-#{Mongo::VERSION}"
172
+ system "yardoc lib/**/*.rb lib/mongo/**/*.rb lib/bson/**/*.rb -e yard/yard_ext.rb -p yard/templates -o #{out} --title MongoRuby-#{Mongo::VERSION} --files docs/TUTORIAL.md,docs/HISTORY.md,docs/CREDITS.md,docs/1.0_UPGRADE.md"
173
173
  end
174
174
 
175
175
  namespace :gem do
@@ -177,22 +177,35 @@ namespace :gem do
177
177
  desc "Install the gem locally"
178
178
  task :install do
179
179
  sh "gem build bson.gemspec"
180
- sh "gem install bson-*.gem"
180
+ sh "gem install --no-rdoc --no-ri bson-*.gem"
181
+
181
182
  sh "gem build mongo.gemspec"
182
- sh "gem install mongo-*.gem"
183
+ sh "gem install --no-rdoc --no-ri mongo-*.gem"
184
+
183
185
  sh "rm mongo-*.gem"
184
186
  sh "rm bson-*.gem"
185
187
  end
186
188
 
187
189
  desc "Install the optional c extensions"
188
190
  task :install_extensions do
191
+ sh "gem uninstall -x -a -I bson_ext"
189
192
  sh "gem build bson_ext.gemspec"
190
- sh "gem install bson_ext-*.gem"
193
+ sh "gem install --no-rdoc --no-ri bson_ext-*.gem"
191
194
  sh "rm bson_ext-*.gem"
192
195
  end
193
196
 
194
197
  end
195
198
 
199
+ namespace :ci do
200
+ namespace :test do
201
+ task :c do
202
+ Rake::Task['gem:install'].invoke
203
+ Rake::Task['gem:install_extensions'].invoke
204
+ Rake::Task['test:c'].invoke
205
+ end
206
+ end
207
+ end
208
+
196
209
  task :default => :list
197
210
 
198
211
  task :list do
@@ -2,10 +2,10 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- MINIMUM_BSON_EXT_VERSION = "1.1.1"
5
+ MINIMUM_BSON_EXT_VERSION = "1.1.2"
6
6
 
7
7
  module BSON
8
- VERSION = "1.1.1"
8
+ VERSION = "1.1.2"
9
9
  def self.serialize(obj, check_keys=false, move_id=false)
10
10
  BSON_CODER.serialize(obj, check_keys, move_id)
11
11
  end
@@ -60,10 +60,12 @@ else
60
60
  module BSON
61
61
  BSON_CODER = BSON_RUBY
62
62
  end
63
- warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance."
64
- warn " You can install the extension as follows:\n gem install bson_ext\n"
65
- warn " If you continue to receive this message after installing, make sure that the"
66
- warn " bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.\n"
63
+ unless ENV['TEST_MODE']
64
+ warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance."
65
+ warn " You can install the extension as follows:\n gem install bson_ext\n"
66
+ warn " If you continue to receive this message after installing, make sure that the"
67
+ warn " bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.\n"
68
+ end
67
69
  end
68
70
  end
69
71
 
@@ -437,11 +437,13 @@ class BSONTest < Test::Unit::TestCase
437
437
  # HashWithIndifferentAccess can cause problems for _id but not for other
438
438
  # keys. rather than require rails to test with HWIA directly, we do this
439
439
  # somewhat hacky test.
440
+ #
441
+ # Note that the driver only eliminates duplicate ids when move_id is true.
440
442
  def test_no_duplicate_id
441
443
  dup = {"_id" => "foo", :_id => "foo"}
442
444
  one = {"_id" => "foo"}
443
445
 
444
- assert_equal @encoder.serialize(one).to_a, @encoder.serialize(dup).to_a
446
+ assert_equal @encoder.serialize(one, false, true).to_a, @encoder.serialize(dup, false, true).to_a
445
447
  end
446
448
 
447
449
  def test_duplicate_keys
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Menard
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-10-14 00:00:00 -04:00
20
+ date: 2010-11-04 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies: []
23
23