hermeneutics 1.13 → 1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hermeneutics/message.rb +2 -1
- data/lib/hermeneutics/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34855e35779618671f657756ec5e16cb4f57da8925d822a605aa5a727aa3362c
|
4
|
+
data.tar.gz: 6ebed997b49c501692cd829c2fd010fd06bd4ef34e1f76ca88a6970ca0ffab67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04a4d6586ee2dd68e571b6e5a4e9da0bc329fd715dd619a1c72392e0e68992dd6e84bd70f8542645545c8e9d25f81e46c2814cbc794ff0d4e3cd3a11f3794161
|
7
|
+
data.tar.gz: d44b4fdf6b8285938b3bf4bf66ec5f7627fdd274d0be9ca764ffc918dcfe2ddd431ca9ffdefa988ee6ac5f4e5cffafb5f4b4d227442e9b3dab0f8968835421cc
|
data/lib/hermeneutics/message.rb
CHANGED
@@ -23,12 +23,13 @@ module Hermeneutics
|
|
23
23
|
def parse input, **parameters
|
24
24
|
b = parameters[ :boundary]
|
25
25
|
b or raise ParseError, "Missing boundary parameter."
|
26
|
+
input.encode! input.encoding, universal_newline: true
|
26
27
|
list = input.split /^--#{Regexp.quote b}/
|
27
28
|
prolog = list.shift
|
28
29
|
epilog = list.pop
|
29
30
|
epilog and epilog.slice! /\A--\n/ or raise "Missing last separator."
|
30
31
|
list.each { |p|
|
31
|
-
p.slice! /\A\n/ or raise "Malformed separator."
|
32
|
+
p.slice! /\A\n/ or raise "Malformed separator: #{b + p[/.*/]}."
|
32
33
|
}
|
33
34
|
list.map! { |t| Message.parse t }
|
34
35
|
new b, prolog, list, epilog
|
data/lib/hermeneutics/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hermeneutics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.14'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: supplement
|