belletrist 1.1.3 → 1.1.5
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/CHANGELOG.md +6 -0
- data/lib/belletrist/html.rb +3 -3
- data/lib/belletrist/json.rb +2 -2
- data/lib/belletrist/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: 1f0f1d479b8c6051f12cb0c10cee19d9d5764f2784c97e697288fba65e919e4e
|
|
4
|
+
data.tar.gz: ddbdf0ad94232105262f792a3909b3560ec3753ba8219978b682137438416539
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c841572188dc02ad3c0e86600d0576de6669e433d9433efd695df6c67a69cc158d988f2a0082c2136c8d03cb29bc567f078b26e2484be49f3c04b4ec78d232b
|
|
7
|
+
data.tar.gz: 17e566bf4e25a7ff2fb56f67cb17e323f80eaa5763916df58d918bb32e568622f7d23f5b2d20cffa3f299ca882fe07adc37f99e0b4c6134d387c63cdc44b70f8
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
This file contains general, high level explanations of the differences between versions. Please check the commmit
|
|
3
3
|
history for further details.
|
|
4
4
|
|
|
5
|
+
## 1.1.5
|
|
6
|
+
* Fixed issue with Belletrist::JSON using relative namespacing, and completely breaking outside of tests as a result.
|
|
7
|
+
|
|
8
|
+
## 1.1.4
|
|
9
|
+
* Fixed sanitizer failing on non-string values, by converting everything to a string beforehand.
|
|
10
|
+
|
|
5
11
|
## 1.1.3
|
|
6
12
|
* Added `model` argument to the `component` method of `HTML::Element`. This allows easier access to the root object
|
|
7
13
|
for purposes of getting values sent into the subclass, for component usage.
|
data/lib/belletrist/html.rb
CHANGED
|
@@ -53,15 +53,15 @@ module Belletrist::HTML
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
private def s_key(key)
|
|
56
|
-
key.gsub(/\W/, '')
|
|
56
|
+
key.to_s.gsub(/\W/, '')
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
private def s_quoted(value)
|
|
60
|
-
value.gsub(/"/, '"')
|
|
60
|
+
value.to_s.gsub(/"/, '"')
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
private def s_txt(text)
|
|
64
|
-
text.gsub(ESCAPE_HTML_PATTERN, ESCAPE_HTML)
|
|
64
|
+
text.to_s.gsub(ESCAPE_HTML_PATTERN, ESCAPE_HTML)
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def to_s
|
data/lib/belletrist/json.rb
CHANGED
|
@@ -72,7 +72,7 @@ module Belletrist::JSON
|
|
|
72
72
|
value = '{'
|
|
73
73
|
@elements.each_index do |i|
|
|
74
74
|
item = @elements[i]
|
|
75
|
-
value += "#{JSON.sanitize(item.key)}:#{JSON.sanitize(item.value)}"
|
|
75
|
+
value += "#{Belletrist::JSON.sanitize(item.key)}:#{Belletrist::JSON.sanitize(item.value)}"
|
|
76
76
|
value += ',' unless i + 1 == @elements.length
|
|
77
77
|
end
|
|
78
78
|
value + '}'
|
|
@@ -119,7 +119,7 @@ module Belletrist::JSON
|
|
|
119
119
|
value = '['
|
|
120
120
|
@elements.each_index do |i|
|
|
121
121
|
item = @elements[i]
|
|
122
|
-
value += JSON.sanitize(item)
|
|
122
|
+
value += Belletrist::JSON.sanitize(item)
|
|
123
123
|
value += ',' unless i + 1 == @elements.length
|
|
124
124
|
end
|
|
125
125
|
value + ']'
|
data/lib/belletrist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: belletrist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juniper
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-12-
|
|
11
|
+
date: 2023-12-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |
|
|
14
14
|
Belletrist is a collection of Ruby DSLs for generation of different data file types. Currently, HTML and JSON are
|