cequel 1.0.4 → 1.1.0
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 +4 -4
- data/Appraisals +3 -0
- data/CHANGELOG.md +7 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +5 -4
- data/Gemfile.lock +215 -22
- data/README.md +19 -6
- data/Vagrantfile +6 -1
- data/lib/cequel.rb +3 -2
- data/lib/cequel/metal/batch.rb +16 -1
- data/lib/cequel/metal/data_set.rb +63 -39
- data/lib/cequel/metal/deleter.rb +2 -2
- data/lib/cequel/metal/incrementer.rb +2 -2
- data/lib/cequel/metal/inserter.rb +8 -6
- data/lib/cequel/metal/keyspace.rb +127 -34
- data/lib/cequel/metal/logger.rb +1 -1
- data/lib/cequel/metal/row.rb +3 -4
- data/lib/cequel/metal/updater.rb +2 -2
- data/lib/cequel/metal/writer.rb +18 -12
- data/lib/cequel/record/associations.rb +7 -1
- data/lib/cequel/record/bound.rb +1 -1
- data/lib/cequel/record/callbacks.rb +10 -6
- data/lib/cequel/record/data_set_builder.rb +13 -2
- data/lib/cequel/record/persistence.rb +14 -12
- data/lib/cequel/record/properties.rb +3 -3
- data/lib/cequel/record/railtie.rb +1 -1
- data/lib/cequel/record/record_set.rb +12 -12
- data/lib/cequel/record/schema.rb +5 -1
- data/lib/cequel/schema/keyspace.rb +1 -1
- data/lib/cequel/schema/table_property.rb +1 -1
- data/lib/cequel/type.rb +44 -10
- data/lib/cequel/uuids.rb +46 -0
- data/lib/cequel/version.rb +1 -1
- data/spec/examples/metal/data_set_spec.rb +93 -0
- data/spec/examples/metal/keyspace_spec.rb +74 -0
- data/spec/examples/record/associations_spec.rb +84 -0
- data/spec/examples/record/persistence_spec.rb +23 -0
- data/spec/examples/record/properties_spec.rb +1 -1
- data/spec/examples/record/record_set_spec.rb +12 -3
- data/spec/examples/record/schema_spec.rb +1 -1
- data/spec/examples/record/secondary_index_spec.rb +1 -1
- data/spec/examples/schema/table_reader_spec.rb +2 -3
- data/spec/examples/spec_helper.rb +8 -0
- data/spec/examples/type_spec.rb +7 -5
- data/spec/examples/uuids_spec.rb +22 -0
- data/spec/support/helpers.rb +25 -19
- data/templates/config/cequel.yml +5 -5
- metadata +40 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6eac18c5d802d417f619e19c31970ba843cd6ca
|
4
|
+
data.tar.gz: 904a86db08bb93edb3484ecc34edefa4e86c245b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb1fe18077241a6002f25e4853cde91f5b0937e0c7c42f5625052473006edfa722c461c046fc4713fd1010aa71bfe23a811e335761085f1963c21e9dc79121f
|
7
|
+
data.tar.gz: b20744caf7e47b951eae94437daa5a2fb7df8a835d0532b4d550bd78f9745f5d57def94c98001e510baba8d61de5823c7a55e8b2fdb78528ef76cf8b348740b6
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -52,7 +52,7 @@ install [VirtualBox](https://www.virtualbox.org/) and
|
|
52
52
|
Cequel's Vagrantfile can generate a virtual machine for any Cassandra version
|
53
53
|
that Cequel supports (i.e., 1.2.x and 2.0.x). You can run multiple VMs at the
|
54
54
|
same time; the first machine you boot will expose its Cassandra instance on
|
55
|
-
port `
|
55
|
+
port `9042`, which is the default port that Cequel will look for.
|
56
56
|
|
57
57
|
Cequel is tested against a large range of Ruby, Rails, and Cassandra versions;
|
58
58
|
for most patches, you can just run the tests using the latest version of all of
|
data/Gemfile
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gemspec
|
4
|
-
gem 'rocco', :platforms => :ruby
|
5
|
-
gem 'redcarpet', '< 2.0', :platforms => :ruby
|
6
|
-
gem 'travis'
|
7
|
-
gem 'travis-lint'
|
8
4
|
|
9
5
|
group :debug do
|
10
6
|
gem 'debugger', :platforms => :mri_19
|
11
7
|
gem 'byebug', :platforms => :mri_20
|
8
|
+
gem 'pry'
|
12
9
|
end
|
10
|
+
|
11
|
+
gem 'racc', :platforms => :rbx
|
12
|
+
gem 'rubysl', '~> 2.0', :platforms => :rbx
|
13
|
+
gem 'psych', :platforms => :rbx
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cequel (1.0
|
5
|
-
activemodel
|
6
|
-
|
7
|
-
cassandra-cql (~> 1.2)
|
8
|
-
connection_pool (~> 1.1)
|
9
|
-
i18n
|
4
|
+
cequel (1.1.0)
|
5
|
+
activemodel (>= 3.1)
|
6
|
+
cql-rb
|
10
7
|
|
11
8
|
GEM
|
12
9
|
remote: https://rubygems.org/
|
@@ -32,12 +29,9 @@ GEM
|
|
32
29
|
byebug (2.7.0)
|
33
30
|
columnize (~> 0.3)
|
34
31
|
debugger-linecache (~> 1.2)
|
35
|
-
cassandra-cql (1.2.2)
|
36
|
-
simple_uuid (>= 0.2.0)
|
37
|
-
thrift_client (>= 0.7.1, < 0.9)
|
38
32
|
coderay (1.1.0)
|
39
33
|
columnize (0.3.6)
|
40
|
-
|
34
|
+
cql-rb (1.2.1)
|
41
35
|
debugger (1.6.6)
|
42
36
|
columnize (>= 0.3.1)
|
43
37
|
debugger-linecache (~> 1.2.0)
|
@@ -54,6 +48,7 @@ GEM
|
|
54
48
|
faraday (>= 0.7.4, < 0.9)
|
55
49
|
ffi (1.9.3)
|
56
50
|
ffi (1.9.3-java)
|
51
|
+
ffi2-generators (0.1.1)
|
57
52
|
gh (0.13.2)
|
58
53
|
addressable
|
59
54
|
backports
|
@@ -76,7 +71,6 @@ GEM
|
|
76
71
|
minitest (4.7.5)
|
77
72
|
multi_json (1.9.0)
|
78
73
|
multipart-post (1.2.0)
|
79
|
-
mustache (0.99.5)
|
80
74
|
net-http-persistent (2.9.4)
|
81
75
|
net-http-pipeline (1.0.1)
|
82
76
|
parser (2.1.7)
|
@@ -92,14 +86,12 @@ GEM
|
|
92
86
|
method_source (~> 0.8)
|
93
87
|
slop (~> 3.4)
|
94
88
|
spoon (~> 0.0)
|
89
|
+
psych (2.0.4)
|
95
90
|
pusher-client (0.4.0)
|
96
91
|
websocket (~> 1.0.0)
|
92
|
+
racc (1.4.11)
|
97
93
|
rainbow (2.0.0)
|
98
94
|
rake (10.1.1)
|
99
|
-
redcarpet (1.17.2)
|
100
|
-
rocco (0.8.2)
|
101
|
-
mustache
|
102
|
-
redcarpet
|
103
95
|
rspec (2.14.1)
|
104
96
|
rspec-core (~> 2.14.0)
|
105
97
|
rspec-expectations (~> 2.14.0)
|
@@ -115,8 +107,209 @@ GEM
|
|
115
107
|
rainbow (>= 1.99.1, < 3.0)
|
116
108
|
ruby-progressbar (~> 1.4)
|
117
109
|
ruby-progressbar (1.4.2)
|
110
|
+
rubysl (2.0.15)
|
111
|
+
rubysl-abbrev (~> 2.0)
|
112
|
+
rubysl-base64 (~> 2.0)
|
113
|
+
rubysl-benchmark (~> 2.0)
|
114
|
+
rubysl-bigdecimal (~> 2.0)
|
115
|
+
rubysl-cgi (~> 2.0)
|
116
|
+
rubysl-cgi-session (~> 2.0)
|
117
|
+
rubysl-cmath (~> 2.0)
|
118
|
+
rubysl-complex (~> 2.0)
|
119
|
+
rubysl-continuation (~> 2.0)
|
120
|
+
rubysl-coverage (~> 2.0)
|
121
|
+
rubysl-csv (~> 2.0)
|
122
|
+
rubysl-curses (~> 2.0)
|
123
|
+
rubysl-date (~> 2.0)
|
124
|
+
rubysl-delegate (~> 2.0)
|
125
|
+
rubysl-digest (~> 2.0)
|
126
|
+
rubysl-drb (~> 2.0)
|
127
|
+
rubysl-e2mmap (~> 2.0)
|
128
|
+
rubysl-english (~> 2.0)
|
129
|
+
rubysl-enumerator (~> 2.0)
|
130
|
+
rubysl-erb (~> 2.0)
|
131
|
+
rubysl-etc (~> 2.0)
|
132
|
+
rubysl-expect (~> 2.0)
|
133
|
+
rubysl-fcntl (~> 2.0)
|
134
|
+
rubysl-fiber (~> 2.0)
|
135
|
+
rubysl-fileutils (~> 2.0)
|
136
|
+
rubysl-find (~> 2.0)
|
137
|
+
rubysl-forwardable (~> 2.0)
|
138
|
+
rubysl-getoptlong (~> 2.0)
|
139
|
+
rubysl-gserver (~> 2.0)
|
140
|
+
rubysl-io-console (~> 2.0)
|
141
|
+
rubysl-io-nonblock (~> 2.0)
|
142
|
+
rubysl-io-wait (~> 2.0)
|
143
|
+
rubysl-ipaddr (~> 2.0)
|
144
|
+
rubysl-irb (~> 2.0)
|
145
|
+
rubysl-logger (~> 2.0)
|
146
|
+
rubysl-mathn (~> 2.0)
|
147
|
+
rubysl-matrix (~> 2.0)
|
148
|
+
rubysl-mkmf (~> 2.0)
|
149
|
+
rubysl-monitor (~> 2.0)
|
150
|
+
rubysl-mutex_m (~> 2.0)
|
151
|
+
rubysl-net-ftp (~> 2.0)
|
152
|
+
rubysl-net-http (~> 2.0)
|
153
|
+
rubysl-net-imap (~> 2.0)
|
154
|
+
rubysl-net-pop (~> 2.0)
|
155
|
+
rubysl-net-protocol (~> 2.0)
|
156
|
+
rubysl-net-smtp (~> 2.0)
|
157
|
+
rubysl-net-telnet (~> 2.0)
|
158
|
+
rubysl-nkf (~> 2.0)
|
159
|
+
rubysl-observer (~> 2.0)
|
160
|
+
rubysl-open-uri (~> 2.0)
|
161
|
+
rubysl-open3 (~> 2.0)
|
162
|
+
rubysl-openssl (~> 2.0)
|
163
|
+
rubysl-optparse (~> 2.0)
|
164
|
+
rubysl-ostruct (~> 2.0)
|
165
|
+
rubysl-pathname (~> 2.0)
|
166
|
+
rubysl-prettyprint (~> 2.0)
|
167
|
+
rubysl-prime (~> 2.0)
|
168
|
+
rubysl-profile (~> 2.0)
|
169
|
+
rubysl-profiler (~> 2.0)
|
170
|
+
rubysl-pstore (~> 2.0)
|
171
|
+
rubysl-pty (~> 2.0)
|
172
|
+
rubysl-rational (~> 2.0)
|
173
|
+
rubysl-readline (~> 2.0)
|
174
|
+
rubysl-resolv (~> 2.0)
|
175
|
+
rubysl-rexml (~> 2.0)
|
176
|
+
rubysl-rinda (~> 2.0)
|
177
|
+
rubysl-rss (~> 2.0)
|
178
|
+
rubysl-scanf (~> 2.0)
|
179
|
+
rubysl-securerandom (~> 2.0)
|
180
|
+
rubysl-set (~> 2.0)
|
181
|
+
rubysl-shellwords (~> 2.0)
|
182
|
+
rubysl-singleton (~> 2.0)
|
183
|
+
rubysl-socket (~> 2.0)
|
184
|
+
rubysl-stringio (~> 2.0)
|
185
|
+
rubysl-strscan (~> 2.0)
|
186
|
+
rubysl-sync (~> 2.0)
|
187
|
+
rubysl-syslog (~> 2.0)
|
188
|
+
rubysl-tempfile (~> 2.0)
|
189
|
+
rubysl-thread (~> 2.0)
|
190
|
+
rubysl-thwait (~> 2.0)
|
191
|
+
rubysl-time (~> 2.0)
|
192
|
+
rubysl-timeout (~> 2.0)
|
193
|
+
rubysl-tmpdir (~> 2.0)
|
194
|
+
rubysl-tsort (~> 2.0)
|
195
|
+
rubysl-un (~> 2.0)
|
196
|
+
rubysl-uri (~> 2.0)
|
197
|
+
rubysl-weakref (~> 2.0)
|
198
|
+
rubysl-webrick (~> 2.0)
|
199
|
+
rubysl-xmlrpc (~> 2.0)
|
200
|
+
rubysl-yaml (~> 2.0)
|
201
|
+
rubysl-zlib (~> 2.0)
|
202
|
+
rubysl-abbrev (2.0.4)
|
203
|
+
rubysl-base64 (2.0.0)
|
204
|
+
rubysl-benchmark (2.0.1)
|
205
|
+
rubysl-bigdecimal (2.0.2)
|
206
|
+
rubysl-cgi (2.0.1)
|
207
|
+
rubysl-cgi-session (2.0.1)
|
208
|
+
rubysl-cmath (2.0.0)
|
209
|
+
rubysl-complex (2.0.0)
|
210
|
+
rubysl-continuation (2.0.0)
|
211
|
+
rubysl-coverage (2.0.3)
|
212
|
+
rubysl-csv (2.0.2)
|
213
|
+
rubysl-english (~> 2.0)
|
214
|
+
rubysl-curses (2.0.1)
|
215
|
+
rubysl-date (2.0.6)
|
216
|
+
rubysl-delegate (2.0.1)
|
217
|
+
rubysl-digest (2.0.3)
|
218
|
+
rubysl-drb (2.0.1)
|
219
|
+
rubysl-e2mmap (2.0.0)
|
220
|
+
rubysl-english (2.0.0)
|
221
|
+
rubysl-enumerator (2.0.0)
|
222
|
+
rubysl-erb (2.0.1)
|
223
|
+
rubysl-etc (2.0.3)
|
224
|
+
ffi2-generators (~> 0.1)
|
225
|
+
rubysl-expect (2.0.0)
|
226
|
+
rubysl-fcntl (2.0.4)
|
227
|
+
ffi2-generators (~> 0.1)
|
228
|
+
rubysl-fiber (2.0.0)
|
229
|
+
rubysl-fileutils (2.0.3)
|
230
|
+
rubysl-find (2.0.1)
|
231
|
+
rubysl-forwardable (2.0.1)
|
232
|
+
rubysl-getoptlong (2.0.0)
|
233
|
+
rubysl-gserver (2.0.0)
|
234
|
+
rubysl-socket (~> 2.0)
|
235
|
+
rubysl-thread (~> 2.0)
|
236
|
+
rubysl-io-console (2.0.0)
|
237
|
+
rubysl-io-nonblock (2.0.0)
|
238
|
+
rubysl-io-wait (2.0.0)
|
239
|
+
rubysl-ipaddr (2.0.0)
|
240
|
+
rubysl-irb (2.0.4)
|
241
|
+
rubysl-e2mmap (~> 2.0)
|
242
|
+
rubysl-mathn (~> 2.0)
|
243
|
+
rubysl-readline (~> 2.0)
|
244
|
+
rubysl-thread (~> 2.0)
|
245
|
+
rubysl-logger (2.0.0)
|
246
|
+
rubysl-mathn (2.0.0)
|
247
|
+
rubysl-matrix (2.1.0)
|
248
|
+
rubysl-e2mmap (~> 2.0)
|
249
|
+
rubysl-mkmf (2.0.1)
|
250
|
+
rubysl-fileutils (~> 2.0)
|
251
|
+
rubysl-shellwords (~> 2.0)
|
252
|
+
rubysl-monitor (2.0.0)
|
253
|
+
rubysl-mutex_m (2.0.0)
|
254
|
+
rubysl-net-ftp (2.0.1)
|
255
|
+
rubysl-net-http (2.0.4)
|
256
|
+
rubysl-cgi (~> 2.0)
|
257
|
+
rubysl-erb (~> 2.0)
|
258
|
+
rubysl-singleton (~> 2.0)
|
259
|
+
rubysl-net-imap (2.0.1)
|
260
|
+
rubysl-net-pop (2.0.1)
|
261
|
+
rubysl-net-protocol (2.0.1)
|
262
|
+
rubysl-net-smtp (2.0.1)
|
263
|
+
rubysl-net-telnet (2.0.0)
|
264
|
+
rubysl-nkf (2.0.1)
|
265
|
+
rubysl-observer (2.0.0)
|
266
|
+
rubysl-open-uri (2.0.0)
|
267
|
+
rubysl-open3 (2.0.0)
|
268
|
+
rubysl-openssl (2.1.0)
|
269
|
+
rubysl-optparse (2.0.1)
|
270
|
+
rubysl-shellwords (~> 2.0)
|
271
|
+
rubysl-ostruct (2.0.4)
|
272
|
+
rubysl-pathname (2.0.0)
|
273
|
+
rubysl-prettyprint (2.0.3)
|
274
|
+
rubysl-prime (2.0.1)
|
275
|
+
rubysl-profile (2.0.0)
|
276
|
+
rubysl-profiler (2.0.1)
|
277
|
+
rubysl-pstore (2.0.0)
|
278
|
+
rubysl-pty (2.0.2)
|
279
|
+
rubysl-rational (2.0.1)
|
280
|
+
rubysl-readline (2.0.2)
|
281
|
+
rubysl-resolv (2.1.0)
|
282
|
+
rubysl-rexml (2.0.2)
|
283
|
+
rubysl-rinda (2.0.1)
|
284
|
+
rubysl-rss (2.0.0)
|
285
|
+
rubysl-scanf (2.0.0)
|
286
|
+
rubysl-securerandom (2.0.0)
|
287
|
+
rubysl-set (2.0.1)
|
288
|
+
rubysl-shellwords (2.0.0)
|
289
|
+
rubysl-singleton (2.0.0)
|
290
|
+
rubysl-socket (2.0.1)
|
291
|
+
rubysl-stringio (2.0.0)
|
292
|
+
rubysl-strscan (2.0.0)
|
293
|
+
rubysl-sync (2.0.0)
|
294
|
+
rubysl-syslog (2.0.1)
|
295
|
+
ffi2-generators (~> 0.1)
|
296
|
+
rubysl-tempfile (2.0.1)
|
297
|
+
rubysl-thread (2.0.2)
|
298
|
+
rubysl-thwait (2.0.0)
|
299
|
+
rubysl-time (2.0.3)
|
300
|
+
rubysl-timeout (2.0.0)
|
301
|
+
rubysl-tmpdir (2.0.1)
|
302
|
+
rubysl-tsort (2.0.1)
|
303
|
+
rubysl-un (2.0.0)
|
304
|
+
rubysl-fileutils (~> 2.0)
|
305
|
+
rubysl-optparse (~> 2.0)
|
306
|
+
rubysl-uri (2.0.0)
|
307
|
+
rubysl-weakref (2.0.0)
|
308
|
+
rubysl-webrick (2.0.0)
|
309
|
+
rubysl-xmlrpc (2.0.0)
|
310
|
+
rubysl-yaml (2.0.4)
|
311
|
+
rubysl-zlib (2.0.1)
|
118
312
|
safe_yaml (0.9.7)
|
119
|
-
simple_uuid (0.4.0)
|
120
313
|
slop (3.5.0)
|
121
314
|
spoon (0.0.4)
|
122
315
|
ffi
|
@@ -124,9 +317,6 @@ GEM
|
|
124
317
|
atomic (>= 1.1.7, < 2)
|
125
318
|
thread_safe (0.2.0-java)
|
126
319
|
atomic (>= 1.1.7, < 2)
|
127
|
-
thrift (0.8.0)
|
128
|
-
thrift_client (0.8.4)
|
129
|
-
thrift (~> 0.8.0)
|
130
320
|
travis (1.6.8)
|
131
321
|
addressable (~> 2.3)
|
132
322
|
backports
|
@@ -152,15 +342,18 @@ PLATFORMS
|
|
152
342
|
ruby
|
153
343
|
|
154
344
|
DEPENDENCIES
|
155
|
-
appraisal
|
345
|
+
appraisal (~> 0.5)
|
156
346
|
byebug
|
157
347
|
cequel!
|
158
348
|
debugger
|
349
|
+
pry
|
350
|
+
psych
|
351
|
+
racc
|
159
352
|
rake
|
160
|
-
redcarpet (< 2.0)
|
161
|
-
rocco
|
162
353
|
rspec (~> 2.0)
|
163
354
|
rubocop
|
355
|
+
rubysl (~> 2.0)
|
164
356
|
travis
|
165
357
|
travis-lint
|
358
|
+
tzinfo
|
166
359
|
yard (~> 0.6)
|
data/README.md
CHANGED
@@ -3,12 +3,10 @@
|
|
3
3
|
Cequel is a Ruby ORM for [Cassandra](http://cassandra.apache.org/) using
|
4
4
|
[CQL3](http://www.datastax.com/documentation/cql/3.0/webhelp/index.html).
|
5
5
|
|
6
|
-
[](https://codeclimate.com/github/cequel/cequel)
|
6
|
+
[](http://badge.fury.io/rb/cequel)
|
7
|
+
[](https://travis-ci.org/cequel/cequel)
|
8
|
+
[](https://gemnasium.com/cequel/cequel)
|
9
|
+
[](https://codeclimate.com/github/cequel/cequel)
|
12
10
|
[](http://inch-pages.github.io/github/cequel/cequel)
|
13
11
|
|
14
12
|
`Cequel::Record` is an ActiveRecord-like domain model layer that exposes
|
@@ -313,6 +311,21 @@ Post.where(:author_id, id)
|
|
313
311
|
Note that `where` is only for secondary indexed columns; use `[]` to scope
|
314
312
|
record sets by primary keys.
|
315
313
|
|
314
|
+
### Consistency tuning ###
|
315
|
+
|
316
|
+
Cassandra supports [tunable
|
317
|
+
consistency](http://www.datastax.com/documentation/cassandra/2.0/cassandra/dml/dml_config_consistency_c.html),
|
318
|
+
allowing you to choose the right balance between query speed and consistent
|
319
|
+
reads and writes. Cequel supports consistency tuning for reads and writes:
|
320
|
+
|
321
|
+
```ruby
|
322
|
+
Post.new(id: 1, title: 'First post!').save!(consistency: :all)
|
323
|
+
|
324
|
+
Post.consistency(:one).find_each { |post| puts post.title }
|
325
|
+
```
|
326
|
+
|
327
|
+
Both read and write consistency default to `QUORUM`.
|
328
|
+
|
316
329
|
### ActiveModel Support ###
|
317
330
|
|
318
331
|
Cequel supports ActiveModel functionality, such as callbacks, validations,
|
data/Vagrantfile
CHANGED
@@ -118,7 +118,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
118
118
|
provision = <<-SH
|
119
119
|
set -e
|
120
120
|
apt-get update
|
121
|
-
apt-get upgrade -y
|
121
|
+
env DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
122
|
+
apt-get install python-software-properties curl -y
|
122
123
|
apt-get autoremove -y
|
123
124
|
add-apt-repository -y ppa:webupd8team/java
|
124
125
|
apt-get update
|
@@ -130,6 +131,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
130
131
|
stop on runlevel [06]
|
131
132
|
exec /opt/apache-cassandra-$1/bin/cassandra" > /etc/init/cassandra.conf
|
132
133
|
sed -i -e 's/rpc_address:.*/rpc_address: 0.0.0.0/' /opt/apache-cassandra-$1/conf/cassandra.yaml
|
134
|
+
sed -i -e 's/start_native_transport:.*/start_native_transport: true/' /opt/apache-cassandra-$1/conf/cassandra.yaml
|
135
|
+
sed -i -e 's/start_rpc:.*/start_rpc: true/' /opt/apache-cassandra-$1/conf/cassandra.yaml
|
133
136
|
service cassandra start
|
134
137
|
SH
|
135
138
|
|
@@ -139,6 +142,8 @@ exec /opt/apache-cassandra-$1/bin/cassandra" > /etc/init/cassandra.conf
|
|
139
142
|
config.vm.define version do |machine|
|
140
143
|
machine.vm.provision :shell, inline: provision,
|
141
144
|
args: [version, java_version]
|
145
|
+
machine.vm.network :forwarded_port, guest: 9042, host: 9042,
|
146
|
+
auto_correct: true
|
142
147
|
machine.vm.network :forwarded_port, guest: 9160, host: 9160,
|
143
148
|
auto_correct: true
|
144
149
|
end
|
data/lib/cequel.rb
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
require 'delegate'
|
3
3
|
|
4
4
|
require 'active_support/core_ext'
|
5
|
-
require '
|
6
|
-
require 'connection_pool'
|
5
|
+
require 'cql'
|
7
6
|
|
8
7
|
require 'cequel/errors'
|
9
8
|
require 'cequel/metal'
|
10
9
|
require 'cequel/schema'
|
11
10
|
require 'cequel/type'
|
12
11
|
require 'cequel/util'
|
12
|
+
require 'cequel/uuids'
|
13
13
|
require 'cequel/record'
|
14
14
|
|
15
15
|
#
|
@@ -22,6 +22,7 @@ require 'cequel/record'
|
|
22
22
|
# access to the database schema defined in Cassandra
|
23
23
|
#
|
24
24
|
module Cequel
|
25
|
+
extend Cequel::Uuids
|
25
26
|
#
|
26
27
|
# Get a handle to a keyspace
|
27
28
|
#
|