textutils 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/lib/textutils.rb +2 -14
- data/lib/textutils/reader/values_reader.rb +10 -1
- data/lib/textutils/version.rb +18 -1
- data/test/helper.rb +5 -0
- metadata +34 -47
- checksums.yaml +0 -7
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'hoe'
|
|
2
2
|
require './lib/textutils/version.rb'
|
3
3
|
|
4
4
|
Hoe.spec 'textutils' do
|
5
|
-
|
5
|
+
|
6
6
|
self.version = TextUtils::VERSION
|
7
7
|
|
8
8
|
self.summary = 'textutils - Text Filters, Helpers, Readers and More'
|
@@ -19,7 +19,7 @@ Hoe.spec 'textutils' do
|
|
19
19
|
|
20
20
|
self.extra_deps = [
|
21
21
|
['props'],
|
22
|
-
['logutils'
|
22
|
+
['logutils'],
|
23
23
|
### 3rd party gems
|
24
24
|
['activesupport']
|
25
25
|
]
|
data/lib/textutils.rb
CHANGED
@@ -21,7 +21,8 @@ require 'logutils'
|
|
21
21
|
|
22
22
|
# our own code
|
23
23
|
|
24
|
-
require 'textutils/version'
|
24
|
+
require 'textutils/version' ## let version always go first
|
25
|
+
|
25
26
|
|
26
27
|
require 'textutils/patterns' # regex patterns for reuse
|
27
28
|
require 'textutils/sanitizier'
|
@@ -64,18 +65,5 @@ require 'textutils/page' # for book pages and page templates
|
|
64
65
|
|
65
66
|
|
66
67
|
|
67
|
-
module TextUtils
|
68
|
-
|
69
|
-
def self.banner
|
70
|
-
"textutils/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.root
|
74
|
-
"#{File.expand_path( File.dirname(File.dirname(__FILE__)) )}"
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
|
80
68
|
|
81
69
|
puts TextUtils.banner if $DEBUG # say hello
|
@@ -59,7 +59,8 @@ class ValuesReader
|
|
59
59
|
## % comment
|
60
60
|
## why? # might get used by markdown for marking headers, for example
|
61
61
|
|
62
|
-
|
62
|
+
|
63
|
+
## NOTE: for now alternative comment lines not allowed as end of line style e.g
|
63
64
|
## some data, more data -- comment here
|
64
65
|
|
65
66
|
if line =~ /^\s*#/ ||
|
@@ -78,6 +79,14 @@ class ValuesReader
|
|
78
79
|
next
|
79
80
|
end
|
80
81
|
|
82
|
+
### NOTE: skip sections lines (marked w/ at least ==) for now
|
83
|
+
### e.g. === Waldviertel ===
|
84
|
+
if line =~ /^\s*={2,}\s+/
|
85
|
+
logger.debug "skipping section line |»#{line}«|"
|
86
|
+
next
|
87
|
+
end
|
88
|
+
|
89
|
+
|
81
90
|
# pass 1) remove possible trailing eol comment
|
82
91
|
## e.g -> nyc, New York # Sample EOL Comment Here (with or without commas,,,,)
|
83
92
|
## becomes -> nyc, New York
|
data/lib/textutils/version.rb
CHANGED
@@ -1,7 +1,24 @@
|
|
1
1
|
|
2
2
|
module TextUtils
|
3
3
|
|
4
|
-
VERSION = '0.9.
|
4
|
+
VERSION = '0.9.5'
|
5
|
+
|
6
|
+
MAJOR = 0 ## todo: namespace inside version or something - why? why not??
|
7
|
+
MINOR = 9
|
8
|
+
PATCH = 5
|
9
|
+
VERSION = [MAJOR,MINOR,PATCH].join('.')
|
10
|
+
|
11
|
+
def self.version
|
12
|
+
VERSION
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.banner
|
16
|
+
"textutils/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.root
|
20
|
+
"#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
|
21
|
+
end
|
5
22
|
|
6
23
|
end # module TextUtils
|
7
24
|
|
data/test/helper.rb
CHANGED
@@ -12,6 +12,11 @@ require 'minitest/autorun'
|
|
12
12
|
# note: just activesupport or active_support will NOT work
|
13
13
|
# require 'active_support/all' # -- now included in textutils itself
|
14
14
|
|
15
|
+
|
16
|
+
### note: do avoid version conflict require prop n prop/db first
|
17
|
+
require 'props'
|
18
|
+
require 'props/db'
|
19
|
+
|
15
20
|
## our own code
|
16
21
|
|
17
22
|
require 'textutils'
|
metadata
CHANGED
@@ -1,85 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Gerald Bauer
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: props
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &80774090 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
|
-
version_requirements:
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
24
|
+
version_requirements: *80774090
|
27
25
|
- !ruby/object:Gem::Dependency
|
28
26
|
name: logutils
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &80773630 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
30
29
|
requirements:
|
31
|
-
- -
|
30
|
+
- - ! '>='
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
32
|
+
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements:
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.5'
|
35
|
+
version_requirements: *80773630
|
41
36
|
- !ruby/object:Gem::Dependency
|
42
37
|
name: activesupport
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &80773320 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
44
40
|
requirements:
|
45
41
|
- - ! '>='
|
46
42
|
- !ruby/object:Gem::Version
|
47
43
|
version: '0'
|
48
44
|
type: :runtime
|
49
45
|
prerelease: false
|
50
|
-
version_requirements:
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
46
|
+
version_requirements: *80773320
|
55
47
|
- !ruby/object:Gem::Dependency
|
56
48
|
name: rdoc
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &80772810 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '4.0'
|
62
55
|
type: :development
|
63
56
|
prerelease: false
|
64
|
-
version_requirements:
|
65
|
-
requirements:
|
66
|
-
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '4.0'
|
57
|
+
version_requirements: *80772810
|
69
58
|
- !ruby/object:Gem::Dependency
|
70
59
|
name: hoe
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &80772360 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
72
62
|
requirements:
|
73
63
|
- - ~>
|
74
64
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
65
|
+
version: '3.12'
|
76
66
|
type: :development
|
77
67
|
prerelease: false
|
78
|
-
version_requirements:
|
79
|
-
requirements:
|
80
|
-
- - ~>
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.6'
|
68
|
+
version_requirements: *80772360
|
83
69
|
description: textutils - Text Filters, Helpers, Readers and More
|
84
70
|
email: ruby-talk@ruby-lang.org
|
85
71
|
executables: []
|
@@ -142,7 +128,6 @@ files:
|
|
142
128
|
homepage: https://github.com/rubylibs/textutils
|
143
129
|
licenses:
|
144
130
|
- Public Domain
|
145
|
-
metadata: {}
|
146
131
|
post_install_message:
|
147
132
|
rdoc_options:
|
148
133
|
- --main
|
@@ -150,30 +135,32 @@ rdoc_options:
|
|
150
135
|
require_paths:
|
151
136
|
- lib
|
152
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
153
139
|
requirements:
|
154
140
|
- - ! '>='
|
155
141
|
- !ruby/object:Gem::Version
|
156
142
|
version: 1.9.2
|
157
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
158
145
|
requirements:
|
159
146
|
- - ! '>='
|
160
147
|
- !ruby/object:Gem::Version
|
161
148
|
version: '0'
|
162
149
|
requirements: []
|
163
|
-
rubyforge_project:
|
164
|
-
rubygems_version:
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 1.8.17
|
165
152
|
signing_key:
|
166
|
-
specification_version:
|
153
|
+
specification_version: 3
|
167
154
|
summary: textutils - Text Filters, Helpers, Readers and More
|
168
155
|
test_files:
|
169
|
-
- test/test_address_helper.rb
|
170
|
-
- test/test_asciify.rb
|
171
|
-
- test/test_fixture_reader.rb
|
172
|
-
- test/test_hypertext_helper.rb
|
173
|
-
- test/test_slugify.rb
|
174
|
-
- test/test_taglist.rb
|
175
156
|
- test/test_title_finder.rb
|
176
|
-
- test/
|
177
|
-
- test/test_title_mapper.rb
|
157
|
+
- test/test_fixture_reader.rb
|
178
158
|
- test/test_unicode_helper.rb
|
159
|
+
- test/test_asciify.rb
|
160
|
+
- test/test_title_mapper.rb
|
179
161
|
- test/test_values_reader.rb
|
162
|
+
- test/test_taglist.rb
|
163
|
+
- test/test_hypertext_helper.rb
|
164
|
+
- test/test_title_helper.rb
|
165
|
+
- test/test_slugify.rb
|
166
|
+
- test/test_address_helper.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 6ad93ecf2ba9da009db3c9ff65a28e1cbb3e3a57
|
4
|
-
data.tar.gz: fadad4266d54d98ca9cd9ac4a1703eeef55359eb
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: bedec60d753bfeaea83bf9b756e14bbb67bdc454868750243838b7297e4ac48860d12b2d3be9d01b5ccb05e4949469c7b2f68a772fde25021dd36e3bd1b5cc39
|
7
|
-
data.tar.gz: 990d161911ec07a6e3761d3558c9aa9053b887ceef88323025995260a2c244a8dfd07e55ba672fcd40d5ccf548855c1464cde9efd93fdc1e0c3c1f69cce4a21a
|