flame_channel_parser 4.2.0 → 4.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f724511488b65ce62f27bdd5196fb18b0ab00559f6f3355c4ab156e009d3ae0
4
- data.tar.gz: d12b7ffcee90ce9dfca4f09177dc42fa9664dd38d98282a4ed60d040699538bc
3
+ metadata.gz: 5310312580c16476d46b962fedb4517abefcffa77462be460e8a5368b277941a
4
+ data.tar.gz: 25b0cb4de7e741fb58589ef030e38c7cea6bb811784b33993b8a9e82604acbc2
5
5
  SHA512:
6
- metadata.gz: 8cb8446d91eb42275d8c295d9f06596c99928886c8e2b53ac8382d6e3738a377c97e31547d022840b9868366c0e0a26b0047818f5e8bde23be47fc37e0533562
7
- data.tar.gz: 3d6c07df92674dea3df971a8a18449ce48e6256ee9d2dad4e1d36be11618cb11caa228bb567c825fb95998aa2aa4ceba707c6285b0c526075b6295fff2b70fa2
6
+ metadata.gz: 00acdb63e9791ef57d05023fb1235dcaabe7c6fdf15f0e1f82182e03cbdbf9579fe24a1c3e08a57480abcf20fba600399b3c206262591f3381c738534bb4520a
7
+ data.tar.gz: e9908c6a1cb2d07e40ee9a1539bc9463d03ee0870f2ebe66330bf075adc0a63de5099e9891b2fd20bd949492464fe033b392d4c0817de7d49ac73e6437307d28
@@ -0,0 +1,23 @@
1
+ name: CI
2
+
3
+ on:
4
+ - push
5
+ - pull_request
6
+
7
+ jobs:
8
+ test:
9
+ name: Ruby ${{ matrix.ruby }}
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby:
15
+ - '2.6'
16
+ - '4.0'
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ bundler-cache: true
23
+ - run: bundle exec rake test
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- # Until framecurve 2.2.4 is released
6
- gem "framecurve", git: "https://github.com/guerilla-di/framecurve.git"
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 4.2.1 / 2026-10-02
2
+
3
+ * Work with frozen string literals, add frozen_string_literal magic comments to all library files
4
+ * Fix the Regexp flags in the Batch timewarp writer (an Array of flags was taken as "ignore case")
5
+
1
6
  === 4.2.0 / 2026-10-02
2
7
 
3
8
  * Make parsing, interpolation and Builder usable from within Ractors (Ruby 4.0+)
data/lib/builder.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  # A Builder-like class for exporting Flame setups
3
4
  class FlameChannelParser::Builder #< BasicObject
data/lib/channel.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "forwardable"
2
3
 
3
4
  module FlameChannelParser
data/lib/extractor.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  # Extracts and bakes a specific animation channel to a given buffer, one string per frame
3
4
  class FlameChannelParser::Extractor
@@ -105,8 +106,7 @@ class FlameChannelParser::Extractor
105
106
  end
106
107
 
107
108
  def compose_channel_not_found_message(for_channel, other_channels)
108
- message = "Channel #{for_channel.inspect} not found in this setup (set the channel with the :channel option). Found other channels though:"
109
- message << "\n"
109
+ message = "Channel #{for_channel.inspect} not found in this setup (set the channel with the :channel option). Found other channels though:\n"
110
110
  message += other_channels.map{|c| "\t%s\n" % c.path }.join
111
111
  end
112
112
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module FlameChannelParser
2
- VERSION = '4.2.0'
3
+ VERSION = '4.2.1'
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require File.dirname(__FILE__) + '/flame_channel_parser/version'
2
3
 
3
4
  module FlameChannelParser
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Writes out a framecurve setup
2
3
  class FlameChannelParser::FramecurveWriters::Base
3
4
  class KeyWriter
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  # Writes out a Batch timewarp node setup
3
4
  class FlameChannelParser::FramecurveWriters::BatchTimewarp < FlameChannelParser::FramecurveWriters::SoftfxTimewarp
@@ -14,7 +15,7 @@ class FlameChannelParser::FramecurveWriters::BatchTimewarp < FlameChannelParser:
14
15
  yield(w)
15
16
  keys = w.keys
16
17
 
17
- keys_data = ''
18
+ keys_data = +''
18
19
  keys.each_with_index do | k, idx |
19
20
  keys_data << templatize(TEMPLATE_KEY, :frame => k[0].to_i, :value => k[1].to_f, :idx => idx)
20
21
  end
@@ -32,7 +33,7 @@ class FlameChannelParser::FramecurveWriters::BatchTimewarp < FlameChannelParser:
32
33
  t = File.read(file)
33
34
  hash.each_pair do | pattern, value |
34
35
  p = Regexp.escape('$%s' % pattern)
35
- handle = Regexp.new(p, [Regexp::MULTILINE, Regexp::EXTENDED])
36
+ handle = Regexp.new(p, Regexp::MULTILINE | Regexp::EXTENDED)
36
37
  t.gsub!(handle, value.to_s)
37
38
  end
38
39
  raise "Not all substitutions done" if t.include?('$')
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  # Writes out a framecurve setup
3
4
  class FlameChannelParser::FramecurveWriters::Kronos < FlameChannelParser::FramecurveWriters::SoftfxTimewarp
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  # Writes out a framecurve setup
3
4
  class FlameChannelParser::FramecurveWriters::SoftfxTimewarp < FlameChannelParser::FramecurveWriters::Base
data/lib/inspector.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Prints out a viewable tree of channel metadata. Useful when you need to inspect comparable setups
2
3
  # for small differentces in channel ordering and animation.
3
4
  class FlameChannelParser::Inspector
data/lib/interpolator.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  require File.expand_path(File.dirname(__FILE__)) + "/segments"
3
4
 
data/lib/key.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Represents a keyframe
2
3
  class FlameChannelParser::Key
3
4
 
data/lib/parser.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  module FlameChannelParser
3
4
  # Comnplete parser class for all Flame/Smoke versions
data/lib/segments.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  require "matrix"
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # shareable_constant_value: literal
2
3
  require "framecurve"
3
4
 
data/lib/xml_parser.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rexml/document'
2
3
  require "rexml/streamlistener"
3
4
 
@@ -10,8 +10,6 @@ class TestBatchTimewarpWriter < Test::Unit::TestCase
10
10
  key_writer.key(19, 102)
11
11
  end
12
12
 
13
- File.open(File.dirname(__FILE__) + "/timewarp_export_samples/BatchTW.timewarp_node", "wb"){|f| f.write(buf.string) }
14
-
15
13
  assert_same_buffer File.open(File.dirname(__FILE__) + "/timewarp_export_samples/BatchTW.timewarp_node"), buf
16
14
  end
17
15
 
@@ -3,7 +3,7 @@ require "helper"
3
3
 
4
4
  class FlameBuilderTest < Test::Unit::TestCase
5
5
  def setup
6
- @s = ""
6
+ @s = +""
7
7
  @b = FlameChannelParser::Builder.new(StringIO.new(@s))
8
8
  end
9
9
 
@@ -29,7 +29,7 @@ class TestFlameChannelParser < Test::Unit::TestCase
29
29
  end
30
30
 
31
31
  def test_parsing_kronos_with_reports
32
- logging_console = ""
32
+ logging_console = +""
33
33
  data = File.open(File.dirname(__FILE__) + "/snaps/TW_TEST.F_Kronos")
34
34
  parser = FlameChannelParser::Parser.new
35
35
  parser.logger_proc = lambda do | log_message |
@@ -12,7 +12,7 @@ class TestInspector < Test::Unit::TestCase
12
12
  channels = FlameChannelParser.parse(data)
13
13
 
14
14
  inspector = FlameChannelParser::Inspector.new(channels)
15
- output = ''
15
+ output = +''
16
16
 
17
17
  inspector.pretty_print(StringIO.new(output))
18
18
 
@@ -27,7 +27,7 @@ class TestInspector < Test::Unit::TestCase
27
27
  channels = FlameChannelParser.parse(data)
28
28
 
29
29
  inspector = FlameChannelParser::Inspector.new(channels)
30
- output = ''
30
+ output = +''
31
31
 
32
32
  inspector.pretty_print(StringIO.new(output))
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flame_channel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
@@ -124,9 +124,8 @@ extensions: []
124
124
  extra_rdoc_files:
125
125
  - README.md
126
126
  files:
127
- - ".autotest"
127
+ - ".github/workflows/ci.yml"
128
128
  - ".gitignore"
129
- - ".travis.yml"
130
129
  - Gemfile
131
130
  - History.txt
132
131
  - README.md
data/.autotest DELETED
@@ -1,23 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require 'autotest/restart'
4
-
5
- # Autotest.add_hook :initialize do |at|
6
- # at.extra_files << "../some/external/dependency.rb"
7
- #
8
- # at.libs << ":../some/external"
9
- #
10
- # at.add_exception 'vendor'
11
- #
12
- # at.add_mapping(/dependency.rb/) do |f, _|
13
- # at.files_matching(/test_.*rb$/)
14
- # end
15
- #
16
- # %w(TestA TestB).each do |klass|
17
- # at.extra_class_map[klass] = "test/test_misc.rb"
18
- # end
19
- # end
20
-
21
- # Autotest.add_hook :run_command do |at|
22
- # system "rake build"
23
- # end
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- rvm:
2
- - 1.8.7
3
- - 1.9.2
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.1
7
- - 2.2.2
8
- cache: bundler
9
- sudo: false