vj-sdk 0.6.5 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION.yml +1 -1
- data/lib/videojuicer/campaign.rb +8 -7
- data/lib/videojuicer/criterion/request.rb +3 -3
- data/lib/videojuicer/presentation.rb +2 -1
- data/spec/helpers/spec_fixtures.rb +5 -3
- data/spec/presentation_spec.rb +3 -2
- data/vj-sdk.gemspec +2 -2
- metadata +4 -4
data/Gemfile
CHANGED
data/VERSION.yml
CHANGED
data/lib/videojuicer/campaign.rb
CHANGED
@@ -3,13 +3,14 @@ module Videojuicer
|
|
3
3
|
include Videojuicer::Resource
|
4
4
|
include Videojuicer::Exceptions
|
5
5
|
|
6
|
-
property :name,
|
7
|
-
property :user_id,
|
8
|
-
property :insert_domain,
|
9
|
-
property :presentation_id,
|
10
|
-
property :disclosure,
|
11
|
-
property :created_at,
|
12
|
-
property :updated_at,
|
6
|
+
property :name, String
|
7
|
+
property :user_id, Integer
|
8
|
+
property :insert_domain, String
|
9
|
+
property :presentation_id, Integer
|
10
|
+
property :disclosure, String
|
11
|
+
property :created_at, DateTime
|
12
|
+
property :updated_at, DateTime
|
13
|
+
property :tag_list, String
|
13
14
|
|
14
15
|
belongs_to :user, :class=>Videojuicer::User
|
15
16
|
|
@@ -6,9 +6,9 @@ module Videojuicer
|
|
6
6
|
|
7
7
|
belongs_to :campaign, :class=>Videojuicer::Campaign
|
8
8
|
|
9
|
-
property :campaign_id,
|
10
|
-
property :referrer,
|
11
|
-
property :exclude,
|
9
|
+
property :campaign_id, Integer
|
10
|
+
property :referrer, String, :nullable => false
|
11
|
+
property :exclude, Boolean
|
12
12
|
|
13
13
|
def self.singular_name
|
14
14
|
"criterion"
|
@@ -10,6 +10,7 @@ module Videojuicer
|
|
10
10
|
property :abstract, String
|
11
11
|
property :user_id, Integer, :writer=>:private
|
12
12
|
belongs_to :user, :class=>Videojuicer::User
|
13
|
+
property :updater_id, Integer
|
13
14
|
property :callback_url, String
|
14
15
|
|
15
16
|
property :state, String, :default=>"ready" # see the STATES constant for values
|
@@ -62,7 +63,7 @@ module Videojuicer
|
|
62
63
|
end
|
63
64
|
define_method "#{type}_assets" do
|
64
65
|
@assets ||= {}
|
65
|
-
@assets[sym_type] ||= Videojuicer::Asset.const_get(type.capitalize.to_sym).all :id => asset_ids[sym_type].join(',') rescue
|
66
|
+
@assets[sym_type] ||= Videojuicer::Asset.const_get(type.capitalize.to_sym).all :id => asset_ids[sym_type].join(',') rescue []
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
@@ -64,9 +64,11 @@ module Videojuicer
|
|
64
64
|
class Insert
|
65
65
|
include FixtureHelper
|
66
66
|
set_attribute_proc {{
|
67
|
-
:campaign_id
|
68
|
-
:asset_type
|
69
|
-
:asset_id
|
67
|
+
:campaign_id => (Campaign.first.id rescue Campaign.gen.id),
|
68
|
+
:asset_type => "com.videojuicer.core.asset.Audio",
|
69
|
+
:asset_id => (Asset::Audio.first.id rescue Asset::Audio.gen.id),
|
70
|
+
:role => 'overlay',
|
71
|
+
:user_id => (User.first.id rescue User.gen.id)
|
70
72
|
}}
|
71
73
|
end
|
72
74
|
|
data/spec/presentation_spec.rb
CHANGED
@@ -63,10 +63,11 @@ describe Videojuicer::Presentation do
|
|
63
63
|
@presentation.video_assets.first.id.should == id
|
64
64
|
end
|
65
65
|
|
66
|
-
it "should should return
|
66
|
+
it "should should return an empty array when there are no assets of that type" do
|
67
67
|
@presentation.document_content = "<img src=\"/my-image.png\"/>"
|
68
68
|
@presentation.asset_ids
|
69
|
-
@presentation.video_assets.should ==
|
69
|
+
@presentation.video_assets.should == []
|
70
|
+
@presentation.video_assets.length.should == 0
|
70
71
|
end
|
71
72
|
|
72
73
|
it "should return the image asset" do
|
data/vj-sdk.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vj-sdk}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["danski", "thejohnny", "knowtheory", "sixones", "btab"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-15}
|
13
13
|
s.email = %q{dan@videojuicer.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vj-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 7
|
10
|
+
version: 0.6.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- danski
|
@@ -19,7 +19,7 @@ autorequire:
|
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
21
|
|
22
|
-
date: 2010-
|
22
|
+
date: 2010-11-15 00:00:00 +00:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|