rails-erb-lint 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-erb-lint.rb +0 -0
- data/lib/rails-erb-lint/helpers/rails_erb_check.rb +8 -1
- data/lib/rails-erb-lint/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b422bbbdace24bd18de1987f28ba951315df0978
|
4
|
+
data.tar.gz: 16e62eb12a06b9643cceef05d17574db8e5fe5eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f73712bdc654e29dcd40ef3e377851fa523ae1aa4b9a2c4fb89abffac86aff773f3dcfca9fa22451bd6b846c0d8c1a04f1d5f46c5e476919d1975b9c3ba1d135
|
7
|
+
data.tar.gz: 3772e952320da6653f5591df174fd1c848bef21d54eb394c89fbff16c2743f152b4cd0a662497e87d9d67c1b1999fb23dcc33fca7923f762e36a406c8893b1d0
|
data/lib/rails-erb-lint.rb
CHANGED
File without changes
|
@@ -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
|
+
ActionView::Template::Handlers::ERB::Erubi
|
8
|
+
else
|
9
|
+
ActionView::Template::Handlers::Erubis
|
10
|
+
end
|
11
|
+
|
5
12
|
attr_reader :error
|
6
13
|
|
7
14
|
def initialize(erb_path)
|
@@ -10,7 +17,7 @@ module RailsErbCheck
|
|
10
17
|
|
11
18
|
def valid_syntax?
|
12
19
|
begin
|
13
|
-
|
20
|
+
CHECKER.new(@erb).result
|
14
21
|
rescue SyntaxError => e
|
15
22
|
@error = e
|
16
23
|
return false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katherine Pe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.
|
144
|
+
rubygems_version: 2.6.8
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Checks validity of ERB files for your Rails app.
|