standard-performance 1.0.1 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +23 -16
- data/config/ruby-1.8.yml +1 -0
- data/config/ruby-1.9.yml +14 -0
- data/config/ruby-2.0.yml +1 -0
- data/config/ruby-2.1.yml +1 -0
- data/docs/RELEASE.md +43 -0
- data/lib/standard/performance/determines_yaml_path.rb +28 -0
- data/lib/standard/performance/plugin.rb +11 -17
- data/lib/standard/performance/version.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3313cb1b98296491d99d1c41ba34d8fb1d23554a3db84466c38a74bba905762
|
4
|
+
data.tar.gz: 0fde13d39f95f79376ae9c848a180661f708168033395cb0d66bb3a04ef57aba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c0e97d9db245d0a97e1a4cb35cd2835de358b98d973056a8c6e2f0f4353e6fbf7d935f8c7da9d8d6667d7f7a4e0e4bafffc17f49e627b41ffb9051c4fc1b567
|
7
|
+
data.tar.gz: bdf5658c49bfb5e21c58c22dc00db7e335217eab5c8cbd0afbf4779aab2421b2e8acba81ef7ed316b1160b9b4cb03b613f8988b89923d80b8df745fb31e8a240
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## [
|
1
|
+
## [1.1.1]
|
2
|
+
|
3
|
+
- Preserve metadata from rubocop-performance by merging it
|
4
|
+
|
5
|
+
## [1.1.0]
|
6
|
+
|
7
|
+
- Updates rubocop-performance from 1.16.0 to 1.18.0
|
8
|
+
- Updates past the circular dependency in an older version of standardrb for development.
|
2
9
|
|
3
10
|
## [1.0.1]
|
4
11
|
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standard-performance (1.
|
5
|
-
lint_roller (~> 1.
|
6
|
-
rubocop-performance (~> 1.
|
4
|
+
standard-performance (1.1.1)
|
5
|
+
lint_roller (~> 1.1)
|
6
|
+
rubocop-performance (~> 1.18.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -11,43 +11,50 @@ GEM
|
|
11
11
|
ast (2.4.2)
|
12
12
|
json (2.6.3)
|
13
13
|
language_server-protocol (3.17.0.3)
|
14
|
-
lint_roller (1.
|
14
|
+
lint_roller (1.1.0)
|
15
15
|
m (1.6.1)
|
16
16
|
method_source (>= 0.6.7)
|
17
17
|
rake (>= 0.9.2.2)
|
18
18
|
method_source (1.0.0)
|
19
|
-
minitest (5.18.
|
20
|
-
parallel (1.
|
21
|
-
parser (3.2.2.
|
19
|
+
minitest (5.18.1)
|
20
|
+
parallel (1.23.0)
|
21
|
+
parser (3.2.2.3)
|
22
22
|
ast (~> 2.4.1)
|
23
|
+
racc
|
24
|
+
racc (1.7.1)
|
23
25
|
rainbow (3.1.1)
|
24
26
|
rake (13.0.6)
|
25
|
-
regexp_parser (2.
|
27
|
+
regexp_parser (2.8.1)
|
26
28
|
rexml (3.2.5)
|
27
|
-
rubocop (1.
|
29
|
+
rubocop (1.52.1)
|
28
30
|
json (~> 2.3)
|
29
31
|
parallel (~> 1.10)
|
30
|
-
parser (>= 3.2.
|
32
|
+
parser (>= 3.2.2.3)
|
31
33
|
rainbow (>= 2.2.2, < 4.0)
|
32
34
|
regexp_parser (>= 1.8, < 3.0)
|
33
35
|
rexml (>= 3.2.5, < 4.0)
|
34
|
-
rubocop-ast (>= 1.
|
36
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
35
37
|
ruby-progressbar (~> 1.7)
|
36
38
|
unicode-display_width (>= 2.4.0, < 3.0)
|
37
|
-
rubocop-ast (1.
|
39
|
+
rubocop-ast (1.29.0)
|
38
40
|
parser (>= 3.2.1.0)
|
39
|
-
rubocop-performance (1.
|
41
|
+
rubocop-performance (1.18.0)
|
40
42
|
rubocop (>= 1.7.0, < 2.0)
|
41
43
|
rubocop-ast (>= 0.4.0)
|
42
44
|
ruby-progressbar (1.13.0)
|
43
|
-
standard (1.
|
45
|
+
standard (1.30.0)
|
44
46
|
language_server-protocol (~> 3.17.0.2)
|
45
|
-
|
46
|
-
rubocop
|
47
|
+
lint_roller (~> 1.0)
|
48
|
+
rubocop (~> 1.52.0)
|
49
|
+
standard-custom (~> 1.0.0)
|
50
|
+
standard-performance (~> 1.1.0)
|
51
|
+
standard-custom (1.0.1)
|
52
|
+
lint_roller (~> 1.0)
|
47
53
|
unicode-display_width (2.4.2)
|
48
54
|
|
49
55
|
PLATFORMS
|
50
56
|
arm64-darwin-22
|
57
|
+
ruby
|
51
58
|
x86_64-linux
|
52
59
|
|
53
60
|
DEPENDENCIES
|
data/config/ruby-1.8.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: ./ruby-1.9.yml
|
data/config/ruby-1.9.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
inherit_from: ./ruby-2.0.yml
|
2
|
+
|
3
|
+
# String#end_with? added in Ruby 2.0.0
|
4
|
+
# https://docs.ruby-lang.org/en/2.0.0/String.html#method-i-end_with-3F
|
5
|
+
Performance/EndWith:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
# String#start_with? added in Ruby 2.0.0
|
9
|
+
# https://docs.ruby-lang.org/en/2.0.0/String.html#method-i-start_with-3F
|
10
|
+
Performance/StartWith:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Performance/DoubleStartEndWith:
|
14
|
+
Enabled: false
|
data/config/ruby-2.0.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: ./ruby-2.1.yml
|
data/config/ruby-2.1.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: ./ruby-2.2.yml
|
data/docs/RELEASE.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# How to release Standard Performance
|
2
|
+
|
3
|
+
Because this gem was generated with the [bundler `gem`
|
4
|
+
command](https://bundler.io/man/bundle-gem.1.html), [our Rakefile](/Rakefile)
|
5
|
+
loads `bundler/gem_tasks`, which provides a lot of the commands one needs
|
6
|
+
to manage a gem's release lifecycle:
|
7
|
+
|
8
|
+
```
|
9
|
+
$ rake -T
|
10
|
+
rake build # Build standard-x.x.x.gem into the pkg directory
|
11
|
+
rake clean # Remove any temporary products
|
12
|
+
rake clobber # Remove any generated files
|
13
|
+
rake install # Build and install standard-x.x.x.gem into system gems
|
14
|
+
rake install:local # Build and install standard-x.x.x.gem into system gems without network access
|
15
|
+
rake release[remote] # Create tag vx.x.x and build and push standard-0.5.2.gem to rubygems.org
|
16
|
+
```
|
17
|
+
|
18
|
+
Most of these commands are depended on (read: run by) `rake release`, which is
|
19
|
+
really the only one we'll need for releasing the gem to
|
20
|
+
[Rubygems.org](https://rubygems.org/gems/standard).
|
21
|
+
|
22
|
+
## Release steps
|
23
|
+
|
24
|
+
1. Make sure git is up to date and `bundle exec rake` exits cleanly
|
25
|
+
1. If you upgraded rubocop-performance, be sure to lock it down in
|
26
|
+
`standard-performance.gemspec`. To avoid being broken transitively, we stick
|
27
|
+
to exact release dependencies (e.g. "0.91.0" instead of "~> 0.91")
|
28
|
+
1. Update `CHANGELOG.md` as exhaustively as you are able and set the top header
|
29
|
+
to "Unreleased"
|
30
|
+
1. Commit all your changes, and push to `main`. There will be separate commits
|
31
|
+
for the release and the changes. The first is the changes commit.
|
32
|
+
1. Bump the appropriate version segment in `lib/standard/version.rb` (basic
|
33
|
+
semantic versioning rules apply; if the release updates Rubocop, follow its
|
34
|
+
version bump at a minimum—if rubocop saw minor bump, we'll also bump the
|
35
|
+
minor version)
|
36
|
+
1. Run `bundle` so that Bundler writes this version to `Gemfile.lock`
|
37
|
+
1. Commit `lib/standard/performance/version.rb`, `Gemfile.lock`, and `CHANGELOG.md` together
|
38
|
+
with the message equal to the new version (e.g. "0.42.1")
|
39
|
+
1. Finally, run `bundle exec rake release`, which will hopefully succeed
|
40
|
+
1. Provide your multi-factor-auth token when prompted to finish publishing the
|
41
|
+
gem
|
42
|
+
1. [Tweet](https://twitter.com) about your awesome new release! (Shameless
|
43
|
+
self-promotion is the most important part of open source software)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Standard
|
2
|
+
module Performance
|
3
|
+
class DeterminesYamlPath
|
4
|
+
def determine(desired_version)
|
5
|
+
desired_version = Gem::Version.new(desired_version) unless desired_version.is_a?(Gem::Version)
|
6
|
+
default = "base.yml"
|
7
|
+
|
8
|
+
file_name = if !Gem::Version.correct?(desired_version)
|
9
|
+
default
|
10
|
+
elsif desired_version < Gem::Version.new("1.9")
|
11
|
+
"ruby-1.8.yml"
|
12
|
+
elsif desired_version < Gem::Version.new("2.0")
|
13
|
+
"ruby-1.9.yml"
|
14
|
+
elsif desired_version < Gem::Version.new("2.1")
|
15
|
+
"ruby-2.0.yml"
|
16
|
+
elsif desired_version < Gem::Version.new("2.2")
|
17
|
+
"ruby-2.1.yml"
|
18
|
+
elsif desired_version < Gem::Version.new("2.3")
|
19
|
+
"ruby-2.2.yml"
|
20
|
+
else
|
21
|
+
default
|
22
|
+
end
|
23
|
+
|
24
|
+
Pathname.new(__dir__).join("../../../config/#{file_name}")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,7 +1,11 @@
|
|
1
|
+
require_relative "determines_yaml_path"
|
2
|
+
|
1
3
|
module Standard::Performance
|
2
4
|
class Plugin < LintRoller::Plugin
|
3
5
|
def initialize(config)
|
4
6
|
@config = config
|
7
|
+
@merges_upstream_metadata = LintRoller::Support::MergesUpstreamMetadata.new
|
8
|
+
@determines_yaml_path = DeterminesYamlPath.new
|
5
9
|
end
|
6
10
|
|
7
11
|
def about
|
@@ -20,10 +24,15 @@ module Standard::Performance
|
|
20
24
|
def rules(context)
|
21
25
|
trick_rubocop_into_thinking_we_required_rubocop_performance!
|
22
26
|
|
27
|
+
rules = @merges_upstream_metadata.merge(
|
28
|
+
YAML.load_file(@determines_yaml_path.determine(context.target_ruby_version)),
|
29
|
+
YAML.load_file(Pathname.new(Gem.loaded_specs["rubocop-performance"].full_gem_path).join("config/default.yml"))
|
30
|
+
)
|
31
|
+
|
23
32
|
LintRoller::Rules.new(
|
24
|
-
type: :
|
33
|
+
type: :object,
|
25
34
|
config_format: :rubocop,
|
26
|
-
value:
|
35
|
+
value: rules
|
27
36
|
)
|
28
37
|
end
|
29
38
|
|
@@ -47,20 +56,5 @@ module Standard::Performance
|
|
47
56
|
require "rubocop/cop/performance_cops"
|
48
57
|
RuboCop::ConfigLoader.default_configuration.loaded_features.add("rubocop-performance")
|
49
58
|
end
|
50
|
-
|
51
|
-
def determine_yaml_path(desired_version)
|
52
|
-
desired_version = Gem::Version.new(desired_version) unless desired_version.is_a?(Gem::Version)
|
53
|
-
default = "base.yml"
|
54
|
-
|
55
|
-
file_name = if !Gem::Version.correct?(desired_version)
|
56
|
-
default
|
57
|
-
elsif desired_version < Gem::Version.new("2.3")
|
58
|
-
"ruby-2.2.yml"
|
59
|
-
else
|
60
|
-
default
|
61
|
-
end
|
62
|
-
|
63
|
-
Pathname.new(__dir__).join("../../../config/#{file_name}")
|
64
|
-
end
|
65
59
|
end
|
66
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard-performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lint_roller
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-performance
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.18.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.18.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- searls@gmail.com
|
@@ -53,9 +53,15 @@ files:
|
|
53
53
|
- README.md
|
54
54
|
- Rakefile
|
55
55
|
- config/base.yml
|
56
|
+
- config/ruby-1.8.yml
|
57
|
+
- config/ruby-1.9.yml
|
58
|
+
- config/ruby-2.0.yml
|
59
|
+
- config/ruby-2.1.yml
|
56
60
|
- config/ruby-2.2.yml
|
61
|
+
- docs/RELEASE.md
|
57
62
|
- lib/standard-performance.rb
|
58
63
|
- lib/standard/performance.rb
|
64
|
+
- lib/standard/performance/determines_yaml_path.rb
|
59
65
|
- lib/standard/performance/plugin.rb
|
60
66
|
- lib/standard/performance/version.rb
|
61
67
|
homepage: https://github.com/standardrb/standard-performance
|
@@ -81,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
87
|
- !ruby/object:Gem::Version
|
82
88
|
version: '0'
|
83
89
|
requirements: []
|
84
|
-
rubygems_version: 3.4.
|
90
|
+
rubygems_version: 3.4.14
|
85
91
|
signing_key:
|
86
92
|
specification_version: 4
|
87
93
|
summary: Standard Ruby Plugin providing configuration for rubocop-performance
|