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 CHANGED
@@ -2,7 +2,7 @@ source :gemcutter
2
2
 
3
3
  # http://github.com/carlhuda/bundler/issues/#issue/107
4
4
  # - do not change unless lib/bundler_runtime_patch tested / defunct
5
- gem "bundler", "0.9.26"
5
+ #gem "bundler", "0.9.26"
6
6
 
7
7
  def gems(names, version)
8
8
  names.each { |n| gem(n, version) }
@@ -1,5 +1,5 @@
1
1
  ---
2
- :build:
3
2
  :major: 0
3
+ :build:
4
4
  :minor: 6
5
- :patch: 1
5
+ :patch: 3
@@ -21,6 +21,7 @@ module Videojuicer
21
21
  # - generic file handling
22
22
  base.property :file, File
23
23
  base.property :file_name, String
24
+ base.property :friendly_name, String
24
25
  base.property :file_size, Integer, :writer => :private # bytes
25
26
  base.property :source_uri, String
26
27
 
@@ -10,7 +10,7 @@ module Videojuicer
10
10
  property :disclosure, String
11
11
  property :created_at, DateTime
12
12
  property :updated_at, DateTime
13
-
13
+
14
14
  belongs_to :user, :class=>Videojuicer::User
15
15
 
16
16
  attr_accessor :criteria
@@ -14,6 +14,7 @@ module Videojuicer
14
14
  property :click_target, String
15
15
  property :asset_type, String
16
16
  property :asset_id, Integer
17
+ property :duration, Integer
17
18
  property :created_at, DateTime
18
19
  property :updated_at, DateTime
19
20
 
@@ -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
@@ -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 too" do
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 = 1
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
 
@@ -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.1"
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-07-27}
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: 5
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
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-07-27 00:00:00 +01:00
22
+ date: 2010-08-05 00:00:00 +01:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency