encosion 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{encosion}
5
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Rob Cameron"]
9
- s.date = %q{2009-08-04}
12
+ s.date = %q{2009-11-30}
10
13
  s.email = %q{cannikinn@gmail.com}
11
14
  s.extra_rdoc_files = [
12
15
  "LICENSE",
@@ -35,7 +38,7 @@ Gem::Specification.new do |s|
35
38
  s.homepage = %q{http://github.com/cannikin/encosion}
36
39
  s.rdoc_options = ["--charset=UTF-8"]
37
40
  s.require_paths = ["lib"]
38
- s.rubygems_version = %q{1.3.4}
41
+ s.rubygems_version = %q{1.3.5}
39
42
  s.summary = %q{Ruby library for working with the Brightcove API}
40
43
  s.test_files = [
41
44
  "test/encosion_test.rb",
@@ -58,3 +61,4 @@ Gem::Specification.new do |s|
58
61
  s.add_dependency(%q<json>, [">= 1.1.7"])
59
62
  end
60
63
  end
64
+
@@ -1,6 +1,7 @@
1
1
  $:.unshift File.dirname(__FILE__) # for use/testing when no gem is installed
2
2
 
3
3
  # external
4
+ require 'rubygems'
4
5
  require 'net/http'
5
6
  require 'net/https'
6
7
  require 'uri'
@@ -17,7 +18,7 @@ require 'encosion/exceptions'
17
18
 
18
19
  module Encosion
19
20
 
20
- VERSION = '0.3.0'
21
+ VERSION = '0.3.1'
21
22
  LOGGER = Logger.new(STDOUT)
22
23
 
23
24
  SERVER = 'api.brightcove.com'
@@ -33,7 +34,9 @@ module Encosion
33
34
  :port => PORT,
34
35
  :secure => SECURE,
35
36
  :read_path => READ_PATH,
36
- :write_path => WRITE_PATH }
37
+ :write_path => WRITE_PATH,
38
+ :send_timeout => 120,
39
+ :receive_timeout => 60 }
37
40
  attr_accessor :options
38
41
 
39
42
  # make @options available so it can be set externally when using the library
@@ -53,8 +53,9 @@ module Encosion
53
53
 
54
54
 
55
55
  # Performs an HTTP GET
56
- def get(server,port,secure,path,command,options)
56
+ def get(server,port,secure,path,timeout,command,options)
57
57
  http = HTTPClient.new
58
+ http.receive_timeout = timeout
58
59
  url = secure ? 'https://' : 'http://'
59
60
  url += "#{server}:#{port}#{path}"
60
61
 
@@ -75,8 +76,9 @@ module Encosion
75
76
 
76
77
 
77
78
  # Performs an HTTP POST
78
- def post(server,port,secure,path,command,options,instance)
79
+ def post(server,port,secure,path,timeout,command,options,instance)
79
80
  http = HTTPClient.new
81
+ http.send_timeout = timeout
80
82
  url = secure ? 'https://' : 'http://'
81
83
  url += "#{server}:#{port}#{path}"
82
84
 
@@ -138,6 +138,7 @@ module Encosion
138
138
  Encosion.options[:port],
139
139
  Encosion.options[:secure],
140
140
  Encosion.options[:read_path],
141
+ Encosion.options[:read_timeout],
141
142
  method,
142
143
  options)
143
144
  end
@@ -151,6 +152,7 @@ module Encosion
151
152
  Encosion.options[:port],
152
153
  Encosion.options[:secure],
153
154
  Encosion.options[:write_path],
155
+ Encosion.options[:send_timeout],
154
156
  method,
155
157
  options,
156
158
  self)
@@ -246,6 +248,7 @@ module Encosion
246
248
  Encosion.options[:port],
247
249
  Encosion.options[:secure],
248
250
  Encosion.options[:write_path],
251
+ Encosion.options[:send_timeout],
249
252
  'create_video',
250
253
  options,
251
254
  self)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encosion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Cameron
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-04 00:00:00 -07:00
12
+ date: 2009-11-30 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency