vj-sdk 0.6.1 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION.yml +2 -2
- data/lib/videojuicer/asset/base.rb +1 -0
- data/lib/videojuicer/campaign.rb +1 -1
- data/lib/videojuicer/insert.rb +1 -0
- data/lib/videojuicer/presentation.rb +3 -0
- data/spec/presentation_spec.rb +11 -4
- data/vj-sdk.gemspec +2 -2
- metadata +4 -4
data/Gemfile
CHANGED
data/VERSION.yml
CHANGED
data/lib/videojuicer/campaign.rb
CHANGED
data/lib/videojuicer/insert.rb
CHANGED
@@ -50,8 +50,11 @@ module Videojuicer
|
|
50
50
|
#get the thumbnail image associated with the presentation
|
51
51
|
def image_asset
|
52
52
|
@image_asset ||= Videojuicer::Asset::Image.get(image_asset_id)
|
53
|
+
return @image_asset unless block_given?
|
54
|
+
yield @image_asset if block_given?
|
53
55
|
end
|
54
56
|
|
57
|
+
#video_asset_ids and video_assets methods
|
55
58
|
@@asset_types.each do |type|
|
56
59
|
sym_type = type.to_sym
|
57
60
|
define_method "#{type}_asset_ids" do
|
data/spec/presentation_spec.rb
CHANGED
@@ -25,8 +25,8 @@ describe Videojuicer::Presentation do
|
|
25
25
|
|
26
26
|
before :each do
|
27
27
|
@presentation = @klass.gen
|
28
|
-
Videojuicer::Asset::Video.create :file_name => 'foo.mp4'
|
29
|
-
Videojuicer::Asset::Image.create :file_name => 'foo.png'
|
28
|
+
5.of { Videojuicer::Asset::Video.create :file_name => 'foo.mp4' }
|
29
|
+
5.of { Videojuicer::Asset::Image.create :file_name => 'foo.png' }
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should fetch asset ids" do
|
@@ -55,7 +55,7 @@ describe Videojuicer::Presentation do
|
|
55
55
|
@presentation.asset_ids[:image].first.should == '200'
|
56
56
|
end
|
57
57
|
|
58
|
-
it "should fetch assets
|
58
|
+
it "should also fetch assets" do
|
59
59
|
@presentation.document_content = "{% video %}{% id 1 %}{% endvideo %}"
|
60
60
|
@presentation.asset_ids
|
61
61
|
@presentation.video_assets.first.should_not == nil
|
@@ -63,11 +63,18 @@ describe Videojuicer::Presentation do
|
|
63
63
|
end
|
64
64
|
|
65
65
|
it "should return the image asset" do
|
66
|
-
@presentation.image_asset_id =
|
66
|
+
@presentation.image_asset_id = Videojuicer::Asset::Image.first.id
|
67
67
|
@presentation.image_asset.should_not == nil
|
68
68
|
@presentation.image_asset.class.should == Videojuicer::Asset::Image
|
69
69
|
end
|
70
70
|
|
71
|
+
it "should also take a block and pass the image_asset to that block" do
|
72
|
+
@presentation.image_asset_id = Videojuicer::Asset::Image.first.id
|
73
|
+
@presentation.image_asset do |image|
|
74
|
+
image.id.should == 1
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
71
78
|
end
|
72
79
|
|
73
80
|
|
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.3"
|
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-08-05}
|
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: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 3
|
10
|
+
version: 0.6.3
|
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-08-05 00:00:00 +01:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|