phraseapp-ruby 1.0.15 → 1.0.16

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: 058fa89f6b08b1b9f37315377a737c157c21aa9d
4
- data.tar.gz: 581635c7ad2d5db9c137d00f8cb38f78cc93b3ae
3
+ metadata.gz: b96a2866c0bd6341989f54ca08d76907e51cc3a6
4
+ data.tar.gz: b24a97f975e9a9e0050cc796a8e14f197296cc77
5
5
  SHA512:
6
- metadata.gz: fe0998dba3662539a79f255d4d5f666bafc58152fa980696dd3bd892b04f6a51959fdc90b3e58c7505fab088e99e25196dc5c24d26fa54243cd188bb8590b714
7
- data.tar.gz: 18020bf020462151be285f453a3b911827be2254489bf6f493c639ed980738f6cb1b512a1f739a57936bcafe0dfdb3a1f51704e48808bdea874132a4adfe9441
6
+ metadata.gz: ef657f1dc89433b4f0d94463caba8883cfadc4eb22303a30018aa2f31761bdfa0e336f425bb6040bdb9ad352d7095e8a3bb5ab6480ac575417260200f386443d
7
+ data.tar.gz: c536926f691fcf971d212c5af982fa6844e26b5a6d83ab80a4d3c664827548af49763b4e2a857f0d85edd8829cb84e2da878d31923452071c0a259241686130f
@@ -42,6 +42,10 @@ module PhraseApp
42
42
  self.host = tmpA.host
43
43
  end
44
44
 
45
+ if tmpA.skip_ssl_verification
46
+ self.skip_ssl_verification = tmpA.skip_ssl_verification
47
+ end
48
+
45
49
  if tmpA.debug
46
50
  self.debug = tmpA.debug
47
51
  end
@@ -66,6 +70,14 @@ module PhraseApp
66
70
  end
67
71
  end
68
72
 
73
+ def self.skip_ssl_verification
74
+ if authH.skip_ssl_verification && authH.skip_ssl_verification
75
+ return true
76
+ else
77
+ return false
78
+ end
79
+ end
80
+
69
81
  def self.debug
70
82
  if authH.debug && authH.debug != ""
71
83
  return authH.debug
@@ -1026,7 +1026,7 @@ module RequestParams
1026
1026
  # locale_id::
1027
1027
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1028
1028
  # q::
1029
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1029
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1030
1030
  class KeysDeleteParams < ::OpenStruct
1031
1031
  def locale_id=(val)
1032
1032
  self.locale_id = val
@@ -1051,7 +1051,7 @@ module RequestParams
1051
1051
  # order::
1052
1052
  # Order direction. Can be one of: asc, desc.
1053
1053
  # q::
1054
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1054
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1055
1055
  # sort::
1056
1056
  # Sort by field. Can be one of: name, created_at, updated_at.
1057
1057
  class KeysListParams < ::OpenStruct
@@ -1086,7 +1086,7 @@ module RequestParams
1086
1086
  # order::
1087
1087
  # Order direction. Can be one of: asc, desc.
1088
1088
  # q::
1089
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1089
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1090
1090
  # sort::
1091
1091
  # Sort by field. Can be one of: name, created_at, updated_at.
1092
1092
  class KeysSearchParams < ::OpenStruct
@@ -1119,7 +1119,7 @@ module RequestParams
1119
1119
  # locale_id::
1120
1120
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1121
1121
  # q::
1122
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1122
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1123
1123
  # tags::
1124
1124
  # Tag or comma-separated list of tags to add to the matching collection of keys
1125
1125
  class KeysTagParams < ::OpenStruct
@@ -1150,7 +1150,7 @@ module RequestParams
1150
1150
  # locale_id::
1151
1151
  # Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
1152
1152
  # q::
1153
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1153
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>name:key_name</code> for text queries on key names</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1154
1154
  # tags::
1155
1155
  # Tag or comma-separated list of tags to add to the matching collection of keys
1156
1156
  class KeysUntagParams < ::OpenStruct
@@ -1297,7 +1297,7 @@ module RequestParams
1297
1297
  # order::
1298
1298
  # Order direction. Can be one of: asc, desc.
1299
1299
  # q::
1300
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1300
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1301
1301
  # sort::
1302
1302
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1303
1303
  class TranslationsByKeyParams < ::OpenStruct
@@ -1326,7 +1326,7 @@ module RequestParams
1326
1326
  # order::
1327
1327
  # Order direction. Can be one of: asc, desc.
1328
1328
  # q::
1329
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1329
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1330
1330
  # sort::
1331
1331
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1332
1332
  class TranslationsByLocaleParams < ::OpenStruct
@@ -1355,7 +1355,7 @@ module RequestParams
1355
1355
  # order::
1356
1356
  # Order direction. Can be one of: asc, desc.
1357
1357
  # q::
1358
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1358
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1359
1359
  # sort::
1360
1360
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1361
1361
  class TranslationsExcludeParams < ::OpenStruct
@@ -1384,7 +1384,7 @@ module RequestParams
1384
1384
  # order::
1385
1385
  # Order direction. Can be one of: asc, desc.
1386
1386
  # q::
1387
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1387
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1388
1388
  # sort::
1389
1389
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1390
1390
  class TranslationsIncludeParams < ::OpenStruct
@@ -1413,7 +1413,7 @@ module RequestParams
1413
1413
  # order::
1414
1414
  # Order direction. Can be one of: asc, desc.
1415
1415
  # q::
1416
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1416
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1417
1417
  # sort::
1418
1418
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1419
1419
  class TranslationsListParams < ::OpenStruct
@@ -1442,7 +1442,7 @@ module RequestParams
1442
1442
  # order::
1443
1443
  # Order direction. Can be one of: asc, desc.
1444
1444
  # q::
1445
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1445
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1446
1446
  # sort::
1447
1447
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1448
1448
  class TranslationsSearchParams < ::OpenStruct
@@ -1471,7 +1471,7 @@ module RequestParams
1471
1471
  # order::
1472
1472
  # Order direction. Can be one of: asc, desc.
1473
1473
  # q::
1474
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1474
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1475
1475
  # sort::
1476
1476
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1477
1477
  class TranslationsUnverifyParams < ::OpenStruct
@@ -1500,7 +1500,7 @@ module RequestParams
1500
1500
  # order::
1501
1501
  # Order direction. Can be one of: asc, desc.
1502
1502
  # q::
1503
- # Specify a <a href="/api/v2/examples/#word-matching-examples">search term query</a> including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1503
+ # Specify a search term query including wildcard or exact matching. It will search the key metadata for matching results. Searched fields include key name, description, tags, translations.<br><br> Also supports the following qualifiers in the query:<br> <ul> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>updated_at{>=|<=}2013-02-21</code> for date range queries</li> </ul> Find more examples <a href="/api/v2/examples/">here</a>.
1504
1504
  # sort::
1505
1505
  # Sort criteria. Can be one of: key_name, created_at, updated_at.
1506
1506
  class TranslationsVerifyParams < ::OpenStruct
@@ -122,8 +122,16 @@ module PhraseApp
122
122
  end
123
123
 
124
124
  http = Net::HTTP.new(uri.host, uri.port)
125
- http.use_ssl = true
126
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
125
+
126
+ if uri.is_a?(URI::HTTPS)
127
+ http.use_ssl = true
128
+ if PhraseApp::Auth::skip_ssl_verification
129
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
130
+ else
131
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
132
+ end
133
+ end
134
+
127
135
  if PhraseApp::Auth.debug
128
136
  puts "method:"
129
137
  puts req.method
@@ -1,3 +1,3 @@
1
1
  module PhraseApp
2
- VERSION = '1.0.15'
2
+ VERSION = '1.0.16'
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.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhraseApp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-16 00:00:00.000000000 Z
11
+ date: 2015-07-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: PhraseApp API client libary
14
14
  email: