jmonteiro-mongo_mapper 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -338,12 +338,6 @@ module MongoMapper
338
338
  end
339
339
 
340
340
  def save(options={})
341
- # Support AR style save calls save(false) so ORM agnostic libs can
342
- # successfully call save without validations, regardless of if they
343
- # expect mongo_mapper's style of doing it, or they expect
344
- # ActiveRecord's style of doing it.
345
- options = {:validate => options} if options.is_a?(TrueClass) || options.is_a?(FalseClass)
346
-
347
341
  options.reverse_merge!(:validate => true)
348
342
  perform_validations = options.delete(:validate)
349
343
  !perform_validations || valid? ? create_or_update(options) : false
@@ -271,7 +271,7 @@ module MongoMapper
271
271
  end
272
272
 
273
273
  def embeddable?
274
- type.respond_to?(:embeddable?) && type.embeddable? ? true : false
274
+ type.respond_to?(:embeddable?) && type.embeddable?
275
275
  end
276
276
 
277
277
  def number?
data/lib/mongo_mapper.rb CHANGED
@@ -5,7 +5,7 @@ require 'set'
5
5
  # so i want to make sure that if you are using gems you do in fact have the correct versions
6
6
  # if there is a better way to do this, please enlighten me!
7
7
  if self.class.const_defined?(:Gem)
8
- gem 'activesupport', '>= 2.3'
8
+ gem 'activesupport', '~> 2.3'
9
9
  gem 'mongo', '0.18.2'
10
10
  gem 'jnunemaker-validatable', '1.8.1'
11
11
  end
@@ -727,17 +727,8 @@ class DocumentTest < Test::Unit::TestCase
727
727
  doc.save(:validate => false)
728
728
  @document.count.should == 1
729
729
  end
730
-
731
- context 'calling save with the ActiveRecord style of turning validations off' do
732
- should 'insert an invalid document' do
733
- doc = @document.new
734
- doc.expects(:valid?).never
735
- doc.save(false)
736
- @document.count.should == 1
737
- end
738
- end
739
730
  end
740
-
731
+
741
732
  context "#save (with options)" do
742
733
  setup do
743
734
  MongoMapper.ensured_indexes = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jmonteiro-mongo_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-15 00:00:00 -02:00
13
+ date: 2010-01-18 00:00:00 -02:00
14
14
  default_executable: mmconsole
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency