tangerine 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -13,8 +13,9 @@ module Tangerine
13
13
  class API
14
14
 
15
15
  def self.authenticate!(credentials)
16
- @secret = credentials[:secret]
17
- HTTP.default_params :pcode => credentials[:provider_code]
16
+ creds = HashWithIndifferentAccess.new credentials
17
+ @secret = creds[:secret]
18
+ HTTP.default_params :pcode => creds[:provider_code]
18
19
  end
19
20
 
20
21
  def self.get(request_type, params={})
@@ -22,9 +22,10 @@ class Tangerine::Channel < Tangerine::Base
22
22
  Tangerine::Video.where(:embed_code => embed_codes)
23
23
  end
24
24
 
25
- def to_json(options = {})
25
+ def as_json(options = {})
26
26
  # TODO: Figure out why rails needs this to be called so badly
27
27
  vids = videos
28
+
28
29
  {:size => size,
29
30
  :title => title,
30
31
  :thumbnail => thumbnail,
@@ -35,6 +36,6 @@ class Tangerine::Channel < Tangerine::Base
35
36
  :status => status,
36
37
  :uploaded_at => uploaded_at,
37
38
  :videos => vids
38
- }.to_json
39
+ }
39
40
  end
40
41
  end
@@ -17,6 +17,10 @@ class Tangerine::ChannelSet < Tangerine::Base
17
17
  response.parsed_response['list']['item']
18
18
  end
19
19
 
20
+ def as_json(options = {})
21
+ {:channels => channels}
22
+ end
23
+
20
24
  def to_json(options = {})
21
25
  {:channels => channels}.to_json
22
26
  end
@@ -48,7 +48,7 @@ class Tangerine::Video < Tangerine::Base
48
48
  items.collect { |item| Tangerine::Video.new(item) }
49
49
  end
50
50
 
51
- def to_json(options = {})
51
+ def as_json(options = {})
52
52
  {:size => size,
53
53
  :title => title,
54
54
  :thumbnail => thumbnail,
@@ -65,7 +65,7 @@ class Tangerine::Video < Tangerine::Base
65
65
  :labels => labels,
66
66
  :metadata => metadata,
67
67
  :stat => stat
68
- }.to_json
68
+ }
69
69
  end
70
70
 
71
71
  protected
data/tangerine.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tangerine}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Anthony Navarre", "Craig Williams"]
12
- s.date = %q{2011-03-17}
12
+ s.date = %q{2011-03-23}
13
13
  s.description = %q{Ooyala Backlot API Wrapper. Read more about the Ooyala Backlot API at http://www.ooyala.com/support/docs/backlot_api}
14
14
  s.email = %q{anthony.navarre@factorylabs.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tangerine
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anthony Navarre
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-17 00:00:00 -06:00
19
+ date: 2011-03-23 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency