fastlane-plugin-csv_translation 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 429b0130e18889c08894e5db31651595c12cceefe2422186e09e454474b6935f
|
4
|
+
data.tar.gz: d7ba4a687ab5f2ec3988e910746b340ca938a0982387504ec91350819c269414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66a16815bcbf0954501a4afc14532950326d5b550e38b0a2f1ce563abc2b0ad5820fb47441733ab271ef61e14ac55adef9a71ed3871d6ab70e3f46c85460b4f2
|
7
|
+
data.tar.gz: abf48d7ae57f9fe2d3276a4e64724e20d6a9d3560193bafabf3af589f3f74834a673156b7540d3b2af52c654aa18f89858130ecfe33234dd9f55741a220ec1f8
|
@@ -17,12 +17,15 @@ module Fastlane
|
|
17
17
|
|
18
18
|
csv_file_path = "#{csv_file_folder}/#{params[:file_path]}"
|
19
19
|
csv_row_identifier = params[:identifier]
|
20
|
+
csv_row_identifier_header = params[:identifier_header]
|
20
21
|
|
21
22
|
require 'csv'
|
22
23
|
|
23
24
|
# picking translation request-identifier entry from the feature_branch csv file
|
24
|
-
feature_branch_translation_requests = CSV.
|
25
|
-
feature_branch_translation_requests = feature_branch_translation_requests.select
|
25
|
+
feature_branch_translation_requests = CSV.foreach(csv_file_path, headers: true).map { |row| row.to_h }
|
26
|
+
feature_branch_translation_requests = feature_branch_translation_requests.select do |translation_request|
|
27
|
+
translation_request[csv_row_identifier_header].eql?(csv_row_identifier)
|
28
|
+
end
|
26
29
|
|
27
30
|
# rebasing CSV file
|
28
31
|
git_commit_info = {}
|
@@ -66,7 +69,6 @@ module Fastlane
|
|
66
69
|
|
67
70
|
# Step5: Append back feature branch translation_requests
|
68
71
|
all_translation_requests = CSV.table(csv_file_path, headers: true)
|
69
|
-
all_translation_requests.delete_if { |row| row.map { |value| value.to_s }.join("").include?(csv_row_identifier) }
|
70
72
|
|
71
73
|
headers = CSV.open(csv_file_path, &:readline)
|
72
74
|
CSV.open(csv_file_path, "w", write_headers: true, headers: headers, force_quotes: true) do |csv|
|
@@ -113,6 +115,12 @@ module Fastlane
|
|
113
115
|
env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_FILE_PATH",
|
114
116
|
description: "The file path to your csv file",
|
115
117
|
is_string: true),
|
118
|
+
FastlaneCore::ConfigItem.new(key: :identifier_header,
|
119
|
+
env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_IDENTIFIER_HEADER",
|
120
|
+
description: "An identifier header(column name) of the CSV file",
|
121
|
+
is_string: true,
|
122
|
+
optional: true,
|
123
|
+
default_value: "Ticket"),
|
116
124
|
FastlaneCore::ConfigItem.new(key: :identifier,
|
117
125
|
env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_IDENTIFIER",
|
118
126
|
description: "An identifier value of the CSV file row",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-csv_translation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manish Rathi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|