File tree Expand file tree Collapse file tree 14 files changed +27
-24
lines changed Expand file tree Collapse file tree 14 files changed +27
-24
lines changed Original file line number Diff line number Diff line change 1
1
# master [ (unreleased)] ( https://github.com/whitesmith/rubycritic/compare/v3.3.0...master )
2
2
3
- * [ CHANGE] Update ` rubocop ` to 0.51.0 (by [ @olleolleolle ] [ ] )
3
+ * [ CHANGE] Update ` rubocop ` to 0.51.0 (by [ @olleolleolle ] [ ] )
4
+ * [ CHANGE] Update ` parser ` to 2.5.0 (by [ @joshrpowell ] [ ] )
5
+ * [ CHANGE] Update ` rainbow ` to 3.0 (by [ @joshrpowell ] [ ] )
6
+ * [ CHANGE] Update ` rubocop ` to 0.53.0 (by [ @joshrpowell ] [ ] )
4
7
5
8
# 3.3.0 / 2017-10-10 [ (commits)] ( https://github.com/whitesmith/rubycritic/compare/v3.2.3...v3.3.0 )
6
9
7
10
* [ FEATURE] Add lint format similar to Golint (by [ @nightscape ] [ ] )
8
- * [ CHANGE] Update ` cucumber ` to 3.0 (by [ @onumis ] [ ] )
11
+ * [ CHANGE] Update ` cucumber ` to 3.0 (by [ @onumis ] [ ] )
9
12
* [ CHANGE] Update ` rake ` to 12.0 (by [ @onumis ] [ ] )
10
13
* [ CHANGE] Update ` rubocop ` to 0.50.0 (by [ @onumis ] [ ] )
11
14
* [ CHANGE] Accepting floating point values from Flog (by [ @onumis ] [ ] )
226
229
[ @yuku-t ] : https://github.com/yuku-t
227
230
[ @ochagata ] : https://github.com/ochagata
228
231
[ @nightscape ] : https://github.com/nightscape
232
+ [ @joshrpowell ] : https://github.com/joshrpowell
Original file line number Diff line number Diff line change 3
3
4
4
# Always look in the lib directory of this gem
5
5
# first when searching the load path
6
- $LOAD_PATH. unshift File . expand_path ( '../../ lib' , __FILE__ )
6
+ $LOAD_PATH. unshift File . expand_path ( '../lib' , __dir__ )
7
7
8
8
require 'rubycritic/cli/application'
9
9
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ def add_smells_to(analysed_module)
35
35
@flog . flog ( analysed_module . path )
36
36
@flog . each_by_score do |class_method , original_score |
37
37
score = original_score . round
38
- if score >= HIGH_COMPLEXITY_SCORE_THRESHOLD
39
- analysed_module . smells << create_smell ( class_method , score )
40
- end
38
+ analysed_module . smells << create_smell ( class_method , score ) if score >= HIGH_COMPLEXITY_SCORE_THRESHOLD
41
39
end
42
40
end
43
41
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ def to_h
76
76
no_browser : no_browser
77
77
}
78
78
end
79
+ # rubocop:enable Metrics/MethodLength
79
80
80
81
private
81
82
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ def to_h
87
87
}
88
88
end
89
89
90
- def to_json ( *a )
91
- to_h . to_json ( *a )
90
+ def to_json ( *options )
91
+ to_h . to_json ( *options )
92
92
end
93
93
end
94
94
end
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def to_h
26
26
}
27
27
end
28
28
29
- def to_json ( *a )
30
- to_h . to_json ( *a )
29
+ def to_json ( *options )
30
+ to_h . to_json ( *options )
31
31
end
32
32
33
33
def ==( other )
Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ def to_h
23
23
@letter
24
24
end
25
25
26
- def to_json ( *a )
27
- to_h . to_json ( *a )
26
+ def to_json ( *options )
27
+ to_h . to_json ( *options )
28
28
end
29
29
end
30
30
end
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ def to_h
48
48
}
49
49
end
50
50
51
- def to_json ( *a )
52
- to_h . to_json ( *a )
51
+ def to_json ( *options )
52
+ to_h . to_json ( *options )
53
53
end
54
54
55
55
def doc_url
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def self.erb_template(template_path)
12
12
ERB . new ( File . read ( File . join ( TEMPLATES_DIR , template_path ) ) )
13
13
end
14
14
15
- TEMPLATES_DIR = File . expand_path ( '../ templates' , __FILE__ )
15
+ TEMPLATES_DIR = File . expand_path ( 'templates' , __dir__ )
16
16
LAYOUT_TEMPLATE = erb_template ( File . join ( 'layouts' , 'application.html.erb' ) )
17
17
18
18
include ViewHelpers
Original file line number Diff line number Diff line change 10
10
module RubyCritic
11
11
module Generator
12
12
class HtmlReport
13
- ASSETS_DIR = File . expand_path ( '../ html/assets' , __FILE__ )
13
+ ASSETS_DIR = File . expand_path ( 'html/assets' , __dir__ )
14
14
15
15
def initialize ( analysed_modules )
16
16
@analysed_modules = analysed_modules
You can’t perform that action at this time.
0 commit comments