opulent 1.5.3 → 1.5.4
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/opulent/compiler.rb +3 -3
- data/lib/opulent/parser.rb +2 -3
- data/lib/opulent/parser/include.rb +3 -2
- data/lib/opulent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395e17141bef9fd37e7127c56fed28d6550781e6
|
4
|
+
data.tar.gz: 5da0167d2de3f8f53d9e1c3f730eadfa21c27422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb537d3ab7b7aa7e5f422145e361e1e125abf20b4af845be3fb305197390ce8486ac0b54d6ffd7af84bb2cbb5e812432060c36d61f97b5cb1da4a7ed63736c84
|
7
|
+
data.tar.gz: 42bc66550b27c609fee7a84202aad550de2c2eac5fbca371c4ac1007e6405e3df7dc0f8e3654cae5c4ce5086b725ad1aeffdeed66efeaded466bfbcd0da10939
|
data/lib/opulent/compiler.rb
CHANGED
@@ -96,10 +96,10 @@ module Opulent
|
|
96
96
|
#
|
97
97
|
def indent_lines(text, indent)
|
98
98
|
text ||= ''
|
99
|
-
text.lines.inject('') do |
|
100
|
-
indent + line
|
99
|
+
text.lines.inject('') do |result, line|
|
100
|
+
result += indent + line
|
101
101
|
end
|
102
|
-
end
|
102
|
+
end
|
103
103
|
|
104
104
|
# Give an explicit error report where an unexpected sequence of tokens
|
105
105
|
# appears and give indications on how to solve it
|
data/lib/opulent/parser.rb
CHANGED
@@ -154,10 +154,9 @@ module Opulent
|
|
154
154
|
#
|
155
155
|
def indent_lines(text, indent)
|
156
156
|
text ||= ''
|
157
|
-
text.lines.inject('') do |
|
158
|
-
indent + line
|
157
|
+
text.lines.inject('') do |result, line|
|
158
|
+
result += indent + line
|
159
159
|
end
|
160
|
-
text
|
161
160
|
end
|
162
161
|
|
163
162
|
# Give an explicit error report where an unexpected sequence of tokens
|
@@ -49,8 +49,9 @@ module Opulent
|
|
49
49
|
error :include, file unless File.file? file
|
50
50
|
|
51
51
|
# Indent all lines and prepare them for the parser
|
52
|
-
lines = indent_lines File.read(file),
|
53
|
-
lines <<
|
52
|
+
lines = indent_lines File.read(file), ' ' * indent
|
53
|
+
lines << ' '
|
54
|
+
|
54
55
|
# Indent all the output lines with the current indentation
|
55
56
|
@code.insert @i + 1, *lines.lines
|
56
57
|
end
|
data/lib/opulent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opulent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Grozav
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|