rails-erb-lint 1.2.0 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/rails-erb-lint/helpers/rails_erb_check.rb +10 -2
- data/lib/rails-erb-lint/version.rb +1 -1
- data/lib/rails-erb-lint.rb +0 -0
- metadata +37 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2885ba14d4317492a8d589fd9663e918271f467909cd77b19626663beeb595ed
|
4
|
+
data.tar.gz: 33b34c66ca21ca1cf3aba236eb44aef06cc99b5f3a012524972e6e3b7ba113c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137b07b21b815cd1c977ac3b66b5bd125e7369bd95ccab33ebd0eb70b1a1d19fa51d0693d514bed4d8944bb98f00c3088e49db81ae38d19214bc4860b222642c
|
7
|
+
data.tar.gz: fb49f9738f9029bb693ba1f5efe5a877566d22da1d52b8ed85834d4515fe1deb2967d2ee6b1399102ede3d92e282c10303c599396f10f395f0259dd0f404f9aa
|
@@ -2,6 +2,13 @@ require 'action_view'
|
|
2
2
|
|
3
3
|
module RailsErbCheck
|
4
4
|
class Checker
|
5
|
+
CHECKER =
|
6
|
+
if defined?(ActionView::Template::Handlers::ERB::Erubi)
|
7
|
+
->(erb) { eval ActionView::Template::Handlers::ERB::Erubi.new(erb).src }
|
8
|
+
else
|
9
|
+
->(erb) { ActionView::Template::Handlers::Erubis.new(erb).result }
|
10
|
+
end
|
11
|
+
|
5
12
|
attr_reader :error
|
6
13
|
|
7
14
|
def initialize(erb_path)
|
@@ -10,14 +17,15 @@ module RailsErbCheck
|
|
10
17
|
|
11
18
|
def valid_syntax?
|
12
19
|
begin
|
13
|
-
|
20
|
+
CHECKER.call(@erb)
|
14
21
|
rescue SyntaxError => e
|
15
22
|
@error = e
|
23
|
+
|
16
24
|
return false
|
17
25
|
rescue Exception
|
26
|
+
|
18
27
|
return true
|
19
28
|
end
|
20
29
|
end
|
21
|
-
|
22
30
|
end
|
23
31
|
end
|
data/lib/rails-erb-lint.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,62 +1,65 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-erb-lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katherine Pe
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :
|
19
|
+
version: '5.0'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: gli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
type: :
|
33
|
+
version: 2.21.0
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.21.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rainbow
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.1.1
|
62
|
+
- - "<"
|
60
63
|
- !ruby/object:Gem::Version
|
61
64
|
version: '4.0'
|
62
65
|
type: :runtime
|
@@ -64,16 +67,19 @@ dependencies:
|
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
69
|
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 3.1.1
|
72
|
+
- - "<"
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '4.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: aruba
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - ">="
|
74
80
|
- !ruby/object:Gem::Version
|
75
81
|
version: '0'
|
76
|
-
type: :
|
82
|
+
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
@@ -95,19 +101,19 @@ dependencies:
|
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
104
|
+
name: rake
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
|
-
- - "
|
107
|
+
- - ">="
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
type: :
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
|
-
- - "
|
114
|
+
- - ">="
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
116
|
+
version: '0'
|
111
117
|
description: Checks validity of ERB files for your Rails app.
|
112
118
|
email: katherinepe@me.com
|
113
119
|
executables:
|
@@ -120,11 +126,11 @@ files:
|
|
120
126
|
- lib/rails-erb-lint/helpers/rails_erb_check.rb
|
121
127
|
- lib/rails-erb-lint/linter/check_validity.rb
|
122
128
|
- lib/rails-erb-lint/version.rb
|
123
|
-
homepage: https://github.com/
|
129
|
+
homepage: https://github.com/kathgironpe/rails-erb-lint
|
124
130
|
licenses:
|
125
131
|
- MIT
|
126
132
|
metadata: {}
|
127
|
-
post_install_message:
|
133
|
+
post_install_message:
|
128
134
|
rdoc_options: []
|
129
135
|
require_paths:
|
130
136
|
- lib
|
@@ -140,9 +146,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
146
|
- !ruby/object:Gem::Version
|
141
147
|
version: '0'
|
142
148
|
requirements: []
|
143
|
-
|
144
|
-
|
145
|
-
signing_key:
|
149
|
+
rubygems_version: 3.3.7
|
150
|
+
signing_key:
|
146
151
|
specification_version: 4
|
147
152
|
summary: Checks validity of ERB files for your Rails app.
|
148
153
|
test_files: []
|