text-hyphen 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +27 -0
- data/License.rdoc +1 -1
- data/README.rdoc +11 -5
- data/Rakefile +1 -1
- data/bin/ruby-hyphen +9 -10
- data/lib/text/hyphen.rb +16 -5
- data/test/test_text_hyphen.rb +12 -0
- data/text-hyphen.gemspec +21 -33
- metadata +137 -115
data/History.rdoc
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
== 1.3 / 2012.06.20
|
2
|
+
* Feature:
|
3
|
+
* Cezary Baginsky (https://github.com/e2) added the ability to specify a
|
4
|
+
hyphen character (such as the HTML soft-hyphen entity) instead of always
|
5
|
+
using the dash-hyphen.
|
6
|
+
* Added a new option to bin/ruby-hyphen to support the new feature.
|
7
|
+
* Bug Fix:
|
8
|
+
* bin/ruby-hyphen didn't work when visualizing to a size. Fixed.
|
9
|
+
|
10
|
+
== 1.2.1 / 2012.04.05
|
11
|
+
* Bug Fix:
|
12
|
+
* Fixed some typos in the README
|
13
|
+
* Test Coverage:
|
14
|
+
* Tested on the following versions under Mac OS X 10.7:
|
15
|
+
* mri-1.8.7-p358: 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
16
|
+
* mri-1.9.2-p318: 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
17
|
+
* mri-1.9.3-p125: 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
18
|
+
* mri-2.0.0-dev: 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
19
|
+
* jruby-1.6.7 (1.8 mode): 5 tests, 45 assertions, 0 failures, 0 errors
|
20
|
+
* jruby-1.6.7 (1.9 mode): 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
21
|
+
* jruby-1.7.0-dev (1.8 mode): 5 tests, 45 assertions, 0 failures, 0 errors
|
22
|
+
* jruby-1.7.0-dev (1.9 mode): 5 tests, 45 assertions, 0 failures, 0 errors, 0 skips
|
23
|
+
* ree-1.8.7-2012.02: 5 tests, 45 assertions, 0 failures, 0 errors
|
24
|
+
* rbx-2.0.0-dev: 5 tests, 45 assertions, 0 failures, 0 errors
|
25
|
+
* Versions tested previously should continue to work. Versions not currently
|
26
|
+
tested were not installed on the test system.
|
27
|
+
|
1
28
|
== 1.2 / 2011.07.17
|
2
29
|
* Major Enhancements:
|
3
30
|
* This release supports Ruby 1.9 with UTF-8 encodings. The language files are
|
data/License.rdoc
CHANGED
@@ -22,7 +22,7 @@ present in a given Language File, it should be considered under the terms of
|
|
22
22
|
TeX.
|
23
23
|
|
24
24
|
=== Library License
|
25
|
-
* Copyright Austin Ziegler, 2004–
|
25
|
+
* Copyright Austin Ziegler, 2004–2012
|
26
26
|
|
27
27
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
28
28
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.rdoc
CHANGED
@@ -15,8 +15,9 @@ hyphenation pattern files are based on the sources available from
|
|
15
15
|
{CTAN}[http://www.ctan.org] as of 2004.12.19 and have been manually translated
|
16
16
|
by Austin Ziegler.
|
17
17
|
|
18
|
-
This
|
19
|
-
|
18
|
+
This is a small feature release adding support for custom hyphens and fixing a
|
19
|
+
bug in ruby-hyphen. This release provides both Ruby 1.8.7 and Ruby 1.9.2
|
20
|
+
support. This is the last major release supporting Ruby 1.8 interpreters.
|
20
21
|
Future versions will only work with Ruby 1.9 or later interpreters.
|
21
22
|
|
22
23
|
== Where
|
@@ -31,11 +32,16 @@ Future versions will only work with Ruby 1.9 or later interpreters.
|
|
31
32
|
require 'text/hyphen'
|
32
33
|
hh = Text::Hyphen.new(:language => 'en_us', :left => 2, :right => 2)
|
33
34
|
# Defaults to the above
|
34
|
-
hh =
|
35
|
+
hh = Text::Hyphen.new
|
35
36
|
|
36
37
|
word = "representation"
|
37
|
-
points =
|
38
|
-
puts
|
38
|
+
points = hh.hyphenate(word) #=> [3, 5, 8, 10]
|
39
|
+
puts hh.visualize(word) #=> rep-re-sen-ta-tion
|
40
|
+
|
41
|
+
Both visualize and hyphenate_to methods allow choosing a custom hyphen:
|
42
|
+
|
43
|
+
puts hh.visualize(word, "­") #=> rep­re­sen­ta­tion
|
44
|
+
|
39
45
|
|
40
46
|
Text::Hyphen is truly multilingual, with 29 languages or language variants
|
41
47
|
supported. As an example, consider the difference between the following:
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ Hoe.spec 'text-hyphen' do |spec|
|
|
12
12
|
developer('Austin Ziegler', 'austin@rubyforge.org')
|
13
13
|
|
14
14
|
self.rubyforge_name = 'text-format'
|
15
|
-
spec.remote_rdoc_dir = 'text-hyphen
|
15
|
+
spec.remote_rdoc_dir = 'text-hyphen'
|
16
16
|
spec.rsync_args << ' --exclude=statsvn/'
|
17
17
|
|
18
18
|
spec.history_file = 'History.rdoc'
|
data/bin/ruby-hyphen
CHANGED
@@ -9,16 +9,12 @@
|
|
9
9
|
|
10
10
|
require 'optparse'
|
11
11
|
require 'ostruct'
|
12
|
-
|
13
|
-
begin
|
14
|
-
require 'text/hyphen'
|
15
|
-
rescue LoadError
|
16
|
-
require 'rubygems'
|
17
|
-
require 'text/hyphen'
|
18
|
-
end
|
12
|
+
require 'text/hyphen'
|
19
13
|
|
20
14
|
options = OpenStruct.new
|
21
15
|
options.action = :visualise
|
16
|
+
options.dash = '-'
|
17
|
+
|
22
18
|
ARGV.options do |opt|
|
23
19
|
opt.banner = "Usage: #{File.basename($0)} [options] [mode] word+"
|
24
20
|
opt.separator ""
|
@@ -48,6 +44,9 @@ ARGV.options do |opt|
|
|
48
44
|
opt.on('-l', '--language LANGUAGE', 'Loads the specified language resource.') { |lang|
|
49
45
|
options.language = lang
|
50
46
|
}
|
47
|
+
opt.on('-d', '--hyphen DASH', 'Sets the hyphen character. If not provided, uses the normal hyphen ("-").') { |dash|
|
48
|
+
options.dash = dash
|
49
|
+
}
|
51
50
|
|
52
51
|
opt.separator ""
|
53
52
|
opt.on_tail('-h', '--help', 'Shows this help') {
|
@@ -63,7 +62,7 @@ end
|
|
63
62
|
|
64
63
|
if ARGV.empty? and options.action != :stats
|
65
64
|
$stderr.puts ARGV.options
|
66
|
-
exit
|
65
|
+
exit 1
|
67
66
|
end
|
68
67
|
|
69
68
|
hyphenator = Text::Hyphen.new do |h|
|
@@ -76,7 +75,7 @@ case options.action
|
|
76
75
|
when :visualise
|
77
76
|
size = 80
|
78
77
|
ARGV.each do |word|
|
79
|
-
vis = hyphenator.visualise(word)
|
78
|
+
vis = hyphenator.visualise(word, options.dash)
|
80
79
|
if (size - vis.size - 1) < 0
|
81
80
|
puts
|
82
81
|
size = 80
|
@@ -95,7 +94,7 @@ when :hyphenate
|
|
95
94
|
when :hyphenate_to
|
96
95
|
size = 80
|
97
96
|
ARGV.each do |word|
|
98
|
-
vis = hyphenator.
|
97
|
+
vis = hyphenator.hyphenate_to(word, options.size, options.dash)
|
99
98
|
if (size - vis.size - 1) < 0
|
100
99
|
puts
|
101
100
|
size = 80
|
data/lib/text/hyphen.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# -*- ruby encoding: utf-8 -*-
|
2
|
+
|
2
3
|
module Text # :nodoc:
|
3
4
|
end
|
4
5
|
|
@@ -7,7 +8,7 @@ end
|
|
7
8
|
# a specific language's hyphenation patterns.
|
8
9
|
class Text::Hyphen
|
9
10
|
DEBUG = false
|
10
|
-
VERSION = '1.
|
11
|
+
VERSION = '1.3'
|
11
12
|
|
12
13
|
DEFAULT_MIN_LEFT = 2
|
13
14
|
DEFAULT_MIN_RIGHT = 2
|
@@ -150,13 +151,17 @@ class Text::Hyphen
|
|
150
151
|
#
|
151
152
|
# hyp.visualize('representation') #=> rep-re-sen-ta-tion
|
152
153
|
#
|
154
|
+
# Any string can be set instead of the default hyphen:
|
155
|
+
#
|
156
|
+
# hyp.visualize('example', '­') #=> exam­ple
|
157
|
+
#
|
153
158
|
# Because hyphenation can be expensive, if the word has been visualised
|
154
159
|
# previously, it will be returned from a per-instance cache.
|
155
|
-
def visualise(word)
|
160
|
+
def visualise(word, hyphen = '-')
|
156
161
|
return @vcache[word] if @vcache.has_key?(word)
|
157
162
|
w = word.dup
|
158
163
|
hyphenate(w).each_with_index do |pos, n|
|
159
|
-
w[pos.to_i + n, 0] =
|
164
|
+
w[pos.to_i + n, 0] = hyphen if pos != 0
|
160
165
|
end
|
161
166
|
@vcache[word] = w
|
162
167
|
end
|
@@ -169,13 +174,17 @@ class Text::Hyphen
|
|
169
174
|
end
|
170
175
|
|
171
176
|
# This function will hyphenate a word so that the first point is at most
|
177
|
+
#
|
178
|
+
# NOTE: if hyphen is set to a string, it will still be counted as one
|
179
|
+
# character (since it represents a hyphen)
|
180
|
+
#
|
172
181
|
# +size+ characters.
|
173
|
-
def hyphenate_to(word, size)
|
182
|
+
def hyphenate_to(word, size, hyphen = '-')
|
174
183
|
point = hyphenate(word).delete_if { |e| e >= size }.max
|
175
184
|
if point.nil?
|
176
185
|
[nil, word]
|
177
186
|
else
|
178
|
-
[word[0 ... point] +
|
187
|
+
[word[0 ... point] + hyphen, word[point .. -1]]
|
179
188
|
end
|
180
189
|
end
|
181
190
|
|
@@ -251,3 +260,5 @@ EOS
|
|
251
260
|
require File.join(p, v, f)
|
252
261
|
end
|
253
262
|
end
|
263
|
+
|
264
|
+
# vim: syntax=ruby
|
data/test/test_text_hyphen.rb
CHANGED
@@ -27,6 +27,8 @@ class TestTextHyphen < Test::Unit::TestCase
|
|
27
27
|
%w(play- back), [nil, 'presents'], %w(pro- grammable),
|
28
28
|
%w(rep- resentation)]
|
29
29
|
|
30
|
+
SOFT_HYPHEN = "­"
|
31
|
+
|
30
32
|
def test_hyphenate
|
31
33
|
@r = []
|
32
34
|
a = Text::Hyphen.new do |xx|
|
@@ -53,4 +55,14 @@ class TestTextHyphen < Test::Unit::TestCase
|
|
53
55
|
assert_equal(HY_TO, @r)
|
54
56
|
WORDS.each { |w| assert_not_nil(a.instance_eval { @cache[w] }) }
|
55
57
|
end
|
58
|
+
|
59
|
+
def test_alt_hyphen_for_visualize
|
60
|
+
a = Text::Hyphen.new.visualize('backpack', SOFT_HYPHEN)
|
61
|
+
assert_equal "back#{SOFT_HYPHEN}pack", a
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_alt_hyphen_for_hyphenate_to
|
65
|
+
a = Text::Hyphen.new.hyphenate_to('backpack', 5, SOFT_HYPHEN)
|
66
|
+
assert_equal ["back#{SOFT_HYPHEN}", 'pack'], a
|
67
|
+
end
|
56
68
|
end
|
data/text-hyphen.gemspec
CHANGED
@@ -1,63 +1,51 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
-
s.version = "1.
|
4
|
+
s.name = "text-hyphen"
|
5
|
+
s.version = "1.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [
|
9
|
-
s.date =
|
10
|
-
s.description =
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
by Austin Ziegler.
|
22
|
-
|
23
|
-
This release is 1.2. This is a major release providing both Ruby 1.8.7 and Ruby
|
24
|
-
1.9.2 support. This is the last major release supporting Ruby 1.8 interpreters.
|
25
|
-
Future versions will only work with Ruby 1.9 or later interpreters.}
|
26
|
-
s.email = [%q{austin@rubyforge.org}]
|
27
|
-
s.executables = [%q{ruby-hyphen}]
|
28
|
-
s.extra_rdoc_files = [%q{Manifest.txt}, %q{History.rdoc}, %q{License.rdoc}, %q{README.rdoc}]
|
29
|
-
s.files = [%q{.autotest}, %q{History.rdoc}, %q{License.rdoc}, %q{Manifest.txt}, %q{README.rdoc}, %q{Rakefile}, %q{bin/ruby-hyphen}, %q{lib/text-hyphen.rb}, %q{lib/text/hyphen.rb}, %q{lib/text/hyphen/language.rb}, %q{lib/text/hyphen/language/1.8/ca.rb}, %q{lib/text/hyphen/language/1.8/cs.rb}, %q{lib/text/hyphen/language/1.8/da.rb}, %q{lib/text/hyphen/language/1.8/de1.rb}, %q{lib/text/hyphen/language/1.8/de2.rb}, %q{lib/text/hyphen/language/1.8/en_uk.rb}, %q{lib/text/hyphen/language/1.8/en_us.rb}, %q{lib/text/hyphen/language/1.8/es.rb}, %q{lib/text/hyphen/language/1.8/et.rb}, %q{lib/text/hyphen/language/1.8/eu.rb}, %q{lib/text/hyphen/language/1.8/fi.rb}, %q{lib/text/hyphen/language/1.8/fr.rb}, %q{lib/text/hyphen/language/1.8/ga.rb}, %q{lib/text/hyphen/language/1.8/hr.rb}, %q{lib/text/hyphen/language/1.8/hsb.rb}, %q{lib/text/hyphen/language/1.8/hu1.rb}, %q{lib/text/hyphen/language/1.8/hu2.rb}, %q{lib/text/hyphen/language/1.8/ia.rb}, %q{lib/text/hyphen/language/1.8/id.rb}, %q{lib/text/hyphen/language/1.8/is.rb}, %q{lib/text/hyphen/language/1.8/it.rb}, %q{lib/text/hyphen/language/1.8/la.rb}, %q{lib/text/hyphen/language/1.8/mn.rb}, %q{lib/text/hyphen/language/1.8/nl.rb}, %q{lib/text/hyphen/language/1.8/no1.rb}, %q{lib/text/hyphen/language/1.8/no2.rb}, %q{lib/text/hyphen/language/1.8/pl.rb}, %q{lib/text/hyphen/language/1.8/pt.rb}, %q{lib/text/hyphen/language/1.8/sv.rb}, %q{lib/text/hyphen/language/1.9/ca.rb}, %q{lib/text/hyphen/language/1.9/cs.rb}, %q{lib/text/hyphen/language/1.9/da.rb}, %q{lib/text/hyphen/language/1.9/de1.rb}, %q{lib/text/hyphen/language/1.9/de2.rb}, %q{lib/text/hyphen/language/1.9/en_uk.rb}, %q{lib/text/hyphen/language/1.9/en_us.rb}, %q{lib/text/hyphen/language/1.9/es.rb}, %q{lib/text/hyphen/language/1.9/et.rb}, %q{lib/text/hyphen/language/1.9/eu.rb}, %q{lib/text/hyphen/language/1.9/fi.rb}, %q{lib/text/hyphen/language/1.9/fr.rb}, %q{lib/text/hyphen/language/1.9/ga.rb}, %q{lib/text/hyphen/language/1.9/hr.rb}, %q{lib/text/hyphen/language/1.9/hsb.rb}, %q{lib/text/hyphen/language/1.9/hu1.rb}, %q{lib/text/hyphen/language/1.9/hu2.rb}, %q{lib/text/hyphen/language/1.9/ia.rb}, %q{lib/text/hyphen/language/1.9/id.rb}, %q{lib/text/hyphen/language/1.9/is.rb}, %q{lib/text/hyphen/language/1.9/it.rb}, %q{lib/text/hyphen/language/1.9/la.rb}, %q{lib/text/hyphen/language/1.9/mn.rb}, %q{lib/text/hyphen/language/1.9/nl.rb}, %q{lib/text/hyphen/language/1.9/no1.rb}, %q{lib/text/hyphen/language/1.9/no2.rb}, %q{lib/text/hyphen/language/1.9/pl.rb}, %q{lib/text/hyphen/language/1.9/pt.rb}, %q{lib/text/hyphen/language/1.9/sv.rb}, %q{lib/text/hyphen/language/ca.rb}, %q{lib/text/hyphen/language/cs.rb}, %q{lib/text/hyphen/language/da.rb}, %q{lib/text/hyphen/language/de.rb}, %q{lib/text/hyphen/language/de1.rb}, %q{lib/text/hyphen/language/de2.rb}, %q{lib/text/hyphen/language/en_uk.rb}, %q{lib/text/hyphen/language/en_us.rb}, %q{lib/text/hyphen/language/es.rb}, %q{lib/text/hyphen/language/et.rb}, %q{lib/text/hyphen/language/eu.rb}, %q{lib/text/hyphen/language/fi.rb}, %q{lib/text/hyphen/language/fr.rb}, %q{lib/text/hyphen/language/ga.rb}, %q{lib/text/hyphen/language/hr.rb}, %q{lib/text/hyphen/language/hsb.rb}, %q{lib/text/hyphen/language/hu.rb}, %q{lib/text/hyphen/language/hu1.rb}, %q{lib/text/hyphen/language/hu2.rb}, %q{lib/text/hyphen/language/ia.rb}, %q{lib/text/hyphen/language/id.rb}, %q{lib/text/hyphen/language/is.rb}, %q{lib/text/hyphen/language/it.rb}, %q{lib/text/hyphen/language/la.rb}, %q{lib/text/hyphen/language/mn.rb}, %q{lib/text/hyphen/language/ms.rb}, %q{lib/text/hyphen/language/nl.rb}, %q{lib/text/hyphen/language/no.rb}, %q{lib/text/hyphen/language/no1.rb}, %q{lib/text/hyphen/language/no2.rb}, %q{lib/text/hyphen/language/pl.rb}, %q{lib/text/hyphen/language/pt.rb}, %q{lib/text/hyphen/language/sv.rb}, %q{test/data/bug_9807_latin1.rb}, %q{test/data/bug_9807_utf-8.rb}, %q{test/test_bugs.rb}, %q{test/test_text_hyphen.rb}, %q{text-hyphen.gemspec}, %q{.gemtest}]
|
30
|
-
s.rdoc_options = [%q{--main}, %q{README.rdoc}]
|
31
|
-
s.require_paths = [%q{lib}]
|
32
|
-
s.rubyforge_project = %q{text-format}
|
33
|
-
s.rubygems_version = %q{1.8.5}
|
34
|
-
s.summary = %q{Text::Hyphen is a Ruby library to hyphenate words in various languages using Ruby-fied versions of TeX hyphenation patterns}
|
35
|
-
s.test_files = [%q{test/test_bugs.rb}, %q{test/test_text_hyphen.rb}]
|
8
|
+
s.authors = ["Austin Ziegler"]
|
9
|
+
s.date = "2012-06-21"
|
10
|
+
s.description = "Text::Hyphen is a Ruby library to hyphenate words in various languages using\nRuby-fied versions of TeX hyphenation patterns. It will properly hyphenate\nvarious words according to the rules of the language the word is written in.\nThe algorithm is based on that of the TeX typesetting system by Donald E.\nKnuth.\n\nThis is originally based on the Perl implementation of\n{TeX::Hyphen}[http://search.cpan.org/author/JANPAZ/TeX-Hyphen-0.140/lib/TeX/Hyphen.pm]\nand the {Ruby port}[http://rubyforge.org/projects/text-format]. The language\nhyphenation pattern files are based on the sources available from\n{CTAN}[http://www.ctan.org] as of 2004.12.19 and have been manually translated\nby Austin Ziegler.\n\nThis is a small feature release adding support for custom hyphens and fixing a\nbug in ruby-hyphen. This release provides both Ruby 1.8.7 and Ruby 1.9.2\nsupport. This is the last major release supporting Ruby 1.8 interpreters.\nFuture versions will only work with Ruby 1.9 or later interpreters."
|
11
|
+
s.email = ["austin@rubyforge.org"]
|
12
|
+
s.executables = ["ruby-hyphen"]
|
13
|
+
s.extra_rdoc_files = ["History.rdoc", "License.rdoc", "Manifest.txt", "README.rdoc", "History.rdoc", "License.rdoc", "README.rdoc"]
|
14
|
+
s.files = [".autotest", "History.rdoc", "License.rdoc", "Manifest.txt", "README.rdoc", "Rakefile", "bin/ruby-hyphen", "lib/text-hyphen.rb", "lib/text/hyphen.rb", "lib/text/hyphen/language.rb", "lib/text/hyphen/language/1.8/ca.rb", "lib/text/hyphen/language/1.8/cs.rb", "lib/text/hyphen/language/1.8/da.rb", "lib/text/hyphen/language/1.8/de1.rb", "lib/text/hyphen/language/1.8/de2.rb", "lib/text/hyphen/language/1.8/en_uk.rb", "lib/text/hyphen/language/1.8/en_us.rb", "lib/text/hyphen/language/1.8/es.rb", "lib/text/hyphen/language/1.8/et.rb", "lib/text/hyphen/language/1.8/eu.rb", "lib/text/hyphen/language/1.8/fi.rb", "lib/text/hyphen/language/1.8/fr.rb", "lib/text/hyphen/language/1.8/ga.rb", "lib/text/hyphen/language/1.8/hr.rb", "lib/text/hyphen/language/1.8/hsb.rb", "lib/text/hyphen/language/1.8/hu1.rb", "lib/text/hyphen/language/1.8/hu2.rb", "lib/text/hyphen/language/1.8/ia.rb", "lib/text/hyphen/language/1.8/id.rb", "lib/text/hyphen/language/1.8/is.rb", "lib/text/hyphen/language/1.8/it.rb", "lib/text/hyphen/language/1.8/la.rb", "lib/text/hyphen/language/1.8/mn.rb", "lib/text/hyphen/language/1.8/nl.rb", "lib/text/hyphen/language/1.8/no1.rb", "lib/text/hyphen/language/1.8/no2.rb", "lib/text/hyphen/language/1.8/pl.rb", "lib/text/hyphen/language/1.8/pt.rb", "lib/text/hyphen/language/1.8/sv.rb", "lib/text/hyphen/language/1.9/ca.rb", "lib/text/hyphen/language/1.9/cs.rb", "lib/text/hyphen/language/1.9/da.rb", "lib/text/hyphen/language/1.9/de1.rb", "lib/text/hyphen/language/1.9/de2.rb", "lib/text/hyphen/language/1.9/en_uk.rb", "lib/text/hyphen/language/1.9/en_us.rb", "lib/text/hyphen/language/1.9/es.rb", "lib/text/hyphen/language/1.9/et.rb", "lib/text/hyphen/language/1.9/eu.rb", "lib/text/hyphen/language/1.9/fi.rb", "lib/text/hyphen/language/1.9/fr.rb", "lib/text/hyphen/language/1.9/ga.rb", "lib/text/hyphen/language/1.9/hr.rb", "lib/text/hyphen/language/1.9/hsb.rb", "lib/text/hyphen/language/1.9/hu1.rb", "lib/text/hyphen/language/1.9/hu2.rb", "lib/text/hyphen/language/1.9/ia.rb", "lib/text/hyphen/language/1.9/id.rb", "lib/text/hyphen/language/1.9/is.rb", "lib/text/hyphen/language/1.9/it.rb", "lib/text/hyphen/language/1.9/la.rb", "lib/text/hyphen/language/1.9/mn.rb", "lib/text/hyphen/language/1.9/nl.rb", "lib/text/hyphen/language/1.9/no1.rb", "lib/text/hyphen/language/1.9/no2.rb", "lib/text/hyphen/language/1.9/pl.rb", "lib/text/hyphen/language/1.9/pt.rb", "lib/text/hyphen/language/1.9/sv.rb", "lib/text/hyphen/language/ca.rb", "lib/text/hyphen/language/cs.rb", "lib/text/hyphen/language/da.rb", "lib/text/hyphen/language/de.rb", "lib/text/hyphen/language/de1.rb", "lib/text/hyphen/language/de2.rb", "lib/text/hyphen/language/en_uk.rb", "lib/text/hyphen/language/en_us.rb", "lib/text/hyphen/language/es.rb", "lib/text/hyphen/language/et.rb", "lib/text/hyphen/language/eu.rb", "lib/text/hyphen/language/fi.rb", "lib/text/hyphen/language/fr.rb", "lib/text/hyphen/language/ga.rb", "lib/text/hyphen/language/hr.rb", "lib/text/hyphen/language/hsb.rb", "lib/text/hyphen/language/hu.rb", "lib/text/hyphen/language/hu1.rb", "lib/text/hyphen/language/hu2.rb", "lib/text/hyphen/language/ia.rb", "lib/text/hyphen/language/id.rb", "lib/text/hyphen/language/is.rb", "lib/text/hyphen/language/it.rb", "lib/text/hyphen/language/la.rb", "lib/text/hyphen/language/mn.rb", "lib/text/hyphen/language/ms.rb", "lib/text/hyphen/language/nl.rb", "lib/text/hyphen/language/no.rb", "lib/text/hyphen/language/no1.rb", "lib/text/hyphen/language/no2.rb", "lib/text/hyphen/language/pl.rb", "lib/text/hyphen/language/pt.rb", "lib/text/hyphen/language/sv.rb", "test/data/bug_9807_latin1.rb", "test/data/bug_9807_utf-8.rb", "test/test_bugs.rb", "test/test_text_hyphen.rb", "text-hyphen.gemspec", ".gemtest"]
|
15
|
+
s.rdoc_options = ["--main", "README.rdoc"]
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
s.rubyforge_project = "text-format"
|
18
|
+
s.rubygems_version = "1.8.21"
|
19
|
+
s.summary = "Text::Hyphen is a Ruby library to hyphenate words in various languages using Ruby-fied versions of TeX hyphenation patterns"
|
20
|
+
s.test_files = ["test/test_bugs.rb", "test/test_text_hyphen.rb"]
|
36
21
|
|
37
22
|
if s.respond_to? :specification_version then
|
38
23
|
s.specification_version = 3
|
39
24
|
|
40
25
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
26
|
s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
|
27
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
|
42
28
|
s.add_development_dependency(%q<hoe-doofus>, ["~> 1.0"])
|
43
29
|
s.add_development_dependency(%q<hoe-gemspec>, ["~> 1.0"])
|
44
30
|
s.add_development_dependency(%q<hoe-git>, ["~> 1.0"])
|
45
31
|
s.add_development_dependency(%q<hoe-seattlerb>, ["~> 1.0"])
|
46
|
-
s.add_development_dependency(%q<hoe>, ["
|
32
|
+
s.add_development_dependency(%q<hoe>, ["~> 3.0"])
|
47
33
|
else
|
48
34
|
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
35
|
+
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
49
36
|
s.add_dependency(%q<hoe-doofus>, ["~> 1.0"])
|
50
37
|
s.add_dependency(%q<hoe-gemspec>, ["~> 1.0"])
|
51
38
|
s.add_dependency(%q<hoe-git>, ["~> 1.0"])
|
52
39
|
s.add_dependency(%q<hoe-seattlerb>, ["~> 1.0"])
|
53
|
-
s.add_dependency(%q<hoe>, ["
|
40
|
+
s.add_dependency(%q<hoe>, ["~> 3.0"])
|
54
41
|
end
|
55
42
|
else
|
56
43
|
s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
|
44
|
+
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
57
45
|
s.add_dependency(%q<hoe-doofus>, ["~> 1.0"])
|
58
46
|
s.add_dependency(%q<hoe-gemspec>, ["~> 1.0"])
|
59
47
|
s.add_dependency(%q<hoe-git>, ["~> 1.0"])
|
60
48
|
s.add_dependency(%q<hoe-seattlerb>, ["~> 1.0"])
|
61
|
-
s.add_dependency(%q<hoe>, ["
|
49
|
+
s.add_dependency(%q<hoe>, ["~> 3.0"])
|
62
50
|
end
|
63
51
|
end
|
metadata
CHANGED
@@ -1,142 +1,171 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: text-hyphen
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.3'
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
version: "1.2"
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Austin Ziegler
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-06-21 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
20
15
|
name: rubyforge
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.0.4
|
22
|
+
type: :development
|
21
23
|
prerelease: false
|
22
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
25
|
none: false
|
24
|
-
requirements:
|
25
|
-
- -
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 7
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 0
|
31
|
-
- 4
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
32
29
|
version: 2.0.4
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rdoc
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '3.10'
|
33
38
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: hoe-doofus
|
37
39
|
prerelease: false
|
38
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
|
-
requirements:
|
42
|
+
requirements:
|
41
43
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '3.10'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: hoe-doofus
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.0'
|
48
54
|
type: :development
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: hoe-gemspec
|
52
55
|
prerelease: false
|
53
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: hoe-gemspec
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
54
65
|
none: false
|
55
|
-
requirements:
|
66
|
+
requirements:
|
56
67
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
segments:
|
60
|
-
- 1
|
61
|
-
- 0
|
62
|
-
version: "1.0"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.0'
|
63
70
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: hoe-git
|
67
71
|
prerelease: false
|
68
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
73
|
none: false
|
70
|
-
requirements:
|
74
|
+
requirements:
|
71
75
|
- - ~>
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: hoe-git
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.0'
|
78
86
|
type: :development
|
79
|
-
version_requirements: *id004
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: hoe-seattlerb
|
82
87
|
prerelease: false
|
83
|
-
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
89
|
none: false
|
85
|
-
requirements:
|
90
|
+
requirements:
|
86
91
|
- - ~>
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: hoe-seattlerb
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '1.0'
|
93
102
|
type: :development
|
94
|
-
version_requirements: *id005
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: hoe
|
97
103
|
prerelease: false
|
98
|
-
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: hoe
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
99
113
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
|
104
|
-
segments:
|
105
|
-
- 2
|
106
|
-
- 9
|
107
|
-
- 4
|
108
|
-
version: 2.9.4
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
109
118
|
type: :development
|
110
|
-
|
111
|
-
|
112
|
-
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '3.0'
|
126
|
+
description: ! 'Text::Hyphen is a Ruby library to hyphenate words in various languages
|
127
|
+
using
|
128
|
+
|
113
129
|
Ruby-fied versions of TeX hyphenation patterns. It will properly hyphenate
|
130
|
+
|
114
131
|
various words according to the rules of the language the word is written in.
|
132
|
+
|
115
133
|
The algorithm is based on that of the TeX typesetting system by Donald E.
|
134
|
+
|
116
135
|
Knuth.
|
117
|
-
|
136
|
+
|
137
|
+
|
118
138
|
This is originally based on the Perl implementation of
|
139
|
+
|
119
140
|
{TeX::Hyphen}[http://search.cpan.org/author/JANPAZ/TeX-Hyphen-0.140/lib/TeX/Hyphen.pm]
|
141
|
+
|
120
142
|
and the {Ruby port}[http://rubyforge.org/projects/text-format]. The language
|
143
|
+
|
121
144
|
hyphenation pattern files are based on the sources available from
|
145
|
+
|
122
146
|
{CTAN}[http://www.ctan.org] as of 2004.12.19 and have been manually translated
|
147
|
+
|
123
148
|
by Austin Ziegler.
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
149
|
+
|
150
|
+
|
151
|
+
This is a small feature release adding support for custom hyphens and fixing a
|
152
|
+
|
153
|
+
bug in ruby-hyphen. This release provides both Ruby 1.8.7 and Ruby 1.9.2
|
154
|
+
|
155
|
+
support. This is the last major release supporting Ruby 1.8 interpreters.
|
156
|
+
|
157
|
+
Future versions will only work with Ruby 1.9 or later interpreters.'
|
158
|
+
email:
|
129
159
|
- austin@rubyforge.org
|
130
|
-
executables:
|
160
|
+
executables:
|
131
161
|
- ruby-hyphen
|
132
162
|
extensions: []
|
133
|
-
|
134
|
-
extra_rdoc_files:
|
135
|
-
- Manifest.txt
|
163
|
+
extra_rdoc_files:
|
136
164
|
- History.rdoc
|
137
165
|
- License.rdoc
|
166
|
+
- Manifest.txt
|
138
167
|
- README.rdoc
|
139
|
-
files:
|
168
|
+
files:
|
140
169
|
- .autotest
|
141
170
|
- History.rdoc
|
142
171
|
- License.rdoc
|
@@ -246,38 +275,31 @@ files:
|
|
246
275
|
- .gemtest
|
247
276
|
homepage:
|
248
277
|
licenses: []
|
249
|
-
|
250
278
|
post_install_message:
|
251
|
-
rdoc_options:
|
279
|
+
rdoc_options:
|
252
280
|
- --main
|
253
281
|
- README.rdoc
|
254
|
-
require_paths:
|
282
|
+
require_paths:
|
255
283
|
- lib
|
256
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
284
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
257
285
|
none: false
|
258
|
-
requirements:
|
259
|
-
- -
|
260
|
-
- !ruby/object:Gem::Version
|
261
|
-
|
262
|
-
|
263
|
-
- 0
|
264
|
-
version: "0"
|
265
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
286
|
+
requirements:
|
287
|
+
- - ! '>='
|
288
|
+
- !ruby/object:Gem::Version
|
289
|
+
version: '0'
|
290
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
266
291
|
none: false
|
267
|
-
requirements:
|
268
|
-
- -
|
269
|
-
- !ruby/object:Gem::Version
|
270
|
-
|
271
|
-
segments:
|
272
|
-
- 0
|
273
|
-
version: "0"
|
292
|
+
requirements:
|
293
|
+
- - ! '>='
|
294
|
+
- !ruby/object:Gem::Version
|
295
|
+
version: '0'
|
274
296
|
requirements: []
|
275
|
-
|
276
297
|
rubyforge_project: text-format
|
277
|
-
rubygems_version: 1.8.
|
298
|
+
rubygems_version: 1.8.21
|
278
299
|
signing_key:
|
279
300
|
specification_version: 3
|
280
|
-
summary: Text::Hyphen is a Ruby library to hyphenate words in various languages using
|
281
|
-
|
301
|
+
summary: Text::Hyphen is a Ruby library to hyphenate words in various languages using
|
302
|
+
Ruby-fied versions of TeX hyphenation patterns
|
303
|
+
test_files:
|
282
304
|
- test/test_bugs.rb
|
283
305
|
- test/test_text_hyphen.rb
|