raindeer 0.9.6 → 0.9.7
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/lib/pages/pages.rb +5 -2
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a65cfafebe6c40a42c885d5ff24ca837fc3e8ee16bacdcce220f15c9fe2ac35e
|
|
4
|
+
data.tar.gz: 1465115922c8a788445a3ff296569c20d12c7003bf58c974d416b87a97bae5a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a3cf8434cd2cefb1fac0e43c3a5426ca513cca3f1ccadb2da58b1da734485256fb69ddc068674f8903e4ff417f41e109d95e1eba335d6e0e91810fee90f6e25
|
|
7
|
+
data.tar.gz: a0976b11aac755fa865c4f9272a7ea2e7c8cbe9ea041393017ae54c2f00018943e80bb9405ec055bc870070690fd928a9565672151021049d84b5a1ab9d294c3
|
data/lib/pages/pages.rb
CHANGED
|
@@ -100,7 +100,9 @@ module Rain
|
|
|
100
100
|
data_lines = []
|
|
101
101
|
text_lines = []
|
|
102
102
|
|
|
103
|
-
File.foreach(file_path
|
|
103
|
+
File.foreach(file_path) do |line|
|
|
104
|
+
line.force_encoding('UTF-8')
|
|
105
|
+
|
|
104
106
|
if line.strip == '---' && dash_lines.count < 2
|
|
105
107
|
dash_lines << line
|
|
106
108
|
next
|
|
@@ -114,7 +116,8 @@ module Rain
|
|
|
114
116
|
text_lines << line
|
|
115
117
|
end
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
metadata = YAML.safe_load(data_lines.join, symbolize_names: true) || []
|
|
120
|
+
[metadata, text_lines.join.strip]
|
|
118
121
|
end
|
|
119
122
|
|
|
120
123
|
class << self
|
data/lib/version.rb
CHANGED