rails_best_practices 1.18.0 → 1.18.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: 4eb57bfb18f02e91c08dbfef14f970acc55e3a3a
4
- data.tar.gz: f7f14c66689cf3cc3bd3a1efd7ea1b533b41d2c7
3
+ metadata.gz: b28f335fee20969fe2276bdd1167772552262162
4
+ data.tar.gz: aff5bdb928fbae84063f42e0b79bc72c2766d11c
5
5
  SHA512:
6
- metadata.gz: d2d1f2d5ed8eb36cdcdfb3936c81c6e75eb50565751d3489dac9f36aa6575715f8044c9728a3c1a33171d476d099f86fcfe7486ee7480d01073c5bfcd61d9553
7
- data.tar.gz: 22aa1432ef5b0ce38a69f9ea2b14344e967a00b1f7f2ddbcc4c67ba7ee67e3dd657ba176acdd492185ec980345c03ef4c063c3791a8fb06ae6ac345462cec28c
6
+ metadata.gz: 9650af54486b7bf655ed79287e43e70c43314d2353a3a68680ff9a17a7c4548056b48b67e3e0ce7d4d9af76f5d087138d6119e6026c816f70e566e63b38883ca
7
+ data.tar.gz: ea4bb8533886d4bd11e25af6eb19c2a354aae861ccf7f9fba22636b0d78da6d97a15626984c9d7ec72b48440107a1766790845c4df8964621e9cbf7fb5811695
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Next Release
2
2
 
3
+ ## 1.18.1
4
+
5
+ * Remove haml ugly option
6
+
3
7
  ## 1.18.0 (2017-03-01)
4
8
 
5
9
  * Add --config option
@@ -128,7 +128,7 @@ module RailsBestPractices
128
128
  elsif filename =~ /.*\.haml$/
129
129
  begin
130
130
  require 'haml'
131
- content = Haml::Engine.new(content, {ugly: true}).precompiled
131
+ content = Haml::Engine.new(content).precompiled
132
132
  # remove \xxx characters
133
133
  content.gsub!(/\\\d{3}/, '')
134
134
  rescue LoadError
@@ -18,7 +18,7 @@ module RailsBestPractices
18
18
  # check rescue node to see if its type is Exception
19
19
  add_callback :start_rescue do |rescue_node|
20
20
  if rescue_node.exception_classes.any? { |rescue_class| "Exception" == rescue_class.to_s }
21
- add_error "not rescue Exception", rescue_node.file, rescue_node.exception_classes.first.line_number
21
+ add_error "Don't rescue Exception", rescue_node.file, rescue_node.exception_classes.first.line_number
22
22
  end
23
23
  end
24
24
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module RailsBestPractices
3
- VERSION = "1.18.0"
3
+ VERSION = "1.18.1"
4
4
  end
@@ -16,7 +16,7 @@ module RailsBestPractices
16
16
  EOF
17
17
  runner.review('app/helpers/posts_helper.rb', content)
18
18
  expect(runner.errors.size).to eq(1)
19
- expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:3 - not rescue Exception")
19
+ expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:3 - Don't rescue Exception")
20
20
  end
21
21
 
22
22
  it "should not rescue exception in method rescue without named var" do
@@ -29,7 +29,7 @@ module RailsBestPractices
29
29
  EOF
30
30
  runner.review('app/helpers/posts_helper.rb', content)
31
31
  expect(runner.errors.size).to eq(1)
32
- expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:3 - not rescue Exception")
32
+ expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:3 - Don't rescue Exception")
33
33
  end
34
34
 
35
35
  it "should not rescue exception in block rescue with named var" do
@@ -44,7 +44,7 @@ module RailsBestPractices
44
44
  EOF
45
45
  runner.review('app/helpers/posts_helper.rb', content)
46
46
  expect(runner.errors.size).to eq(1)
47
- expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:4 - not rescue Exception")
47
+ expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:4 - Don't rescue Exception")
48
48
  end
49
49
 
50
50
  it "should not rescue exception in block rescue without named var" do
@@ -59,7 +59,7 @@ module RailsBestPractices
59
59
  EOF
60
60
  runner.review('app/helpers/posts_helper.rb', content)
61
61
  expect(runner.errors.size).to eq(1)
62
- expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:4 - not rescue Exception")
62
+ expect(runner.errors[0].to_s).to eq("app/helpers/posts_helper.rb:4 - Don't rescue Exception")
63
63
  end
64
64
 
65
65
  it "should allow rescue implicit StandardError in block rescue without named var" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-01 00:00:00.000000000 Z
11
+ date: 2017-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -419,7 +419,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
419
419
  version: 1.3.6
420
420
  requirements: []
421
421
  rubyforge_project:
422
- rubygems_version: 2.5.2
422
+ rubygems_version: 2.6.10
423
423
  signing_key:
424
424
  specification_version: 4
425
425
  summary: a code metric tool for rails codes.