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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/ad_localize/interactors/export_g_spreadsheet.rb +4 -4
- data/lib/ad_localize/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4912c63504f0bb4c170b0d58a2e4fdc2df11a66b69ff300644c098e262ac36bf
|
4
|
+
data.tar.gz: 8ba77200d900a9c379849b876a733fd201eec256ce473365b19909287671feb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82408859e066f57b962fe07df4e577efa92ae1621b8b6f6a5419316266fd811ccc8e3c832db98ded07e425642cd192de6ed579efb13310173da217892601ebca
|
7
|
+
data.tar.gz: 534c388c96c9cc11b4dee70e6f4537ec095ee9218d5d3d6beaa23825ec8ac570810eae6abea32870a00be332638e0856b8ba85c9d43187fd790af24b6bd34db4
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ad_localize (4.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.
|
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 **
|
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:)
|
data/lib/ad_localize/version.rb
CHANGED