ai_tagger 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/tagger/cli.rb +2 -2
- data/lib/tagger/downloader.rb +0 -11
- data/lib/tagger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2a61f863e88fa90a06dad54e7115f24affd77fa
|
4
|
+
data.tar.gz: 9f8e22a5cba43f9ffa4750c6a38eff3cbdb6aae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a393b527897cfd20810b6fa0c0c5577f2856063ba45e07911382bc8e865724a239214bd608e59975a544aa69e9757503f1765189d7cafb4ba30aa3bb8e7b8189
|
7
|
+
data.tar.gz: 9ebcf941ae13be8fc90bc04ddd2aa8bae7eb48d75f7391d616086fbcd608756eaa0cec51c472ba8c4924b4274c9b001740e4db32cf5e3d43e928b41783321438
|
data/Gemfile.lock
CHANGED
data/lib/tagger/cli.rb
CHANGED
@@ -8,10 +8,10 @@ module Tagger
|
|
8
8
|
|
9
9
|
# Download as CSV
|
10
10
|
downloader = Tagger::Downloader.new(url)
|
11
|
-
downloader.
|
11
|
+
csv = downloader.download()
|
12
12
|
|
13
13
|
# Parse CSV
|
14
|
-
raw_file = CSV.
|
14
|
+
raw_file = CSV.parse(csv, headers: true)
|
15
15
|
events = raw_file.map do |row|
|
16
16
|
event_name = row[1]
|
17
17
|
if event_name.nil?
|
data/lib/tagger/downloader.rb
CHANGED
@@ -6,19 +6,8 @@ module Tagger
|
|
6
6
|
@spreadsheet_url = spreadsheet_url
|
7
7
|
end
|
8
8
|
|
9
|
-
def download_and_write
|
10
|
-
content = download()
|
11
|
-
write_to_file(content)
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
9
|
def download
|
17
10
|
open(@spreadsheet_url).read
|
18
11
|
end
|
19
|
-
|
20
|
-
def write_to_file(content)
|
21
|
-
File.write("tmp/raw.csv", content)
|
22
|
-
end
|
23
12
|
end
|
24
13
|
end
|
data/lib/tagger/version.rb
CHANGED