gotime-cassandra_object 0.7.5 → 0.7.6
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.
@@ -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.
|
8
|
+
s.version = "0.7.6"
|
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-
|
12
|
+
s.date = %q{2011-02-11}
|
13
13
|
s.description = %q{Cassandra ActiveModel}
|
14
14
|
s.email = %q{grantr@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -109,6 +109,8 @@ module CassandraObject
|
|
109
109
|
allocate.tap do |object|
|
110
110
|
object.instance_variable_set("@schema_version", attributes.delete('schema_version'))
|
111
111
|
object.instance_variable_set("@key", parse_key(key))
|
112
|
+
object.instance_variable_set("@new_record", false)
|
113
|
+
object.instance_variable_set("@destroyed", false)
|
112
114
|
object.instance_variable_set("@attributes", decode_columns_hash(attributes).with_indifferent_access)
|
113
115
|
end
|
114
116
|
end
|
@@ -151,7 +153,7 @@ module CassandraObject
|
|
151
153
|
_run_create_callbacks do
|
152
154
|
@key ||= self.class.next_key(self)
|
153
155
|
_write
|
154
|
-
@
|
156
|
+
@new_record = false
|
155
157
|
@key
|
156
158
|
end
|
157
159
|
end
|
@@ -168,7 +170,7 @@ module CassandraObject
|
|
168
170
|
end
|
169
171
|
|
170
172
|
def new_record?
|
171
|
-
|
173
|
+
@new_record
|
172
174
|
end
|
173
175
|
|
174
176
|
def destroyed?
|
@@ -176,7 +178,7 @@ module CassandraObject
|
|
176
178
|
end
|
177
179
|
|
178
180
|
def persisted?
|
179
|
-
|
181
|
+
!(new_record? || destroyed?)
|
180
182
|
end
|
181
183
|
|
182
184
|
def destroy
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
8
|
+
- 6
|
9
|
+
version: 0.7.6
|
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-
|
18
|
+
date: 2011-02-11 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: -
|
216
|
+
hash: -2972902042338948118
|
217
217
|
segments:
|
218
218
|
- 0
|
219
219
|
version: "0"
|