ad_localize 4.0.0 → 4.0.1

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
  SHA256:
3
- metadata.gz: 1581d41a8d5a3f41dc91cf69f4b8abfdf8c2121695cf116a46c738825818cbd9
4
- data.tar.gz: 64af1cc80f9e9247514c334e13f6252e267283e3c38ade2d3111a4deb252164b
3
+ metadata.gz: 4912c63504f0bb4c170b0d58a2e4fdc2df11a66b69ff300644c098e262ac36bf
4
+ data.tar.gz: 8ba77200d900a9c379849b876a733fd201eec256ce473365b19909287671feb1
5
5
  SHA512:
6
- metadata.gz: 0ebfdd0a7746acdaa06b713c6f129b04b7a81fb0441bf5975a47b415b892dd135b87c3e99e0610a98584adb2317f4d170a64230f932db3a3c0c3ecf8d00eabee
7
- data.tar.gz: bd9a7140d68dc5f76c6c9e0dc19342180083205079d6d4e6022c0039176ae36f9e8c50441dec84bd5ea89f6596812c998be246163c3a9942e5fd9661379c3c30
6
+ metadata.gz: 82408859e066f57b962fe07df4e577efa92ae1621b8b6f6a5419316266fd811ccc8e3c832db98ded07e425642cd192de6ed579efb13310173da217892601ebca
7
+ data.tar.gz: 534c388c96c9cc11b4dee70e6f4537ec095ee9218d5d3d6beaa23825ec8ac570810eae6abea32870a00be332638e0856b8ba85c9d43187fd790af24b6bd34db4
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [4.0.1] - 2020-10-19
8
+ ### Fixed
9
+ - delete downloaded files even when any of them is a CSV file
10
+
7
11
  ## [4.0.0] - 2020-10-19
8
12
  ### Breaking change
9
13
  - Precedence to csv files. Only CSV files will be exported if both csv file and google spreadsheet are provided
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ad_localize (4.0.0)
4
+ ad_localize (4.0.1)
5
5
  activesupport (>= 5.2, < 7.0)
6
6
  colorize (~> 0.8)
7
7
  google-api-client (~> 0.34)
@@ -12,7 +12,7 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (6.0.3.3)
15
+ activesupport (6.0.3.4)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 0.7, < 2)
18
18
  minitest (~> 5.1)
data/README.md CHANGED
@@ -91,7 +91,7 @@ To use a private google spreasheet you need to use a Google Cloud Service Accoun
91
91
  - Go to *IAM & Admin / Service Account* and create a new service account.
92
92
  - Store the created `client-secret.json` (in a password manager for example)
93
93
  2. Enable Google Spreadsheet API for the project
94
- - Go to *API / Library* and enable the **Drive API** there.
94
+ - Go to *API / Library* and enable the **Google Spreadsheet API** there.
95
95
  3. Add the service account to a spreadsheet.
96
96
  - In *IAM & Admin / Service Account*, the service account's email is listed. Invite it to the spreadsheet to export.
97
97
 
@@ -33,13 +33,13 @@ module AdLocalize
33
33
  export_request.csv_paths = downloaded_files.map(&:path)
34
34
  if export_request.has_csv_files?
35
35
  ExportCSVFiles.new.call(export_request: export_request)
36
- downloaded_files.select { |downloaded_file| File.exist?(downloaded_file.path) }.each do |downloaded_file|
37
- downloaded_file.close
38
- downloaded_file.unlink
39
- end
40
36
  else
41
37
  LOGGER.error("invalid export request. check the spreadsheet share configuration")
42
38
  end
39
+ downloaded_files.select { |downloaded_file| File.exist?(downloaded_file.path) }.each do |downloaded_file|
40
+ downloaded_file.close
41
+ downloaded_file.unlink
42
+ end
43
43
  end
44
44
 
45
45
  def download_public_sheet(url:)
@@ -1,3 +1,3 @@
1
1
  module AdLocalize
2
- VERSION = "4.0.0"
2
+ VERSION = "4.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ad_localize
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edouard Siegel