w_syntax_tree-erb 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile.lock +7 -7
- data/lib/syntax_tree/erb/format.rb +6 -5
- data/lib/syntax_tree/erb/version.rb +1 -1
- data/syntax_tree-erb.gemspec +6 -6
- metadata +30 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7625d38e4764dc486d61c0141a4e25892efa6fc993779b08885110dd55f830e6
|
4
|
+
data.tar.gz: 1551342a3b0550f0e59bf92c184586f0b8ea401bb2c4f55058e6fb1b7d0759f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c737cc77acef8c790b3e08a99aacc509e01e69ea67a70ecfa2684db9034bcb65c4ec7cb705fafe6e8c147a8f0a4237d015ebeedddd213e26c7a75fe123348618
|
7
|
+
data.tar.gz: 38f27bdf74980a3fae073b2fc5ff5e2114eacfe69886da0b819e62ac5547ae220e369de722a0284aa556dfce2f1e00e3b61364838e43438961119891fdf4f2b8
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.9.5] - 2023-07-02
|
10
|
+
|
11
|
+
- Fixes ruby comment in ERB-tag included VoidStatement
|
12
|
+
Example:
|
13
|
+
|
14
|
+
```erb
|
15
|
+
<% # this is a comment %>
|
16
|
+
```
|
17
|
+
|
18
|
+
Output:
|
19
|
+
|
20
|
+
```diff
|
21
|
+
-<%
|
22
|
+
-
|
23
|
+
- # this is a comment
|
24
|
+
-%>
|
25
|
+
+<% # this is a comment %>
|
26
|
+
```
|
27
|
+
|
28
|
+
- Updates versions in Bundler
|
29
|
+
|
9
30
|
## [0.9.4] - 2023-07-01
|
10
31
|
|
11
32
|
- Inline even more empty HTML-tags
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
w_syntax_tree-erb (0.9.
|
5
|
-
prettier_print (>= 1.2.0)
|
6
|
-
syntax_tree (>= 6.1.1)
|
4
|
+
w_syntax_tree-erb (0.9.5)
|
5
|
+
prettier_print (~> 1.2, >= 1.2.0)
|
6
|
+
syntax_tree (~> 6.1, >= 6.1.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -28,10 +28,10 @@ PLATFORMS
|
|
28
28
|
x86_64-linux
|
29
29
|
|
30
30
|
DEPENDENCIES
|
31
|
-
bundler
|
32
|
-
minitest
|
33
|
-
rake
|
34
|
-
simplecov
|
31
|
+
bundler (~> 2)
|
32
|
+
minitest (~> 5)
|
33
|
+
rake (~> 13)
|
34
|
+
simplecov (~> 0.22)
|
35
35
|
w_syntax_tree-erb!
|
36
36
|
|
37
37
|
BUNDLED WITH
|
@@ -118,18 +118,19 @@ module SyntaxTree
|
|
118
118
|
if node.value.is_a?(String)
|
119
119
|
output_rows(node.value.split("\n"))
|
120
120
|
else
|
121
|
-
|
121
|
+
nodes = node.value&.statements&.child_nodes || []
|
122
|
+
nodes = nodes.reject { |node| node.is_a?(SyntaxTree::VoidStmt) }
|
122
123
|
|
123
|
-
if
|
124
|
+
if nodes.size == 1
|
124
125
|
q.text(" ")
|
125
|
-
q.seplist(
|
126
|
+
q.seplist(nodes, -> { q.breakable("") }) do |child_node|
|
126
127
|
format_statement(child_node)
|
127
128
|
end
|
128
129
|
q.text(" ")
|
129
|
-
elsif
|
130
|
+
elsif nodes.size > 1
|
130
131
|
q.indent do
|
131
132
|
q.breakable("")
|
132
|
-
q.seplist(
|
133
|
+
q.seplist(nodes, -> { q.breakable("") }) do |child_node|
|
133
134
|
format_statement(child_node)
|
134
135
|
end
|
135
136
|
end
|
data/syntax_tree-erb.gemspec
CHANGED
@@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = %w[lib]
|
25
25
|
|
26
|
-
spec.
|
27
|
-
spec.
|
26
|
+
spec.add_runtime_dependency "prettier_print", "~> 1.2", ">= 1.2.0"
|
27
|
+
spec.add_runtime_dependency "syntax_tree", "~> 6.1", ">= 6.1.1"
|
28
28
|
|
29
|
-
spec.add_development_dependency "bundler"
|
30
|
-
spec.add_development_dependency "minitest"
|
31
|
-
spec.add_development_dependency "rake"
|
32
|
-
spec.add_development_dependency "simplecov"
|
29
|
+
spec.add_development_dependency "bundler", "~> 2"
|
30
|
+
spec.add_development_dependency "minitest", "~> 5"
|
31
|
+
spec.add_development_dependency "rake", "~> 13"
|
32
|
+
spec.add_development_dependency "simplecov", "~> 0.22"
|
33
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: w_syntax_tree-erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Newton
|
@@ -9,12 +9,15 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-07-
|
12
|
+
date: 2023-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: prettier_print
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.2'
|
18
21
|
- - ">="
|
19
22
|
- !ruby/object:Gem::Version
|
20
23
|
version: 1.2.0
|
@@ -22,6 +25,9 @@ dependencies:
|
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.2'
|
25
31
|
- - ">="
|
26
32
|
- !ruby/object:Gem::Version
|
27
33
|
version: 1.2.0
|
@@ -29,6 +35,9 @@ dependencies:
|
|
29
35
|
name: syntax_tree
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6.1'
|
32
41
|
- - ">="
|
33
42
|
- !ruby/object:Gem::Version
|
34
43
|
version: 6.1.1
|
@@ -36,6 +45,9 @@ dependencies:
|
|
36
45
|
prerelease: false
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
38
47
|
requirements:
|
48
|
+
- - "~>"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '6.1'
|
39
51
|
- - ">="
|
40
52
|
- !ruby/object:Gem::Version
|
41
53
|
version: 6.1.1
|
@@ -43,58 +55,58 @@ dependencies:
|
|
43
55
|
name: bundler
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
45
57
|
requirements:
|
46
|
-
- - "
|
58
|
+
- - "~>"
|
47
59
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
60
|
+
version: '2'
|
49
61
|
type: :development
|
50
62
|
prerelease: false
|
51
63
|
version_requirements: !ruby/object:Gem::Requirement
|
52
64
|
requirements:
|
53
|
-
- - "
|
65
|
+
- - "~>"
|
54
66
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
67
|
+
version: '2'
|
56
68
|
- !ruby/object:Gem::Dependency
|
57
69
|
name: minitest
|
58
70
|
requirement: !ruby/object:Gem::Requirement
|
59
71
|
requirements:
|
60
|
-
- - "
|
72
|
+
- - "~>"
|
61
73
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
74
|
+
version: '5'
|
63
75
|
type: :development
|
64
76
|
prerelease: false
|
65
77
|
version_requirements: !ruby/object:Gem::Requirement
|
66
78
|
requirements:
|
67
|
-
- - "
|
79
|
+
- - "~>"
|
68
80
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
81
|
+
version: '5'
|
70
82
|
- !ruby/object:Gem::Dependency
|
71
83
|
name: rake
|
72
84
|
requirement: !ruby/object:Gem::Requirement
|
73
85
|
requirements:
|
74
|
-
- - "
|
86
|
+
- - "~>"
|
75
87
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
88
|
+
version: '13'
|
77
89
|
type: :development
|
78
90
|
prerelease: false
|
79
91
|
version_requirements: !ruby/object:Gem::Requirement
|
80
92
|
requirements:
|
81
|
-
- - "
|
93
|
+
- - "~>"
|
82
94
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
95
|
+
version: '13'
|
84
96
|
- !ruby/object:Gem::Dependency
|
85
97
|
name: simplecov
|
86
98
|
requirement: !ruby/object:Gem::Requirement
|
87
99
|
requirements:
|
88
|
-
- - "
|
100
|
+
- - "~>"
|
89
101
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
102
|
+
version: '0.22'
|
91
103
|
type: :development
|
92
104
|
prerelease: false
|
93
105
|
version_requirements: !ruby/object:Gem::Requirement
|
94
106
|
requirements:
|
95
|
-
- - "
|
107
|
+
- - "~>"
|
96
108
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
109
|
+
version: '0.22'
|
98
110
|
description:
|
99
111
|
email:
|
100
112
|
- kddnewton@gmail.com
|