flame_timewarp_extractor 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,8 @@ require 'hoe'
6
6
  Hoe.spec 'flame_timewarp_extractor' do | s |
7
7
  s.readme_file = 'README.rdoc'
8
8
  s.developer('Julik', 'me@julik.nl')
9
- s.extra_deps = {"flame_channel_parser" => "~> 2.1.0"}
9
+ s.extra_deps = {"flame_channel_parser" => "~> 2.0"}
10
+ s.extra_dev_deps = {"cli_test" => "~> 1.0.0"}
10
11
  s.clean_globs = %w( **/.DS_Store coverage.info **/*.rbc .idea .yardoc)
11
12
  end
12
13
 
@@ -3,7 +3,7 @@ require "flame_channel_parser"
3
3
 
4
4
  class FlameTimewarpExtractor
5
5
 
6
- VERSION = "4.0.0"
6
+ VERSION = "4.0.1"
7
7
 
8
8
  # Channels that can be the timewarp
9
9
  CHANNELS = %( Timing/Timing Frame )
data/test/test_cli.rb CHANGED
@@ -1,39 +1,27 @@
1
1
  require "test/unit"
2
2
  require "stringio"
3
3
  require "tempfile"
4
+ require "cli_test"
4
5
 
5
6
  class TestCli < Test::Unit::TestCase
6
- BIN_P = File.expand_path(File.dirname(__FILE__) + "/../bin/flametwextract")
7
+
8
+ BINARY = File.expand_path(File.dirname(__FILE__) + "/../bin/flametwextract")
7
9
 
8
10
  # Run the binary under test with passed options, and return [exit_code, stdout_content, stderr_content]
9
11
  def cli(commandline_arguments)
10
- old_stdout, old_stderr, old_argv = $stdout, $stderr, ARGV.dup
11
- os, es = StringIO.new, StringIO.new
12
- begin
13
- $stdout, $stderr, verbosity = os, es, $VERBOSE
14
- ARGV.replace(commandline_arguments.split)
15
- $VERBOSE = false
16
- load(BIN_P)
17
- return [0, os.string, es.string]
18
- rescue SystemExit => boom # The binary uses exit(), we use that to preserve the output code
19
- return [boom.status, os.string, es.string]
20
- ensure
21
- $VERBOSE = verbosity
22
- ARGV.replace(old_argv)
23
- $stdout, $stderr = old_stdout, old_stderr
24
- end
12
+ CLITest.new(BINARY).run(commandline_arguments)
25
13
  end
26
14
 
27
15
  def test_cli_with_no_args_produces_usage
28
16
  status, o, e = cli('')
29
- assert_equal -1, status
30
- assert_match /No input file path provided/, e
31
- assert_match /--help for usage information/, e
17
+ assert_equal( -1, status)
18
+ assert_match( /No input file path provided/, e)
19
+ assert_match( /--help for usage information/, e)
32
20
  end
33
21
 
34
22
  def test_cli_with_nonexisting_file
35
23
  status, o, e = cli(" amazing.action")
36
- assert_equal -1, status
24
+ assert_equal( -1, status)
37
25
  assert_match /does not exist/, e
38
26
  end
39
27
 
@@ -5,11 +5,16 @@ require "stringio"
5
5
  class TestTwextract < Test::Unit::TestCase
6
6
 
7
7
  def test_parse_with_interpolated_setup
8
+ interpolated_io = StringIO.new
9
+ FlameTimewarpExtractor.new.extract(File.dirname(__FILE__) + "/samples/TW_TEST.F_Kronos", :destination => interpolated_io)
10
+ assert_equal 77981, interpolated_io.pos
11
+ end
12
+
13
+ def test_parse_kronos_setup
8
14
  interpolated_io = StringIO.new
9
15
  baked_io = File.open(File.dirname(__FILE__) + "/samples/TW_16_010_v01.output.txt")
10
16
 
11
17
  FlameTimewarpExtractor.new.extract(File.dirname(__FILE__) + "/samples/TW_016_010_v01.timewarp", :destination => interpolated_io)
12
-
13
18
  assert_same_output(baked_io, interpolated_io)
14
19
  end
15
20
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: flame_timewarp_extractor
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 4.0.0
5
+ version: 4.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Julik
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-24 00:00:00 Z
13
+ date: 2011-09-13 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: flame_channel_parser
@@ -20,20 +20,31 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.0
23
+ version: "2.0"
24
24
  type: :runtime
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
27
- name: hoe
27
+ name: cli_test
28
28
  prerelease: false
29
29
  requirement: &id002 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
- - - ">="
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 2.9.4
34
+ version: 1.0.0
35
35
  type: :development
36
36
  version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: hoe
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: "2.10"
46
+ type: :development
47
+ version_requirements: *id003
37
48
  description: Extract timewarp channels from Flame setup files into a simple list of "to-frame" to "from-frame" mappings.
38
49
  email:
39
50
  - me@julik.nl