text-reform 0.2.0 → 0.3.0
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 +7 -0
- data/Gemfile +3 -0
- data/HACKING +5 -0
- data/History.txt +14 -0
- data/LICENSE +23 -0
- data/Manifest.txt +11 -0
- data/README +49 -36
- data/lib/text/reform.rb +1541 -1541
- data/{tests/tc_text_reform.rb → test/test_text_reform.rb} +448 -451
- metadata +58 -53
- data/Changelog +0 -5
- data/Install +0 -4
- data/Rakefile +0 -116
- data/TODO +0 -5
- data/tests/testall.rb +0 -20
metadata
CHANGED
@@ -1,58 +1,63 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.4
|
3
|
-
specification_version: 1
|
1
|
+
--- !ruby/object:Gem::Specification
|
4
2
|
name: text-reform
|
5
|
-
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2005-01-19
|
8
|
-
summary: Text::Reform reformats text according to formatting pictures.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: eule@space.ch
|
12
|
-
homepage: http://rubyforge.org/projects/text-format
|
13
|
-
rubyforge_project: text-reform
|
14
|
-
description: ''
|
15
|
-
autorequire: text/format
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
-
|
22
|
-
- ">"
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: 0.0.0
|
25
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
26
5
|
platform: ruby
|
27
|
-
authors:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
extra_rdoc_files: []
|
6
|
+
authors:
|
7
|
+
- Kaspar Schiess
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |-
|
14
|
+
Text::Reform reformats text according to formatting picture templates. It's a
|
15
|
+
port from the Perl module of the same name originally by Damian Conway
|
16
|
+
(damian@conway.org). Much of the documentation has been copied from the
|
17
|
+
original documentation and adapted to the Ruby version.
|
18
|
+
|
19
|
+
The interface is subject to change, since it will undergo major Rubyfication;
|
20
|
+
additionally, some features may have not been ported yet.
|
21
|
+
email:
|
22
|
+
- kaspar.schiess@absurd.li
|
45
23
|
executables: []
|
46
24
|
extensions: []
|
25
|
+
extra_rdoc_files:
|
26
|
+
- README
|
27
|
+
files:
|
28
|
+
- Gemfile
|
29
|
+
- HACKING
|
30
|
+
- History.txt
|
31
|
+
- LICENSE
|
32
|
+
- Manifest.txt
|
33
|
+
- README
|
34
|
+
- lib/text/reform.rb
|
35
|
+
- test/test_text_reform.rb
|
36
|
+
homepage: https://github.com/kschiess/text-reform
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options:
|
42
|
+
- "--main"
|
43
|
+
- README
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
47
56
|
requirements: []
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
- "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: 1.0.0
|
58
|
-
version:
|
57
|
+
rubyforge_project: text-format
|
58
|
+
rubygems_version: 2.2.1
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Text::Reform reformats text according to formatting picture templates
|
62
|
+
test_files:
|
63
|
+
- test/test_text_reform.rb
|
data/Changelog
DELETED
data/Install
DELETED
data/Rakefile
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
#! /usr/bin/env rake
|
2
|
-
$LOAD_PATH.unshift('lib')
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
require 'rake/gempackagetask'
|
6
|
-
require 'text/reform'
|
7
|
-
require 'archive/tar/minitar'
|
8
|
-
require 'zlib'
|
9
|
-
|
10
|
-
DISTDIR = "text-reform-#{Text::Reform::VERSION}"
|
11
|
-
TARDIST = "../#{DISTDIR}.tar.gz"
|
12
|
-
|
13
|
-
DATE_RE = %r<(\d{4})[./-]?(\d{2})[./-]?(\d{2})(?:[\sT]?(\d{2})[:.]?(\d{2})[:.]?(\d{2})?)?>
|
14
|
-
|
15
|
-
if ENV['RELEASE_DATE']
|
16
|
-
year, month, day, hour, minute, second = DATE_RE.match(ENV['RELEASE_DATE']).captures
|
17
|
-
year ||= 0
|
18
|
-
month ||= 0
|
19
|
-
day ||= 0
|
20
|
-
hour ||= 0
|
21
|
-
minute ||= 0
|
22
|
-
second ||= 0
|
23
|
-
ReleaseDate = Time.mktime(year, month, day, hour, minute, second)
|
24
|
-
else
|
25
|
-
ReleaseDate = nil
|
26
|
-
end
|
27
|
-
|
28
|
-
task :test do |t|
|
29
|
-
require 'test/unit/testsuite'
|
30
|
-
require 'test/unit/ui/console/testrunner'
|
31
|
-
|
32
|
-
runner = Test::Unit::UI::Console::TestRunner
|
33
|
-
|
34
|
-
$LOAD_PATH.unshift('tests')
|
35
|
-
$stderr.puts "Checking for test cases:" if t.verbose
|
36
|
-
Dir['tests/tc_*.rb'].each do |testcase|
|
37
|
-
$stderr.puts "\t#{testcase}" if t.verbose
|
38
|
-
load testcase
|
39
|
-
end
|
40
|
-
|
41
|
-
suite = Test::Unit::TestSuite.new("Text::Reform")
|
42
|
-
|
43
|
-
ObjectSpace.each_object(Class) do |testcase|
|
44
|
-
suite << testcase.suite if testcase < Test::Unit::TestCase
|
45
|
-
end
|
46
|
-
|
47
|
-
runner.run(suite)
|
48
|
-
end
|
49
|
-
|
50
|
-
spec = eval(File.read("text-reform.gemspec"))
|
51
|
-
spec.version = Text::Reform::VERSION
|
52
|
-
desc "Build the RubyGem for Text::Reform"
|
53
|
-
task :gem => [ :test ]
|
54
|
-
Rake::GemPackageTask.new(spec) do |g|
|
55
|
-
g.need_tar = false
|
56
|
-
g.need_zip = false
|
57
|
-
g.package_dir = ".."
|
58
|
-
end
|
59
|
-
|
60
|
-
desc "Build a Text::Reform .tar.gz distribution."
|
61
|
-
task :tar => [ TARDIST ]
|
62
|
-
file TARDIST => [ :test ] do |t|
|
63
|
-
current = File.basename(Dir.pwd)
|
64
|
-
Dir.chdir("..") do
|
65
|
-
begin
|
66
|
-
files = Dir["#{current}/**/*"].select { |dd| dd !~ %r{(?:/CVS/?|~$)} }
|
67
|
-
files.map! do |dd|
|
68
|
-
ddnew = dd.gsub(/^#{current}/, DISTDIR)
|
69
|
-
mtime = ReleaseDate || File.stat(dd).mtime
|
70
|
-
if File.directory?(dd)
|
71
|
-
{ :name => ddnew, :mode => 0755, :dir => true, :mtime => mtime }
|
72
|
-
else
|
73
|
-
if dd =~ %r{bin/}
|
74
|
-
mode = 0755
|
75
|
-
else
|
76
|
-
mode = 0644
|
77
|
-
end
|
78
|
-
data = File.read(dd)
|
79
|
-
{ :name => ddnew, :mode => mode, :data => data, :size => data.size,
|
80
|
-
:mtime => mtime }
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
ff = File.open(t.name.gsub(%r{^\.\./}o, ''), "wb")
|
85
|
-
gz = Zlib::GzipWriter.new(ff)
|
86
|
-
tw = Archive::Tar::Minitar::Writer.new(gz)
|
87
|
-
|
88
|
-
files.each do |entry|
|
89
|
-
if entry[:dir]
|
90
|
-
tw.mkdir(entry[:name], entry)
|
91
|
-
else
|
92
|
-
tw.add_file_simple(entry[:name], entry) { |os| os.write(entry[:data]) }
|
93
|
-
end
|
94
|
-
end
|
95
|
-
ensure
|
96
|
-
tw.close if tw
|
97
|
-
gz.close if gz
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
101
|
-
task TARDIST => [ :test ]
|
102
|
-
|
103
|
-
def sign(file)
|
104
|
-
system %("C:/Program Files/Windows Privacy Tools/GnuPG/gpg.exe" -ba #{file}).gsub(%r{/}) { "\\" }
|
105
|
-
raise "Error signing with GPG." unless File.exists?("#{file}.asc")
|
106
|
-
end
|
107
|
-
|
108
|
-
task :signtar => [ :tar ] do
|
109
|
-
sign TARDIST
|
110
|
-
end
|
111
|
-
task :signgem => [ :gem ] do
|
112
|
-
sign "../#{DISTDIR}.gem"
|
113
|
-
end
|
114
|
-
|
115
|
-
desc "Build everything."
|
116
|
-
task :default => [ :signtar, :signgem ]
|
data/TODO
DELETED
data/tests/testall.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#--
|
3
|
-
# Ruwiki version 0.8.0
|
4
|
-
# Copyright � 2002 - 2003, Digikata and HaloStatue
|
5
|
-
# Alan Chen (alan@digikata.com)
|
6
|
-
# Austin Ziegler (ruwiki@halostatue.ca)
|
7
|
-
#
|
8
|
-
# Licensed under the same terms as Ruby.
|
9
|
-
#
|
10
|
-
# $Id: testall.rb,v 1.1.1.1 2005/01/18 11:15:55 eule Exp $
|
11
|
-
#++
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
|
14
|
-
|
15
|
-
puts "Checking for test cases:"
|
16
|
-
Dir['tc*.rb'].each do |testcase|
|
17
|
-
puts "\t#{testcase}"
|
18
|
-
require testcase
|
19
|
-
end
|
20
|
-
puts " "
|