charta 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf89b408699b34e871d1b85a23315e3e2d735b5c
4
- data.tar.gz: '02795fccd17495a483a93d3a1752c874a28d7e48'
3
+ metadata.gz: 313d94abe50e72ec1d336ab3a9e4512dd04f8b9e
4
+ data.tar.gz: b28e8dfe8296964aa1f4c2f690698741961db939
5
5
  SHA512:
6
- metadata.gz: b9c290de3bebb7d8d10ef5a3b179fa7adaedc20555a82552500cf30dd3131594824efb8292f9a618f030aeedaf9e4775f4f165f32074e755df860204abbf1988
7
- data.tar.gz: 363f6dc4da4a6f296460f9e38ec34051a8a980069829c362827e6d29bb3f110c51976b9e9890ea5b0badd52af5093f5658cf6ab7ee43558bb985b2d5b3b2e1ca
6
+ metadata.gz: 7748160065921587712166e5016ed27c6a8dbea070b26b00e55b7ebb7734e68c1106826065e3ea2e867e4adb7b147077bfe6f19e012eb187aa6a52f3fd3d7e70
7
+ data.tar.gz: 2b779c9146592f655ed435a6118b58dcfbff065df7ce412bc1cbfd924b2219252b09b078872e40fe9f04296bf9fc2828a140a8af9fe1ccff91498d75f4e84bdb
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'rgeo', '~> 0.6.0'
22
22
  spec.add_dependency 'json', '>= 1.8.0'
23
23
  spec.add_dependency 'rgeo-geojson', '~> 0.4.3'
24
+ spec.add_dependency 'activesupport', '>= 5.1'
24
25
  spec.add_development_dependency 'bundler', '~> 1.14'
25
26
  spec.add_development_dependency 'rake', '~> 10.0'
26
27
  spec.add_development_dependency 'minitest', '~> 5.0'
@@ -1,10 +1,13 @@
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'
4
5
 
5
6
  module Charta
6
7
  # Represents a Geometry with SRID
7
8
  class Geometry
9
+ delegate_missing_to :to_rgeo
10
+
8
11
  def initialize(feature, properties = {})
9
12
  self.feature = feature
10
13
  @properties = properties
@@ -234,12 +237,12 @@ module Charta
234
237
  # TODO: Manage YAML domain type to ensure maintainability of YAML
235
238
  # serialization in time.
236
239
  def feature
237
- if @feature.nil?
238
- if @ewkt.nil?
239
- raise StandardError, 'Invalid geometry (no feature, no EWKT)'
240
- else
240
+ unless defined? @feature
241
+ if defined? @ewkt
241
242
  @feature = ::Charta::Geometry.from_ewkt(@ewkt)
242
243
  @properties = @options.dup if @options
244
+ else
245
+ raise StandardError, 'Invalid geometry (no feature, no EWKT)'
243
246
  end
244
247
  end
245
248
  @feature.dup
@@ -335,5 +338,10 @@ module Charta
335
338
  )
336
339
  end
337
340
  end
341
+
342
+ def respond_to_missing?(name, include_private = false)
343
+ return false if name == :init_with
344
+ super
345
+ end
338
346
  end
339
347
  end
@@ -1,3 +1,3 @@
1
1
  module Charta
2
- VERSION = '0.1.9'.freeze
2
+ VERSION = '0.1.10'.freeze
3
3
  end
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.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice TEXIER
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-24 00:00:00.000000000 Z
11
+ date: 2018-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.4.3
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '5.1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '5.1'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -172,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
186
  version: '0'
173
187
  requirements: []
174
188
  rubyforge_project:
175
- rubygems_version: 2.5.2
189
+ rubygems_version: 2.6.14
176
190
  signing_key:
177
191
  specification_version: 4
178
192
  summary: Simple tool over geos and co