hdo-storting-importer 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -77,17 +77,9 @@ module Hdo
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def read_promises
|
80
|
-
|
81
|
-
content = ''
|
82
|
-
csvs.each do |csv|
|
83
|
-
if csv =~ /^http/
|
84
|
-
content << open(csv).read
|
85
|
-
else
|
86
|
-
content << File.read(File.expand_path(csv))
|
87
|
-
end
|
88
|
-
end
|
80
|
+
file = @files.first or raise "no spreadsheet given"
|
89
81
|
|
90
|
-
Util.json_pretty Promise.
|
82
|
+
Util.json_pretty Promise.from_xlsx(file)
|
91
83
|
end
|
92
84
|
|
93
85
|
end
|