minor: extra rake tasks for tests. don't show C ext warning when testing
This commit is contained in:
parent
2939932526
commit
e21a4b897a
23
Rakefile
23
Rakefile
@ -176,23 +176,40 @@ namespace :gem do
|
||||
|
||||
desc "Install the gem locally"
|
||||
task :install do
|
||||
sh "gem install --no-rdoc --no-ri json"
|
||||
|
||||
sh "gem uninstall -x -a -I bson"
|
||||
sh "gem build bson.gemspec"
|
||||
sh "gem install bson-*.gem"
|
||||
sh "gem install --no-rdoc --no-ri bson-*.gem"
|
||||
|
||||
sh "gem uninstall -x -a -I mongo"
|
||||
sh "gem build mongo.gemspec"
|
||||
sh "gem install mongo-*.gem"
|
||||
sh "gem install --no-rdoc --no-ri mongo-*.gem"
|
||||
|
||||
sh "rm mongo-*.gem"
|
||||
sh "rm bson-*.gem"
|
||||
end
|
||||
|
||||
desc "Install the optional c extensions"
|
||||
task :install_extensions do
|
||||
sh "gem uninstall -x -a -I bson_ext"
|
||||
sh "gem build bson_ext.gemspec"
|
||||
sh "gem install bson_ext-*.gem"
|
||||
sh "gem install --no-rdoc --no-ri bson_ext-*.gem"
|
||||
sh "rm bson_ext-*.gem"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
namespace :ci do
|
||||
namespace :test do
|
||||
task :c do
|
||||
Rake::Task['gem:install'].invoke
|
||||
Rake::Task['gem:install_extensions'].invoke
|
||||
Rake::Task['test:c'].invoke
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
task :default => :list
|
||||
|
||||
task :list do
|
||||
|
10
lib/bson.rb
10
lib/bson.rb
@ -60,10 +60,12 @@ else
|
||||
module BSON
|
||||
BSON_CODER = BSON_RUBY
|
||||
end
|
||||
warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance."
|
||||
warn " You can install the extension as follows:\n gem install bson_ext\n"
|
||||
warn " If you continue to receive this message after installing, make sure that the"
|
||||
warn " bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.\n"
|
||||
unless ENV['TEST_MODE']
|
||||
warn "\n**Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance."
|
||||
warn " You can install the extension as follows:\n gem install bson_ext\n"
|
||||
warn " If you continue to receive this message after installing, make sure that the"
|
||||
warn " bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user