rubocop-performance 1.8.1 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +10 -2
  4. data/config/default.yml +47 -6
  5. data/lib/rubocop/cop/mixin/regexp_metacharacter.rb +4 -4
  6. data/lib/rubocop/cop/performance/ancestors_include.rb +1 -0
  7. data/lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb +77 -0
  8. data/lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb +1 -0
  9. data/lib/rubocop/cop/performance/bind_call.rb +3 -2
  10. data/lib/rubocop/cop/performance/block_given_with_explicit_block.rb +52 -0
  11. data/lib/rubocop/cop/performance/caller.rb +13 -15
  12. data/lib/rubocop/cop/performance/casecmp.rb +1 -0
  13. data/lib/rubocop/cop/performance/chain_array_allocation.rb +20 -18
  14. data/lib/rubocop/cop/performance/constant_regexp.rb +73 -0
  15. data/lib/rubocop/cop/performance/count.rb +1 -0
  16. data/lib/rubocop/cop/performance/delete_prefix.rb +1 -0
  17. data/lib/rubocop/cop/performance/delete_suffix.rb +1 -0
  18. data/lib/rubocop/cop/performance/detect.rb +3 -2
  19. data/lib/rubocop/cop/performance/end_with.rb +1 -0
  20. data/lib/rubocop/cop/performance/fixed_size.rb +1 -0
  21. data/lib/rubocop/cop/performance/flat_map.rb +1 -0
  22. data/lib/rubocop/cop/performance/inefficient_hash_search.rb +2 -0
  23. data/lib/rubocop/cop/performance/io_readlines.rb +3 -7
  24. data/lib/rubocop/cop/performance/method_object_as_block.rb +32 -0
  25. data/lib/rubocop/cop/performance/open_struct.rb +1 -0
  26. data/lib/rubocop/cop/performance/range_include.rb +1 -0
  27. data/lib/rubocop/cop/performance/redundant_block_call.rb +4 -4
  28. data/lib/rubocop/cop/performance/redundant_equality_comparison_block.rb +80 -0
  29. data/lib/rubocop/cop/performance/redundant_match.rb +1 -0
  30. data/lib/rubocop/cop/performance/redundant_merge.rb +1 -0
  31. data/lib/rubocop/cop/performance/redundant_split_regexp_argument.rb +64 -0
  32. data/lib/rubocop/cop/performance/redundant_string_chars.rb +2 -6
  33. data/lib/rubocop/cop/performance/reverse_each.rb +7 -10
  34. data/lib/rubocop/cop/performance/reverse_first.rb +1 -0
  35. data/lib/rubocop/cop/performance/size.rb +1 -0
  36. data/lib/rubocop/cop/performance/squeeze.rb +2 -1
  37. data/lib/rubocop/cop/performance/start_with.rb +1 -0
  38. data/lib/rubocop/cop/performance/string_include.rb +2 -1
  39. data/lib/rubocop/cop/performance/string_replacement.rb +1 -0
  40. data/lib/rubocop/cop/performance/sum.rb +123 -15
  41. data/lib/rubocop/cop/performance/times_map.rb +1 -0
  42. data/lib/rubocop/cop/performance/unfreeze_string.rb +19 -1
  43. data/lib/rubocop/cop/performance/uri_default_parser.rb +1 -0
  44. data/lib/rubocop/cop/performance_cops.rb +6 -0
  45. data/lib/rubocop/performance/version.rb +6 -1
  46. metadata +25 -27
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  - Jonas Arvidsson
9
9
  - Yuji Nakayama
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-18 00:00:00.000000000 Z
13
+ date: 2021-03-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -18,14 +18,20 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.87.0
21
+ version: 0.90.0
22
+ - - "<"
23
+ - !ruby/object:Gem::Version
24
+ version: '2.0'
22
25
  type: :runtime
23
26
  prerelease: false
24
27
  version_requirements: !ruby/object:Gem::Requirement
25
28
  requirements:
26
29
  - - ">="
27
30
  - !ruby/object:Gem::Version
28
- version: 0.87.0
31
+ version: 0.90.0
32
+ - - "<"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
29
35
  - !ruby/object:Gem::Dependency
30
36
  name: rubocop-ast
31
37
  requirement: !ruby/object:Gem::Requirement
@@ -40,20 +46,6 @@ dependencies:
40
46
  - - ">="
41
47
  - !ruby/object:Gem::Version
42
48
  version: 0.4.0
43
- - !ruby/object:Gem::Dependency
44
- name: simplecov
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '0'
50
- type: :development
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: '0'
57
49
  description: |
58
50
  A collection of RuboCop cops to check for performance optimizations
59
51
  in Ruby code.
@@ -71,14 +63,17 @@ files:
71
63
  - lib/rubocop/cop/mixin/regexp_metacharacter.rb
72
64
  - lib/rubocop/cop/mixin/sort_block.rb
73
65
  - lib/rubocop/cop/performance/ancestors_include.rb
66
+ - lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb
74
67
  - lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb
75
68
  - lib/rubocop/cop/performance/bind_call.rb
69
+ - lib/rubocop/cop/performance/block_given_with_explicit_block.rb
76
70
  - lib/rubocop/cop/performance/caller.rb
77
71
  - lib/rubocop/cop/performance/case_when_splat.rb
78
72
  - lib/rubocop/cop/performance/casecmp.rb
79
73
  - lib/rubocop/cop/performance/chain_array_allocation.rb
80
74
  - lib/rubocop/cop/performance/collection_literal_in_loop.rb
81
75
  - lib/rubocop/cop/performance/compare_with_block.rb
76
+ - lib/rubocop/cop/performance/constant_regexp.rb
82
77
  - lib/rubocop/cop/performance/count.rb
83
78
  - lib/rubocop/cop/performance/delete_prefix.rb
84
79
  - lib/rubocop/cop/performance/delete_suffix.rb
@@ -89,12 +84,15 @@ files:
89
84
  - lib/rubocop/cop/performance/flat_map.rb
90
85
  - lib/rubocop/cop/performance/inefficient_hash_search.rb
91
86
  - lib/rubocop/cop/performance/io_readlines.rb
87
+ - lib/rubocop/cop/performance/method_object_as_block.rb
92
88
  - lib/rubocop/cop/performance/open_struct.rb
93
89
  - lib/rubocop/cop/performance/range_include.rb
94
90
  - lib/rubocop/cop/performance/redundant_block_call.rb
91
+ - lib/rubocop/cop/performance/redundant_equality_comparison_block.rb
95
92
  - lib/rubocop/cop/performance/redundant_match.rb
96
93
  - lib/rubocop/cop/performance/redundant_merge.rb
97
94
  - lib/rubocop/cop/performance/redundant_sort_block.rb
95
+ - lib/rubocop/cop/performance/redundant_split_regexp_argument.rb
98
96
  - lib/rubocop/cop/performance/redundant_string_chars.rb
99
97
  - lib/rubocop/cop/performance/regexp_match.rb
100
98
  - lib/rubocop/cop/performance/reverse_each.rb
@@ -113,16 +111,16 @@ files:
113
111
  - lib/rubocop/performance.rb
114
112
  - lib/rubocop/performance/inject.rb
115
113
  - lib/rubocop/performance/version.rb
116
- homepage: https://github.com/rubocop-hq/rubocop-performance
114
+ homepage: https://github.com/rubocop/rubocop-performance
117
115
  licenses:
118
116
  - MIT
119
117
  metadata:
120
118
  homepage_uri: https://docs.rubocop.org/rubocop-performance/
121
- changelog_uri: https://github.com/rubocop-hq/rubocop-performance/blob/master/CHANGELOG.md
122
- source_code_uri: https://github.com/rubocop-hq/rubocop-performance/
123
- documentation_uri: https://docs.rubocop.org/rubocop-performance/
124
- bug_tracker_uri: https://github.com/rubocop-hq/rubocop-performance/issues
125
- post_install_message:
119
+ changelog_uri: https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md
120
+ source_code_uri: https://github.com/rubocop/rubocop-performance/
121
+ documentation_uri: https://docs.rubocop.org/rubocop-performance/1.10/
122
+ bug_tracker_uri: https://github.com/rubocop/rubocop-performance/issues
123
+ post_install_message:
126
124
  rdoc_options: []
127
125
  require_paths:
128
126
  - lib
@@ -137,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
135
  - !ruby/object:Gem::Version
138
136
  version: '0'
139
137
  requirements: []
140
- rubygems_version: 3.1.4
141
- signing_key:
138
+ rubygems_version: 3.2.12
139
+ signing_key:
142
140
  specification_version: 4
143
141
  summary: Automatic performance checking tool for Ruby code.
144
142
  test_files: []