velir_kaltura-ruby 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/README.rdoc +1 -1
- data/VERSION.yml +2 -2
- data/lib/kaltura/kaltura_client_base.rb +20 -1
- data/velir_kaltura-ruby.gemspec +2 -2
- metadata +4 -4
data/README.markdown
CHANGED
@@ -5,7 +5,7 @@ A gem implementation of Kaltura's Ruby API client. The kaltura-ruby library suf
|
|
5
5
|
|
6
6
|
[Kaltura.org project page](http://www.kaltura.org/project/kcl_ruby)
|
7
7
|
|
8
|
-
[Gem Documentation](http://rdoc.info/Velir/kaltura-ruby)
|
8
|
+
[Gem Documentation](http://rdoc.info/projects/Velir/kaltura-ruby)
|
9
9
|
|
10
10
|
Installation
|
11
11
|
-------------
|
data/README.rdoc
CHANGED
@@ -5,7 +5,7 @@ A gem implementation of Kaltura's Ruby API client. The kaltura-ruby library suf
|
|
5
5
|
|
6
6
|
Project Page - http://www.kaltura.org/project/kcl_ruby
|
7
7
|
|
8
|
-
Gem Documentation - http://rdoc.info/Velir/kaltura-ruby
|
8
|
+
Gem Documentation - http://rdoc.info/projects/Velir/kaltura-ruby
|
9
9
|
|
10
10
|
= Installation
|
11
11
|
|
data/VERSION.yml
CHANGED
@@ -247,7 +247,7 @@ module Kaltura
|
|
247
247
|
object_type_element = xml_element.get_text('objectType')
|
248
248
|
if (object_type_element != nil)
|
249
249
|
object_class = xml_element.get_text('objectType').value
|
250
|
-
instance =
|
250
|
+
instance = KalturaClassFactory.set_instance(object_class)
|
251
251
|
xml_element.elements.each do | element |
|
252
252
|
value = KalturaClassFactory.object_from_xml(element)
|
253
253
|
instance.send(self.underscore(element.name) + "=", value);
|
@@ -264,6 +264,25 @@ module Kaltura
|
|
264
264
|
def self.underscore(val)
|
265
265
|
val.gsub(/(.)([A-Z])/,'\1_\2').downcase
|
266
266
|
end
|
267
|
+
|
268
|
+
def self.set_instance(object_request_class)
|
269
|
+
string_object_class = object_request_class.to_s
|
270
|
+
instance = nil
|
271
|
+
unless KalturaClassFactory.request_is_response?(string_object_class)
|
272
|
+
stripped_request = KalturaClassFactory.strip_kaltura_from_request(string_object_class)
|
273
|
+
instance = Module.const_get("Response").const_get(stripped_request).new
|
274
|
+
else
|
275
|
+
instance = Object.const_get(object_request_class).new
|
276
|
+
end
|
277
|
+
instance
|
278
|
+
end
|
279
|
+
|
280
|
+
def self.strip_kaltura_from_request(request)
|
281
|
+
request.gsub("Kaltura","")
|
282
|
+
end
|
283
|
+
def self.request_is_response?(request)
|
284
|
+
request == request.split("Response",0).to_s
|
285
|
+
end
|
267
286
|
end
|
268
287
|
|
269
288
|
class KalturaAPIError < RuntimeError
|
data/velir_kaltura-ruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{velir_kaltura-ruby}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Patrick Robertson"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-20}
|
13
13
|
s.email = %q{patrick.robertson@velir.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: velir_kaltura-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Patrick Robertson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-20 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|