bson 1.1.4 → 1.1.5

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.

Files changed (3) hide show
  1. data/Rakefile +50 -69
  2. data/lib/bson.rb +2 -2
  3. metadata +4 -4
data/Rakefile CHANGED
@@ -38,32 +38,45 @@ end
38
38
 
39
39
  desc "Test the MongoDB Ruby driver."
40
40
  task :test do
41
- puts "\nThis option has changed."
42
- puts "\nTo test the driver with the c-extensions:\nrake test:c\n"
43
- puts "To test the pure ruby driver: \nrake test:ruby"
41
+ puts "\nTo test the driver with the C-extensions:\nrake test:c\n\n"
42
+ puts "To test the pure ruby driver: \nrake test:ruby\n\n"
44
43
  end
45
44
 
46
45
  namespace :test do
47
46
 
48
- desc "Test the driver with the c extension enabled."
47
+ desc "Test the driver with the C extension enabled."
49
48
  task :c do
50
49
  ENV['C_EXT'] = 'TRUE'
51
- Rake::Task['test:unit'].invoke
52
- Rake::Task['test:functional'].invoke
53
- Rake::Task['test:bson'].invoke
54
- Rake::Task['test:pooled_threading'].invoke
55
- Rake::Task['test:drop_databases'].invoke
50
+ if ENV['TEST']
51
+ Rake::Task['test:functional'].invoke
52
+ else
53
+ Rake::Task['test:unit'].invoke
54
+ Rake::Task['test:functional'].invoke
55
+ Rake::Task['test:bson'].invoke
56
+ Rake::Task['test:pooled_threading'].invoke
57
+ Rake::Task['test:drop_databases'].invoke
58
+ end
56
59
  ENV['C_EXT'] = nil
57
60
  end
58
61
 
59
- desc "Test the driver using pure ruby (no c extension)"
62
+ desc "Test the driver using pure ruby (no C extension)"
60
63
  task :ruby do
61
64
  ENV['C_EXT'] = nil
62
- Rake::Task['test:unit'].invoke
63
- Rake::Task['test:functional'].invoke
64
- Rake::Task['test:bson'].invoke
65
- Rake::Task['test:pooled_threading'].invoke
66
- Rake::Task['test:drop_databases'].invoke
65
+ if ENV['TEST']
66
+ Rake::Task['test:functional'].invoke
67
+ else
68
+ Rake::Task['test:unit'].invoke
69
+ Rake::Task['test:functional'].invoke
70
+ Rake::Task['test:bson'].invoke
71
+ Rake::Task['test:pooled_threading'].invoke
72
+ Rake::Task['test:drop_databases'].invoke
73
+ end
74
+ end
75
+
76
+ desc "Run the replica set test suite"
77
+ Rake::TestTask.new(:rs) do |t|
78
+ t.test_files = FileList['test/replica_sets/*_test.rb']
79
+ t.verbose = true
67
80
  end
68
81
 
69
82
  Rake::TestTask.new(:unit) do |t|
@@ -77,52 +90,7 @@ namespace :test do
77
90
  end
78
91
 
79
92
  Rake::TestTask.new(:pooled_threading) do |t|
80
- t.test_files = FileList['test/threading/*.rb']
81
- t.verbose = true
82
- end
83
-
84
- Rake::TestTask.new(:replica_pair_count) do |t|
85
- t.test_files = FileList['test/replica_pairs/count_test.rb']
86
- t.verbose = true
87
- end
88
-
89
- Rake::TestTask.new(:replica_pair_insert) do |t|
90
- t.test_files = FileList['test/replica_pairs/insert_test.rb']
91
- t.verbose = true
92
- end
93
-
94
- Rake::TestTask.new(:pooled_replica_pair_insert) do |t|
95
- t.test_files = FileList['test/replica_pairs/pooled_insert_test.rb']
96
- t.verbose = true
97
- end
98
-
99
- Rake::TestTask.new(:replica_pair_query) do |t|
100
- t.test_files = FileList['test/replica_pairs/query_test.rb']
101
- t.verbose = true
102
- end
103
-
104
- Rake::TestTask.new(:replica_set_count) do |t|
105
- t.test_files = FileList['test/replica_sets/count_test.rb']
106
- t.verbose = true
107
- end
108
-
109
- Rake::TestTask.new(:replica_set_insert) do |t|
110
- t.test_files = FileList['test/replica_sets/insert_test.rb']
111
- t.verbose = true
112
- end
113
-
114
- Rake::TestTask.new(:pooled_replica_set_insert) do |t|
115
- t.test_files = FileList['test/replica_sets/pooled_insert_test.rb']
116
- t.verbose = true
117
- end
118
-
119
- Rake::TestTask.new(:replica_set_query) do |t|
120
- t.test_files = FileList['test/replica_sets/query_test.rb']
121
- t.verbose = true
122
- end
123
-
124
- Rake::TestTask.new(:replica_set_ack) do |t|
125
- t.test_files = FileList['test/replica_sets/replication_ack_test.rb']
93
+ t.test_files = FileList['test/threading/*_test.rb']
126
94
  t.verbose = true
127
95
  end
128
96
 
@@ -147,16 +115,17 @@ namespace :test do
147
115
  end
148
116
 
149
117
  task :drop_databases do |t|
150
- puts "Dropping test database..."
151
- require File.join(File.dirname(__FILE__), 'test', 'test_helper')
152
- include Mongo
153
- con = Connection.new(ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost',
154
- ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT)
155
- con.drop_database(MONGO_TEST_DB)
118
+ puts "Dropping test databases..."
119
+ require './lib/mongo'
120
+ con = Mongo::Connection.new(ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost',
121
+ ENV['MONGO_RUBY_DRIVER_PORT'] || Mongo::Connection::DEFAULT_PORT)
122
+ con.database_names.each do |name|
123
+ con.drop_database(name) if name =~ /^ruby-test/
124
+ end
156
125
  end
157
126
  end
158
127
 
159
- desc "Generate documentation"
128
+ desc "Generate RDOC documentation"
160
129
  task :rdoc do
161
130
  version = eval(File.read("mongo.gemspec")).version
162
131
  out = File.join('html', version.to_s)
@@ -172,6 +141,19 @@ task :ydoc do
172
141
  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/GridFS.md,docs/FAQ.md,docs/REPLICA_SETS.md,docs/WRITE_CONCERN.md,docs/HISTORY.md,docs/CREDITS.md,docs/1.0_UPGRADE.md"
173
142
  end
174
143
 
144
+ namespace :bamboo do
145
+ namespace :test do
146
+ task :ruby do
147
+ Rake::Task['test:ruby'].invoke
148
+ end
149
+
150
+ task :c do
151
+ Rake::Task['gem:install_extensions'].invoke
152
+ Rake::Task['test:c'].invoke
153
+ end
154
+ end
155
+ end
156
+
175
157
  namespace :gem do
176
158
 
177
159
  desc "Install the gem locally"
@@ -188,7 +170,6 @@ namespace :gem do
188
170
 
189
171
  desc "Install the optional c extensions"
190
172
  task :install_extensions do
191
- sh "gem uninstall -x -a -I bson_ext"
192
173
  sh "gem build bson_ext.gemspec"
193
174
  sh "gem install --no-rdoc --no-ri bson_ext-*.gem"
194
175
  sh "rm bson_ext-*.gem"
@@ -2,10 +2,10 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- MINIMUM_BSON_EXT_VERSION = "1.1.4"
5
+ MINIMUM_BSON_EXT_VERSION = "1.1.5"
6
6
 
7
7
  module BSON
8
- VERSION = "1.1.4"
8
+ VERSION = "1.1.5"
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
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 4
10
- version: 1.1.4
9
+ - 5
10
+ version: 1.1.5
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-11-30 00:00:00 -05:00
20
+ date: 2010-12-15 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies: []
23
23