charta 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/charta.gemspec +2 -4
- data/lib/charta.rb +0 -1
- data/lib/charta/geometry.rb +4 -12
- data/lib/charta/version.rb +1 -1
- metadata +6 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2df82681d22428e8a351eb7021b92633c58734d
|
4
|
+
data.tar.gz: 882e807081a9b46d51ce58e67b823268f98921a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1bda79d73e0533c5f768266ea2543d5af2776d5435efaf5f81dab0f519ae5fb39864a2d20ae3ef0d4b80300e3af5b965f46dc767b057f1db8034bb0e7276722
|
7
|
+
data.tar.gz: 2de5ce38da7e6a7258336fb96a0b05c9a24f7e7d0d8d531a232d82abc279eddd0c111bdaed944120e60c8c1c85fa2b06114e7c91781d06c7509ddabd264677fa
|
data/charta.gemspec
CHANGED
@@ -18,11 +18,9 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_dependency 'nokogiri', '>= 1.7.0'
|
21
|
-
spec.add_dependency 'rgeo', '~>
|
21
|
+
spec.add_dependency 'rgeo', '~> 0.6.0'
|
22
22
|
spec.add_dependency 'json', '>= 1.8.0'
|
23
|
-
spec.add_dependency 'rgeo-geojson', '~>
|
24
|
-
spec.add_dependency 'rgeo-proj4', '~> 1.0.0'
|
25
|
-
spec.add_dependency 'activesupport', '>= 5.1'
|
23
|
+
spec.add_dependency 'rgeo-geojson', '~> 0.4.3'
|
26
24
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
27
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
26
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
data/lib/charta.rb
CHANGED
data/lib/charta/geometry.rb
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'rgeo/geo_json'
|
3
3
|
require 'rgeo/svg' # integrated lib for now
|
4
|
-
require 'active_support/core_ext/module/delegation'
|
5
4
|
|
6
5
|
module Charta
|
7
6
|
# Represents a Geometry with SRID
|
8
7
|
class Geometry
|
9
|
-
delegate_missing_to :to_rgeo
|
10
|
-
|
11
8
|
def initialize(feature, properties = {})
|
12
9
|
self.feature = feature
|
13
10
|
@properties = properties
|
@@ -237,12 +234,12 @@ module Charta
|
|
237
234
|
# TODO: Manage YAML domain type to ensure maintainability of YAML
|
238
235
|
# serialization in time.
|
239
236
|
def feature
|
240
|
-
|
241
|
-
if
|
237
|
+
if @feature.nil?
|
238
|
+
if @ewkt.nil?
|
239
|
+
raise StandardError, 'Invalid geometry (no feature, no EWKT)'
|
240
|
+
else
|
242
241
|
@feature = ::Charta::Geometry.from_ewkt(@ewkt)
|
243
242
|
@properties = @options.dup if @options
|
244
|
-
else
|
245
|
-
raise StandardError, 'Invalid geometry (no feature, no EWKT)'
|
246
243
|
end
|
247
244
|
end
|
248
245
|
@feature.dup
|
@@ -338,10 +335,5 @@ module Charta
|
|
338
335
|
)
|
339
336
|
end
|
340
337
|
end
|
341
|
-
|
342
|
-
def respond_to_missing?(name, include_private = false)
|
343
|
-
return false if name == :init_with
|
344
|
-
super
|
345
|
-
end
|
346
338
|
end
|
347
339
|
end
|
data/lib/charta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: charta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice TEXIER
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.6.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,42 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.4.3
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rgeo-proj4
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.0.0
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.0.0
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: activesupport
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5.1'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '5.1'
|
68
|
+
version: 0.4.3
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: bundler
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|