cequel 1.0.3 → 1.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecc18113832fd82c80bfbf912be8e44c876ba03d
4
- data.tar.gz: e160bc03502cc811f1aadaafe292fa3328276a9e
3
+ metadata.gz: 653863da592d33f9f4b50876ef2f5eb56177eee9
4
+ data.tar.gz: b476ebecbc1b66175eb9ee85d20a9be064fbec8d
5
5
  SHA512:
6
- metadata.gz: 3eb91fe46d8bdaf97cf090168eaecbfd9c4050f17b206997d5c755df37c3b7d672f6b4f036beddd7143b58d17ded738b658b3f42c620308a97e1d6c745d70446
7
- data.tar.gz: d29932e8db4c7df04dec415d385e8189e1bb925f5133c0e04515ee198657665326c022a34a62fba9aead6ae1154f55a3611b3cfb0d4b7a6e91e2a287f89bfc1e
6
+ metadata.gz: 97f0f3db17b059ed6c983611a20559768b654cff6e50be068ca41e411847a0e1ccab930783e202b8c588cf7e0996f5c0b4fa45f5084e2519f71fb47e7a3ad7ef
7
+ data.tar.gz: f17464df0048ece7d69a8221cde76c6812cf6a3deac9d0fd7b843773d9df4cc8239d070bd91af9d0130883c8a5e8bb32354fd3c746be26f293fa0be337071a3c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.4
2
+
3
+ * Fix `#invalid?`
4
+
1
5
  ## 1.0.3
2
6
 
3
7
  * Put missing .yml template file in gem – fix `cequel:configuration` generator
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cequel (1.0.3)
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.3)
15
- activesupport (= 4.0.3)
14
+ activemodel (4.0.4)
15
+ activesupport (= 4.0.4)
16
16
  builder (~> 3.1.0)
17
- activesupport (4.0.3)
18
- i18n (~> 0.6, >= 0.6.4)
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.8.4)
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.5)
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.18.1)
111
+ rubocop (0.19.0)
112
112
  json (>= 1.7.7, < 2)
113
- parser (~> 2.1.3)
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.4.7)
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.7)
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.7.0)
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.38)
146
+ tzinfo (0.3.39)
143
147
  websocket (1.0.7)
144
148
  yard (0.8.7.3)
145
149
 
@@ -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
- sprintf(
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
- sprintf('%s (ERROR) %s', label, sanitize(statement, bind_vars))
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
@@ -83,8 +83,8 @@ module Cequel
83
83
 
84
84
  private
85
85
 
86
- def valid_with_callbacks?
87
- run_callbacks(:validation) { valid_without_callbacks? }
86
+ def valid_with_callbacks?(context=nil)
87
+ run_callbacks(:validation) { valid_without_callbacks? context }
88
88
  end
89
89
  end
90
90
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Cequel
3
3
  # The current version of the library
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
@@ -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.3
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-05 00:00:00.000000000 Z
17
+ date: 2014-03-15 00:00:00.000000000 Z
16
18
  dependencies:
17
19
  - !ruby/object:Gem::Dependency
18
20
  name: activesupport