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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c71aa70ecad0d3fc6f4ace18098198196315fc2b
4
- data.tar.gz: 9669d49d6519db878b48a8dc755cf703df196258
3
+ metadata.gz: b2a61f863e88fa90a06dad54e7115f24affd77fa
4
+ data.tar.gz: 9f8e22a5cba43f9ffa4750c6a38eff3cbdb6aae4
5
5
  SHA512:
6
- metadata.gz: a40a331a4706d8daad82ba2b387adb6d053ce24f25c5a2f57ebb48b6eb37852fa409079befac3661591e2cb503017cd4345783a67ac36703e3dec770b11900cb
7
- data.tar.gz: 80cbe9499b13058df214058af7dfb08222dffe11dffde238c4572a44c4f267c89952214c272a0314d53175d55b57b830b09aa40ead1aa453d459ba4be356045a
6
+ metadata.gz: a393b527897cfd20810b6fa0c0c5577f2856063ba45e07911382bc8e865724a239214bd608e59975a544aa69e9757503f1765189d7cafb4ba30aa3bb8e7b8189
7
+ data.tar.gz: 9ebcf941ae13be8fc90bc04ddd2aa8bae7eb48d75f7391d616086fbcd608756eaa0cec51c472ba8c4924b4274c9b001740e4db32cf5e3d43e928b41783321438
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ai_tagger (0.1.2)
4
+ ai_tagger (0.1.3)
5
5
  activesupport (~> 4.2.11.1)
6
6
  thor (~> 0.20.3)
7
7
 
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.download_and_write()
11
+ csv = downloader.download()
12
12
 
13
13
  # Parse CSV
14
- raw_file = CSV.read("tmp/raw.csv", headers: true)
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?
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tagger
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ai_tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dunya Kirkali