360_services 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/360_services.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{360_services}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sorenson Media"]
9
- s.date = %q{2010-02-23}
9
+ s.date = %q{2010-02-24}
10
10
  s.description = %q{Ruby bindings for Sorenson 360}
11
11
  s.email = %q{video@sorensonmedia.com}
12
12
  s.extra_rdoc_files = ["README.rdoc", "lib/sorenson/services.rb", "lib/sorenson/services/account.rb", "lib/sorenson/services/array.rb", "lib/sorenson/services/asset.rb", "lib/sorenson/services/base.rb", "lib/sorenson/services/category.rb", "lib/sorenson/services/core_ext.rb", "lib/sorenson/services/core_ext/attribute_accessors.rb", "lib/sorenson/services/core_ext/hash.rb", "lib/sorenson/services/core_ext/object.rb", "lib/sorenson/services/event.rb", "lib/sorenson/services/flag.rb", "lib/sorenson/services/group.rb", "lib/sorenson/services/metric.rb", "lib/sorenson/services/rate_plan.rb", "lib/sorenson/services/site.rb", "lib/sorenson/services/tag.rb"]
13
- s.files = ["Manifest", "README.rdoc", "Rakefile", "fakeweb_cache", "features/manage_accounts.feature", "features/manage_assets.feature", "features/manage_categories.feature", "features/manage_flags.feature", "features/manage_group_assets.feature", "features/manage_groups.feature", "features/manage_metadata.feature", "features/manage_metrics.feature", "features/manage_sites.feature", "features/manage_tags.feature", "features/mange_rate_plan.feature", "features/step_definitions/manage_accounts_steps.rb", "features/step_definitions/manage_assets_steps.rb", "features/step_definitions/manage_categories_steps.rb", "features/step_definitions/manage_flags_steps.rb", "features/step_definitions/manage_group_assets_steps.rb", "features/step_definitions/manage_groups_steps.rb", "features/step_definitions/manage_metadata_steps.rb", "features/step_definitions/manage_metrics_steps.rb", "features/step_definitions/manage_sites_steps.rb", "features/step_definitions/manage_tags_steps.rb", "features/step_definitions/mange_rate_plan_steps.rb", "features/step_definitions/utility_steps.rb", "features/step_definitions/web_steps.rb", "features/support/document_steps.rb", "features/support/env.rb", "features/support/netrecorder.rb", "features/support/paths.rb", "lib/sorenson/services.rb", "lib/sorenson/services/account.rb", "lib/sorenson/services/array.rb", "lib/sorenson/services/asset.rb", "lib/sorenson/services/base.rb", "lib/sorenson/services/category.rb", "lib/sorenson/services/core_ext.rb", "lib/sorenson/services/core_ext/attribute_accessors.rb", "lib/sorenson/services/core_ext/hash.rb", "lib/sorenson/services/core_ext/object.rb", "lib/sorenson/services/event.rb", "lib/sorenson/services/flag.rb", "lib/sorenson/services/group.rb", "lib/sorenson/services/metric.rb", "lib/sorenson/services/rate_plan.rb", "lib/sorenson/services/site.rb", "lib/sorenson/services/tag.rb", "360_services.gemspec"]
13
+ s.files = ["Manifest", "README.rdoc", "Rakefile", "features/manage_accounts.feature", "features/manage_assets.feature", "features/manage_categories.feature", "features/manage_flags.feature", "features/manage_group_assets.feature", "features/manage_groups.feature", "features/manage_metadata.feature", "features/manage_metrics.feature", "features/manage_sites.feature", "features/manage_tags.feature", "features/mange_rate_plan.feature", "features/step_definitions/manage_accounts_steps.rb", "features/step_definitions/manage_assets_steps.rb", "features/step_definitions/manage_categories_steps.rb", "features/step_definitions/manage_flags_steps.rb", "features/step_definitions/manage_group_assets_steps.rb", "features/step_definitions/manage_groups_steps.rb", "features/step_definitions/manage_metadata_steps.rb", "features/step_definitions/manage_metrics_steps.rb", "features/step_definitions/manage_sites_steps.rb", "features/step_definitions/manage_tags_steps.rb", "features/step_definitions/mange_rate_plan_steps.rb", "features/step_definitions/utility_steps.rb", "features/step_definitions/web_steps.rb", "features/support/document_steps.rb", "features/support/env.rb", "features/support/netrecorder.rb", "features/support/paths.rb", "lib/sorenson/services.rb", "lib/sorenson/services/account.rb", "lib/sorenson/services/array.rb", "lib/sorenson/services/asset.rb", "lib/sorenson/services/base.rb", "lib/sorenson/services/category.rb", "lib/sorenson/services/core_ext.rb", "lib/sorenson/services/core_ext/attribute_accessors.rb", "lib/sorenson/services/core_ext/hash.rb", "lib/sorenson/services/core_ext/object.rb", "lib/sorenson/services/event.rb", "lib/sorenson/services/flag.rb", "lib/sorenson/services/group.rb", "lib/sorenson/services/metric.rb", "lib/sorenson/services/rate_plan.rb", "lib/sorenson/services/site.rb", "lib/sorenson/services/tag.rb", "360_services.gemspec"]
14
14
  s.homepage = %q{http://github.com/sorensonmedia/360_services}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "360_services", "--main", "README.rdoc"]
16
16
  s.require_paths = ["lib"]
data/Manifest CHANGED
@@ -1,7 +1,6 @@
1
1
  Manifest
2
2
  README.rdoc
3
3
  Rakefile
4
- fakeweb_cache
5
4
  features/manage_accounts.feature
6
5
  features/manage_assets.feature
7
6
  features/manage_categories.feature
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'cucumber'
3
3
  require 'cucumber/rake/task'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('360_services', '0.0.2') do |p|
6
+ Echoe.new('360_services', '0.0.3') do |p|
7
7
  p.description = "Ruby bindings for Sorenson 360"
8
8
  p.url = "http://github.com/sorensonmedia/360_services"
9
9
  p.author = "Sorenson Media"
@@ -25,7 +25,7 @@ Scenario: Get asset
25
25
 
26
26
  Scenario: Get asset count
27
27
  Given I am logged in
28
- Then the asset count should be "67"
28
+ Then the asset count should be "1"
29
29
 
30
30
  Scenario: Get asset presets
31
31
  Given I am logged in
@@ -16,10 +16,6 @@ Scenario: List flagged assets
16
16
  And I assign the flags "red blue green" to the asset
17
17
  When I get all flags
18
18
  Then the flags list should contain "red"
19
-
20
- Scenario: Count flags
21
- Given I am logged in
22
- Then the flag count should be "4"
23
19
 
24
20
  Scenario: Add flags to asset
25
21
  Given I am logged in
@@ -34,7 +30,7 @@ Scenario: Find all assets by flag
34
30
  And I get the first asset
35
31
  And I assign the flag "red" to the asset
36
32
  And I find all assets with the flag "red"
37
- Then the assets list should contain "a5ef53eb-032e-4983-9828-ee72ee6c6bc2"
33
+ Then the assets list should contain "6913b8ae-9b47-4487-87b2-d1d4d103f4de"
38
34
 
39
35
  Scenario: Get asset flags
40
36
  Given I am logged in
@@ -42,3 +38,7 @@ Scenario: Get asset flags
42
38
  And I assign the flag "pear" to the asset
43
39
  And I get the flags for the asset
44
40
  Then the flags list should contain "pear"
41
+
42
+ Scenario: Count flags
43
+ Given I am logged in
44
+ Then the flag count should be "4"
@@ -28,6 +28,4 @@ Scenario: Get group assets
28
28
  And I add the asset to the group
29
29
  And I reload the group
30
30
  Then the group should have the asset
31
-
32
-
33
-
31
+
@@ -5,18 +5,14 @@ Feature: Manage Metrics
5
5
 
6
6
  Scenario: See Total Plays
7
7
  Given I am logged in
8
- Then the total plays should be "39"
8
+ Then the total plays should be "1"
9
9
 
10
10
  Scenario: See Storage Used
11
11
  Given I am logged in
12
- Then the storage used should be "42581251.0"
12
+ Then the storage used should be "13255511.0"
13
13
 
14
14
  Scenario: See all metrics
15
15
  Given I am logged in
16
16
  And I get all metrics
17
- Then the events list should contain an event with a day of "2009-12-17"
18
-
19
-
20
-
21
-
17
+ Then the events list should contain an event with a day of "2010-02-24"
22
18
 
@@ -3,7 +3,7 @@ Given /^I (?:am logged|should be able to log) in with "([^\"]*)" and "([^\"]*)"$
3
3
  end
4
4
 
5
5
  Given "I am logged in" do
6
- @account = Sorenson::Services::Account.login("integrum@integrumtech.com", "integrum")
6
+ @account = Sorenson::Services::Account.login("360services@sorensonmedia.com", "S0r3ns0n")
7
7
  end
8
8
 
9
9
  And /^I get an account$/ do
@@ -7,7 +7,8 @@ Then /^the asset should be in the group$/ do
7
7
  end
8
8
 
9
9
  Then /^the asset should have the group$/ do
10
- @asset.group.should == @group
10
+ @asset.group.guid.should == @group.guid
11
+ @asset.group.name.should == @group.name
11
12
  end
12
13
 
13
14
  Then /^the group should have the asset$/ do
@@ -3,8 +3,8 @@ require 'rubygems'
3
3
  require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
4
4
  require 'webrat'
5
5
  require 'webrat/core/matchers'
6
- require 'fakeweb'
7
- require 'netrecorder'
6
+ # require 'fakeweb'
7
+ # require 'netrecorder'
8
8
  require "#{File.dirname(__FILE__)}/../../lib/sorenson/services.rb"
9
9
 
10
10
  Webrat.configure do |config|
@@ -1,20 +1,20 @@
1
- NetRecorder.config do |config|
2
- config.cache_file = "fakeweb_cache"
3
- if ENV['RECORD_WEB']
4
- config.record_net_calls = true
5
- else
6
- config.fakeweb = true
7
- FakeWeb.allow_net_connect = false
8
- end
9
- end
10
-
11
- at_exit {NetRecorder.cache! if NetRecorder.recording?}
12
-
13
- Before do |scenario|
14
- if NetRecorder.recording?
15
- NetRecorder.scope = scenario.name
16
- else
17
- FakeWeb.clean_registry
18
- NetRecorder.register_scope(scenario.name)
19
- end
20
- end
1
+ # NetRecorder.config do |config|
2
+ # config.cache_file = "fakeweb_cache"
3
+ # if ENV['RECORD_WEB']
4
+ # config.record_net_calls = true
5
+ # else
6
+ # config.fakeweb = true
7
+ # FakeWeb.allow_net_connect = false
8
+ # end
9
+ # end
10
+ #
11
+ # at_exit {NetRecorder.cache! if NetRecorder.recording?}
12
+ #
13
+ # Before do |scenario|
14
+ # if NetRecorder.recording?
15
+ # NetRecorder.scope = scenario.name
16
+ # else
17
+ # FakeWeb.clean_registry
18
+ # NetRecorder.register_scope(scenario.name)
19
+ # end
20
+ # end
@@ -11,7 +11,7 @@ module Sorenson
11
11
  :permalink_location, :status, :description, :video_duration, :abstract_file_id, :version_id,
12
12
  :date_retrieved, :audio_data_rate, :audio_bitrate_mode, :video_codec, :display_name, :name,
13
13
  :video_data_rate, :author_id, :width, :file_size, :thumbnail_image_url, :direct_asset_url,
14
- :password, :metadata, :groups, :embed_list
14
+ :password, :metadata, :groups, :embed_list, :group_id
15
15
 
16
16
  # Get all of the assets as a list of guids. Use offset and quantity to return subsets.
17
17
  # Sorenson::Services::Account.login('username', 'password')
@@ -25,11 +25,12 @@ module Sorenson
25
25
 
26
26
  # Get a list of asset guids by passing a tag name
27
27
  def self.find_all_by_tag(tag_name)
28
- get_from("/tags/#{tag_name}/assets")
28
+ p account_id
29
+ get_from("/tags/#{tag_name}/assets", :account_id => account_id)
29
30
  end
30
31
 
31
32
  def self.find_all_by_flag(flag_name)
32
- get_from("/flags/#{flag_name}/assets")
33
+ get_from("/flags/#{flag_name}/assets?account_id=#{account_id}")
33
34
  end
34
35
 
35
36
  def tags
@@ -114,7 +115,8 @@ module Sorenson
114
115
  end
115
116
 
116
117
  def group
117
- Group.new(Base.get_from("/groups/#{@group_id}")) if @group_id
118
+ return nil if @group_id.nil?
119
+ Group.new(Base.get_from("/groups/#{group_id}")['group'])
118
120
  end
119
121
 
120
122
  def initialize(data)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 360_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sorenson Media
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-23 00:00:00 -07:00
12
+ date: 2010-02-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -81,7 +81,6 @@ files:
81
81
  - Manifest
82
82
  - README.rdoc
83
83
  - Rakefile
84
- - fakeweb_cache
85
84
  - features/manage_accounts.feature
86
85
  - features/manage_assets.feature
87
86
  - features/manage_categories.feature