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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c755024ecaeaabf99ceb33b9c65c52c0ab3cda9
4
- data.tar.gz: 71d266c0611a778fcc2367e699f3e9861cacdada
3
+ metadata.gz: b422bbbdace24bd18de1987f28ba951315df0978
4
+ data.tar.gz: 16e62eb12a06b9643cceef05d17574db8e5fe5eb
5
5
  SHA512:
6
- metadata.gz: 20df5b0a36e0b31c0b6276adccdab2e78394a976c4a78571114ef5ca5103cc0c1d42ec6bec7946c123097dbc9dcf0039df8b165b91de202df8d2debf61f4f6fe
7
- data.tar.gz: 93d14018a063366b3d74c7941a91a40c92be52b89dbd4106c246f9c0a8f812f71b5cc93604c17e15a76a5d4f0b3f3d18e358b69e182d3bb2d90480154af16f95
6
+ metadata.gz: f73712bdc654e29dcd40ef3e377851fa523ae1aa4b9a2c4fb89abffac86aff773f3dcfca9fa22451bd6b846c0d8c1a04f1d5f46c5e476919d1975b9c3ba1d135
7
+ data.tar.gz: 3772e952320da6653f5591df174fd1c848bef21d54eb394c89fbff16c2743f152b4cd0a662497e87d9d67c1b1999fb23dcc33fca7923f762e36a406c8893b1d0
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
- ActionView::Template::Handlers::Erubis.new(@erb).result
20
+ CHECKER.new(@erb).result
14
21
  rescue SyntaxError => e
15
22
  @error = e
16
23
  return false
@@ -1,3 +1,3 @@
1
1
  module RailsErbLint
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
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.0
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: 2016-08-31 00:00:00.000000000 Z
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.5.1
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.