cequel 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +4 -17
- data/CHANGELOG.md +8 -0
- data/DRIVER_TODO +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +110 -65
- data/README.md +4 -3
- data/Rakefile +39 -3
- data/Vagrantfile +10 -13
- data/cequel.gemspec +42 -0
- data/lib/cequel.rb +2 -2
- data/lib/cequel/metal/data_set.rb +1 -1
- data/lib/cequel/metal/keyspace.rb +23 -15
- data/lib/cequel/metal/logging.rb +1 -1
- data/lib/cequel/metal/request_logger.rb +1 -1
- data/lib/cequel/metal/writer.rb +1 -1
- data/lib/cequel/record.rb +1 -1
- data/lib/cequel/record/association_collection.rb +1 -1
- data/lib/cequel/record/associations.rb +1 -1
- data/lib/cequel/record/belongs_to_association.rb +1 -1
- data/lib/cequel/record/collection.rb +34 -28
- data/lib/cequel/record/data_set_builder.rb +1 -1
- data/lib/cequel/record/lazy_record_collection.rb +1 -1
- data/lib/cequel/record/persistence.rb +4 -2
- data/lib/cequel/record/properties.rb +2 -2
- data/lib/cequel/record/record_set.rb +1 -1
- data/lib/cequel/record/schema.rb +2 -2
- data/lib/cequel/record/scoped.rb +1 -1
- data/lib/cequel/schema/create_table_dsl.rb +1 -1
- data/lib/cequel/schema/keyspace.rb +17 -2
- data/lib/cequel/schema/migration_validator.rb +1 -1
- data/lib/cequel/schema/update_table_dsl.rb +1 -1
- data/lib/cequel/type.rb +5 -5
- data/lib/cequel/util.rb +30 -0
- data/lib/cequel/uuids.rb +5 -5
- data/lib/cequel/version.rb +1 -1
- data/spec/examples/metal/keyspace_spec.rb +1 -1
- data/spec/examples/record/list_spec.rb +9 -0
- data/spec/examples/record/persistence_spec.rb +2 -2
- data/spec/examples/schema/keyspace_spec.rb +1 -2
- data/spec/examples/schema/table_reader_spec.rb +1 -1
- data/spec/examples/spec_helper.rb +3 -0
- data/spec/examples/uuids_spec.rb +1 -1
- data/spec/support/helpers.rb +7 -5
- data/tags +836 -0
- metadata +49 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8b4cf39dc447c80169330a707b43b5086d550b7
|
4
|
+
data.tar.gz: 06d0a4ee8090a9578ab5f6092ff24b4c81c535b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66fc988c9a4a54f45db1872bd12b073220161c5f1a1cdc6359001b6b2058528ba7184b3b158187c5f12190dd3c9534bf0c5202cef90ec411d652eaebb83736c1
|
7
|
+
data.tar.gz: 99e197f7a3bee6c40bba033032d13d910e928f8fc162b3e3bd268559515d391d3a116f6d8063858acee30bd9d4c38473f9b6d1c10170a85e1cb6ce34be74e98d
|
data/Appraisals
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
appraise "rails-4.2" do
|
2
|
+
gem "activemodel", "~> 4.2.0"
|
3
|
+
end
|
4
|
+
|
1
5
|
appraise "rails-4.1" do
|
2
6
|
gem "activemodel", "~> 4.1.0"
|
3
7
|
end
|
@@ -10,20 +14,3 @@ appraise "rails-3.2" do
|
|
10
14
|
gem "activemodel", "~> 3.2.0"
|
11
15
|
gem "tzinfo", "~> 0.3"
|
12
16
|
end
|
13
|
-
|
14
|
-
appraise "rails-3.1" do
|
15
|
-
gem "activemodel", "~> 3.1.0"
|
16
|
-
gem "tzinfo", "~> 0.3"
|
17
|
-
end
|
18
|
-
|
19
|
-
appraise "thrift" do
|
20
|
-
gem "cassandra-cql", "~> 1.2"
|
21
|
-
end
|
22
|
-
|
23
|
-
appraise "cql-rb-1" do
|
24
|
-
gem "cql-rb", "~> 1.2"
|
25
|
-
end
|
26
|
-
|
27
|
-
appraise "cql-rb-2" do
|
28
|
-
gem "cql-rb", "~> 2.0"
|
29
|
-
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.6.0
|
2
|
+
|
3
|
+
* Replace cql-rb with cassandra-driver
|
4
|
+
* Don't overwrite ActiveSupport's `Module#forwardable` (fixes Rails 4.2
|
5
|
+
incompatibility)
|
6
|
+
* Don't interact with updater/deleter if new record
|
7
|
+
* Drop support for Rails 3.1
|
8
|
+
|
1
9
|
## 1.5.0
|
2
10
|
|
3
11
|
* Support ActiveSupport instrumentation of Record create, update, destroy
|
data/DRIVER_TODO
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,90 +1,123 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cequel (1.
|
4
|
+
cequel (1.6.0)
|
5
5
|
activemodel (>= 3.1, < 5.0)
|
6
|
-
|
6
|
+
cassandra-driver (~> 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.
|
12
|
-
activesupport (= 4.
|
11
|
+
activemodel (4.2.0)
|
12
|
+
activesupport (= 4.2.0)
|
13
13
|
builder (~> 3.1)
|
14
|
-
activesupport (4.
|
15
|
-
i18n (~> 0.
|
14
|
+
activesupport (4.2.0)
|
15
|
+
i18n (~> 0.7)
|
16
16
|
json (~> 1.7, >= 1.7.7)
|
17
17
|
minitest (~> 5.1)
|
18
|
-
thread_safe (~> 0.
|
18
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
19
19
|
tzinfo (~> 1.1)
|
20
|
+
addressable (2.3.7)
|
20
21
|
appraisal (1.0.2)
|
21
22
|
bundler
|
22
23
|
rake
|
23
24
|
thor (>= 0.14.0)
|
24
25
|
ast (2.0.0)
|
26
|
+
astrolabe (1.3.0)
|
27
|
+
parser (>= 2.2.0.pre.3, < 3.0)
|
28
|
+
backports (3.6.4)
|
25
29
|
builder (3.2.2)
|
26
30
|
byebug (2.7.0)
|
27
31
|
columnize (~> 0.3)
|
28
32
|
debugger-linecache (~> 1.2)
|
33
|
+
cassandra-driver (1.2.0)
|
34
|
+
ione (~> 1.2)
|
35
|
+
cassandra-driver (1.2.0-java)
|
36
|
+
ione (~> 1.2)
|
29
37
|
coderay (1.1.0)
|
30
|
-
columnize (0.
|
31
|
-
cql-rb (2.0.3)
|
32
|
-
ione (~> 1)
|
38
|
+
columnize (0.9.0)
|
33
39
|
debugger (1.6.8)
|
34
40
|
columnize (>= 0.3.1)
|
35
41
|
debugger-linecache (~> 1.2.0)
|
36
42
|
debugger-ruby_core_source (~> 1.3.5)
|
37
43
|
debugger-linecache (1.2.0)
|
38
|
-
debugger-ruby_core_source (1.3.
|
44
|
+
debugger-ruby_core_source (1.3.8)
|
39
45
|
diff-lcs (1.2.5)
|
40
|
-
|
46
|
+
ethon (0.7.2)
|
47
|
+
ffi (>= 1.3.0)
|
48
|
+
faraday (0.9.1)
|
49
|
+
multipart-post (>= 1.2, < 3)
|
50
|
+
faraday_middleware (0.9.1)
|
51
|
+
faraday (>= 0.7.4, < 0.10)
|
52
|
+
ffi (1.9.6)
|
53
|
+
ffi (1.9.6-java)
|
41
54
|
ffi2-generators (0.1.1)
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
55
|
+
gh (0.14.0)
|
56
|
+
addressable
|
57
|
+
backports
|
58
|
+
faraday (~> 0.8)
|
59
|
+
multi_json (~> 1.0)
|
60
|
+
net-http-persistent (>= 2.7)
|
61
|
+
net-http-pipeline
|
62
|
+
highline (1.6.21)
|
63
|
+
i18n (0.7.0)
|
64
|
+
ione (1.2.0)
|
65
|
+
json (1.8.2)
|
66
|
+
json (1.8.2-java)
|
67
|
+
launchy (2.4.3)
|
68
|
+
addressable (~> 2.3)
|
69
|
+
launchy (2.4.3-java)
|
70
|
+
addressable (~> 2.3)
|
71
|
+
spoon (~> 0.0.1)
|
46
72
|
method_source (0.8.2)
|
47
|
-
minitest (5.
|
48
|
-
|
73
|
+
minitest (5.5.1)
|
74
|
+
multi_json (1.10.1)
|
75
|
+
multipart-post (2.0.0)
|
76
|
+
net-http-persistent (2.9.4)
|
77
|
+
net-http-pipeline (1.0.1)
|
78
|
+
parser (2.2.0.3)
|
49
79
|
ast (>= 1.1, < 3.0)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
method_source (~> 0.8.1)
|
80
|
+
powerpack (0.1.0)
|
81
|
+
pry (0.9.12.6)
|
82
|
+
coderay (~> 1.0)
|
83
|
+
method_source (~> 0.8)
|
55
84
|
slop (~> 3.4)
|
56
|
-
pry (0.
|
57
|
-
coderay (~> 1.
|
58
|
-
method_source (~> 0.8
|
85
|
+
pry (0.9.12.6-java)
|
86
|
+
coderay (~> 1.0)
|
87
|
+
method_source (~> 0.8)
|
59
88
|
slop (~> 3.4)
|
60
89
|
spoon (~> 0.0)
|
61
|
-
psych (2.0.
|
90
|
+
psych (2.0.12)
|
91
|
+
pusher-client (0.6.0)
|
92
|
+
json
|
93
|
+
websocket (~> 1.0)
|
62
94
|
racc (1.4.12)
|
63
95
|
rainbow (2.0.0)
|
64
|
-
rake (10.
|
65
|
-
rspec (3.
|
66
|
-
rspec-core (~> 3.
|
67
|
-
rspec-expectations (~> 3.
|
68
|
-
rspec-mocks (~> 3.
|
69
|
-
rspec-core (3.
|
70
|
-
rspec-support (~> 3.
|
71
|
-
rspec-expectations (3.
|
96
|
+
rake (10.4.2)
|
97
|
+
rspec (3.2.0)
|
98
|
+
rspec-core (~> 3.2.0)
|
99
|
+
rspec-expectations (~> 3.2.0)
|
100
|
+
rspec-mocks (~> 3.2.0)
|
101
|
+
rspec-core (3.2.0)
|
102
|
+
rspec-support (~> 3.2.0)
|
103
|
+
rspec-expectations (3.2.0)
|
104
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
105
|
+
rspec-support (~> 3.2.0)
|
106
|
+
rspec-its (1.1.0)
|
107
|
+
rspec-core (>= 3.0.0)
|
108
|
+
rspec-expectations (>= 3.0.0)
|
109
|
+
rspec-mocks (3.2.0)
|
72
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
-
rspec-support (~> 3.
|
74
|
-
rspec-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
rspec-support (3.1.1)
|
80
|
-
rubocop (0.19.1)
|
81
|
-
json (>= 1.7.7, < 2)
|
82
|
-
parser (~> 2.1.7)
|
83
|
-
powerpack (~> 0.0.6)
|
111
|
+
rspec-support (~> 3.2.0)
|
112
|
+
rspec-support (3.2.1)
|
113
|
+
rubocop (0.29.1)
|
114
|
+
astrolabe (~> 1.3)
|
115
|
+
parser (>= 2.2.0.1, < 3.0)
|
116
|
+
powerpack (~> 0.1)
|
84
117
|
rainbow (>= 1.99.1, < 3.0)
|
85
118
|
ruby-progressbar (~> 1.4)
|
86
|
-
ruby-progressbar (1.
|
87
|
-
rubysl (2.0
|
119
|
+
ruby-progressbar (1.7.1)
|
120
|
+
rubysl (2.1.0)
|
88
121
|
rubysl-abbrev (~> 2.0)
|
89
122
|
rubysl-base64 (~> 2.0)
|
90
123
|
rubysl-benchmark (~> 2.0)
|
@@ -118,7 +151,7 @@ GEM
|
|
118
151
|
rubysl-io-nonblock (~> 2.0)
|
119
152
|
rubysl-io-wait (~> 2.0)
|
120
153
|
rubysl-ipaddr (~> 2.0)
|
121
|
-
rubysl-irb (~> 2.
|
154
|
+
rubysl-irb (~> 2.1)
|
122
155
|
rubysl-logger (~> 2.0)
|
123
156
|
rubysl-mathn (~> 2.0)
|
124
157
|
rubysl-matrix (~> 2.0)
|
@@ -147,7 +180,6 @@ GEM
|
|
147
180
|
rubysl-pstore (~> 2.0)
|
148
181
|
rubysl-pty (~> 2.0)
|
149
182
|
rubysl-rational (~> 2.0)
|
150
|
-
rubysl-readline (~> 2.0)
|
151
183
|
rubysl-resolv (~> 2.0)
|
152
184
|
rubysl-rexml (~> 2.0)
|
153
185
|
rubysl-rinda (~> 2.0)
|
@@ -189,14 +221,14 @@ GEM
|
|
189
221
|
rubysl-csv (2.0.2)
|
190
222
|
rubysl-english (~> 2.0)
|
191
223
|
rubysl-curses (2.0.1)
|
192
|
-
rubysl-date (2.0.
|
224
|
+
rubysl-date (2.0.9)
|
193
225
|
rubysl-delegate (2.0.1)
|
194
226
|
rubysl-digest (2.0.3)
|
195
227
|
rubysl-drb (2.0.1)
|
196
228
|
rubysl-e2mmap (2.0.0)
|
197
229
|
rubysl-english (2.0.0)
|
198
230
|
rubysl-enumerator (2.0.0)
|
199
|
-
rubysl-erb (2.0.
|
231
|
+
rubysl-erb (2.0.2)
|
200
232
|
rubysl-etc (2.0.3)
|
201
233
|
ffi2-generators (~> 0.1)
|
202
234
|
rubysl-expect (2.0.0)
|
@@ -214,12 +246,11 @@ GEM
|
|
214
246
|
rubysl-io-nonblock (2.0.0)
|
215
247
|
rubysl-io-wait (2.0.0)
|
216
248
|
rubysl-ipaddr (2.0.0)
|
217
|
-
rubysl-irb (2.
|
249
|
+
rubysl-irb (2.1.1)
|
218
250
|
rubysl-e2mmap (~> 2.0)
|
219
251
|
rubysl-mathn (~> 2.0)
|
220
|
-
rubysl-readline (~> 2.0)
|
221
252
|
rubysl-thread (~> 2.0)
|
222
|
-
rubysl-logger (2.
|
253
|
+
rubysl-logger (2.1.0)
|
223
254
|
rubysl-mathn (2.0.0)
|
224
255
|
rubysl-matrix (2.1.0)
|
225
256
|
rubysl-e2mmap (~> 2.0)
|
@@ -242,21 +273,20 @@ GEM
|
|
242
273
|
rubysl-observer (2.0.0)
|
243
274
|
rubysl-open-uri (2.0.0)
|
244
275
|
rubysl-open3 (2.0.0)
|
245
|
-
rubysl-openssl (2.1
|
276
|
+
rubysl-openssl (2.2.1)
|
246
277
|
rubysl-optparse (2.0.1)
|
247
278
|
rubysl-shellwords (~> 2.0)
|
248
279
|
rubysl-ostruct (2.0.4)
|
249
|
-
rubysl-pathname (2.
|
280
|
+
rubysl-pathname (2.1.0)
|
250
281
|
rubysl-prettyprint (2.0.3)
|
251
282
|
rubysl-prime (2.0.1)
|
252
283
|
rubysl-profile (2.0.0)
|
253
284
|
rubysl-profiler (2.0.1)
|
254
285
|
rubysl-pstore (2.0.0)
|
255
|
-
rubysl-pty (2.0.
|
286
|
+
rubysl-pty (2.0.3)
|
256
287
|
rubysl-rational (2.0.1)
|
257
|
-
rubysl-readline (2.0.2)
|
258
288
|
rubysl-resolv (2.1.0)
|
259
|
-
rubysl-rexml (2.0.
|
289
|
+
rubysl-rexml (2.0.4)
|
260
290
|
rubysl-rinda (2.0.1)
|
261
291
|
rubysl-rss (2.0.0)
|
262
292
|
rubysl-scanf (2.0.0)
|
@@ -268,7 +298,7 @@ GEM
|
|
268
298
|
rubysl-stringio (2.0.0)
|
269
299
|
rubysl-strscan (2.0.0)
|
270
300
|
rubysl-sync (2.0.0)
|
271
|
-
rubysl-syslog (2.0
|
301
|
+
rubysl-syslog (2.1.0)
|
272
302
|
ffi2-generators (~> 0.1)
|
273
303
|
rubysl-tempfile (2.0.1)
|
274
304
|
rubysl-thread (2.0.2)
|
@@ -284,7 +314,7 @@ GEM
|
|
284
314
|
rubysl-weakref (2.0.0)
|
285
315
|
rubysl-webrick (2.0.0)
|
286
316
|
rubysl-xmlrpc (2.0.0)
|
287
|
-
rubysl-yaml (2.0
|
317
|
+
rubysl-yaml (2.1.0)
|
288
318
|
rubysl-zlib (2.0.1)
|
289
319
|
slop (3.6.0)
|
290
320
|
spoon (0.0.4)
|
@@ -293,10 +323,24 @@ GEM
|
|
293
323
|
thread_safe (0.3.4)
|
294
324
|
thread_safe (0.3.4-java)
|
295
325
|
timecop (0.7.1)
|
326
|
+
travis (1.7.5)
|
327
|
+
addressable (~> 2.3)
|
328
|
+
backports
|
329
|
+
faraday (~> 0.9)
|
330
|
+
faraday_middleware (~> 0.9, >= 0.9.1)
|
331
|
+
gh (~> 0.13)
|
332
|
+
highline (~> 1.6)
|
333
|
+
launchy (~> 2.1)
|
334
|
+
pry (~> 0.9, < 0.10)
|
335
|
+
pusher-client (~> 0.4)
|
336
|
+
typhoeus (~> 0.6, >= 0.6.8)
|
337
|
+
typhoeus (0.7.1)
|
338
|
+
ethon (>= 0.7.1)
|
296
339
|
tzinfo (1.2.2)
|
297
340
|
thread_safe (~> 0.1)
|
298
|
-
|
299
|
-
|
341
|
+
websocket (1.2.1)
|
342
|
+
wwtd (0.7.0)
|
343
|
+
yard (0.8.7.6)
|
300
344
|
|
301
345
|
PLATFORMS
|
302
346
|
java
|
@@ -313,8 +357,9 @@ DEPENDENCIES
|
|
313
357
|
rake (~> 10.1)
|
314
358
|
rspec (~> 3.1)
|
315
359
|
rspec-its (~> 1.0)
|
316
|
-
rubocop
|
360
|
+
rubocop
|
317
361
|
rubysl (~> 2.0)
|
318
362
|
timecop (~> 0.7)
|
363
|
+
travis (~> 1.7)
|
319
364
|
wwtd (~> 0.5)
|
320
365
|
yard (~> 0.6)
|
data/README.md
CHANGED
@@ -513,15 +513,16 @@ the columns that are given.
|
|
513
513
|
|
514
514
|
### Rails ###
|
515
515
|
|
516
|
+
* 4.2
|
517
|
+
* 4.1
|
516
518
|
* 4.0
|
517
519
|
* 3.2
|
518
|
-
* 3.1
|
519
520
|
|
520
521
|
### Ruby ###
|
521
522
|
|
522
|
-
* Ruby 2.1, 2.0, 1.9.3
|
523
|
+
* Ruby 2.2, 2.1, 2.0, 1.9.3
|
523
524
|
* JRuby 1.7
|
524
|
-
* Rubinius 2.
|
525
|
+
* Rubinius 2.5
|
525
526
|
|
526
527
|
### Cassandra ###
|
527
528
|
|
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@ require 'bundler/setup'
|
|
3
3
|
require 'rspec/core/rake_task'
|
4
4
|
require 'rubocop/rake_task'
|
5
5
|
require 'wwtd/tasks'
|
6
|
+
require 'travis'
|
6
7
|
require File.expand_path('../lib/cequel/version', __FILE__)
|
7
8
|
|
8
9
|
RUBY_VERSIONS = YAML.load_file(File.expand_path('../.travis.yml', __FILE__))['rvm']
|
@@ -50,11 +51,20 @@ end
|
|
50
51
|
desc 'Run the specs'
|
51
52
|
RSpec::Core::RakeTask.new(:test) do |t|
|
52
53
|
t.pattern = './spec/examples/**/*_spec.rb'
|
53
|
-
|
54
|
+
rspec_opts = '--backtrace'
|
55
|
+
version = File.basename(File.dirname(RbConfig::CONFIG['bindir']))
|
56
|
+
gemfile = ENV.fetch('BUNDLE_GEMFILE', 'Gemfile')
|
57
|
+
log_path = File.expand_path("../spec/log/#{Time.now.to_i}-#{version}-#{File.basename(gemfile, '.gemfile')}", __FILE__)
|
58
|
+
FileUtils.mkdir_p(File.dirname(log_path))
|
59
|
+
File.open(log_path, 'w') do |f|
|
60
|
+
f.puts "RBENV_VERSION=#{version} BUNDLE_GEMFILE=#{gemfile} bundle exec rake test"
|
61
|
+
end
|
62
|
+
rspec_opts << " --out='#{log_path}' --format=progress"
|
63
|
+
t.rspec_opts = rspec_opts
|
54
64
|
end
|
55
65
|
|
56
66
|
desc 'Check style with Rubocop'
|
57
|
-
|
67
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
58
68
|
task.patterns = ['lib/**/*.rb']
|
59
69
|
task.formatters = ['files']
|
60
70
|
task.fail_on_error = true
|
@@ -69,7 +79,20 @@ namespace :test do
|
|
69
79
|
end
|
70
80
|
|
71
81
|
task :all do
|
72
|
-
|
82
|
+
travis = Travis::Repository.find('cequel/cequel')
|
83
|
+
current_commit = `git rev-parse HEAD`.chomp
|
84
|
+
build = travis.builds.find { |build| build.commit.sha == current_commit }
|
85
|
+
if build.nil?
|
86
|
+
puts "Could not find build for #{current_commit}; running tests locally"
|
87
|
+
abort unless system('bundle', 'exec', 'wwtd', '--parallel')
|
88
|
+
elsif !build.finished?
|
89
|
+
puts "Build for #{current_commit} is not finished; running tests locally"
|
90
|
+
abort unless system('bundle', 'exec', 'wwtd', '--parallel')
|
91
|
+
elsif build.green?
|
92
|
+
puts "Travis build for #{current_commit} is green; skipping local tests"
|
93
|
+
else
|
94
|
+
abort "Travis build for #{current_commit} failed; canceling release"
|
95
|
+
end
|
73
96
|
end
|
74
97
|
end
|
75
98
|
|
@@ -95,3 +118,16 @@ task :verify_changelog do
|
|
95
118
|
abort "Changelog is not up-to-date."
|
96
119
|
end
|
97
120
|
end
|
121
|
+
|
122
|
+
namespace :cassandra do
|
123
|
+
namespace :versions do
|
124
|
+
desc 'Update list of available Cassandra versions'
|
125
|
+
task :update do
|
126
|
+
listing = Net::HTTP.get(URI.parse("http://archive.apache.org/dist/cassandra/"))
|
127
|
+
versions = listing.scan(%r(href="(\d+\.\d+\.\d+)/")).map(&:first)
|
128
|
+
File.open(File.expand_path('../.cassandra-versions', __FILE__), 'w') do |f|
|
129
|
+
f.puts(versions.sort_by(&Gem::Version.method(:new)).join("\n"))
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|