caliber 0.50.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +23 -2
- data/caliber.gemspec +6 -4
- data/config/rspec.yml +4 -0
- data/exe/caliber +82 -0
- data.tar.gz.sig +0 -0
- metadata +13 -11
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03ef9e509842c030139692644b4dde8a99fcfc596338eb82cf9fb095f0af4160
|
4
|
+
data.tar.gz: 40ecc02698b9dfb3d25a416942ff11b49b1b67208d765a4b4aeba856e72a12ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62fbe47abd8dad48d2fa46a43c75b58d72b90448c28921cc51f79b854771e70ce082dff58a5d6c4826343b9673a361fdcf12951b2ecf2bbd37fb948dd650fab6
|
7
|
+
data.tar.gz: 475f059c2703b912cce667f19b99401bdaf05c84890b7b54dbe9e33734ea5eeb7029737d25ab39b768a58fafd3e82e3e0c9a5fce5bd7430894f9a750e8fabd35
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -2,15 +2,16 @@
|
|
2
2
|
:toclevels: 5
|
3
3
|
:figure-caption!:
|
4
4
|
|
5
|
-
:rubocop_link: link:https://docs.rubocop.org/rubocop[RuboCop]
|
6
5
|
:rubocop_capybara_link: link:https://docs.rubocop.org/rubocop-capybara[RuboCop Capybara]
|
7
6
|
:rubocop_disable_syntax_link: link:https://github.com/fatkodima/rubocop-disable_syntax[RuboCop Disable Syntax]
|
8
7
|
:rubocop_factory_bot_link: link:https://docs.rubocop.org/rubocop-factory_bot/[RuboCop FactoryBot]
|
8
|
+
:rubocop_link: link:https://docs.rubocop.org/rubocop[RuboCop]
|
9
9
|
:rubocop_packaging_link: link:https://docs.rubocop.org/rubocop-packaging[RuboCop Packaging]
|
10
10
|
:rubocop_performance_link: link:https://docs.rubocop.org/rubocop-performance[RuboCop Performance]
|
11
|
-
:rubocop_thread_safety_link: link:https://github.com/rubocop/rubocop-thread_safety[RuboCop Thread Safety]
|
12
11
|
:rubocop_rake_link: link:https://docs.rubocop.org/rubocop-rspec[RuboCop Rake]
|
13
12
|
:rubocop_rspec_link: link:https://docs.rubocop.org/rubocop-rspec[RuboCop RSpec]
|
13
|
+
:rubocop_thread_safety_link: link:https://github.com/rubocop/rubocop-thread_safety[RuboCop Thread Safety]
|
14
|
+
:xdg_configuration_link: link:https://alchemists.io/articles/xdg_base_directory_specification[XDG Base Directory Specification]
|
14
15
|
|
15
16
|
= Caliber
|
16
17
|
|
@@ -291,6 +292,26 @@ require:
|
|
291
292
|
|
292
293
|
Adding additional RuboCop gems only requires adding them to your YAML configuration.
|
293
294
|
|
295
|
+
=== Command Line Interface (CLI)
|
296
|
+
|
297
|
+
⚠️ This is experimental but might be of interest to anyone using RuboCop's local {xdg_configuration_link} (highly recommend).
|
298
|
+
|
299
|
+
At the moment, RuboCop doesn't have native functionality for handling these updates and this CLI is one solution to that problem (see this link:https://github.com/rubocop/rubocop/issues/12729[issue] for details). So this CLI automates the updating of outstanding issues you have not resolved for your RuboCop configuration (i.e. `.rubocop_todo.yml`) and is handy when you've fixed issues and want to update your configuration to reflect these changes. The CLI assumes you are using the following structure:
|
300
|
+
|
301
|
+
....
|
302
|
+
.config/rubocop/config.yml
|
303
|
+
.config/rubocop/issues.yml
|
304
|
+
....
|
305
|
+
|
306
|
+
...and that you have this line in `.config/rubocop/config.yml`:
|
307
|
+
|
308
|
+
[source,yaml]
|
309
|
+
----
|
310
|
+
inherit_from: issues.yml
|
311
|
+
----
|
312
|
+
|
313
|
+
Assuming the above is true, you can run the `caliber` CLI and follow the prompts for either updating your outstanding issues or exiting. Upon competition, the CLI will update your `.config/rubocop/issues.yml` so you can commit these updates/changes to your repository.
|
314
|
+
|
294
315
|
== Development
|
295
316
|
|
296
317
|
To contribute, run:
|
data/caliber.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "caliber"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.52.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/caliber"
|
@@ -23,14 +23,16 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.3"
|
26
|
-
spec.add_dependency "rubocop", "~> 1.
|
26
|
+
spec.add_dependency "rubocop", "~> 1.61"
|
27
27
|
spec.add_dependency "rubocop-disable_syntax", "~> 0.1"
|
28
28
|
spec.add_dependency "rubocop-packaging", "~> 0.5"
|
29
|
-
spec.add_dependency "rubocop-performance", "~> 1.
|
29
|
+
spec.add_dependency "rubocop-performance", "~> 1.21"
|
30
30
|
spec.add_dependency "rubocop-rake", "~> 0.6"
|
31
|
-
spec.add_dependency "rubocop-rspec", "~> 2.
|
31
|
+
spec.add_dependency "rubocop-rspec", "~> 2.27.1"
|
32
32
|
spec.add_dependency "rubocop-thread_safety", "~> 0.5"
|
33
33
|
|
34
|
+
spec.bindir = "exe"
|
35
|
+
spec.executables << "caliber"
|
34
36
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
35
37
|
spec.files = Dir["*.gemspec", "config/**/*", "lib/**/*"]
|
36
38
|
end
|
data/config/rspec.yml
CHANGED
@@ -62,6 +62,8 @@ RSpec/IdenticalEqualityAssertion:
|
|
62
62
|
Enabled: true
|
63
63
|
RSpec/IndexedLet:
|
64
64
|
Enabled: true
|
65
|
+
RSpec/IsExpectedSpecify:
|
66
|
+
Enabled: true
|
65
67
|
RSpec/MatchArray:
|
66
68
|
Enabled: true
|
67
69
|
RSpec/MetadataStyle:
|
@@ -80,6 +82,8 @@ RSpec/RedundantPredicateMatcher:
|
|
80
82
|
Enabled: true
|
81
83
|
RSpec/RemoveConst:
|
82
84
|
Enabled: true
|
85
|
+
RSpec/RepeatedSubjectCall:
|
86
|
+
Enabled: true
|
83
87
|
RSpec/Rails/AvoidSetupHook:
|
84
88
|
Enabled: true
|
85
89
|
RSpec/Rails/HaveHttpStatus:
|
data/exe/caliber
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "pathname"
|
5
|
+
|
6
|
+
PATHS = {
|
7
|
+
xdg_config: ".config/rubocop/config.yml",
|
8
|
+
xdg_issues: ".config/rubocop/issues.yml",
|
9
|
+
config: ".rubocop.yml",
|
10
|
+
todo: ".rubocop_todo.yml"
|
11
|
+
}.freeze
|
12
|
+
|
13
|
+
class Updater
|
14
|
+
def initialize root: Pathname.pwd, paths: PATHS
|
15
|
+
@root = root
|
16
|
+
@paths = paths
|
17
|
+
end
|
18
|
+
|
19
|
+
def call
|
20
|
+
prompt
|
21
|
+
check_xdg_configuration
|
22
|
+
check_standard_configuration
|
23
|
+
copy_configuration
|
24
|
+
remove_inheritance
|
25
|
+
generate_issues
|
26
|
+
apply_changes
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
attr_reader :root, :paths
|
32
|
+
|
33
|
+
def prompt
|
34
|
+
puts "Update RuboCop configuration with outstanding issues (y/n)?"
|
35
|
+
|
36
|
+
return if gets.chomp == "y"
|
37
|
+
|
38
|
+
puts "RuboCop configuration update canceled."
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
|
42
|
+
def check_xdg_configuration
|
43
|
+
return if full_path(:xdg_config).exist?
|
44
|
+
|
45
|
+
abort "RuboCop XDG configuration must exist before proceeding."
|
46
|
+
end
|
47
|
+
|
48
|
+
def check_standard_configuration
|
49
|
+
return unless full_path(:config).exist?
|
50
|
+
|
51
|
+
abort "RuboCop configuration exists. Please use a XDG configuration instead."
|
52
|
+
end
|
53
|
+
|
54
|
+
def copy_configuration = full_path(:config).write full_path(:xdg_config).read
|
55
|
+
|
56
|
+
def generate_issues = system "bundle exec rubocop --auto-gen-config"
|
57
|
+
|
58
|
+
def remove_inheritance
|
59
|
+
full_path(:config).then do |path|
|
60
|
+
content = path.read.sub(/inherit_from:\s(issues|\.rubocop_todo.).yml/, "")
|
61
|
+
path.write content
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def apply_changes
|
66
|
+
config_path = full_path :config
|
67
|
+
todo_path = full_path :todo
|
68
|
+
|
69
|
+
if todo_path.empty?
|
70
|
+
puts "No changes were detected."
|
71
|
+
else
|
72
|
+
full_path(:xdg_issues).write todo_path.read
|
73
|
+
end
|
74
|
+
|
75
|
+
config_path.delete
|
76
|
+
todo_path.delete
|
77
|
+
end
|
78
|
+
|
79
|
+
def full_path(key) = root.join(paths.fetch(key))
|
80
|
+
end
|
81
|
+
|
82
|
+
Updater.new.call
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caliber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.52.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-03-30 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: rubocop
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '1.
|
46
|
+
version: '1.61'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
53
|
+
version: '1.61'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: rubocop-disable_syntax
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,14 +85,14 @@ dependencies:
|
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1.
|
88
|
+
version: '1.21'
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '1.
|
95
|
+
version: '1.21'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: rubocop-rake
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -113,14 +113,14 @@ dependencies:
|
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 2.27.1
|
117
117
|
type: :runtime
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 2.27.1
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: rubocop-thread_safety
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,8 @@ dependencies:
|
|
138
138
|
description:
|
139
139
|
email:
|
140
140
|
- brooke@alchemists.io
|
141
|
-
executables:
|
141
|
+
executables:
|
142
|
+
- caliber
|
142
143
|
extensions: []
|
143
144
|
extra_rdoc_files:
|
144
145
|
- README.adoc
|
@@ -157,6 +158,7 @@ files:
|
|
157
158
|
- config/rspec.yml
|
158
159
|
- config/ruby.yml
|
159
160
|
- config/thread.yml
|
161
|
+
- exe/caliber
|
160
162
|
- lib/caliber.rb
|
161
163
|
homepage: https://alchemists.io/projects/caliber
|
162
164
|
licenses:
|
@@ -184,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
186
|
- !ruby/object:Gem::Version
|
185
187
|
version: '0'
|
186
188
|
requirements: []
|
187
|
-
rubygems_version: 3.5.
|
189
|
+
rubygems_version: 3.5.7
|
188
190
|
signing_key:
|
189
191
|
specification_version: 4
|
190
192
|
summary: A global, high quality, and constantly updated RuboCop configuration.
|
metadata.gz.sig
CHANGED
Binary file
|