slaw 10.3.1 → 10.4.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 +4 -4
- data/.travis.yml +0 -1
- data/README.md +4 -0
- data/lib/slaw/extract/extractor.rb +2 -9
- data/lib/slaw/version.rb +1 -1
- data/slaw.gemspec +0 -1
- metadata +5 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e20546bab171b4b78f42ebd1d1a38bc246253a25423ff48067483f15d4806f71
|
|
4
|
+
data.tar.gz: 4f5899aa5565c5a70714c2edb78774468d79620d992deef7c66991c526f63a8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3d8d3dd989a852d7950deb9bc3172788f475fdfa9b6342d0d92d1ba8f60ad973ed3efc7029086e80a915672e8098e99cbbd3ad654692a103e222e3f480f53bd
|
|
7
|
+
data.tar.gz: c605715d80d4704c619c19dd5578ed70189c302ad77d7adce70fee6b52c57b095570b041f43de24a9705fd80da924274dcb21217e2df8442b352ce082a1c4bf2
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
|
@@ -86,6 +86,10 @@ You can create your own grammar by creating a gem that provides these files and
|
|
|
86
86
|
|
|
87
87
|
## Changelog
|
|
88
88
|
|
|
89
|
+
### 10.4.0 (9 April 2021)
|
|
90
|
+
|
|
91
|
+
* Remove dependency on mimemagic. Guess file type based on filename instead.
|
|
92
|
+
|
|
89
93
|
### 10.3.1 (11 January 2021)
|
|
90
94
|
|
|
91
95
|
* Strip ascii, unicode general and unicode supplemental punctuation from num elements when building eIds
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'mimemagic'
|
|
2
|
-
|
|
3
1
|
module Slaw
|
|
4
2
|
module Extract
|
|
5
3
|
|
|
@@ -13,15 +11,10 @@ module Slaw
|
|
|
13
11
|
#
|
|
14
12
|
# @return [String] extracted text
|
|
15
13
|
def extract_from_file(filename)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
case mimetype && mimetype.type
|
|
19
|
-
when 'text/html'
|
|
14
|
+
if filename.end_with? '.html' or filename.end_with? '.htm'
|
|
20
15
|
extract_from_html(filename)
|
|
21
|
-
when 'text/plain', nil
|
|
22
|
-
extract_from_text(filename)
|
|
23
16
|
else
|
|
24
|
-
|
|
17
|
+
extract_from_text(filename)
|
|
25
18
|
end
|
|
26
19
|
end
|
|
27
20
|
|
data/lib/slaw/version.rb
CHANGED
data/slaw.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slaw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.
|
|
4
|
+
version: 10.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Kempe
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-04-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -94,20 +94,6 @@ dependencies:
|
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0.20'
|
|
97
|
-
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: mimemagic
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - "~>"
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0.2'
|
|
104
|
-
type: :runtime
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0.2'
|
|
111
97
|
description: Slaw is a lightweight library for rendering and generating Akoma Ntoso
|
|
112
98
|
acts from plain text and PDF documents.
|
|
113
99
|
email:
|
|
@@ -173,7 +159,7 @@ homepage: https://github.com/longhotsummer/slaw
|
|
|
173
159
|
licenses:
|
|
174
160
|
- MIT
|
|
175
161
|
metadata: {}
|
|
176
|
-
post_install_message:
|
|
162
|
+
post_install_message:
|
|
177
163
|
rdoc_options: []
|
|
178
164
|
require_paths:
|
|
179
165
|
- lib
|
|
@@ -189,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
189
175
|
version: '0'
|
|
190
176
|
requirements: []
|
|
191
177
|
rubygems_version: 3.0.3
|
|
192
|
-
signing_key:
|
|
178
|
+
signing_key:
|
|
193
179
|
specification_version: 4
|
|
194
180
|
summary: A lightweight library for using Akoma Ntoso acts in Ruby.
|
|
195
181
|
test_files:
|