voicebase-client-ruby 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +10 -14
- data/lib/voicebase/v2/client.rb +10 -5
- data/lib/voicebase/version.rb +1 -1
- data/voicebase-client-ruby.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c362743af328e42bd5d54126b0f9a1c7906c8f
|
4
|
+
data.tar.gz: b3f4fed60130df9d1d2124878823ce9f09667a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a946d164eedb57448429c3aebb7123213a67744bc9c68d83ba41a615137a4b33b872012d62c6ef547ea6fca2822d114249b1ef5c5380afcf485192d02b755a81
|
7
|
+
data.tar.gz: 307d7479cfd7f02125c2a106da73ae51839f774ed6fc406283391df9e5b2287d29de8c16bb1d0aebbb8df7c1941d97db8c6ea7ff5400be928a0081c09b1a1f64
|
data/LICENSE
CHANGED
@@ -1,17 +1,13 @@
|
|
1
|
-
|
2
|
-
Copyright (c) 2016 User Testing, Inc.
|
1
|
+
Copyright 2016 User Testing, Inc.
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
11
|
-
portions of the Software.
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
8
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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.
|
data/lib/voicebase/v2/client.rb
CHANGED
@@ -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
|
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
|
-
#
|
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 = {
|
153
|
-
|
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
|
data/lib/voicebase/version.rb
CHANGED
@@ -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 = "
|
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.
|
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
|
-
-
|
133
|
+
- APACHE
|
134
134
|
metadata: {}
|
135
135
|
post_install_message:
|
136
136
|
rdoc_options: []
|