gly 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gly.rb +4 -1
- data/lib/gly/cli.rb +71 -8
- data/lib/gly/document.rb +20 -8
- data/lib/gly/document_gabc_convertor.rb +10 -2
- data/lib/gly/exceptions.rb +16 -0
- data/lib/gly/exceptions.rb~ +3 -0
- data/lib/gly/gabc_convertor.rb +29 -11
- data/lib/gly/gly_convertor.rb +52 -0
- data/lib/gly/gly_convertor.rb~ +11 -0
- data/lib/gly/glyfy_cli.rb~ +92 -0
- data/lib/gly/headers.rb +3 -1
- data/lib/gly/lister.rb +41 -6
- data/lib/gly/lyrics.rb +7 -7
- data/lib/gly/markup.rb +15 -0
- data/lib/gly/markup.rb~ +11 -0
- data/lib/gly/parser.rb +65 -23
- data/lib/gly/preview_builder.rb +13 -4
- data/lib/gly/preview_generator.rb +44 -23
- data/lib/gly/{parsed_score.rb → score.rb} +1 -1
- data/lib/gly/templates/lualatex_document.tex +11 -11
- data/tests/examples.rb +27 -7
- data/tests/examples/gly/expected/block_lyrics.gabc +1 -1
- data/tests/examples/gly/expected/block_lyrics.gabc~ +2 -0
- data/tests/examples/gly/expected/block_music.gabc +2 -0
- data/tests/examples/gly/expected/block_music.gabc~ +4 -0
- data/tests/examples/gly/expected/blocks.gabc +3 -0
- data/tests/examples/gly/expected/differentia_final.gabc +2 -0
- data/tests/examples/gly/expected/empty_lyric_syllable.gabc +2 -0
- data/tests/examples/gly/expected/empty_lyric_syllable.gabc~ +1 -0
- data/tests/examples/gly/expected/explicit_lyrics.gabc +1 -1
- data/tests/examples/gly/expected/header_colon.gabc +3 -0
- data/tests/examples/gly/expected/header_colon.gabc~ +3 -0
- data/tests/examples/gly/expected/header_empty.gabc +2 -0
- data/tests/examples/gly/expected/header_empty.gabc~ +2 -0
- data/tests/examples/gly/expected/nabc.gabc +3 -0
- data/tests/examples/gly/expected/no_clef.gabc +2 -0
- data/tests/examples/gly/expected/no_clef.gabc~ +1 -0
- data/tests/examples/gly/expected/real1.gabc~ +15 -0
- data/tests/examples/gly/expected/unsingables.gabc +2 -0
- data/tests/examples/gly/expected/unsingables.gabc~ +2 -0
- data/tests/examples/gly/given/block_lyrics.gly~ +3 -0
- data/tests/examples/gly/given/block_music.gly +4 -0
- data/tests/examples/gly/given/blocks.gly +6 -0
- data/tests/examples/gly/given/differentia_final.gly +5 -0
- data/tests/examples/gly/given/differentia_final.gly~ +2 -0
- data/tests/examples/gly/given/empty_lyric_syllable.gly +2 -0
- data/tests/examples/gly/given/empty_lyric_syllable.gly~ +2 -0
- data/tests/examples/gly/given/header_colon.gly +3 -0
- data/tests/examples/gly/given/header_colon.gly~ +4 -0
- data/tests/examples/gly/given/header_empty.gly +1 -0
- data/tests/examples/gly/given/header_empty.gly~ +2 -0
- data/tests/examples/gly/given/nabc.gly +3 -0
- data/tests/examples/gly/given/nabc.gly~ +2 -0
- data/tests/examples/gly/given/no_clef.gly +2 -0
- data/tests/examples/gly/given/no_clef.gly~ +1 -0
- data/tests/examples/gly/given/real1.gly~ +18 -0
- data/tests/examples/gly/given/unsingables.gly +2 -0
- data/tests/examples/gly/given/unsingables.gly~ +2 -0
- data/tests/examples/glyfy/expected/header.gly +3 -0
- data/tests/examples/glyfy/expected/header.gly~ +2 -0
- data/tests/examples/glyfy/expected/simple.gly +3 -0
- data/tests/examples/glyfy/expected/simple.gly~ +2 -0
- data/tests/examples/glyfy/given/header.gabc +3 -0
- data/tests/examples/glyfy/given/simple.gabc +2 -0
- data/tests/examples/parser/markup_after_header.gly +4 -0
- data/tests/examples/parser/markups.gly +10 -0
- data/tests/examples/parser/markups.gly~ +5 -0
- data/tests/examples/parser/score_markup_order.gly +19 -0
- data/tests/examples/parser/score_markup_order.gly~ +13 -0
- data/tests/parser.rb +51 -0
- data/tests/parser.rb~ +12 -0
- data/tests/run.rb +1 -0
- data/tests/test_helper.rb +19 -0
- metadata +59 -10
- data/bin/glyfy +0 -4
- data/tests/examples.rb~ +0 -9
- data/tests/programmed_examples.rb~ +0 -14
- data/tests/run.rb~ +0 -3
- data/tests/string_helpers_test.rb~ +0 -19
data/bin/glyfy
DELETED
data/tests/examples.rb~
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative 'test_helper'
|
2
|
-
|
3
|
-
# tests of cases that cannot be easily described by a pair
|
4
|
-
# of single gly file and resulting gabc file
|
5
|
-
class TestSpecialCases < MiniTest::Test
|
6
|
-
def self.loads_without_crash_test(filename)
|
7
|
-
case_name = File.basename(given_file).sub(/\.[^\.]*\Z/, '')
|
8
|
-
define_method "test_#{case_name}" do
|
9
|
-
File.open given_file do |fr|
|
10
|
-
gly_process(fr).string
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
data/tests/run.rb~
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative 'test_helper'
|
2
|
-
|
3
|
-
class StringHelpersTest < GlyTest
|
4
|
-
SH = Gly::StringHelpers
|
5
|
-
|
6
|
-
examples = [
|
7
|
-
['single_chunk', 'a', ['a']],
|
8
|
-
['simple_whitespace', 'aa aa', ['aa', 'aa']],
|
9
|
-
['leading_trailing_whitespace', ' a a ', ['a', 'a']],
|
10
|
-
['bracketted', '(a)', ['a']],
|
11
|
-
]
|
12
|
-
|
13
|
-
examples.each do |e|
|
14
|
-
name, given, expected = e
|
15
|
-
define_method "test_#{name}" do
|
16
|
-
assert_equal expected, SH.music_split(given)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|