as2 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/as2/version.rb +1 -1
- data/lib/as2.rb +11 -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: e5d44130a76edfd15f3938df800fd0b82a0a14446ed064844250c33f0ba28c0c
|
4
|
+
data.tar.gz: b2436bd0539cefe5387e08042ba5bf1798282515c17d6c884eda08c7e9abd913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7ec66eff025813c21849d375933cef2e06c70ae658363ffce640d22ea72be73650908862307380e70da03510765016b99bf60a65f6f56f432d4e3381eab8ee4
|
7
|
+
data.tar.gz: 5f9747317e5675e292ea80f02b01de73a0d14e78c60236970f81a8a68a3cefb0535b2bd9c4d2b6fee7e95399746fd773f40de5481db2975fe2f21c9ce5c7178e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.9.0, August 28, 2023
|
2
|
+
|
3
|
+
* Bugfix for quoting AS2-From/AS2-To identifiers
|
4
|
+
* Add utility method for un-quoting identifiers
|
5
|
+
|
6
|
+
both implemented in [#33](https://github.com/alexdean/as2/pull/33)
|
7
|
+
|
1
8
|
## 0.8.0, August 25, 2023
|
2
9
|
|
3
10
|
* Quote AS2-From/AS2-To identifiers which contain spaces. [#30](https://github.com/alexdean/as2/pull/30)
|
data/lib/as2/version.rb
CHANGED
data/lib/as2.rb
CHANGED
@@ -38,10 +38,20 @@ module As2
|
|
38
38
|
|
39
39
|
# surround an As2-From/As2-To value with double-quotes, if it contains a space.
|
40
40
|
def self.quoted_system_identifier(name)
|
41
|
-
if name.to_s.include?(' ')
|
41
|
+
if name.to_s.include?(' ') && !name.to_s.start_with?('"')
|
42
42
|
"\"#{name}\""
|
43
43
|
else
|
44
44
|
name
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
# remove double-quotes from an As2-From/As2-To value, if it contains any.
|
49
|
+
# this is useful in client code which may not automatically strip these quotes from a header value.
|
50
|
+
def self.unquoted_system_identifier(name)
|
51
|
+
if !name.is_a?(String)
|
52
|
+
return name
|
53
|
+
end
|
54
|
+
|
55
|
+
name.delete_prefix('"').delete_suffix('"').gsub('\"', '"')
|
56
|
+
end
|
47
57
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: as2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OfficeLuv
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-08-
|
12
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mail
|