cequel 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +17 -13
- data/lib/cequel/metal/logger.rb +2 -2
- data/lib/cequel/record/callbacks.rb +2 -2
- data/lib/cequel/record/validations.rb +2 -2
- data/lib/cequel/schema/table.rb +2 -2
- data/lib/cequel/version.rb +1 -1
- data/spec/examples/record/validations_spec.rb +10 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653863da592d33f9f4b50876ef2f5eb56177eee9
|
4
|
+
data.tar.gz: b476ebecbc1b66175eb9ee85d20a9be064fbec8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97f0f3db17b059ed6c983611a20559768b654cff6e50be068ca41e411847a0e1ccab930783e202b8c588cf7e0996f5c0b4fa45f5084e2519f71fb47e7a3ad7ef
|
7
|
+
data.tar.gz: f17464df0048ece7d69a8221cde76c6812cf6a3deac9d0fd7b843773d9df4cc8239d070bd91af9d0130883c8a5e8bb32354fd3c746be26f293fa0be337071a3c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cequel (1.0.
|
4
|
+
cequel (1.0.4)
|
5
5
|
activemodel
|
6
6
|
activesupport (>= 3.1)
|
7
7
|
cassandra-cql (~> 1.2)
|
@@ -11,11 +11,11 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (4.0.
|
15
|
-
activesupport (= 4.0.
|
14
|
+
activemodel (4.0.4)
|
15
|
+
activesupport (= 4.0.4)
|
16
16
|
builder (~> 3.1.0)
|
17
|
-
activesupport (4.0.
|
18
|
-
i18n (~> 0.6, >= 0.6.
|
17
|
+
activesupport (4.0.4)
|
18
|
+
i18n (~> 0.6, >= 0.6.9)
|
19
19
|
minitest (~> 4.2)
|
20
20
|
multi_json (~> 1.3)
|
21
21
|
thread_safe (~> 0.1)
|
@@ -74,12 +74,12 @@ GEM
|
|
74
74
|
method_source (0.8.2)
|
75
75
|
mime-types (1.25.1)
|
76
76
|
minitest (4.7.5)
|
77
|
-
multi_json (1.
|
77
|
+
multi_json (1.9.0)
|
78
78
|
multipart-post (1.2.0)
|
79
79
|
mustache (0.99.5)
|
80
80
|
net-http-persistent (2.9.4)
|
81
81
|
net-http-pipeline (1.0.1)
|
82
|
-
parser (2.1.
|
82
|
+
parser (2.1.7)
|
83
83
|
ast (~> 1.1)
|
84
84
|
slop (~> 3.4, >= 3.4.5)
|
85
85
|
powerpack (0.0.9)
|
@@ -108,13 +108,16 @@ GEM
|
|
108
108
|
rspec-expectations (2.14.5)
|
109
109
|
diff-lcs (>= 1.1.3, < 2.0)
|
110
110
|
rspec-mocks (2.14.6)
|
111
|
-
rubocop (0.
|
111
|
+
rubocop (0.19.0)
|
112
112
|
json (>= 1.7.7, < 2)
|
113
|
-
parser (~> 2.1.
|
113
|
+
parser (~> 2.1.7)
|
114
114
|
powerpack (~> 0.0.6)
|
115
115
|
rainbow (>= 1.99.1, < 3.0)
|
116
|
+
ruby-progressbar (~> 1.4)
|
117
|
+
ruby-progressbar (1.4.2)
|
118
|
+
safe_yaml (0.9.7)
|
116
119
|
simple_uuid (0.4.0)
|
117
|
-
slop (3.
|
120
|
+
slop (3.5.0)
|
118
121
|
spoon (0.0.4)
|
119
122
|
ffi
|
120
123
|
thread_safe (0.2.0)
|
@@ -124,7 +127,7 @@ GEM
|
|
124
127
|
thrift (0.8.0)
|
125
128
|
thrift_client (0.8.4)
|
126
129
|
thrift (~> 0.8.0)
|
127
|
-
travis (1.6.
|
130
|
+
travis (1.6.8)
|
128
131
|
addressable (~> 2.3)
|
129
132
|
backports
|
130
133
|
faraday (~> 0.8.7)
|
@@ -135,11 +138,12 @@ GEM
|
|
135
138
|
pry (~> 0.9)
|
136
139
|
pusher-client (~> 0.4)
|
137
140
|
typhoeus (~> 0.6)
|
138
|
-
travis-lint (1.
|
141
|
+
travis-lint (1.8.0)
|
139
142
|
hashr (~> 0.0.22)
|
143
|
+
safe_yaml (~> 0.9.0)
|
140
144
|
typhoeus (0.6.7)
|
141
145
|
ethon (~> 0.6.2)
|
142
|
-
tzinfo (0.3.
|
146
|
+
tzinfo (0.3.39)
|
143
147
|
websocket (1.0.7)
|
144
148
|
yard (0.8.7.3)
|
145
149
|
|
data/lib/cequel/metal/logger.rb
CHANGED
@@ -37,7 +37,7 @@ module Cequel
|
|
37
37
|
def log(label, timing, statement, bind_vars)
|
38
38
|
if timing >= threshold
|
39
39
|
out.add(severity) do
|
40
|
-
|
40
|
+
format(
|
41
41
|
'%s (%dms) %s',
|
42
42
|
label, timing, sanitize(statement, bind_vars)
|
43
43
|
)
|
@@ -64,7 +64,7 @@ module Cequel
|
|
64
64
|
#
|
65
65
|
def log(label, statement, bind_vars)
|
66
66
|
out.add(severity) do
|
67
|
-
|
67
|
+
format('%s (ERROR) %s', label, sanitize(statement, bind_vars))
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -31,12 +31,12 @@ module Cequel
|
|
31
31
|
|
32
32
|
# (see Persistence#save)
|
33
33
|
def save(options = {})
|
34
|
-
connection.batch { run_callbacks(:save) { super }}
|
34
|
+
connection.batch { run_callbacks(:save) { super } }
|
35
35
|
end
|
36
36
|
|
37
37
|
# (see Persistence#save)
|
38
38
|
def destroy
|
39
|
-
connection.batch { run_callbacks(:destroy) { super }}
|
39
|
+
connection.batch { run_callbacks(:destroy) { super } }
|
40
40
|
end
|
41
41
|
|
42
42
|
protected
|
data/lib/cequel/schema/table.rb
CHANGED
@@ -9,11 +9,11 @@ module Cequel
|
|
9
9
|
# @see Keyspace#read_table
|
10
10
|
#
|
11
11
|
class Table
|
12
|
-
STORAGE_PROPERTIES = %w
|
12
|
+
STORAGE_PROPERTIES = %w(
|
13
13
|
bloom_filter_fp_chance caching comment compaction compression
|
14
14
|
dclocal_read_repair_chance gc_grace_seconds read_repair_chance
|
15
15
|
replicate_on_write
|
16
|
-
|
16
|
+
)
|
17
17
|
|
18
18
|
# @return [Symbol] the name of the table
|
19
19
|
attr_reader :name
|
data/lib/cequel/version.rb
CHANGED
@@ -37,6 +37,16 @@ describe Cequel::Record::Validations do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
describe '#invalid?' do
|
41
|
+
it 'should be true if model is not valid' do
|
42
|
+
invalid_post.should be_invalid
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should be false if model is valid' do
|
46
|
+
valid_post.should_not be_invalid
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
40
50
|
describe '#save' do
|
41
51
|
it 'should return false and not persist model if invalid' do
|
42
52
|
invalid_post.save.should be_false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mat Brown
|
@@ -9,10 +9,12 @@ authors:
|
|
9
9
|
- Keenan Brock
|
10
10
|
- Insoo Buzz Jung
|
11
11
|
- Louis Simoneau
|
12
|
+
- Peter Williams
|
13
|
+
- Kenneth Hoffman
|
12
14
|
autorequire:
|
13
15
|
bindir: bin
|
14
16
|
cert_chain: []
|
15
|
-
date: 2014-03-
|
17
|
+
date: 2014-03-15 00:00:00.000000000 Z
|
16
18
|
dependencies:
|
17
19
|
- !ruby/object:Gem::Dependency
|
18
20
|
name: activesupport
|