framecurve 2.2.1 → 2.2.2
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.
- checksums.yaml +7 -0
- data/.travis.yml +8 -0
- data/Gemfile +1 -1
- data/History.txt +4 -0
- data/bin/framecurve_validator +3 -2
- data/framecurve.gemspec +10 -8
- data/lib/framecurve/comment.rb +12 -1
- data/lib/framecurve/parser.rb +3 -1
- data/lib/framecurve/tuple.rb +6 -1
- data/lib/framecurve.rb +1 -1
- data/test/helper.rb +2 -0
- data/test/test_framecurve_comment.rb +3 -3
- data/test/test_framecurve_curve.rb +1 -1
- data/test/test_framecurve_from_fcp_xml_binary.rb +1 -1
- data/test/test_framecurve_parser.rb +1 -1
- data/test/test_framecurve_serializer.rb +1 -1
- data/test/test_framecurve_tuple.rb +3 -3
- data/test/test_framecurve_validator.rb +5 -4
- data/test/test_framecurve_validator_binary.rb +1 -1
- metadata +32 -24
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 4ab133f8cfd677f1b60324814261036f50fcf044
|
|
4
|
+
data.tar.gz: c391caff4f15eb6344a6c6b1c7540267be2ec327
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: cf8c5ab39aa0e8488e27caaae9f69a50c3a292269bbe9d8ac47439e3c8efcad2349a24cb34404c6f05f40d80e86ff3fb69c8415a5dfeb95eb3c2394f8b9a3b8f
|
|
7
|
+
data.tar.gz: 4a91d6574317ca124d20469b35b7336c33c7480ba6b8c2de43170f9fe64dc2b19acb4b8f475fdf9682a84388e74b89c9e42f9b1088849796dd0104891c0fc846
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/History.txt
CHANGED
data/bin/framecurve_validator
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
-
require File.dirname(__FILE__) + "/../lib/framecurve"
|
|
2
|
+
require File.dirname(__FILE__) + "/../lib/framecurve" unless defined?(Framecurve)
|
|
3
3
|
|
|
4
4
|
class Color
|
|
5
5
|
def self.method_missing(*a)
|
|
@@ -34,4 +34,5 @@ ARGV.each do | arg |
|
|
|
34
34
|
end
|
|
35
35
|
exit 10
|
|
36
36
|
end
|
|
37
|
-
end
|
|
37
|
+
end
|
|
38
|
+
exit 0
|
data/framecurve.gemspec
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
+
# stub: framecurve 2.2.2 ruby lib
|
|
5
6
|
|
|
6
7
|
Gem::Specification.new do |s|
|
|
7
8
|
s.name = "framecurve"
|
|
8
|
-
s.version = "2.2.
|
|
9
|
+
s.version = "2.2.2"
|
|
9
10
|
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
|
+
s.require_paths = ["lib"]
|
|
11
13
|
s.authors = ["Julik"]
|
|
12
|
-
s.date = "
|
|
14
|
+
s.date = "2014-10-20"
|
|
13
15
|
s.description = " Parser, validation and interpolation"
|
|
14
16
|
s.email = "me@julik.nl"
|
|
15
17
|
s.executables = ["framecurve_from_fcp_xml", "framecurve_validator"]
|
|
@@ -19,6 +21,7 @@ Gem::Specification.new do |s|
|
|
|
19
21
|
]
|
|
20
22
|
s.files = [
|
|
21
23
|
".document",
|
|
24
|
+
".travis.yml",
|
|
22
25
|
"Gemfile",
|
|
23
26
|
"History.txt",
|
|
24
27
|
"LICENSE.txt",
|
|
@@ -204,24 +207,23 @@ Gem::Specification.new do |s|
|
|
|
204
207
|
]
|
|
205
208
|
s.homepage = "http://github.com/guerilla-di/framecurve"
|
|
206
209
|
s.licenses = ["MIT"]
|
|
207
|
-
s.
|
|
208
|
-
s.rubygems_version = "1.8.15"
|
|
210
|
+
s.rubygems_version = "2.2.2"
|
|
209
211
|
s.summary = "Handles Framecurve files"
|
|
210
212
|
|
|
211
213
|
if s.respond_to? :specification_version then
|
|
212
|
-
s.specification_version =
|
|
214
|
+
s.specification_version = 4
|
|
213
215
|
|
|
214
216
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
215
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
|
217
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
|
|
216
218
|
s.add_development_dependency(%q<rake>, [">= 0"])
|
|
217
219
|
s.add_development_dependency(%q<cli_test>, [">= 0"])
|
|
218
220
|
else
|
|
219
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
|
221
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
|
220
222
|
s.add_dependency(%q<rake>, [">= 0"])
|
|
221
223
|
s.add_dependency(%q<cli_test>, [">= 0"])
|
|
222
224
|
end
|
|
223
225
|
else
|
|
224
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
|
226
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
|
225
227
|
s.add_dependency(%q<rake>, [">= 0"])
|
|
226
228
|
s.add_dependency(%q<cli_test>, [">= 0"])
|
|
227
229
|
end
|
data/lib/framecurve/comment.rb
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Represents a framecurve comment
|
|
2
|
-
class Framecurve::Comment
|
|
2
|
+
class Framecurve::Comment
|
|
3
|
+
include Comparable
|
|
4
|
+
attr_reader :text
|
|
5
|
+
|
|
6
|
+
def initialize(text)
|
|
7
|
+
@text = text
|
|
8
|
+
end
|
|
9
|
+
|
|
3
10
|
def tuple?
|
|
4
11
|
false
|
|
5
12
|
end
|
|
@@ -11,4 +18,8 @@ class Framecurve::Comment < Struct.new(:text)
|
|
|
11
18
|
def to_s
|
|
12
19
|
['#', text.to_s.gsub(/\r\n?/, '')].join(' ')
|
|
13
20
|
end
|
|
21
|
+
|
|
22
|
+
def <=>(another)
|
|
23
|
+
to_s <=> another.to_s
|
|
24
|
+
end
|
|
14
25
|
end
|
data/lib/framecurve/parser.rb
CHANGED
|
@@ -33,7 +33,9 @@ class Framecurve::Parser
|
|
|
33
33
|
curve = Framecurve::Curve.new(elements)
|
|
34
34
|
|
|
35
35
|
# Pick the actual filename if it's available
|
|
36
|
-
|
|
36
|
+
if path_or_io.respond_to?(:path) && path_or_io.path
|
|
37
|
+
curve.filename = File.basename(path_or_io.path)
|
|
38
|
+
end
|
|
37
39
|
|
|
38
40
|
return curve
|
|
39
41
|
end
|
data/lib/framecurve/tuple.rb
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
# Represents one Framecurve frame correlation record
|
|
2
|
-
class Framecurve::Tuple
|
|
2
|
+
class Framecurve::Tuple
|
|
3
3
|
include Comparable
|
|
4
|
+
attr_reader :at, :value
|
|
4
5
|
|
|
6
|
+
def initialize(at, value)
|
|
7
|
+
@at, @value = at, value
|
|
8
|
+
end
|
|
9
|
+
|
|
5
10
|
def tuple?
|
|
6
11
|
true
|
|
7
12
|
end
|
data/lib/framecurve.rb
CHANGED
data/test/helper.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
require 'helper'
|
|
1
|
+
require File.dirname(__FILE__) + '/helper'
|
|
2
2
|
|
|
3
3
|
class TestFramecurveComment < Test::Unit::TestCase
|
|
4
4
|
def test_not_tuple
|
|
5
|
-
assert Framecurve::Comment.new.comment?
|
|
6
|
-
assert !Framecurve::Comment.new.tuple?
|
|
5
|
+
assert Framecurve::Comment.new('').comment?
|
|
6
|
+
assert !Framecurve::Comment.new('').tuple?
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def test_initialization
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require 'helper'
|
|
1
|
+
require File.dirname(__FILE__) + '/helper'
|
|
2
2
|
|
|
3
3
|
class TestFramecurveTuple < Test::Unit::TestCase
|
|
4
4
|
def test_initialization
|
|
@@ -9,8 +9,8 @@ class TestFramecurveTuple < Test::Unit::TestCase
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def test_not_comment
|
|
12
|
-
assert !Framecurve::Tuple.new.comment?
|
|
13
|
-
assert Framecurve::Tuple.new.tuple?
|
|
12
|
+
assert !Framecurve::Tuple.new(0,0).comment?
|
|
13
|
+
assert Framecurve::Tuple.new(0,0).tuple?
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def test_vlidates_equality_to_5_decimal_places
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require 'helper'
|
|
1
|
+
require File.dirname(__FILE__) + '/helper'
|
|
2
2
|
|
|
3
3
|
class TestFramecurveValidator < Test::Unit::TestCase
|
|
4
4
|
|
|
@@ -48,8 +48,9 @@ class TestFramecurveValidator < Test::Unit::TestCase
|
|
|
48
48
|
v = Framecurve::Validator.new
|
|
49
49
|
v.validate([])
|
|
50
50
|
assert v.any_errors?
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
messages = ["The framecurve did not contain any frame correlation records",
|
|
52
|
+
"The framecurve did not contain any lines at all"]
|
|
53
|
+
assert_equal Set.new(messages), Set.new(v.errors)
|
|
53
54
|
end
|
|
54
55
|
|
|
55
56
|
def test_should_error_out_without_actual_tuples
|
|
@@ -124,7 +125,7 @@ class TestFramecurveValidator < Test::Unit::TestCase
|
|
|
124
125
|
v.validate(c)
|
|
125
126
|
assert v.any_warnings?
|
|
126
127
|
assert !v.ok?
|
|
127
|
-
|
|
128
|
+
assert v.warnings.include?("It is recommended that a framecurve starts with a comment with the specification URL")
|
|
128
129
|
end
|
|
129
130
|
|
|
130
131
|
def test_should_warn_without_preamble_headers
|
metadata
CHANGED
|
@@ -1,50 +1,58 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: framecurve
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 2.2.2
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Julik
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 2014-10-20 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: jeweler
|
|
16
|
-
requirement:
|
|
17
|
-
none: false
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
16
|
requirements:
|
|
19
|
-
- - ~>
|
|
17
|
+
- - "~>"
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 1.
|
|
19
|
+
version: '1.8'
|
|
22
20
|
type: :development
|
|
23
21
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.8'
|
|
25
27
|
- !ruby/object:Gem::Dependency
|
|
26
28
|
name: rake
|
|
27
|
-
requirement:
|
|
28
|
-
none: false
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
30
|
requirements:
|
|
30
|
-
- -
|
|
31
|
+
- - ">="
|
|
31
32
|
- !ruby/object:Gem::Version
|
|
32
33
|
version: '0'
|
|
33
34
|
type: :development
|
|
34
35
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
36
41
|
- !ruby/object:Gem::Dependency
|
|
37
42
|
name: cli_test
|
|
38
|
-
requirement:
|
|
39
|
-
none: false
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
44
|
requirements:
|
|
41
|
-
- -
|
|
45
|
+
- - ">="
|
|
42
46
|
- !ruby/object:Gem::Version
|
|
43
47
|
version: '0'
|
|
44
48
|
type: :development
|
|
45
49
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
47
|
-
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
description: " Parser, validation and interpolation"
|
|
48
56
|
email: me@julik.nl
|
|
49
57
|
executables:
|
|
50
58
|
- framecurve_from_fcp_xml
|
|
@@ -54,7 +62,8 @@ extra_rdoc_files:
|
|
|
54
62
|
- LICENSE.txt
|
|
55
63
|
- README.rdoc
|
|
56
64
|
files:
|
|
57
|
-
- .document
|
|
65
|
+
- ".document"
|
|
66
|
+
- ".travis.yml"
|
|
58
67
|
- Gemfile
|
|
59
68
|
- History.txt
|
|
60
69
|
- LICENSE.txt
|
|
@@ -240,26 +249,25 @@ files:
|
|
|
240
249
|
homepage: http://github.com/guerilla-di/framecurve
|
|
241
250
|
licenses:
|
|
242
251
|
- MIT
|
|
252
|
+
metadata: {}
|
|
243
253
|
post_install_message:
|
|
244
254
|
rdoc_options: []
|
|
245
255
|
require_paths:
|
|
246
256
|
- lib
|
|
247
257
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
248
|
-
none: false
|
|
249
258
|
requirements:
|
|
250
|
-
- -
|
|
259
|
+
- - ">="
|
|
251
260
|
- !ruby/object:Gem::Version
|
|
252
261
|
version: '0'
|
|
253
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
|
-
none: false
|
|
255
263
|
requirements:
|
|
256
|
-
- -
|
|
264
|
+
- - ">="
|
|
257
265
|
- !ruby/object:Gem::Version
|
|
258
266
|
version: '0'
|
|
259
267
|
requirements: []
|
|
260
268
|
rubyforge_project:
|
|
261
|
-
rubygems_version:
|
|
269
|
+
rubygems_version: 2.2.2
|
|
262
270
|
signing_key:
|
|
263
|
-
specification_version:
|
|
271
|
+
specification_version: 4
|
|
264
272
|
summary: Handles Framecurve files
|
|
265
273
|
test_files: []
|