cinesync 0.9.6 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ $: << File.expand_path(File.dirname(__FILE__))
2
+ require 'spec_helper'
3
+
4
+ describe "cineSync session" do
5
+ before do
6
+ @obj = CineSync::Session.new
7
+ end
8
+
9
+ it "should have current file version" do
10
+ @obj.file_version.should == 3
11
+ @obj.should.be.valid?
12
+ end
13
+
14
+ it "should have standard features by default" do
15
+ @obj.session_features.should == :standard
16
+ end
17
+
18
+ it "should store user data" do
19
+ @obj.notes.should.not.be.nil?
20
+ @obj.notes.should.be.empty?
21
+ @obj.user_data = "My custom data"
22
+ @obj.user_data.should == "My custom data"
23
+ end
24
+
25
+ it "should have a groups array" do
26
+ @obj.groups.should == []
27
+ @obj.groups << "My group"
28
+ @obj.groups.should == ["My group"]
29
+ end
30
+
31
+ it "should store notes" do
32
+ @obj.notes.should.not.be.nil?
33
+ @obj.notes.should.be.empty?
34
+ @obj.notes = "asdf"
35
+ @obj.notes.should == "asdf"
36
+ end
37
+
38
+ it "should have an array of media" do
39
+ @obj.media.should == []
40
+ end
41
+
42
+ it "should set pro features with group movies" do
43
+ @obj.session_features.should == :standard
44
+ @obj.media << CineSync::GroupMovie.new(CineSync::AllFilesGroup)
45
+ @obj.session_features.should == :pro
46
+ @obj.media.delete_at(0)
47
+ @obj.session_features.should == :standard
48
+ end
49
+
50
+ it "should include children in validity" do
51
+ @obj.should.be.valid?
52
+ mf = CineSync::MediaFile.new
53
+ mf.should.not.be.valid?
54
+ @obj.media << mf
55
+ @obj.should.not.be.valid?
56
+ mf.name = "asdf"
57
+ mf.locator.path = "asdf.mov"
58
+ mf.should.be.valid?
59
+ @obj.should.be.valid?
60
+ end
61
+ end
data/spec/small.txt ADDED
@@ -0,0 +1 @@
1
+ This is a small file to test the short_hash method.
@@ -1,10 +1,8 @@
1
1
  require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
2
+ require 'bacon'
4
3
 
5
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
4
  $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
6
  require 'cinesync'
8
7
 
9
- class Test::Unit::TestCase
10
- end
8
+ Bacon.summary_on_exit
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/5.0" version="3" clientFeatures="awesome" userData="sessionUserData">
3
+ <notes>These are my session notes.</notes>
4
+ </session>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="4" sessionFeatures="standard" userData="sessionUserData">
3
+ <notes>These are my session notes.</notes>
4
+ </session>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="3" sessionFeatures="awesome" userData="sessionUserData">
3
+ <notes>These are my session notes.</notes>
4
+ </session>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="3" sessionFeatures="standard" userData="sessionUserData blah bloo blee">
3
+ <media active="true" currentFrame="23">
4
+ <name>024b_fn_079_v01_1-98.mov</name>
5
+ <locators>
6
+ <path>/Volumes/Scratch/test_files/movies/024b_fn_079_v01_1-98.mov</path>
7
+ </locators>
8
+ <playRange>
9
+ <inFrame value="40" />
10
+ <outFrame value="50" />
11
+ <playOnlyRange value="true" />
12
+ </playRange>
13
+ </media>
14
+ <media currentFrame="65">
15
+ <name>sample_mpeg4.mp4</name>
16
+ <locators>
17
+ <url>http://example.com/test_files/movies/sample_mpeg4.mp4</url>
18
+ <shortHash>e74db5de61fa5483c541a3a3056f22d158b44ace</shortHash>
19
+ </locators>
20
+ <playRange>
21
+ <inFrame value="62" />
22
+ <outFrame value="67" />
23
+ <playOnlyRange value="true" />
24
+ </playRange>
25
+ </media>
26
+ <media userData="myPrivateInfo">
27
+ <name>Test_MH 2fps.mov</name>
28
+ <locators>
29
+ <shortHash>f9f0c5d3e3e340bcc9486abbb01a71089de9b886</shortHash>
30
+ </locators>
31
+ <notes>These notes on the last movie.</notes>
32
+ <annotation frame="1">
33
+ <notes>This is a note on the first frame of the last movie.</notes>
34
+ </annotation>
35
+ </media>
36
+ <notes>These are my session notes.&#x0A;newline.</notes>
37
+ </session>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="3" sessionFeatures="standard" userData="sessionUserData blah bloo blee">
3
+ <media>
4
+ <name>024b_fn_079_v01_1-98.mov</name>
5
+ <locators>
6
+ <path>/Volumes/Scratch/test_files/movies/024b_fn_079_v01_1-98.mov</path>
7
+ </locators>
8
+ <playRange>
9
+ <inFrame value="40" />
10
+ <outFrame value="50" />
11
+ <playOnlyRange value="true" />
12
+ </playRange>
13
+ </media>
14
+ <media active="true" currentFrame="65">
15
+ <name>sample_mpeg4.mp4</name>
16
+ <locators>
17
+ <url>http://example.com/test_files/movies/sample_mpeg4.mp4</url>
18
+ <shortHash>e74db5de61fa5483c541a3a3056f22d158b44ace</shortHash>
19
+ </locators>
20
+ <playRange>
21
+ <inFrame value="62" />
22
+ <outFrame value="67" />
23
+ <playOnlyRange value="true" />
24
+ </playRange>
25
+ </media>
26
+ <media userData="myPrivateInfo">
27
+ <name>Test_MH 2fps.mov</name>
28
+ <locators>
29
+ <shortHash>f9f0c5d3e3e340bcc9486abbb01a71089de9b886</shortHash>
30
+ </locators>
31
+ <notes>These notes on the last movie.</notes>
32
+ <annotation frame="1">
33
+ <notes>This is a note on the first frame of the last movie.</notes>
34
+ </annotation>
35
+ </media>
36
+ <notes>These are my session notes.&#x0A;newline.</notes>
37
+ </session>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="3" sessionFeatures="standard" userData="sessionUserData blah bloo blee">
3
+ <media active="true" currentFrame="23">
4
+ <name>024b_fn_079_v01_1-98.mov</name>
5
+ <locators>
6
+ <path>/Volumes/Scratch/test_files/movies/024b_fn_079_v01_1-98.mov</path>
7
+ </locators>
8
+ <playRange>
9
+ <inFrame value="40" />
10
+ <outFrame value="50" />
11
+ <playOnlyRange value="true" />
12
+ </playRange>
13
+ </media>
14
+ </session>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <session xmlns="http://www.cinesync.com/ns/session/3.0" version="3" sessionFeatures="standard" userData="sessionUserData blah bloo blee">
3
+ <media>
4
+ <name>024b_fn_079_v01_1-98.mov</name>
5
+ <locators>
6
+ <path>/Volumes/Scratch/test_files/movies/024b_fn_079_v01_1-98.mov</path>
7
+ </locators>
8
+ <playRange>
9
+ <inFrame value="40" />
10
+ <outFrame value="50" />
11
+ <playOnlyRange value="true" />
12
+ </playRange>
13
+ </media>
14
+ <media active="true" currentFrame="65">
15
+ <name>sample_mpeg4.mp4</name>
16
+ <locators>
17
+ <url>http://example.com/test_files/movies/sample_mpeg4.mp4</url>
18
+ <shortHash>e74db5de61fa5483c541a3a3056f22d158b44ace</shortHash>
19
+ </locators>
20
+ <playRange>
21
+ <inFrame value="62" />
22
+ <outFrame value="67" />
23
+ <playOnlyRange value="true" />
24
+ </playRange>
25
+ </media>
26
+ <media userData="myPrivateInfo">
27
+ <name>Test_MH 2fps.mov</name>
28
+ <locators>
29
+ <shortHash>f9f0c5d3e3e340bcc9486abbb01a71089de9b886</shortHash>
30
+ </locators>
31
+ <notes>These notes on the last movie.</notes>
32
+ <annotation frame="1">
33
+ <notes>This is a note on the first frame of the last movie.</notes>
34
+ </annotation>
35
+ </media>
36
+ <notes>These are my session notes.&#x0A;newline.</notes>
37
+ </session>