fastlane-plugin-upload_to_onesky 0.1.2 → 0.1.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f209e7f9497858fe71ee6fa3b2b6da21139ba019
|
4
|
+
data.tar.gz: c11d7c6f5d0319bd1880cd4f1553ef73de41b7b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e76bbce17428485e71f323bf5c8f5c80f6d36cb0ab4c92c9269cc9ec4d4b0809ccd3f2ebb065c1831373c8abebb0987c081abcb9ac3c65fe2dd4ce12d90e8c
|
7
|
+
data.tar.gz: c66a522ba9a55ca6ecab249d3491f5837369e722e72c088f80b9bf1079c371bffba369554ee6a96122085207c7eef7ef668b39478e7ea7615f6510c192b2f724
|
@@ -23,14 +23,27 @@ module Fastlane
|
|
23
23
|
multipart: true
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
# True by default on onesky file upload
|
27
|
+
# https://github.com/onesky/api-documentation-platform/blob/master/resources/file.md#upload---upload-a-file
|
28
|
+
unless params[:is_keeping_all_strings]
|
29
|
+
body_hash[:is_keeping_all_strings] = false
|
30
|
+
end
|
31
|
+
|
32
|
+
# False by default on onesky file upload
|
33
|
+
# https://github.com/onesky/api-documentation-platform/blob/master/resources/file.md#upload---upload-a-file
|
34
|
+
if params[:is_allow_translation_same_as_original]
|
35
|
+
body_hash[:is_allow_translation_same_as_original] = true
|
36
|
+
end
|
37
|
+
|
38
|
+
resp = RestClient.post(url,
|
39
|
+
body_hash,
|
40
|
+
request_params)
|
27
41
|
|
28
42
|
if resp.code == 201
|
29
43
|
UI.success "#{File.basename params[:strings_file_path]} was successfully uploaded to project #{params[:project_id]} in OneSky"
|
30
44
|
else
|
31
45
|
UI.error "Error uploading file to OneSky, Status code is #{resp.code}"
|
32
46
|
end
|
33
|
-
|
34
47
|
end
|
35
48
|
|
36
49
|
def self.auth_hash(api_key, secret_key)
|
@@ -91,7 +104,19 @@ module Fastlane
|
|
91
104
|
optional: false,
|
92
105
|
verify_block: proc do |value|
|
93
106
|
raise 'No file format given'.red unless (value and not value.empty?)
|
94
|
-
end)
|
107
|
+
end),
|
108
|
+
FastlaneCore::ConfigItem.new(key: :is_keeping_all_strings,
|
109
|
+
env_name: 'IS_KEEPING_ALL_STRINGS',
|
110
|
+
description: 'Deprecate strings if not found in newly uploaded file',
|
111
|
+
is_string: false,
|
112
|
+
optional: true,
|
113
|
+
default_value: true),
|
114
|
+
FastlaneCore::ConfigItem.new(key: :is_allow_translation_same_as_original,
|
115
|
+
env_name: 'IS_ALLOW_TRANSLATION_SAME_AS_ARIGINAL',
|
116
|
+
description: 'Skip importing translations that are the same as source text',
|
117
|
+
is_string: false,
|
118
|
+
optional: true,
|
119
|
+
default_value: false)
|
95
120
|
]
|
96
121
|
end
|
97
122
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-upload_to_onesky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joshrlesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|