hiq 0.2.2 → 0.2.3
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 +4 -4
- data/lib/hiq/domain/filler_library.rb +12 -20
- data/lib/hiq/domain/line_composer.rb +1 -1
- data/lib/hiq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01f5f0694196e980cd36d86d7c3995d05a72548230a37b513570ee0c5faed998
|
4
|
+
data.tar.gz: b67a7324ae0deb31451a7797ba27af9127ef743669259743a7c7e4a6ef0553ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0803d7976ba63d812f742c4d400cce9e1b61e182ea93c925023d08ed3b1dad520e653f808ddac05056ac89de994701f0c921f999d8fb2edb607005c19fa77b9b'
|
7
|
+
data.tar.gz: 62b8b18edca28bec99356dfc502c904f9dcb1c9aa125ca4d0fdd3e8e0e8abf0f9117db13a822cf892a926d42b7b8caa876920bfd69faf1a9b8d7902fc51884f7
|
@@ -5,27 +5,19 @@ module Hiq
|
|
5
5
|
class FillerLibrary
|
6
6
|
def self.interpolated_fillers
|
7
7
|
{
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
7 => {
|
15
|
-
1 => 'a X',
|
16
|
-
2 => 'the pale X',
|
17
|
-
3 => 'X in silence',
|
18
|
-
4 => 'X ends the autumn',
|
19
|
-
5 => 'A spark of X above',
|
20
|
-
6 => 'the sad facade of X torn'
|
21
|
-
}
|
8
|
+
1 => ['the X', 'a X'],
|
9
|
+
2 => ['ghastly X', 'the pale X'],
|
10
|
+
3 => ['shadow of X', 'X in silence'],
|
11
|
+
4 => ['X of my joy fade', 'X ends the autumn'],
|
12
|
+
5 => ['A spark of X above'],
|
13
|
+
6 => ['the sad facade of X torn']
|
22
14
|
}
|
23
15
|
end
|
24
16
|
|
25
17
|
def self.fillers
|
26
18
|
{
|
27
|
-
5 => ['empty riverside', 'tears flow in the rain', 'cheerful summer\'s charm']
|
28
|
-
7 => ['the vain wind of summer blows', 'gentle breeze upon a mountain', 'a frog jumps into a well']
|
19
|
+
5 => ['empty riverside', 'tears flow in the rain', 'cheerful summer\'s charm'],
|
20
|
+
7 => ['the vain wind of summer blows', 'gentle breeze upon a mountain', 'a frog jumps into a well']
|
29
21
|
}
|
30
22
|
end
|
31
23
|
|
@@ -36,12 +28,12 @@ module Hiq
|
|
36
28
|
@cfillers = FillerLibrary.fillers
|
37
29
|
end
|
38
30
|
|
39
|
-
def get_const_filler(
|
40
|
-
cfillers[
|
31
|
+
def get_const_filler(filler_length)
|
32
|
+
cfillers[filler_length].delete(cfillers[filler_length].sample)
|
41
33
|
end
|
42
34
|
|
43
|
-
def get_interpolated_filler(
|
44
|
-
ifillers[
|
35
|
+
def get_interpolated_filler(filler_length)
|
36
|
+
ifillers[filler_length].delete(ifillers[filler_length].sample)
|
45
37
|
end
|
46
38
|
end
|
47
39
|
end
|
@@ -32,7 +32,7 @@ module Hiq
|
|
32
32
|
def filled_line
|
33
33
|
return [library.get_const_filler(target_syllable_length)] if line.empty?
|
34
34
|
|
35
|
-
[library.get_interpolated_filler(
|
35
|
+
[library.get_interpolated_filler(syllable_gap_size).gsub('X', line.first)]
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
data/lib/hiq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Taras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|