tangerine 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
  gem "httparty", "0.7.4"
4
4
  gem "activesupport", "3.0.5"
5
+ gem "i18n", "0.5.0"
5
6
 
6
7
  # Add dependencies to develop your gem here.
7
8
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -9,6 +9,7 @@ GEM
9
9
  git (1.2.5)
10
10
  httparty (0.7.4)
11
11
  crack (= 0.1.8)
12
+ i18n (0.5.0)
12
13
  jeweler (1.5.2)
13
14
  bundler (~> 1.0.0)
14
15
  git (>= 1.2.5)
@@ -41,6 +42,7 @@ DEPENDENCIES
41
42
  bundler (~> 1.0.0)
42
43
  fakeweb (= 1.3.0)
43
44
  httparty (= 0.7.4)
45
+ i18n (= 0.5.0)
44
46
  jeweler (~> 1.5.2)
45
47
  rcov
46
48
  rspec (~> 2.3.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
data/lib/tangerine.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'active_support/inflector'
2
2
  require 'tangerine/backlot'
3
+ require 'tangerine/backlot/base'
4
+ require 'tangerine/backlot/channel'
3
5
  require 'tangerine/backlot/channel_set'
4
- require 'tangerine/backlot/query'
5
6
  require 'tangerine/backlot/video'
@@ -4,6 +4,7 @@ require 'digest/sha2'
4
4
 
5
5
  module Tangerine
6
6
  module Backlot
7
+
7
8
  class HTTP
8
9
  include HTTParty
9
10
  base_uri 'http://api.ooyala.com/partner'
@@ -17,17 +18,22 @@ module Tangerine
17
18
  end
18
19
 
19
20
  def self.get(request_type, params={})
20
- HTTP.default_params :signature => self.signature(params)
21
- HTTP.default_params :pcode => @provider_code
21
+ set_params(params)
22
22
  HTTP.get(request_type)
23
23
  end
24
24
 
25
- # TODO: Refactor this method since it's doing double-duty ... not sure why Ooyala API doesn't like
26
- # it if we assign some values to params instead of default params
27
- def self.signature(params)
25
+ def self.set_params(params)
26
+ HTTP.default_params.clear
27
+
28
28
  params['expires'] ||= (Time.now.to_i + 10).to_s
29
+ HTTP.default_params params
30
+
31
+ HTTP.default_params :pcode => @provider_code
32
+ HTTP.default_params :signature => self.signature(params)
33
+ end
34
+
35
+ def self.signature(params)
29
36
  string_to_sign = params.keys.sort.inject(@secret) do |memo, key|
30
- HTTP.default_params key => params[key]
31
37
  memo += "#{key}=#{params[key]}"
32
38
  end
33
39
  digest = Digest::SHA256.digest(string_to_sign)
@@ -37,5 +43,9 @@ module Tangerine
37
43
  end
38
44
 
39
45
  end
46
+
47
+ def self.query(options)
48
+ Tangerine::Backlot::API.get('/query', options)
49
+ end
40
50
  end
41
51
 
@@ -0,0 +1,27 @@
1
+ class Tangerine::Base
2
+
3
+ def initialize(options)
4
+ options.delete('content_type')
5
+ options.each do |k,v|
6
+ # TODO: Look into using Crack gem for reliably undercoring these
7
+ attr = k.to_s.underscore
8
+ self.send("#{attr}=", v)
9
+ end
10
+ end
11
+
12
+ def self.prepare_items(items)
13
+ # Yes, we are fully aware that type-checking sucks. Move along now, nothing to see here.
14
+ items.is_a?(Array) ? items : [items]
15
+ end
16
+
17
+ def self.finder(&block)
18
+ @finder = block
19
+ end
20
+
21
+ def self.find(embed_code)
22
+ results = @finder.call
23
+ results = self.prepare_items(results)
24
+ found_item = results.select { |item| item['embedCode'] == embed_code }.first
25
+ end
26
+
27
+ end
@@ -0,0 +1,14 @@
1
+ class Tangerine::Channel < Tangerine::Base
2
+
3
+ attr_accessor :size,
4
+ :title,
5
+ :content_type,
6
+ :thumbnail,
7
+ :updated_at,
8
+ :embed_code,
9
+ :description,
10
+ :length,
11
+ :status,
12
+ :uploaded_at
13
+
14
+ end
@@ -1,4 +1,4 @@
1
- class Tangerine::ChannelSet
1
+ class Tangerine::ChannelSet < Tangerine::Base
2
2
 
3
3
  attr_accessor :embed_code,
4
4
  :title,
@@ -12,19 +12,22 @@ class Tangerine::ChannelSet
12
12
  :height,
13
13
  :stat
14
14
 
15
- def initialize(options)
16
- options.delete('content_type')
17
- options.each do |k,v|
18
- # TODO: Look into using Crack gem for reliably undercoring these
19
- attr = k.to_s.underscore
20
- self.send("#{attr}=", v)
21
- # TODO: move into Base class
22
- end
15
+ finder do
16
+ response = Tangerine.query('contentType' => 'MultiChannel')
17
+ response.parsed_response['list']['item']
23
18
  end
24
19
 
25
20
  def self.find(embed_code)
26
- result = Tangerine::Query.new('contentType' => 'MultiChannel')
27
- meh = result.response.parsed_response['list']['item'].first
28
- Tangerine::ChannelSet.new(meh)
21
+ found = super(embed_code)
22
+ Tangerine::ChannelSet.new(found)
29
23
  end
24
+
25
+ def channels
26
+ result = Tangerine::Backlot::API.get('/channel_sets', 'mode' => 'list', 'channelSetEmbedCode' => embed_code)
27
+ items = result.parsed_response['channelSet']['channel']
28
+ items = Tangerine::Base.prepare_items(items)
29
+ items.collect {|item| Tangerine::Channel.new(item) }
30
+ end
31
+
30
32
  end
33
+
@@ -1,6 +1,6 @@
1
1
  class Tangerine::Video
2
2
  def self.all
3
- Tangerine::Query.new('contentType' => 'Video').response
3
+ Tangerine.query('contentType' => 'Video')
4
4
  end
5
5
  end
6
6
 
@@ -0,0 +1,53 @@
1
+ module TangerineGirl
2
+
3
+ @@definitions = {}
4
+
5
+ def self.create(template_name, overrides={})
6
+ @@definitions[template_name].create(overrides)
7
+ end
8
+
9
+ def self.define(template_name)
10
+ template = TangerineGirl::Template.new(template_name)
11
+ yield template
12
+ @@definitions[template_name] = template
13
+ end
14
+
15
+ class Template
16
+
17
+ def initialize(name)
18
+ @name = name
19
+ @defaults = {}
20
+ end
21
+
22
+ def create(overrides)
23
+ options = @defaults.dup.merge(overrides)
24
+ subject = "Tangerine::#{@name.to_s.classify}".constantize
25
+ subject.new(options)
26
+ end
27
+
28
+ def method_missing(method, *args, &block)
29
+ if method.to_s =~ /=$/
30
+ attr_name = method.to_s.gsub(/=$/, '').to_sym
31
+ @defaults[attr_name] = *args
32
+ else
33
+ super(method, *args, &block)
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+
40
+ TangerineGirl.define(:channel_set) do |cs|
41
+ cs.embed_code = "BLABLABLALBLABLABLBAHHH!!!!"
42
+ cs.title = "an ode to channelsets"
43
+ # cs.description = nil
44
+ # cs.flight_start_time = "1294087113"
45
+ # cs.height = "3"
46
+ # cs.size = nil
47
+ # cs.stat = nil
48
+ # cs.status = "live"
49
+ # cs.updated_at = "1294087113"
50
+ # cs.uploaded_at = "1294087113"
51
+ # cs.width = "4"
52
+ end
53
+
@@ -0,0 +1,47 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.ooyala.com:80/partner/channel_sets?channelSetEmbedCode=85aTdiMjoYR5K26Fp8TMgGtGQUCEC2Y1&pcode=lsNTrbQBqCQbH-VA6ALCshAHLWrV&signature=awYsnC3RpS4PN%2BXZGuFZTizUi5VAXTsAngkuuFwyoSg&expires=1325437210&mode=list
6
+ body:
7
+ headers:
8
+ response: !ruby/struct:VCR::Response
9
+ status: !ruby/struct:VCR::ResponseStatus
10
+ code: 200
11
+ message: OK
12
+ headers:
13
+ last-modified:
14
+ - Thu, 10 Mar 2011 21:02:45 GMT
15
+ content-type:
16
+ - application/xml; charset=utf-8
17
+ date:
18
+ - Thu, 10 Mar 2011 21:02:45 GMT
19
+ content-length:
20
+ - "659"
21
+ set-cookie:
22
+ - ooyala-web-rails-session=BAh7CDoPdXBkYXRlZF9hdEl1OglUaW1lDVXJG4DkXtQKBjofQG1hcnNoYWxfd2l0aF91dGNfY29lcmNpb25UOg9zZXNzaW9uX2lkIiVlMjM0ZjgwNjRiMGM2NWNjNzk5ZjVkNGNjNjE1OGVmNToSY3JlYXRpb25fdGltZUAG--1930e6d8333b31d5ee4bb86dc935478d6db5b4bd; path=/; HttpOnly
23
+ vary:
24
+ - Accept-Encoding,User-Agent
25
+ cache-control:
26
+ - private, max-age=0
27
+ body: |
28
+ <?xml version="1.0" encoding="UTF-8"?>
29
+ <channelSet>
30
+ <embedCode>85aTdiMjoYR5K26Fp8TMgGtGQUCEC2Y1</embedCode>
31
+ <title>Brand Site Video Gallery</title>
32
+ <status>live</status>
33
+ <channel>
34
+ <embedCode>9haTdiMjoVHPey7H15JCroS9tJ25Xzw2</embedCode>
35
+ <title><%= title %></title>
36
+ <description></description>
37
+ <status>live</status>
38
+ <content_type>Channel</content_type>
39
+ <uploadedAt>1299603290</uploadedAt>
40
+ <length>258007</length>
41
+ <thumbnail>http://cdn.videos.thenorthface.com/I3MHB2MTqP5zvA8dYvzbvGlPJdg7DxRK/M_-lZjo5g2zgfr_H5hMDoxOjA0O88asB</thumbnail>
42
+ <size>0</size>
43
+ <updatedAt>1299603448</updatedAt>
44
+ </channel>
45
+ </channelSet>
46
+
47
+ http_version: "1.1"
@@ -28,8 +28,8 @@
28
28
  <?xml version="1.0" encoding="UTF-8"?>
29
29
  <list totalResults="5" size="5" pageID="0" statistics-as-of_text="Wed Mar 09 21:40:01 UTC 2011" limit="500" statistics-as-of="1299706801">
30
30
  <item>
31
- <embedCode><%= mock_channel_set.embed_code %></embedCode>
32
- <title><%= mock_channel_set.title %></title>
31
+ <embedCode>x5b214MTomu6ISJSgohKKZbNuR9bdUJ8</embedCode>
32
+ <title>Pitchfork Live</title>
33
33
  <description></description>
34
34
  <status>live</status>
35
35
  <content_type>MultiChannel</content_type>
@@ -43,8 +43,8 @@
43
43
  </stat>
44
44
  </item>
45
45
  <item>
46
- <embedCode>x5b214MTomu6ISJSgohKKZbNuR9bdUJ8</embedCode>
47
- <title>Pitchfork Live</title>
46
+ <embedCode><%= mock_channel_set.embed_code %></embedCode>
47
+ <title><%= mock_channel_set.title %></title>
48
48
  <description></description>
49
49
  <status>live</status>
50
50
  <content_type>MultiChannel</content_type>
@@ -11,17 +11,32 @@ describe Tangerine::Backlot do
11
11
  describe Tangerine::Backlot::API do
12
12
  context 'class methods' do
13
13
  subject { Tangerine::Backlot::API }
14
- let(:params) { {'some_key' => 'some_value'} }
15
14
 
16
- # it { puts subject.get('/query', 'contentType' => 'MultiChannel').inspect }
17
15
  describe '.get' do
16
+
18
17
  let(:response) { mock }
19
18
  let(:request) { '/some-request-path' }
20
- before { Tangerine::Backlot::HTTP.should_receive(:get).with(request).and_return(response) }
21
19
 
22
20
  it 'returns the HTTP response' do
23
- subject.get(request, params).should == response
21
+ Tangerine::Backlot::HTTP.should_receive(:get).with(request).and_return(response)
22
+ subject.get(request).should == response
23
+ end
24
+
25
+ context 'when making subsequent requests' do
26
+
27
+ let(:original_params) { { 'contentType' => 'Channel' } }
28
+ before do
29
+ Tangerine::Backlot::HTTP.stub(:get)
30
+ Tangerine::Backlot::API.get('/query', original_params)
31
+ end
32
+ subject { Tangerine::Backlot::HTTP }
33
+
34
+ it 'clears parameters before the new request' do
35
+ Tangerine::Backlot::API.get('/channel_sets', 'mode' => 'list')
36
+ subject.default_params.keys.should_not include('contentType')
37
+ end
24
38
  end
39
+
25
40
  end
26
41
 
27
42
  end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Tangerine::Base do
4
+
5
+ context
6
+
7
+ end
@@ -3,41 +3,51 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
3
3
  describe Tangerine::ChannelSet do
4
4
  authenticate!
5
5
 
6
+ let(:embed_code) { 'My Awesome Embed Code' }
7
+ let(:title) { 'My Awesome Title' }
8
+ let(:mock_channel_set) { double(:embed_code => embed_code, :title => title) }
9
+ let(:vcr_erb) { {:mock_channel_set => mock_channel_set} }
10
+ let(:channel_set) do
11
+ TangerineGirl.create(:channel_set, :embed_code => embed_code, :title => title)
12
+ end
13
+
6
14
  context 'retreiving a specific channelset' do
7
15
 
8
16
  describe '.find' do
9
17
 
10
- let(:title) { 'My Awesome Title' }
11
- let(:embed_code) { 'My Awesome Embed Code' }
12
- let(:mock_channel_set) { double(:embed_code => embed_code, :title => title) }
13
- let(:vcr_erb) { {:mock_channel_set => mock_channel_set} }
14
-
15
- # TODO: find a better way to build these up ala FactoryGirl sans ActiveRecord
16
- let(:channel_set) do
17
- Tangerine::ChannelSet.new(
18
- :embed_code => embed_code,
19
- :title => title,
20
- :description => nil,
21
- :flight_start_time => "1294087113",
22
- :height => "3",
23
- :size => nil,
24
- :stat => nil,
25
- :status => "live",
26
- :title => "My Awesome Title",
27
- :updated_at => "1294087113",
28
- :uploaded_at => "1294087113",
29
- :width => "4"
30
- )
31
- end
32
-
33
18
  subject { Tangerine::ChannelSet.find(embed_code) }
34
19
  before do
35
20
  pause_vcr "Tangerine::Query.new('contentType' => 'MultiChannel')", vcr_erb
36
21
  end
22
+
23
+ after { play_vcr }
24
+ # it { should be_functionally_equivalent_to(channel_set) }
25
+ its(:embed_code) { should == embed_code }
26
+ its(:title) { should == title }
27
+
28
+ end
29
+ end
30
+
31
+ context 'retreiving its channels' do
32
+ describe '#channels' do
33
+
34
+ let(:embed_code) { '85aTdiMjoYR5K26Fp8TMgGtGQUCEC2Y1' }
35
+ let(:title) { 'Snowboarding' }
36
+ let(:vcr_erb) { {:title => title} }
37
+
38
+ before do
39
+ Tangerine::ChannelSet.stub(:find).with(embed_code).and_return(channel_set)
40
+ pause_vcr "Tangerine::Backlot::API.get('channel_sets', 'list')", vcr_erb
41
+ end
37
42
  after { play_vcr }
38
- it { should be_functionally_equivalent_to(channel_set) }
43
+ subject { Tangerine::ChannelSet.find(embed_code) }
44
+
45
+ it 'returns a list of channels belonging to the channelset' do
46
+ subject.channels.first.title.should == title
47
+ end
39
48
 
40
49
  end
41
50
  end
51
+
42
52
  end
43
53
 
@@ -9,10 +9,9 @@ describe Tangerine::Video do
9
9
  describe '.all' do
10
10
 
11
11
  let(:mock_response) { mock }
12
- let(:query_double) { double(:response => mock_response) }
13
12
  let(:params) { {'contentType' => 'Video'} }
14
13
  subject { Tangerine::Video.all }
15
- before { Tangerine::Query.should_receive(:new).with(params).and_return(query_double) }
14
+ before { Tangerine.should_receive(:query).with(params).and_return(mock_response) }
16
15
 
17
16
  it 'returns the response of the query' do
18
17
  subject.should == mock_response
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.3.1"
8
+ s.version = "0.4.0"
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"]
12
- s.date = %q{2011-03-09}
12
+ s.date = %q{2011-03-10}
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 = [
@@ -30,16 +30,20 @@ Gem::Specification.new do |s|
30
30
  "VERSION",
31
31
  "lib/tangerine.rb",
32
32
  "lib/tangerine/backlot.rb",
33
+ "lib/tangerine/backlot/base.rb",
34
+ "lib/tangerine/backlot/channel.rb",
33
35
  "lib/tangerine/backlot/channel_set.rb",
34
- "lib/tangerine/backlot/query.rb",
35
36
  "lib/tangerine/backlot/video.rb",
36
37
  "spec/spec_helper.rb",
37
38
  "spec/support/authentication.rb",
38
39
  "spec/support/functionally_equivalent.rb",
40
+ "spec/support/tangerine_girl.rb",
41
+ "spec/support/vcr_cassettes/Tangerine_Backlot_API_get_channel_sets_list_.yml",
39
42
  "spec/support/vcr_cassettes/Tangerine_Query_new_contentType_MultiChannel_.yml",
40
43
  "spec/support/vcr_cassettes/Tangerine_Video_all.yml",
41
44
  "spec/support/vcr_support.rb",
42
45
  "spec/tangerine/backlot_spec.rb",
46
+ "spec/tangerine/base_spec.rb",
43
47
  "spec/tangerine/channel_set_spec.rb",
44
48
  "spec/tangerine/video_spec.rb",
45
49
  "tangerine.gemspec"
@@ -53,8 +57,10 @@ Gem::Specification.new do |s|
53
57
  "spec/spec_helper.rb",
54
58
  "spec/support/authentication.rb",
55
59
  "spec/support/functionally_equivalent.rb",
60
+ "spec/support/tangerine_girl.rb",
56
61
  "spec/support/vcr_support.rb",
57
62
  "spec/tangerine/backlot_spec.rb",
63
+ "spec/tangerine/base_spec.rb",
58
64
  "spec/tangerine/channel_set_spec.rb",
59
65
  "spec/tangerine/video_spec.rb"
60
66
  ]
@@ -65,6 +71,7 @@ Gem::Specification.new do |s|
65
71
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
66
72
  s.add_runtime_dependency(%q<httparty>, ["= 0.7.4"])
67
73
  s.add_runtime_dependency(%q<activesupport>, ["= 3.0.5"])
74
+ s.add_runtime_dependency(%q<i18n>, ["= 0.5.0"])
68
75
  s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
69
76
  s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
70
77
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -78,6 +85,7 @@ Gem::Specification.new do |s|
78
85
  else
79
86
  s.add_dependency(%q<httparty>, ["= 0.7.4"])
80
87
  s.add_dependency(%q<activesupport>, ["= 3.0.5"])
88
+ s.add_dependency(%q<i18n>, ["= 0.5.0"])
81
89
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
82
90
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
83
91
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -92,6 +100,7 @@ Gem::Specification.new do |s|
92
100
  else
93
101
  s.add_dependency(%q<httparty>, ["= 0.7.4"])
94
102
  s.add_dependency(%q<activesupport>, ["= 3.0.5"])
103
+ s.add_dependency(%q<i18n>, ["= 0.5.0"])
95
104
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
96
105
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
97
106
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
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: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anthony Navarre
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-09 00:00:00 -07:00
18
+ date: 2011-03-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -52,6 +52,22 @@ dependencies:
52
52
  type: :runtime
53
53
  - !ruby/object:Gem::Dependency
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - "="
58
+ - !ruby/object:Gem::Version
59
+ hash: 11
60
+ segments:
61
+ - 0
62
+ - 5
63
+ - 0
64
+ version: 0.5.0
65
+ version_requirements: *id003
66
+ name: i18n
67
+ prerelease: false
68
+ type: :runtime
69
+ - !ruby/object:Gem::Dependency
70
+ requirement: &id004 !ruby/object:Gem::Requirement
55
71
  none: false
56
72
  requirements:
57
73
  - - ~>
@@ -62,12 +78,12 @@ dependencies:
62
78
  - 3
63
79
  - 0
64
80
  version: 2.3.0
65
- version_requirements: *id003
81
+ version_requirements: *id004
66
82
  name: rspec
67
83
  prerelease: false
68
84
  type: :development
69
85
  - !ruby/object:Gem::Dependency
70
- requirement: &id004 !ruby/object:Gem::Requirement
86
+ requirement: &id005 !ruby/object:Gem::Requirement
71
87
  none: false
72
88
  requirements:
73
89
  - - ~>
@@ -78,12 +94,12 @@ dependencies:
78
94
  - 6
79
95
  - 0
80
96
  version: 0.6.0
81
- version_requirements: *id004
97
+ version_requirements: *id005
82
98
  name: yard
83
99
  prerelease: false
84
100
  type: :development
85
101
  - !ruby/object:Gem::Dependency
86
- requirement: &id005 !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
87
103
  none: false
88
104
  requirements:
89
105
  - - ~>
@@ -94,12 +110,12 @@ dependencies:
94
110
  - 0
95
111
  - 0
96
112
  version: 1.0.0
97
- version_requirements: *id005
113
+ version_requirements: *id006
98
114
  name: bundler
99
115
  prerelease: false
100
116
  type: :development
101
117
  - !ruby/object:Gem::Dependency
102
- requirement: &id006 !ruby/object:Gem::Requirement
118
+ requirement: &id007 !ruby/object:Gem::Requirement
103
119
  none: false
104
120
  requirements:
105
121
  - - ~>
@@ -110,12 +126,12 @@ dependencies:
110
126
  - 5
111
127
  - 2
112
128
  version: 1.5.2
113
- version_requirements: *id006
129
+ version_requirements: *id007
114
130
  name: jeweler
115
131
  prerelease: false
116
132
  type: :development
117
133
  - !ruby/object:Gem::Dependency
118
- requirement: &id007 !ruby/object:Gem::Requirement
134
+ requirement: &id008 !ruby/object:Gem::Requirement
119
135
  none: false
120
136
  requirements:
121
137
  - - ">="
@@ -124,12 +140,12 @@ dependencies:
124
140
  segments:
125
141
  - 0
126
142
  version: "0"
127
- version_requirements: *id007
143
+ version_requirements: *id008
128
144
  name: rcov
129
145
  prerelease: false
130
146
  type: :development
131
147
  - !ruby/object:Gem::Dependency
132
- requirement: &id008 !ruby/object:Gem::Requirement
148
+ requirement: &id009 !ruby/object:Gem::Requirement
133
149
  none: false
134
150
  requirements:
135
151
  - - "="
@@ -140,12 +156,12 @@ dependencies:
140
156
  - 7
141
157
  - 0
142
158
  version: 1.7.0
143
- version_requirements: *id008
159
+ version_requirements: *id009
144
160
  name: vcr
145
161
  prerelease: false
146
162
  type: :development
147
163
  - !ruby/object:Gem::Dependency
148
- requirement: &id009 !ruby/object:Gem::Requirement
164
+ requirement: &id010 !ruby/object:Gem::Requirement
149
165
  none: false
150
166
  requirements:
151
167
  - - "="
@@ -156,12 +172,12 @@ dependencies:
156
172
  - 3
157
173
  - 0
158
174
  version: 1.3.0
159
- version_requirements: *id009
175
+ version_requirements: *id010
160
176
  name: fakeweb
161
177
  prerelease: false
162
178
  type: :development
163
179
  - !ruby/object:Gem::Dependency
164
- requirement: &id010 !ruby/object:Gem::Requirement
180
+ requirement: &id011 !ruby/object:Gem::Requirement
165
181
  none: false
166
182
  requirements:
167
183
  - - "="
@@ -172,12 +188,12 @@ dependencies:
172
188
  - 3
173
189
  - 5
174
190
  version: 0.3.5
175
- version_requirements: *id010
191
+ version_requirements: *id011
176
192
  name: timecop
177
193
  prerelease: false
178
194
  type: :development
179
195
  - !ruby/object:Gem::Dependency
180
- requirement: &id011 !ruby/object:Gem::Requirement
196
+ requirement: &id012 !ruby/object:Gem::Requirement
181
197
  none: false
182
198
  requirements:
183
199
  - - "="
@@ -188,12 +204,12 @@ dependencies:
188
204
  - 10
189
205
  - 4
190
206
  version: 0.10.4
191
- version_requirements: *id011
207
+ version_requirements: *id012
192
208
  name: ruby-debug
193
209
  prerelease: false
194
210
  type: :development
195
211
  - !ruby/object:Gem::Dependency
196
- requirement: &id012 !ruby/object:Gem::Requirement
212
+ requirement: &id013 !ruby/object:Gem::Requirement
197
213
  none: false
198
214
  requirements:
199
215
  - - ">="
@@ -202,7 +218,7 @@ dependencies:
202
218
  segments:
203
219
  - 0
204
220
  version: "0"
205
- version_requirements: *id012
221
+ version_requirements: *id013
206
222
  name: httparty
207
223
  prerelease: false
208
224
  type: :runtime
@@ -229,16 +245,20 @@ files:
229
245
  - VERSION
230
246
  - lib/tangerine.rb
231
247
  - lib/tangerine/backlot.rb
248
+ - lib/tangerine/backlot/base.rb
249
+ - lib/tangerine/backlot/channel.rb
232
250
  - lib/tangerine/backlot/channel_set.rb
233
- - lib/tangerine/backlot/query.rb
234
251
  - lib/tangerine/backlot/video.rb
235
252
  - spec/spec_helper.rb
236
253
  - spec/support/authentication.rb
237
254
  - spec/support/functionally_equivalent.rb
255
+ - spec/support/tangerine_girl.rb
256
+ - spec/support/vcr_cassettes/Tangerine_Backlot_API_get_channel_sets_list_.yml
238
257
  - spec/support/vcr_cassettes/Tangerine_Query_new_contentType_MultiChannel_.yml
239
258
  - spec/support/vcr_cassettes/Tangerine_Video_all.yml
240
259
  - spec/support/vcr_support.rb
241
260
  - spec/tangerine/backlot_spec.rb
261
+ - spec/tangerine/base_spec.rb
242
262
  - spec/tangerine/channel_set_spec.rb
243
263
  - spec/tangerine/video_spec.rb
244
264
  - tangerine.gemspec
@@ -280,7 +300,9 @@ test_files:
280
300
  - spec/spec_helper.rb
281
301
  - spec/support/authentication.rb
282
302
  - spec/support/functionally_equivalent.rb
303
+ - spec/support/tangerine_girl.rb
283
304
  - spec/support/vcr_support.rb
284
305
  - spec/tangerine/backlot_spec.rb
306
+ - spec/tangerine/base_spec.rb
285
307
  - spec/tangerine/channel_set_spec.rb
286
308
  - spec/tangerine/video_spec.rb
@@ -1,9 +0,0 @@
1
- class Tangerine::Query
2
- attr_reader :response
3
-
4
- def initialize(options)
5
- @response = Tangerine::Backlot::API.get('/query', options)
6
- end
7
-
8
- end
9
-