voicebase-client-ruby 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dff5518b93777f4361ef5ae09534b24f26b81fd
4
- data.tar.gz: a7b02a83c9ec5b4bca5da34213544f7049e45395
3
+ metadata.gz: 86c362743af328e42bd5d54126b0f9a1c7906c8f
4
+ data.tar.gz: b3f4fed60130df9d1d2124878823ce9f09667a95
5
5
  SHA512:
6
- metadata.gz: 722c6172937548128010286413d6a684a1ab6507812a6213091246fe2af74d45fb5fe8eaf9468d4865e1e3510365eea5049931b90a91de21f1635dc4faf58c6f
7
- data.tar.gz: 4472a71f64fd1bdd655c2396161da6b0afbfa0046cc6a03ad105a4ee99cbfe15ffd62fe67324d6f8b9ac88b0eab6cb3e6033c69de4c075d505221f0b11d72ed0
6
+ metadata.gz: a946d164eedb57448429c3aebb7123213a67744bc9c68d83ba41a615137a4b33b872012d62c6ef547ea6fca2822d114249b1ef5c5380afcf485192d02b755a81
7
+ data.tar.gz: 307d7479cfd7f02125c2a106da73ae51839f774ed6fc406283391df9e5b2287d29de8c16bb1d0aebbb8df7c1941d97db8c6ea7ff5400be928a0081c09b1a1f64
data/LICENSE CHANGED
@@ -1,17 +1,13 @@
1
- The MIT License (MIT)
2
- Copyright (c) 2016 User Testing, Inc.
1
+ Copyright 2016 User Testing, Inc.
3
2
 
4
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
5
- and associated documentation files (the "Software"), to deal in the Software without restriction,
6
- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
8
- subject to the following conditions:
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
9
6
 
10
- The above copyright notice and this permission notice shall be included in all copies or substantial
11
- portions of the Software.
7
+ http://www.apache.org/licenses/LICENSE-2.0
12
8
 
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
14
- LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
16
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
17
- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -26,7 +26,6 @@ module VoiceBase
26
26
  end
27
27
 
28
28
  def upload_media(args = {}, headers = {})
29
-
30
29
  media_url = require_media_file_or_url(args)
31
30
 
32
31
  form_args = {
@@ -60,7 +59,7 @@ module VoiceBase
60
59
  VoiceBase::Response.new(response, api_version)
61
60
  end
62
61
 
63
- # I presume this method exists for parity with the V1 API however it is not used by the Orders app
62
+ # I presume this method exists for parity with the V1 API however we are not using it
64
63
  def get_media(args = {}, headers = {})
65
64
  raise ArgumentError, "Missing argument :media_id" unless args[:media_id]
66
65
  url = if args[:media_id]
@@ -121,7 +120,7 @@ module VoiceBase
121
120
  end
122
121
  end
123
122
 
124
- # is this used?
123
+ # I presume this method exists for parity with the V1 API however we are not using it
125
124
  def get_media_progress(args = {}, headers = {})
126
125
  raise ArgumentError, "Missing argument :media_id" unless args[:media_id]
127
126
  VoiceBase::Response.new(self.class.get(
@@ -147,10 +146,16 @@ module VoiceBase
147
146
 
148
147
  private
149
148
 
149
+ def blank?(value)
150
+ value.nil? || value.empty?
151
+ end
152
+
150
153
  def default_headers(headers = {})
151
154
  authenticate! unless token
152
- headers = {'Authorization' => "Bearer #{token.token}",
153
- 'User-Agent' => user_agent}.reject {|k, v| v.blank?}.merge(headers)
155
+ headers = {
156
+ 'Authorization' => "Bearer #{token.token}",
157
+ 'User-Agent' => user_agent
158
+ }.reject { |k, v| blank?(v) }.merge(headers)
154
159
  puts "> headers\n> #{headers}" if debug
155
160
  headers
156
161
  end
@@ -1,5 +1,5 @@
1
1
  module VoiceBase
2
- VERSION = "1.0.14"
2
+ VERSION = "1.0.15"
3
3
 
4
4
  def self.version; VERSION; end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{Ruby client for VoiceBase API Version 1.x and 2.x.}
13
13
  spec.description = %q{Ruby client for VoiceBase API Version 1.x and 2.x that will make both API versions available at the same time.}
14
14
  spec.homepage = "https://github.com/usertesting/voicebase-client-ruby"
15
- spec.license = "MIT"
15
+ spec.license = "APACHE"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.bindir = "exe"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voicebase-client-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerry Hogsett
@@ -130,7 +130,7 @@ files:
130
130
  - voicebase-client-ruby.gemspec
131
131
  homepage: https://github.com/usertesting/voicebase-client-ruby
132
132
  licenses:
133
- - MIT
133
+ - APACHE
134
134
  metadata: {}
135
135
  post_install_message:
136
136
  rdoc_options: []