bson_ext 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +50 -69
- data/ext/cbson/version.h +1 -1
- metadata +5 -5
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 "\
|
42
|
-
puts "
|
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
|
47
|
+
desc "Test the driver with the C extension enabled."
|
49
48
|
task :c do
|
50
49
|
ENV['C_EXT'] = 'TRUE'
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
62
|
+
desc "Test the driver using pure ruby (no C extension)"
|
60
63
|
task :ruby do
|
61
64
|
ENV['C_EXT'] = nil
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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
|
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
|
151
|
-
require
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
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"
|
data/ext/cbson/version.h
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bson_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 5
|
10
|
+
version: 1.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Dirolf
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-15 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- ext/cbson/encoding_helpers.h
|
38
38
|
- ext/cbson/version.h
|
39
39
|
- ext/cbson/buffer.h
|
40
|
-
has_rdoc:
|
40
|
+
has_rdoc: true
|
41
41
|
homepage: http://www.mongodb.org
|
42
42
|
licenses: []
|
43
43
|
|