fastlane-plugin-csv_translation 0.4.1 → 1.0.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: 7189ea70602d3f9110b9275ccff1d796c1ada3e1169217a4c6ed58df5d73ac18
4
- data.tar.gz: d459fb0ed36b20e1fb453dd91bcab49d3af60e345d7027326c02d4b0e68a50f1
3
+ metadata.gz: f657887f9c46ed4aeb2e942573de7c46ed0dae74a9b55e09d26f1c177e1f4a28
4
+ data.tar.gz: 29420529f6802248e6f37c50f3e90c13224eece572a455037d8ace715a27e3f4
5
5
  SHA512:
6
- metadata.gz: bb5b1e92b389a06f1d0f7a88483092e82489efe6450fec63b42bbe11746f653619b092340bdb6e8dffc67f395ec34fa7ba7918d22aa4ac9c812b0034465662dd
7
- data.tar.gz: 2230a17886dc5485dea6aef9858513d3ec8906aa0d6b41180055f104b91c153bfcb2c6ebb3d68d8947e76da932b28774788ea222492b4dfb06365aecfbabdb9b
6
+ metadata.gz: d35379a205bebb7d6840b533dd26e127eb3b2c3f1414b9f373c76a6ec237dab062edb7fed4e208906d40be6cb46c75ad7837bf046f027d47fbd778d300df24da
7
+ data.tar.gz: b530f37c441e6616658486b142263d611dfc0e5f70306e4f689884a6576bd02e96141e28a133a5eec093606510f648845684323abccba23cf02ec3f4e98d368b
@@ -0,0 +1,75 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/csv_translation_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ module SharedValues
7
+ CREATE_CSV_FEATURE_BRANCH_INFO = :CREATE_CSV_FEATURE_BRANCH_INFO
8
+ end
9
+
10
+ class CreateCsvFeatureBranchAction < Action
11
+ def self.run(params)
12
+ # fetching csv file
13
+ csv_file_folder = Helper::CsvTranslationHelper.create_feature_branch(
14
+ repository_name: params[:repository_name],
15
+ branch_name: params[:branch_name],
16
+ feature_branch_name: params[:feature_branch_name]
17
+ )
18
+
19
+ Actions.lane_context[SharedValues::CREATE_CSV_FEATURE_BRANCH_INFO] = csv_file_folder
20
+ return csv_file_folder
21
+ end
22
+
23
+ def self.description
24
+ "Create a csv feature branch."
25
+ end
26
+
27
+ def self.output
28
+ [
29
+ ['CREATE_CSV_FEATURE_BRANCH_INFO', 'Created feature branch info']
30
+ ]
31
+ end
32
+
33
+ def self.available_options
34
+ [
35
+ FastlaneCore::ConfigItem.new(key: :repository_name,
36
+ env_name: "FL_CREATE_CSV_FEATURE_BRANCH_REPOSITORY_NAME",
37
+ description: "The name to your repository, e.g. 'fastlane/fastlane'",
38
+ verify_block: proc do |value|
39
+ UI.user_error!("No repository_name given in input param") unless (value and not value.empty?)
40
+ end),
41
+ FastlaneCore::ConfigItem.new(key: :branch_name,
42
+ env_name: "FL_CREATE_CSV_BASE_BRANCH_NAME",
43
+ description: "The branch name to your repository, (default main)",
44
+ is_string: true,
45
+ default_value: "main"),
46
+ FastlaneCore::ConfigItem.new(key: :feature_branch_name,
47
+ env_name: "FL_CREATE_CSV_FEATURE_BRANCH_NAME",
48
+ description: "The feature branch name for new translation request (Useful if no direct commit allowed in master)",
49
+ is_string: true,
50
+ optional: true)
51
+ ]
52
+ end
53
+
54
+ def self.authors
55
+ ["crazymanish"]
56
+ end
57
+
58
+ def self.example_code
59
+ [
60
+ 'create_csv_feature_branch(
61
+ repository_name: "fastlane/fastlane",
62
+ feature_branch_name: "some_feature_branch_name")',
63
+ 'create_csv_feature_branch(
64
+ repository_name: "fastlane/fastlane",
65
+ branch_name: "master",
66
+ feature_branch_name: "some_feature_branch_name")'
67
+ ]
68
+ end
69
+
70
+ def self.is_supported?(platform)
71
+ true
72
+ end
73
+ end
74
+ end
75
+ end
@@ -68,12 +68,12 @@ module Fastlane
68
68
  end),
69
69
  FastlaneCore::ConfigItem.new(key: :branch_name,
70
70
  env_name: "FL_CREATE_CSV_TRANSLATION_REQUEST_BRANCH_NAME",
71
- description: "The branch name to your repository, (default master)",
71
+ description: "The branch name to your repository, (default main)",
72
72
  is_string: true,
73
- default_value: "master"),
73
+ default_value: "main"),
74
74
  FastlaneCore::ConfigItem.new(key: :feature_branch_name,
75
75
  env_name: "FL_CREATE_CSV_TRANSLATION_REQUEST_FEATURE_BRANCH_NAME",
76
- description: "The feature branch name for new translation request (Useful if no direct commit allowed in master)",
76
+ description: "The feature branch name for new translation request (Useful if no direct commit allowed in main)",
77
77
  is_string: true,
78
78
  optional: true),
79
79
  FastlaneCore::ConfigItem.new(key: :file_path,
@@ -99,7 +99,7 @@ module Fastlane
99
99
  payload: {"header_name" => "some_value"})',
100
100
  'create_csv_translation_request(
101
101
  repository_name: "fastlane/fastlane",
102
- branch_name: "master",
102
+ branch_name: "main",
103
103
  file_path: "translation/some_csv_name.csv",
104
104
  payload: {"header_name" => "some_value"})'
105
105
  ]
@@ -79,12 +79,12 @@ module Fastlane
79
79
  end),
80
80
  FastlaneCore::ConfigItem.new(key: :branch_name,
81
81
  env_name: "FL_DELETE_CSV_TRANSLATION_REQUEST_BRANCH_NAME",
82
- description: "The branch name to your repository, (default master)",
82
+ description: "The branch name to your repository, (default main)",
83
83
  is_string: true,
84
- default_value: "master"),
84
+ default_value: "main"),
85
85
  FastlaneCore::ConfigItem.new(key: :feature_branch_name,
86
86
  env_name: "FL_DELETE_CSV_TRANSLATION_REQUEST_FEATURE_BRANCH_NAME",
87
- description: "The feature branch name for new translation request (Useful if no direct commit allowed in master)",
87
+ description: "The feature branch name for new translation request (Useful if no direct commit allowed in main)",
88
88
  is_string: true,
89
89
  optional: true),
90
90
  FastlaneCore::ConfigItem.new(key: :file_path,
@@ -110,7 +110,7 @@ module Fastlane
110
110
  identifier: "some_identifier_value")',
111
111
  'delete_csv_translation_request(
112
112
  repository_name: "fastlane/fastlane",
113
- branch_name: "master",
113
+ branch_name: "main",
114
114
  file_path: "translation/some_csv_name.csv",
115
115
  identifier: "some_identifier_value")'
116
116
  ]
@@ -0,0 +1,66 @@
1
+ require 'fastlane/action'
2
+ require_relative '../helper/csv_translation_helper'
3
+
4
+ module Fastlane
5
+ module Actions
6
+ module SharedValues
7
+ FETCH_CSV_BRANCH_INFO = :FETCH_CSV_BRANCH_INFO
8
+ end
9
+
10
+ class FetchCsvBranchAction < Action
11
+ def self.run(params)
12
+ # fetching csv file
13
+ csv_file_folder = Helper::CsvTranslationHelper.fetch_csv_file(
14
+ repository_name: repository_name,
15
+ branch_name: branch_name
16
+ )
17
+
18
+ Actions.lane_context[SharedValues::CREATE_CSV_FEATURE_BRANCH_INFO] = csv_file_folder
19
+ return csv_file_folder
20
+ end
21
+
22
+ def self.description
23
+ "Fetch a csv file branch."
24
+ end
25
+
26
+ def self.output
27
+ [
28
+ ['FETCH_CSV_BRANCH_INFO', 'Fetched CSV file branch info']
29
+ ]
30
+ end
31
+
32
+ def self.available_options
33
+ [
34
+ FastlaneCore::ConfigItem.new(key: :repository_name,
35
+ env_name: "FL_FETCH_CSV_REPOSITORY_NAME",
36
+ description: "The name to your repository, e.g. 'fastlane/fastlane'",
37
+ verify_block: proc do |value|
38
+ UI.user_error!("No repository_name given in input param") unless (value and not value.empty?)
39
+ end),
40
+ FastlaneCore::ConfigItem.new(key: :branch_name,
41
+ env_name: "FL_FETCH_CSV_BRANCH_NAME",
42
+ description: "The branch name to your repository, (default main)",
43
+ is_string: true,
44
+ default_value: "main")
45
+ ]
46
+ end
47
+
48
+ def self.authors
49
+ ["crazymanish"]
50
+ end
51
+
52
+ def self.example_code
53
+ [
54
+ 'fetch_csv_branch(repository_name: "fastlane/fastlane")',
55
+ 'fetch_csv_branch(
56
+ repository_name: "fastlane/fastlane",
57
+ branch_name: "some_feature_branch_name")'
58
+ ]
59
+ end
60
+
61
+ def self.is_supported?(platform)
62
+ true
63
+ end
64
+ end
65
+ end
66
+ end
@@ -102,12 +102,12 @@ module Fastlane
102
102
  end),
103
103
  FastlaneCore::ConfigItem.new(key: :branch_name,
104
104
  env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_BRANCH_NAME",
105
- description: "The branch name to your repository, (default master)",
105
+ description: "The branch name to your repository, (default main)",
106
106
  is_string: true,
107
- default_value: "master"),
107
+ default_value: "main"),
108
108
  FastlaneCore::ConfigItem.new(key: :feature_branch_name,
109
109
  env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_FEATURE_BRANCH_NAME",
110
- description: "The feature branch name for new translation request (Useful if no direct commit allowed in master)",
110
+ description: "The feature branch name for new translation request (Useful if no direct commit allowed in main)",
111
111
  is_string: true),
112
112
  FastlaneCore::ConfigItem.new(key: :file_path,
113
113
  env_name: "FL_REBASE_CSV_TRANSLATION_REQUEST_FILE_PATH",
@@ -133,7 +133,7 @@ module Fastlane
133
133
  identifier: "some_identifier_value")',
134
134
  'rebase_csv_translation_request(
135
135
  repository_name: "fastlane/fastlane",
136
- branch_name: "master",
136
+ branch_name: "main",
137
137
  feature_branch_name: "some_feature_branch",
138
138
  file_path: "translation/some_csv_name.csv",
139
139
  identifier: "some_identifier_value")'
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CsvTranslation
3
- VERSION = "0.4.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
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: 0.4.1
4
+ version: 1.0.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-05-24 00:00:00.000000000 Z
11
+ date: 2020-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -145,8 +145,10 @@ files:
145
145
  - LICENSE
146
146
  - README.md
147
147
  - lib/fastlane/plugin/csv_translation.rb
148
+ - lib/fastlane/plugin/csv_translation/actions/create_csv_feature_branch.rb
148
149
  - lib/fastlane/plugin/csv_translation/actions/create_csv_translation_request.rb
149
150
  - lib/fastlane/plugin/csv_translation/actions/delete_csv_translation_request.rb
151
+ - lib/fastlane/plugin/csv_translation/actions/fetch_csv_branch.rb
150
152
  - lib/fastlane/plugin/csv_translation/actions/get_csv_translation_requests.rb
151
153
  - lib/fastlane/plugin/csv_translation/actions/rebase_csv_translation_request.rb
152
154
  - lib/fastlane/plugin/csv_translation/helper/csv_translation_helper.rb
@@ -170,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
172
  - !ruby/object:Gem::Version
171
173
  version: '0'
172
174
  requirements: []
173
- rubygems_version: 3.0.3
175
+ rubygems_version: 3.1.4
174
176
  signing_key:
175
177
  specification_version: 4
176
178
  summary: "A fastlane plugin to manage translation using a CSV file under git repository.