geojsonlint 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geojsonlint.rb +2 -1
- data/lib/geojsonlint/geojson_validator.rb +1 -1
- data/lib/geojsonlint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4ca0d9f36d688972008a4d6699f5e1a0ec89f6f
|
4
|
+
data.tar.gz: b88ee3cad1afc435d3f8a84cf175c5745b34e608
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fad49d5160281dd224949249b95c0c8bdc49e979c6312bb2664886ce3db1c83a5c50e1666b1a66c01cf514ef6852ae841295bdb3b4621da69eefd5aea14a353
|
7
|
+
data.tar.gz: 35d0d6e0867f2c767478e707fc7703d0033600fcbf442c9eb24b5d9357dd44719973db8f6fd93161f368f093bc0854fd058c390a26905af07bc84c47f306a95d
|
data/lib/geojsonlint.rb
CHANGED
@@ -14,7 +14,8 @@ module Geojsonlint
|
|
14
14
|
# @param data [String, Hash]
|
15
15
|
def initialize(data)
|
16
16
|
@data = data
|
17
|
-
|
17
|
+
|
18
|
+
@schema = JSON.parse(File.read(File.expand_path('../geojsonlint/geojson_schema.json', __FILE__)))
|
18
19
|
self
|
19
20
|
end
|
20
21
|
|
@@ -4,7 +4,7 @@ class GeojsonValidator < ActiveModel::EachValidator
|
|
4
4
|
|
5
5
|
def validate_each(record, attribute, value)
|
6
6
|
unless valid_geojson?(value)
|
7
|
-
message = options[:message] || "
|
7
|
+
message = options[:message] || "invalid"
|
8
8
|
record.errors.add(attribute, message)
|
9
9
|
end
|
10
10
|
end
|
data/lib/geojsonlint/version.rb
CHANGED