sessionm-cassandra_object 2.2.35 → 2.2.36
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/cassandra_object/associations.rb +2 -0
- data/lib/cassandra_object/base.rb +3 -0
- data/lib/cassandra_object/validations.rb +3 -2
- data/sessionm-cassandra_object.gemspec +3 -3
- data/test/validations_test.rb +11 -0
- metadata +73 -47
data/Rakefile
CHANGED
@@ -6,9 +6,11 @@ module CassandraObject
|
|
6
6
|
# TODO: is this the convention?
|
7
7
|
include ActiveRecord::Reflection
|
8
8
|
include ActiveRecord::Associations
|
9
|
+
include ActiveRecord::AutosaveAssociation
|
9
10
|
|
10
11
|
autoload :OneToMany
|
11
12
|
autoload :OneToOne
|
13
|
+
autoload :AutosaveAssociation
|
12
14
|
|
13
15
|
included do
|
14
16
|
class_inheritable_hash :associations
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'sessionm-cassandra_object'
|
5
|
-
s.version = '2.2.
|
5
|
+
s.version = '2.2.36'
|
6
6
|
s.description = 'Cassandra ActiveModel'
|
7
7
|
s.summary = 'Cassandra ActiveModel'
|
8
8
|
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.add_runtime_dependency('rails', "
|
22
|
-
s.add_runtime_dependency('cassandra', ">= 0.
|
21
|
+
s.add_runtime_dependency('rails', ">= 3.1")
|
22
|
+
s.add_runtime_dependency('cassandra', ">= 0.12.1")
|
23
23
|
|
24
24
|
s.add_development_dependency('bundler', "~> 1.0.0")
|
25
25
|
end
|
data/test/validations_test.rb
CHANGED
@@ -12,4 +12,15 @@ class CassandraObject::ValidationsTest < CassandraObject::TestCase
|
|
12
12
|
Issue.reset_callbacks(:validate)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
test 'validates :on' do
|
17
|
+
begin
|
18
|
+
Issue.validates(:description, :presence => true, :on => :create)
|
19
|
+
issue = Issue.create!(:description => 'lol')
|
20
|
+
issue.update_attributes! :description => nil
|
21
|
+
assert_raise(CassandraObject::RecordInvalid) { Issue.create!(:description => '') }
|
22
|
+
ensure
|
23
|
+
Issue.reset_callbacks(:validate)
|
24
|
+
end
|
25
|
+
end
|
15
26
|
end
|
metadata
CHANGED
@@ -1,58 +1,74 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sessionm-cassandra_object
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 2
|
7
|
+
- 2
|
8
|
+
- 36
|
9
|
+
version: 2.2.36
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Michael Koziarski
|
9
13
|
- gotime
|
10
14
|
- sessionm
|
11
15
|
autorequire:
|
12
16
|
bindir: bin
|
13
17
|
cert_chain: []
|
14
|
-
|
15
|
-
|
16
|
-
|
18
|
+
|
19
|
+
date: 2012-03-02 00:00:00 -05:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
17
23
|
name: rails
|
18
|
-
requirement: &70262730474840 !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
|
-
requirements:
|
21
|
-
- - ~>
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '3.0'
|
24
|
-
type: :runtime
|
25
24
|
prerelease: false
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
version: 0.11.3
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 1
|
32
|
+
version: "3.1"
|
35
33
|
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: cassandra
|
36
37
|
prerelease: false
|
37
|
-
|
38
|
-
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
- 12
|
45
|
+
- 1
|
46
|
+
version: 0.12.1
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
39
50
|
name: bundler
|
40
|
-
|
41
|
-
|
42
|
-
requirements:
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
43
54
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 1
|
58
|
+
- 0
|
59
|
+
- 0
|
45
60
|
version: 1.0.0
|
46
61
|
type: :development
|
47
|
-
|
48
|
-
version_requirements: *70262730473920
|
62
|
+
version_requirements: *id003
|
49
63
|
description: Cassandra ActiveModel
|
50
64
|
email: klange@sessionm.com
|
51
65
|
executables: []
|
66
|
+
|
52
67
|
extensions: []
|
53
|
-
|
68
|
+
|
69
|
+
extra_rdoc_files:
|
54
70
|
- README.markdown
|
55
|
-
files:
|
71
|
+
files:
|
56
72
|
- .gitignore
|
57
73
|
- CHANGELOG
|
58
74
|
- Gemfile
|
@@ -139,31 +155,41 @@ files:
|
|
139
155
|
- test/types/time_type_test.rb
|
140
156
|
- test/types/utf8_string_type_test.rb
|
141
157
|
- test/validations_test.rb
|
158
|
+
has_rdoc: true
|
142
159
|
homepage: http://github.com/sessionm/cassandra_object
|
143
160
|
licenses: []
|
161
|
+
|
144
162
|
post_install_message:
|
145
163
|
rdoc_options: []
|
146
|
-
|
164
|
+
|
165
|
+
require_paths:
|
147
166
|
- lib
|
148
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
segments:
|
172
|
+
- 1
|
173
|
+
- 9
|
174
|
+
- 2
|
153
175
|
version: 1.9.2
|
154
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
176
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
segments:
|
181
|
+
- 1
|
182
|
+
- 3
|
183
|
+
- 5
|
159
184
|
version: 1.3.5
|
160
185
|
requirements: []
|
186
|
+
|
161
187
|
rubyforge_project:
|
162
|
-
rubygems_version: 1.
|
188
|
+
rubygems_version: 1.3.6
|
163
189
|
signing_key:
|
164
190
|
specification_version: 3
|
165
191
|
summary: Cassandra ActiveModel
|
166
|
-
test_files:
|
192
|
+
test_files:
|
167
193
|
- test/active_model_test.rb
|
168
194
|
- test/base_test.rb
|
169
195
|
- test/batches_test.rb
|