Skip to content

Commit

Permalink
minor: some rspec boiler plate, improvements to bson_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Black committed Dec 14, 2012
1 parent 55ee3fb commit f5f83e7
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 320 deletions.
38 changes: 18 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
docs
.yardoc
coverage
*.gem
nbproject
*#*
*.bundle
*.class
*.gem
*.log
*.o
*.pid
*.so
*.swp
*~
.DS_Store
.idea/*
.rvmrc
.yardoc
coverage
data
docs
ext/cbson/Makefile
lib/mongo_ext/Makefile
Gemfile.lock
lib/bson_ext
lib/mongo_ext/Makefile
nbproject
tasks/benchmark/exp_series_suite_*.js
*~
*#*
*.class
*.swp
*.pid
*.log
test/load/unicorn/unicorn.rb
test/load/thin/config.yml
test/tools/data/
.rvmrc
Gemfile.lock
.idea/*
tmp
data
.DS_Store
tmp
13 changes: 9 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ group :deploy do
end

group :testing do
gem 'simplecov', :require => false
gem 'test-unit'
gem 'shoulda', ">=3.3.2"
gem 'mocha', ">=0.13.0", :require => 'mocha/setup'
gem 'sfl'
gem 'shoulda', ">=3.3.2"
gem 'test-unit'

gem 'growl'
gem 'guard-rspec'
gem 'rb-fsevent'
gem 'rspec'

gem 'sfl'
gem 'simplecov', :require => false
end

platforms :jruby do
Expand Down
4 changes: 4 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
guard 'rspec', :rvm => ['1.8.7@mongo-ruby-driver', '1.9.3@mongo-ruby-driver'] do
watch(%r{^spec/.+_spec\.rb$})
watch('spec/spec_helper.rb') { "spec" }
end
14 changes: 7 additions & 7 deletions lib/bson.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ module BSON
require 'active_support/core_ext/hash/indifferent_access'
end


require 'base64'
require 'bson/bson_ruby'
require 'bson/byte_buffer'
require 'bson/exceptions'
require 'bson/ordered_hash'
require 'bson/types/binary'
require 'bson/types/code'
require 'bson/types/dbref'
require 'bson/types/object_id'
require 'bson/types/min_max_keys'
require 'bson/types/object_id'
require 'bson/types/timestamp'

require 'base64'
require 'bson/ordered_hash'
require 'bson/byte_buffer'
require 'bson/bson_ruby'
require 'bson/exceptions'
8 changes: 4 additions & 4 deletions lib/bson/types/binary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ module BSON
# Use this class when storing binary data in documents.
class Binary < ByteBuffer

SUBTYPE_SIMPLE = 0x00
SUBTYPE_BYTES = 0x02
SUBTYPE_UUID = 0x03
SUBTYPE_MD5 = 0x05
SUBTYPE_SIMPLE = 0x00
SUBTYPE_BYTES = 0x02
SUBTYPE_UUID = 0x03
SUBTYPE_MD5 = 0x05
SUBTYPE_USER_DEFINED = 0x80

# One of the SUBTYPE_* constants. Default is SUBTYPE_BYTES.
Expand Down
Loading

0 comments on commit f5f83e7

Please sign in to comment.