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: df21fc9058fe9bcd922134204271ef24bfd4fc00
4
- data.tar.gz: 7d114bd3c03528292ca454ed2a1b6c9815ae3568
3
+ metadata.gz: f209e7f9497858fe71ee6fa3b2b6da21139ba019
4
+ data.tar.gz: c11d7c6f5d0319bd1880cd4f1553ef73de41b7b5
5
5
  SHA512:
6
- metadata.gz: 85b37074851e080745d7c285b1cbef969e60aaadfa594fb3ce4f0a510444fd04d04e52f387df0c9ab93819dccb993dc562de15ed93ce8f86fe23f1ce4f048fa8
7
- data.tar.gz: d937ea192f47f5786ab717d9d1207f05e7a8d2e5eb9d08f5b8c924815036eae4ff958bf9d211b72b0e00f451adf467bbb19afb1708d5638be17a55bb73b85abf
6
+ metadata.gz: 92e76bbce17428485e71f323bf5c8f5c80f6d36cb0ab4c92c9269cc9ec4d4b0809ccd3f2ebb065c1831373c8abebb0987c081abcb9ac3c65fe2dd4ce12d90e8c
7
+ data.tar.gz: c66a522ba9a55ca6ecab249d3491f5837369e722e72c088f80b9bf1079c371bffba369554ee6a96122085207c7eef7ef668b39478e7ea7615f6510c192b2f724
@@ -23,14 +23,27 @@ module Fastlane
23
23
  multipart: true
24
24
  }
25
25
 
26
- resp = RestClient.post(url,body_hash, request_params)
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
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module UploadToOnesky
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.2
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-07-26 00:00:00.000000000 Z
11
+ date: 2017-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry