cass_schema 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cass_schema/statement_loader.rb +4 -1
- data/lib/cass_schema/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecc2963be5c305ab9bf221b4c0e83e8be5de46eb
|
4
|
+
data.tar.gz: 14a69808bd70ed8894de921dc4e4f1288e1e955a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98ae845a77a4f3f9662c5896b7bb2a1902d3a9aa6d4fdde53074f553926ceba18aa5a5186567c5c49e7882f18a3b162686a042c37cd58acf94d02dfb469d647
|
7
|
+
data.tar.gz: 34f8761b17259b8c5dae3f9463b7db27a6c4a6442ecea43c1d3c3c92ae95b148cf2cd96df6338164709ca718cc7b4af0616a7899b373c40d89cfec61fcdff0ad
|
@@ -7,13 +7,16 @@ module CassSchema
|
|
7
7
|
|
8
8
|
# Parse the individual CQL statements as a list from the file. To do so:
|
9
9
|
# - assume statements are separated by two new lines
|
10
|
-
# - strip comments and empty lines from each statement
|
10
|
+
# - strip comments (#,--,//) and empty lines from each statement
|
11
11
|
# - remove statements that are empty
|
12
|
+
# - Note that /* multiline comments */ are not supported
|
12
13
|
statements = file.split(/\n{2,}/).map do |statement|
|
13
14
|
statement
|
14
15
|
.split(/\n/)
|
15
16
|
.select { |l| l !~ /^\s*#/ }
|
16
17
|
.select { |l| l !~ /^\s*$/ }
|
18
|
+
.select { |l| l !~ /^\s*--.*$/ }
|
19
|
+
.select { |l| l !~ /^\s*\/\/.*$/ }
|
17
20
|
.join("\n")
|
18
21
|
end
|
19
22
|
|
data/lib/cass_schema/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cass_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arron Norwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|