phraseapp-ruby 1.3.2 → 1.3.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: 1aa7f0ac5ccd202703bbac9de61694c907418ad8
4
- data.tar.gz: d45f7314f13beb0b9a95a4a615da10e58bc312db
3
+ metadata.gz: 66f19cceda82bde2fae86aadedbf6352f01006d1
4
+ data.tar.gz: 3ee0565bae45422dd10d03e7f8f35d57b21b2255
5
5
  SHA512:
6
- metadata.gz: 199de16186f3af5d5e5687b5df1c0790c105943f4638f394a3d4269ffba85917c5c11206c6d0f494cfc9a98d2121000034a1bc880289f6a7703da82afa9bff2b
7
- data.tar.gz: 5a22b972f9f09883a2d4db34995135ea7d189d899e64947d16d9d6b7e1fc94e676c085935a6a5c39c0ad7c067a0b536049ceb1dcf59f0eb0730f548f9e8f54a4
6
+ metadata.gz: b5456ee85d5fe98710ff39cc129b2b9bc6c14791c4f6168194e4101df00217663806cad4199456937e8810ffc920340b7ae6ce1d7b57bc7ebf5b0e6e93595649
7
+ data.tar.gz: 66cd330c773979efa5ff5962a1787d0b161a6f43815018a8285db40473f0160a80f4267d14750f5e67058c22bd5203f91610895f2b0fd6c0c0850f78f72c6c62
@@ -1,6 +1,7 @@
1
1
 
2
- # revision_docs:22719e50d32eec5ea61ce7b1233b3c8931e93334
3
- # revision_generator:HEAD/2016-10-24T105550/sacry1
2
+
3
+ # revision_docs:72ae3531d8460b33c6cb4a87636e7fcc66e37447
4
+ # revision_generator:ceb47e5be23d139da3a18a815c6da3ac70d0b412
4
5
  require 'ostruct'
5
6
  require 'net/https'
6
7
  require 'uri'
@@ -1156,6 +1157,8 @@ module RequestParams
1156
1157
  # Indicates whether the upload should not create upload tags.
1157
1158
  # tags::
1158
1159
  # List of tags separated by comma to be associated with the new keys contained in the upload.
1160
+ # update_descriptions::
1161
+ # Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
1159
1162
  # update_translations::
1160
1163
  # Indicates whether existing translations should be updated with the file content.
1161
1164
  class UploadParams < ::OpenStruct
@@ -1214,6 +1217,16 @@ module RequestParams
1214
1217
  super(val)
1215
1218
  end
1216
1219
 
1220
+ def update_descriptions=(val)
1221
+ if val.is_a?(TrueClass)
1222
+ super(true)
1223
+ elsif val.is_a?(FalseClass)
1224
+ return
1225
+ else
1226
+ PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
1227
+ end
1228
+ end
1229
+
1217
1230
  def update_translations=(val)
1218
1231
  if val.is_a?(TrueClass)
1219
1232
  super(true)
@@ -4896,6 +4909,10 @@ end
4896
4909
  data_hash["tags"] = params.tags
4897
4910
  end
4898
4911
 
4912
+ if params.update_descriptions != nil
4913
+ data_hash["update_descriptions"] = (params.update_descriptions == true)
4914
+ end
4915
+
4899
4916
  if params.update_translations != nil
4900
4917
  data_hash["update_translations"] = (params.update_translations == true)
4901
4918
  end
@@ -3,6 +3,8 @@ module PhraseApp
3
3
  URL = "https://api.phraseapp.com"
4
4
 
5
5
  module Auth
6
+ class ValidationError < StandardError
7
+ end
6
8
 
7
9
  # See PhraseApp::Client for usage example
8
10
  class Credentials < OpenStruct
@@ -17,7 +19,7 @@ module PhraseApp
17
19
 
18
20
  def validate!
19
21
  if self.username.to_s == "" && self.token.to_s == ""
20
- raise ValidationError.new("either username or token must be given")
22
+ raise PhraseApp::Auth::ValidationError.new("either username or token must be given")
21
23
  end
22
24
  end
23
25
 
@@ -76,6 +78,3 @@ module PhraseApp
76
78
  end
77
79
  end
78
80
  end
79
-
80
- class ValidationError < StandardError
81
- end
@@ -1,3 +1,3 @@
1
1
  module PhraseApp
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phraseapp-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhraseApp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-03 00:00:00.000000000 Z
11
+ date: 2016-11-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: PhraseApp API client libary
14
14
  email: