citysdk 0.1.1.6 → 0.1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +14 -6
- data/lib/citysdk.rb +1 -1
- data/lib/citysdk/file_reader.rb +4 -3
- data/lib/citysdk/importer.rb +2 -0
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWRlYTFkMjY1YmY2M2E5MTBhYzZhM2NhZDIyOTc1MTY0ZGRiNjM5Mw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YWRjOWZiNWFjNzBlNmEzYWRmOTdjMjQxNzZjYjdkNGQ3ZmNmNjU3YQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmY0NzZlMGEzYzYzYmQxNmFhM2MwNTU1NjFjY2ExMTAwNzVjMTFhYjZkY2E0
|
10
|
+
NzFlM2RlZDllZDVlZjFlMTYyNDliMDM0YzI1ZWNlYzIxOWQ4NTJjN2IyZWE1
|
11
|
+
MDZkNWYzZTNhYTcxN2Y4OGNmZGRhZTdkMjNiYjZiNzA3NjRmYTg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NWIwZWQyOWIxNTUwZWZjNDMyM2U5ZGU1ZjM1NmNhZjgxNWZmMWU5YWJiMTg5
|
14
|
+
MDQ1MzI3YzI5MjBkZmU2N2QwY2U3OGZmOGZiZDUzZjg2NzdlMzQ1YWNiNGI1
|
15
|
+
M2NiZDQzNzA1ZGUzZDgzNjc3ZmNlNTQ3NTFiNzQxNjc1NmIyMDM=
|
data/lib/citysdk.rb
CHANGED
data/lib/citysdk/file_reader.rb
CHANGED
@@ -55,7 +55,7 @@ module CitySDK
|
|
55
55
|
pd = pc = hn = ad = false
|
56
56
|
@params[:fields].reverse.each do |f|
|
57
57
|
pd = f if ( f.to_s =~ /postcode|post/i )
|
58
|
-
pc = f if ( f.to_s =~ /^
|
58
|
+
pc = f if ( f.to_s =~ /^(post|zip)code$/i )
|
59
59
|
hn = f if ( f.to_s =~ /huisnummer|housenumber|(house|huis)(nr|no)|number/i)
|
60
60
|
ad = f if ( f.to_s =~ /address|street|straat|adres/i)
|
61
61
|
end
|
@@ -178,6 +178,7 @@ module CitySDK
|
|
178
178
|
xfield = nil; xs = true
|
179
179
|
yfield = nil; ys = true
|
180
180
|
@content[0][:properties].each do |k,v|
|
181
|
+
next if k.nil?
|
181
182
|
if k.to_s =~ RE_GEO
|
182
183
|
srid,g_type = isWkbGeometry(v)
|
183
184
|
if(srid)
|
@@ -347,8 +348,8 @@ module CitySDK
|
|
347
348
|
|
348
349
|
def readZip(path)
|
349
350
|
begin
|
350
|
-
Dir.mktmpdir("cdkfi_#{File.basename(path)}") do |dir|
|
351
|
-
raise "Error unzipping #{path}." if not system "unzip #{path} -d #{dir} > /dev/null 2>&1"
|
351
|
+
Dir.mktmpdir("cdkfi_#{File.basename(path).gsub(/\A/,'')}") do |dir|
|
352
|
+
raise "Error unzipping #{path}." if not system "unzip '#{path}' -d '#{dir}' > /dev/null 2>&1"
|
352
353
|
Dir.foreach(dir) do |f|
|
353
354
|
next if f =~ /^\./
|
354
355
|
case File.extname(f)
|
data/lib/citysdk/importer.rb
CHANGED
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citysdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Demeyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dbf
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>='
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: georuby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - '>='
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.0.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
40
|
version: 2.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.8.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '>='
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.8.5
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: charlock_holmes
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - '>='
|
59
|
+
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.6.9.4
|
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
68
|
version: 0.6.9.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - '>='
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - '>='
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: Encapsulates the CitySDK api.
|
@@ -117,17 +117,17 @@ require_paths:
|
|
117
117
|
- lib
|
118
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- - '>='
|
120
|
+
- - ! '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- - '>='
|
125
|
+
- - ! '>='
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.0.
|
130
|
+
rubygems_version: 2.0.5
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Encapsulates the CitySDK api, provides high-level file import functionality.
|