phonos 1.2.1 → 1.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.
- data/VERSION +1 -1
- data/lib/phonos/analyzer.rb +1 -2
- data/phonos.gemspec +1 -1
- data/test/test_phonos.rb +6 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.2
|
data/lib/phonos/analyzer.rb
CHANGED
@@ -94,7 +94,7 @@ module Phonos
|
|
94
94
|
data.each do |lang, words|
|
95
95
|
table = @cache.read "#{lang}_phonos"
|
96
96
|
unless table
|
97
|
-
table = YAML.load_file "
|
97
|
+
table = YAML.load_file File.expand_path("../../../share/#{lang}.yaml", __FILE__)
|
98
98
|
@cache.write "#{lang}_phonos", table
|
99
99
|
end
|
100
100
|
words.join('').each_char do |c|
|
@@ -121,7 +121,6 @@ module Phonos
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
SCALES.inject({}) do |r, scale|
|
124
|
-
p f1, f2
|
125
124
|
val = if f1[scale] && f2[scale]
|
126
125
|
f1[scale] / f2[scale]
|
127
126
|
else
|
data/phonos.gemspec
CHANGED
data/test/test_phonos.rb
CHANGED
@@ -39,6 +39,12 @@ class TestPhonos < Test::Unit::TestCase
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
context '#analyze' do
|
43
|
+
should 'return hash' do
|
44
|
+
assert subject.analyze("буба сука дебил").kind_of? Hash
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
42
48
|
# context "Counter" do
|
43
49
|
# should "return correct hash" do
|
44
50
|
# assert_equal({
|