edl 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dde5075293fc802bba0d09eb6dc71071b912ce22
4
- data.tar.gz: a6af8337266f89253d64909d16fc354ee5a0a522
3
+ metadata.gz: 8229f60333ce6d40281980eb5dfb8188f5283882
4
+ data.tar.gz: 24b0c0eb16e8563a228543213142d06104876312
5
5
  SHA512:
6
- metadata.gz: eef75cec8b6edb8c4abef6a672ffcb5158537e33afe64d529de88765dc263644755485797a8a52abb3df258644300a437919059bd2d4b4f44499c1b026ad6cf0
7
- data.tar.gz: 75afefe92e6aed8ad08a5dc5a86617c272fbdf41997aa7c06c8f15af0b1e97cd2882a24cdba34911aee3bf6356f15aeba8dbd9813d762c68e2857c8842d07347
6
+ metadata.gz: 895259b1cf0bc020766d6dc6b075a3cb1b5853ab2775f65c385544d0113cb0b3d74a34fe2f2d4082f53d0381e1ab09368d2cb5670bae1479b61a196d72567438
7
+ data.tar.gz: 7bd9cfccbd517a5a1f2c5ccc9541c5552d7a529409d11cd9dc89377ea6970c9eb352b015839e7f323af8c684101e4a571d3d70ba4451031d2e8b0c765317b0b6
@@ -1,39 +1,39 @@
1
- === 0.1.3 / 2010-10-25
1
+ === 0.1.3
2
2
 
3
3
  * Adds Event#capture_to_and_including_tc which is convenient for frame searches
4
4
 
5
- === 0.1.2 / 2010-10-23
5
+ === 0.1.2
6
6
 
7
7
  * Fix parsing of files with Windows and \r linebreaks properly
8
8
 
9
- === 0.1.1 / 2010-10-21
9
+ === 0.1.1
10
10
 
11
11
  * Fix parsing of files with Windows linebreaks. In an ugly manner.
12
12
 
13
- === 0.0.8 / 2009-01-18
13
+ === 0.0.8
14
14
 
15
15
  * Switch Rubyforge project to guerilla-di
16
16
 
17
- === 0.0.7 / 2009-01-18
17
+ === 0.0.7
18
18
 
19
19
  * Register line_number in the original EDL for parsed events
20
20
  * Preserve the star in comments that have it
21
21
 
22
- === 0.0.6 / 2009-01-14
22
+ === 0.0.6
23
23
 
24
24
  * Fix comments in events appearing twice
25
25
  * Capture extra comments that have no star at the beginning as fallback
26
26
 
27
- === 0.0.5 / 2009-01-14
27
+ === 0.0.5
28
28
 
29
29
  * EDL::Event#starts_with_transition? is an alias
30
30
  * EDL::Event#incoming_transition_duration works as a shortcut for EDL::Transition#duration
31
31
 
32
- === 0.0.4 / 2009-01-14
32
+ === 0.0.4
33
33
 
34
34
  * EDL::Event#speed works as a shortcut for timewarp speed
35
35
 
36
- === 0.0.2 / 2009-01-14
36
+ === 0.0.2
37
37
 
38
38
  * Fix reverse timewarps
39
39
  * Migrate to specs
@@ -44,7 +44,7 @@
44
44
  * Deprecate EDL::Clip - everything is an EDL::Event now
45
45
  * Parse and save verbatim comments in EDL::Event#comments
46
46
 
47
- === 0.0.1 / 2008-12-22
47
+ === 0.0.1
48
48
 
49
49
  * 1 major enhancement
50
50
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "edl"
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Julik Tarkhanov"]
12
- s.date = "2014-02-18"
12
+ s.date = "2014-03-24"
13
13
  s.email = "me@julik.nl"
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
42
42
  "test/samples/TIMEWARP.EDL",
43
43
  "test/samples/TIMEWARP_HALF.EDL",
44
44
  "test/samples/TRAILER_EDL.edl",
45
+ "test/samples/edl_mixed_line_endings.edl",
45
46
  "test/test_edl.rb"
46
47
  ]
47
48
  s.homepage = "http://guerilla-di.org/edl"
data/lib/edl.rb CHANGED
@@ -10,7 +10,7 @@ require File.dirname(__FILE__) + '/edl/linebreak_magician'
10
10
 
11
11
  # A simplistic EDL parser
12
12
  module EDL
13
- VERSION = "0.1.4"
13
+ VERSION = "0.1.5"
14
14
  DEFAULT_FPS = 25.0
15
15
 
16
16
  # Represents an EDL, is returned from the parser. Traditional operation is functional style, i.e.
@@ -1,24 +1,11 @@
1
- require "delegate"
2
-
3
1
  # EDLs sometimes come with \r line breaks, and this is something that fails
4
2
  # with Ruby standard line separator detection. We need something to help us
5
- # with that
6
- class EDL::LinebreakMagician < DelegateClass(IO)
7
-
8
- def initialize(with_file)
9
- sample = with_file.read(2048)
10
- @linebreak = ["\r\n", "\r", "\n"].find{|separator| sample.include?(separator) }
11
- with_file.rewind
12
- __setobj__(with_file)
3
+ # with that. In this case we can just do a bulk replace because EDLs will be relatively
4
+ # small for even very long features.
5
+ class EDL::LinebreakMagician < StringIO
6
+ LOOSE_CR = /#{Regexp.escape("\r")}/
7
+ def initialize(with_io)
8
+ blob = with_io.read
9
+ super(blob.gsub(LOOSE_CR, "\n"))
13
10
  end
14
-
15
- def each(sep_string = $/, &blk)
16
- super(@linebreak || sep_string, &blk)
17
- end
18
- alias_method :each_line, :each
19
-
20
- def gets(sep_string = $/)
21
- super(@linebreak || sep_string)
22
- end
23
-
24
11
  end
@@ -0,0 +1,12 @@
1
+ TITLE: EDL_TEST
2
+ FCM: NON-DROP FRAME
3
+
4
+ 000001 A001C004_130917 V C 01:23:39:00 01:23:49:01 10:02:51:10 10:03:01:11
5
+ * A
6
+ * B
7
+ * C
8
+ * D
9
+ * E
10
+ * F
11
+ * G
12
+
@@ -21,6 +21,7 @@ FCP_REVERSE = File.dirname(__FILE__) + '/samples/FCP_REVERSE.EDL
21
21
  PLATES = File.dirname(__FILE__) + '/samples/PLATES.EDL'
22
22
  KEY = File.dirname(__FILE__) + '/samples/KEY_TRANSITION.EDL'
23
23
  CLIP_NAMES = File.dirname(__FILE__) + '/samples/REEL_IS_CLIP.txt'
24
+ MIXED_LINEBREAKS = File.dirname(__FILE__) + '/samples/edl_mixed_line_endings.edl'
24
25
 
25
26
  class String
26
27
  def tc(fps = Timecode::DEFAULT_FPS)
@@ -640,6 +641,13 @@ context "EffectMatcher" do
640
641
 
641
642
  end
642
643
 
644
+ context "An EDL with mixed line breaks" do
645
+ should 'parse without errors' do
646
+ list = EDL::Parser.new.parse(File.open(MIXED_LINEBREAKS))
647
+ assert_equal ["* A", "* B", "* C", "* D", "* E", "* F", "* G"], list[0].comments
648
+ end
649
+ end
650
+
643
651
  context "A complex EDL passed via Parser" do
644
652
  should "parse without errors" do
645
653
  assert_nothing_raised { EDL::Parser.new.parse(File.open(FORTY_FIVER)) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: edl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-18 00:00:00.000000000 Z
11
+ date: 2014-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timecode
@@ -128,6 +128,7 @@ files:
128
128
  - test/samples/TIMEWARP.EDL
129
129
  - test/samples/TIMEWARP_HALF.EDL
130
130
  - test/samples/TRAILER_EDL.edl
131
+ - test/samples/edl_mixed_line_endings.edl
131
132
  - test/test_edl.rb
132
133
  homepage: http://guerilla-di.org/edl
133
134
  licenses: []