Gemspec file explicitly lists all files, since I can't use find's File.directory? on Github.
This commit is contained in:
parent
54c62734fc
commit
61309340cc
@ -1,59 +1,76 @@
|
|||||||
# This is a copy of the code in the stdlib file 'find.rb'. GitHub doesn't seem
|
PACKAGE_FILES = ['README.rdoc', 'Rakefile', 'mongo-ruby-driver.gemspec',
|
||||||
# to allow me to "require 'find'".
|
'bin/mongo_console',
|
||||||
module Find
|
'bin/run_test_script',
|
||||||
def find(*paths) # :yield: path
|
'bin/standard_benchmark',
|
||||||
paths.collect!{|d| d.dup}
|
'examples/admin.rb',
|
||||||
while file = paths.shift
|
'examples/benchmarks.rb',
|
||||||
catch(:prune) do
|
'examples/blog.rb',
|
||||||
yield file.dup.taint
|
'examples/capped.rb',
|
||||||
next unless File.exist? file
|
'examples/cursor.rb',
|
||||||
begin
|
'examples/gridfs.rb',
|
||||||
if File.lstat(file).directory? then
|
'examples/index_test.rb',
|
||||||
d = Dir.open(file)
|
'examples/info.rb',
|
||||||
begin
|
'examples/queries.rb',
|
||||||
for f in d
|
'examples/simple.rb',
|
||||||
next if f == "." or f == ".."
|
'examples/strict.rb',
|
||||||
if File::ALT_SEPARATOR and file =~ /^(?:[\/\\]|[A-Za-z]:[\/\\]?)$/ then
|
'examples/types.rb',
|
||||||
f = file + f
|
'lib/mongo/admin.rb',
|
||||||
elsif file == "/" then
|
'lib/mongo/collection.rb',
|
||||||
f = "/" + f
|
'lib/mongo/cursor.rb',
|
||||||
else
|
'lib/mongo/db.rb',
|
||||||
f = File.join(file, f)
|
'lib/mongo/gridfs/chunk.rb',
|
||||||
end
|
'lib/mongo/gridfs/grid_store.rb',
|
||||||
paths.unshift f.untaint
|
'lib/mongo/gridfs.rb',
|
||||||
end
|
'lib/mongo/message/get_more_message.rb',
|
||||||
ensure
|
'lib/mongo/message/insert_message.rb',
|
||||||
d.close
|
'lib/mongo/message/kill_cursors_message.rb',
|
||||||
end
|
'lib/mongo/message/message.rb',
|
||||||
end
|
'lib/mongo/message/message_header.rb',
|
||||||
rescue Errno::ENOENT, Errno::EACCES
|
'lib/mongo/message/msg_message.rb',
|
||||||
end
|
'lib/mongo/message/opcodes.rb',
|
||||||
end
|
'lib/mongo/message/query_message.rb',
|
||||||
end
|
'lib/mongo/message/remove_message.rb',
|
||||||
end
|
'lib/mongo/message/update_message.rb',
|
||||||
|
'lib/mongo/message.rb',
|
||||||
|
'lib/mongo/mongo.rb',
|
||||||
|
'lib/mongo/query.rb',
|
||||||
|
'lib/mongo/types/binary.rb',
|
||||||
|
'lib/mongo/types/dbref.rb',
|
||||||
|
'lib/mongo/types/objectid.rb',
|
||||||
|
'lib/mongo/types/regexp_of_holding.rb',
|
||||||
|
'lib/mongo/types/undefined.rb',
|
||||||
|
'lib/mongo/util/bson.rb',
|
||||||
|
'lib/mongo/util/byte_buffer.rb',
|
||||||
|
'lib/mongo/util/ordered_hash.rb',
|
||||||
|
'lib/mongo/util/xml_to_ruby.rb',
|
||||||
|
'lib/mongo.rb']
|
||||||
|
|
||||||
def prune
|
TEST_FILES = ['tests/mongo-qa/_common.rb',
|
||||||
throw :prune
|
'tests/mongo-qa/admin',
|
||||||
end
|
'tests/mongo-qa/capped',
|
||||||
|
'tests/mongo-qa/count1',
|
||||||
module_function :find, :prune
|
'tests/mongo-qa/dbs',
|
||||||
end
|
'tests/mongo-qa/find',
|
||||||
|
'tests/mongo-qa/find1',
|
||||||
# ================================================================
|
'tests/mongo-qa/indices',
|
||||||
|
'tests/mongo-qa/remove',
|
||||||
def self.files_in(dir)
|
'tests/mongo-qa/stress1',
|
||||||
files = []
|
'tests/mongo-qa/test1',
|
||||||
Find.find(dir) { |path|
|
'tests/mongo-qa/update',
|
||||||
next if path =~ /\.DS_Store$/
|
'tests/test_admin.rb',
|
||||||
files << path unless File.directory?(path)
|
'tests/test_bson.rb',
|
||||||
}
|
'tests/test_byte_buffer.rb',
|
||||||
files
|
'tests/test_chunk.rb',
|
||||||
end
|
'tests/test_cursor.rb',
|
||||||
|
'tests/test_db.rb',
|
||||||
PACKAGE_FILES = ['README.rdoc', 'Rakefile', 'mongo-ruby-driver.gemspec'] +
|
'tests/test_db_api.rb',
|
||||||
files_in('bin') + files_in('examples') + files_in('lib')
|
'tests/test_db_connection.rb',
|
||||||
|
'tests/test_grid_store.rb',
|
||||||
TEST_FILES = files_in('tests')
|
'tests/test_message.rb',
|
||||||
|
'tests/test_mongo.rb',
|
||||||
|
'tests/test_objectid.rb',
|
||||||
|
'tests/test_ordered_hash.rb',
|
||||||
|
'tests/test_round_trip.rb']
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = 'mongo'
|
s.name = 'mongo'
|
||||||
|
Loading…
Reference in New Issue
Block a user