gotime-cassandra_object 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gotime-cassandra_object}
8
- s.version = "0.7.7"
8
+ s.version = "0.7.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Koziarski", "grantr"]
12
- s.date = %q{2011-02-17}
12
+ s.date = %q{2011-02-18}
13
13
  s.description = %q{Cassandra ActiveModel}
14
14
  s.email = %q{grantr@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -10,7 +10,7 @@ module CassandraObject
10
10
  end
11
11
  end
12
12
 
13
- def save
13
+ def save(options={})
14
14
  super.tap { changed_attributes.clear }
15
15
  end
16
16
 
@@ -138,7 +138,7 @@ module CassandraObject
138
138
  end
139
139
 
140
140
  module InstanceMethods
141
- def save
141
+ def save(options={})
142
142
  _run_save_callbacks do
143
143
  create_or_update
144
144
  end
@@ -33,17 +33,19 @@ module CassandraObject
33
33
  end
34
34
  end
35
35
 
36
- def save
37
- if valid?
38
- super
39
- else
40
- false
41
- end
36
+ def save(options={})
37
+ perform_validations(options) ? super : false
42
38
  end
43
39
 
44
40
  def save!
45
41
  save || RecordInvalid.raise_error(self)
46
42
  end
43
+
44
+ protected
45
+
46
+ def perform_validations(options={})
47
+ (options[:validate] != false) ? valid? : true
48
+ end
47
49
 
48
50
  end
49
51
  end
@@ -2,7 +2,7 @@ module CassandraObject
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 7
5
- PATCH = 7
5
+ PATCH = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 7
9
- version: 0.7.7
8
+ - 8
9
+ version: 0.7.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Koziarski
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-17 00:00:00 -08:00
18
+ date: 2011-02-18 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -213,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
213
213
  requirements:
214
214
  - - ">="
215
215
  - !ruby/object:Gem::Version
216
- hash: -226474256886539699
216
+ hash: -64604789628622989
217
217
  segments:
218
218
  - 0
219
219
  version: "0"