citysdk 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +16 -16
- data/bin/citysdk-cli +10 -9
- data/lib/citysdk.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61324cf4f66dd18c97c21ee8560010955dffee0c
|
4
|
+
data.tar.gz: 7d2b13d3633bfc7b19af4d11f10cfe7137939453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3db43533c16fbbce2f536b1f97e0ad32e19b793fc7ad95ec5ffef4b783d93c9700d7a8555d4b39e292d806dfd1871e1e0374ae6ab2f20d05c8a648d8953b1d1
|
7
|
+
data.tar.gz: 2e8c4008387d537184bebf6942632a39d4fdaa6e3d1c41eaa3716de7fd3a4b9b7154426973d71ab28ad878e18e71dd73d7b4207f39a76f93709daeffadf155d9
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
citysdk (1.0.
|
4
|
+
citysdk (1.0.6)
|
5
5
|
charlock_holmes (~> 0.6)
|
6
6
|
curses (~> 1.0)
|
7
7
|
dbf (~> 2.0)
|
8
8
|
faraday (~> 0.8)
|
9
9
|
georuby (~> 2.0)
|
10
|
+
i18n (~> 0.7)
|
10
11
|
|
11
12
|
GEM
|
12
13
|
remote: https://rubygems.org/
|
@@ -16,24 +17,24 @@ GEM
|
|
16
17
|
dbf (2.0.7)
|
17
18
|
fastercsv (~> 1.5.4)
|
18
19
|
diff-lcs (1.2.5)
|
19
|
-
faraday (0.9.
|
20
|
+
faraday (0.9.1)
|
20
21
|
multipart-post (>= 1.2, < 3)
|
21
22
|
fastercsv (1.5.5)
|
22
|
-
georuby (2.
|
23
|
-
i18n (0.
|
23
|
+
georuby (2.5.1)
|
24
|
+
i18n (0.7.0)
|
24
25
|
multipart-post (2.0.0)
|
25
|
-
rspec (3.
|
26
|
-
rspec-core (~> 3.
|
27
|
-
rspec-expectations (~> 3.
|
28
|
-
rspec-mocks (~> 3.
|
29
|
-
rspec-core (3.
|
30
|
-
rspec-support (~> 3.
|
31
|
-
rspec-expectations (3.
|
26
|
+
rspec (3.1.0)
|
27
|
+
rspec-core (~> 3.1.0)
|
28
|
+
rspec-expectations (~> 3.1.0)
|
29
|
+
rspec-mocks (~> 3.1.0)
|
30
|
+
rspec-core (3.1.7)
|
31
|
+
rspec-support (~> 3.1.0)
|
32
|
+
rspec-expectations (3.1.2)
|
32
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.
|
34
|
-
rspec-mocks (3.
|
35
|
-
rspec-support (~> 3.
|
36
|
-
rspec-support (3.
|
34
|
+
rspec-support (~> 3.1.0)
|
35
|
+
rspec-mocks (3.1.3)
|
36
|
+
rspec-support (~> 3.1.0)
|
37
|
+
rspec-support (3.1.2)
|
37
38
|
|
38
39
|
PLATFORMS
|
39
40
|
ruby
|
@@ -43,5 +44,4 @@ DEPENDENCIES
|
|
43
44
|
citysdk!
|
44
45
|
faraday
|
45
46
|
georuby
|
46
|
-
i18n (~> 0.6.9)
|
47
47
|
rspec (~> 3.0)
|
data/bin/citysdk-cli
CHANGED
@@ -126,7 +126,7 @@ end
|
|
126
126
|
def createLayer
|
127
127
|
return unless $user
|
128
128
|
|
129
|
-
userdomains = $user[:domains].split(",")
|
129
|
+
userdomains = $user[:domains] ? $user[:domains].split(",") : []
|
130
130
|
userdomains << 'test'
|
131
131
|
userdomains = userdomains.map{|d|d.strip}.uniq
|
132
132
|
layer = {}
|
@@ -269,8 +269,8 @@ def doImport
|
|
269
269
|
|
270
270
|
return unless $user
|
271
271
|
|
272
|
-
if $file_hash[:
|
273
|
-
$file_hash[:
|
272
|
+
if $file_hash[:layer].blank?
|
273
|
+
$file_hash[:layer] = $layer = selectNewOrExistingLayer
|
274
274
|
return unless $layer
|
275
275
|
end
|
276
276
|
|
@@ -299,16 +299,16 @@ def doImport
|
|
299
299
|
n = $file_reader.content.length
|
300
300
|
i = 0
|
301
301
|
begin
|
302
|
-
$file_hash[:
|
302
|
+
$file_hash[:layer] = $layer[:name]
|
303
303
|
imp = Importer.new($file_hash, $file_reader)
|
304
304
|
imp.api.batch_size = $file_hash[:batch_size].to_i
|
305
|
-
n = imp.
|
305
|
+
n = imp.do_import do |d|
|
306
306
|
i += 1
|
307
307
|
outAddstr 1,"importing: #{Integer(100 * i / n)}%" if(i % 100)
|
308
308
|
end
|
309
309
|
outMessage("Import of #{$file_hash[:file_path]} succesful; processed #{n[:created]} items.")
|
310
310
|
rescue Exception => e
|
311
|
-
$file_hash[:
|
311
|
+
$file_hash[:layer] = nil
|
312
312
|
sherror(e.message)
|
313
313
|
return
|
314
314
|
end
|
@@ -442,7 +442,7 @@ def showLayers
|
|
442
442
|
i = 1
|
443
443
|
$layers.each do |u|
|
444
444
|
s = sprintf("%-15s ",u[:name])
|
445
|
-
s += sprintf("#{u[:category]}/#{u[:subcategory]}, #{u[:owner]
|
445
|
+
s += sprintf("#{u[:category]}/#{u[:subcategory]}, #{u[:owner]}, #{u[:description]}")
|
446
446
|
$outwin.setpos(i,0)
|
447
447
|
$outwin.addstr s.remove_non_ascii
|
448
448
|
i += 1
|
@@ -457,7 +457,7 @@ def getUserList
|
|
457
457
|
$users = []
|
458
458
|
begin
|
459
459
|
$api.authenticate($credentials_hash[:login],$credentials_hash[:password]) if $user
|
460
|
-
$users = $api.get('/owners?per_page=1000')
|
460
|
+
$users = $api.get('/owners?per_page=1000')[:owners]
|
461
461
|
$api.release if $user
|
462
462
|
rescue Exception => e
|
463
463
|
sherror("getUserList: " + e.message)
|
@@ -744,7 +744,7 @@ def loadFile
|
|
744
744
|
$file_hash = $file_hash.merge $credentials_hash.dup
|
745
745
|
$file_hash[:file_path] = File.expand_path($file_hash[:file_path])
|
746
746
|
$file_reader = FileReader.new($file_hash)
|
747
|
-
$file_hash[:
|
747
|
+
$file_hash[:layer] = $layer[:name] if $layer
|
748
748
|
fileSummary(0)
|
749
749
|
$outwin.refresh
|
750
750
|
rescue => e
|
@@ -873,6 +873,7 @@ end
|
|
873
873
|
def doConnect
|
874
874
|
begin
|
875
875
|
if $api.nil?
|
876
|
+
log $credentials_hash
|
876
877
|
return if ($credentials_hash[:host].nil? or $credentials_hash[:host]=~/^\s*$/)
|
877
878
|
$api = API.new($credentials_hash[:host])
|
878
879
|
end
|
data/lib/citysdk.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citysdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Demeyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -172,3 +172,4 @@ test_files:
|
|
172
172
|
- spec/files/stations.json
|
173
173
|
- spec/files/wkb.csv
|
174
174
|
- spec/import_spec.rb
|
175
|
+
has_rdoc:
|