24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/fastlane/plugin/onesky/actions/onesky_download_action.rb', line 24
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :public_key,
env_name: 'ONESKY_PUBLIC_KEY',
description: 'Public key for OneSky',
is_string: true,
optional: false,
verify_block: proc do |value|
raise "No Public Key for OneSky given, pass using `public_key: 'token'`".red unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :secret_key,
env_name: 'ONESKY_SECRET_KEY',
description: 'Secret Key for OneSky',
is_string: true,
optional: false,
verify_block: proc do |value|
raise "No Secret Key for OneSky given, pass using `secret_key: 'token'`".red unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :project_id,
env_name: 'ONESKY_PROJECT_ID',
description: 'Project Id to upload file to',
optional: false,
verify_block: proc do |value|
raise "No project id given, pass using `project_id: 'id'`".red unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :locale,
env_name: 'ONESKY_DOWNLOAD_LOCALE',
description: 'Locale to download the translation for',
is_string: true,
optional: false,
verify_block: proc do |value|
raise 'No locale for translation given'.red unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :filename,
env_name: 'ONESKY_DOWNLOAD_FILENAME',
description: 'Name of the file to download the localization for',
is_string: true,
optional: false,
verify_block: proc do |value|
raise "No filename given. Please specify the filename of the file you want to download the translations for using `filename: 'filename'`".red unless value and !value.empty?
end),
FastlaneCore::ConfigItem.new(key: :destination,
env_name: 'ONESKY_DOWNLOAD_DESTINATION',
description: 'Destination file to write the downloaded file to',
is_string: true,
optional: false,
verify_block: proc do |value|
raise "Please specify the filename of the desrtination file you want to download the translations to using `destination: 'filename'`".red unless value and !value.empty?
end)
]
end
|