brightcove-api 1.0.5 → 1.0.6

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.
data/CHANELOG.markdown ADDED
@@ -0,0 +1,3 @@
1
+ # 1.0.6 (2011-02-16)
2
+
3
+ * `set_timeout` can be used to set an HTTP timeout in seconds.
data/README.md CHANGED
@@ -47,4 +47,4 @@ Note on Patches/Pull Requests
47
47
 
48
48
  Copyright
49
49
  =========
50
- Copyright (c) 2010 David Czarnecki. See LICENSE for details.
50
+ Copyright (c) 2010-2011 David Czarnecki. See LICENSE for details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{brightcove-api}
8
- s.version = "1.0.5"
8
+ s.version = "1.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Czarnecki"]
12
- s.date = %q{2011-01-14}
12
+ s.date = %q{2011-02-16}
13
13
  s.description = %q{Ruby gem for interacting with the Brightcove media API. http://docs.brightcove.com/en/media/}
14
14
  s.email = %q{dczarnecki@agoragames.com}
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  "README.md"
18
18
  ]
19
19
  s.files = [
20
+ "CHANELOG.markdown",
20
21
  "Gemfile",
21
22
  "LICENSE",
22
23
  "README.md",
@@ -6,7 +6,7 @@ module Brightcove
6
6
  class API
7
7
  include HTTParty
8
8
 
9
- VERSION = '1.0.4'.freeze
9
+ VERSION = '1.0.6'.freeze
10
10
 
11
11
  DEFAULT_HEADERS = {
12
12
  'User-Agent' => "brightcove-api gem #{VERSION}"
@@ -41,6 +41,10 @@ module Brightcove
41
41
  headers(http_headers)
42
42
  end
43
43
 
44
+ def set_timeout(timeout)
45
+ default_timeout(timeout)
46
+ end
47
+
44
48
  # Call Brightcove using a particular API method, api_method. The options hash is where you can add any parameters appropriate for the API call.
45
49
  def get(api_method, options = {})
46
50
  options.merge!({:command => api_method})
@@ -12,7 +12,7 @@ class TestBrightcoveApi < Test::Unit::TestCase
12
12
  end
13
13
 
14
14
  def test_api_version
15
- assert_equal '1.0.4', Brightcove::API::VERSION
15
+ assert_equal '1.0.6', Brightcove::API::VERSION
16
16
  end
17
17
 
18
18
  def test_can_set_read_api_url
@@ -48,6 +48,13 @@ class TestBrightcoveApi < Test::Unit::TestCase
48
48
  brightcove.set_http_headers({'Accept' => 'application/json'})
49
49
  end
50
50
 
51
+ def test_can_set_timeout
52
+ brightcove = Brightcove::API.new('apikeytoken')
53
+ brightcove.expects(:default_timeout).at_least_once
54
+
55
+ brightcove.set_timeout(5)
56
+ end
57
+
51
58
  def test_find_all_videos
52
59
  FakeWeb.register_uri(:get,
53
60
  'http://api.brightcove.com/services/library?page_size=5&token=0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.&command=find_all_videos',
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightcove-api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 5
10
- version: 1.0.5
8
+ - 6
9
+ version: 1.0.6
11
10
  platform: ruby
12
11
  authors:
13
12
  - David Czarnecki
@@ -15,103 +14,97 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-01-14 00:00:00 -05:00
17
+ date: 2011-02-16 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
21
+ name: httparty
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- hash: 5
28
27
  segments:
29
28
  - 0
30
29
  - 6
31
30
  - 1
32
31
  version: 0.6.1
33
32
  type: :runtime
34
- name: httparty
35
33
  prerelease: false
36
34
  version_requirements: *id001
37
35
  - !ruby/object:Gem::Dependency
36
+ name: json
38
37
  requirement: &id002 !ruby/object:Gem::Requirement
39
38
  none: false
40
39
  requirements:
41
40
  - - ~>
42
41
  - !ruby/object:Gem::Version
43
- hash: 11
44
42
  segments:
45
43
  - 1
46
44
  - 4
47
45
  - 6
48
46
  version: 1.4.6
49
47
  type: :runtime
50
- name: json
51
48
  prerelease: false
52
49
  version_requirements: *id002
53
50
  - !ruby/object:Gem::Dependency
51
+ name: rest-client
54
52
  requirement: &id003 !ruby/object:Gem::Requirement
55
53
  none: false
56
54
  requirements:
57
55
  - - ~>
58
56
  - !ruby/object:Gem::Version
59
- hash: 13
60
57
  segments:
61
58
  - 1
62
59
  - 6
63
60
  - 1
64
61
  version: 1.6.1
65
62
  type: :runtime
66
- name: rest-client
67
63
  prerelease: false
68
64
  version_requirements: *id003
69
65
  - !ruby/object:Gem::Dependency
66
+ name: bundler
70
67
  requirement: &id004 !ruby/object:Gem::Requirement
71
68
  none: false
72
69
  requirements:
73
70
  - - ~>
74
71
  - !ruby/object:Gem::Version
75
- hash: 23
76
72
  segments:
77
73
  - 1
78
74
  - 0
79
75
  - 0
80
76
  version: 1.0.0
81
77
  type: :development
82
- name: bundler
83
78
  prerelease: false
84
79
  version_requirements: *id004
85
80
  - !ruby/object:Gem::Dependency
81
+ name: jeweler
86
82
  requirement: &id005 !ruby/object:Gem::Requirement
87
83
  none: false
88
84
  requirements:
89
85
  - - ~>
90
86
  - !ruby/object:Gem::Version
91
- hash: 1
92
87
  segments:
93
88
  - 1
94
89
  - 5
95
90
  - 1
96
91
  version: 1.5.1
97
92
  type: :development
98
- name: jeweler
99
93
  prerelease: false
100
94
  version_requirements: *id005
101
95
  - !ruby/object:Gem::Dependency
96
+ name: rcov
102
97
  requirement: &id006 !ruby/object:Gem::Requirement
103
98
  none: false
104
99
  requirements:
105
100
  - - ~>
106
101
  - !ruby/object:Gem::Version
107
- hash: 41
108
102
  segments:
109
103
  - 0
110
104
  - 9
111
105
  - 9
112
106
  version: 0.9.9
113
107
  type: :development
114
- name: rcov
115
108
  prerelease: false
116
109
  version_requirements: *id006
117
110
  description: Ruby gem for interacting with the Brightcove media API. http://docs.brightcove.com/en/media/
@@ -124,6 +117,7 @@ extra_rdoc_files:
124
117
  - LICENSE
125
118
  - README.md
126
119
  files:
120
+ - CHANELOG.markdown
127
121
  - Gemfile
128
122
  - LICENSE
129
123
  - README.md
@@ -151,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
145
  requirements:
152
146
  - - ">="
153
147
  - !ruby/object:Gem::Version
154
- hash: 3
148
+ hash: 2943453376308896196
155
149
  segments:
156
150
  - 0
157
151
  version: "0"
@@ -160,7 +154,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
154
  requirements:
161
155
  - - ">="
162
156
  - !ruby/object:Gem::Version
163
- hash: 3
164
157
  segments:
165
158
  - 0
166
159
  version: "0"