use_packwerk 0.57.17 → 0.58.0

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
  SHA256:
3
- metadata.gz: 2fad74ccec1c3b572a5c3dc5cf0c0e17b303514710ede4bc855c215ece78e7bf
4
- data.tar.gz: d1a1cea3c2fdd63da3dd7b29a80ef1a8cd5230d478f3e223be19127f8a01f634
3
+ metadata.gz: 9b7822b93de980f116e8215d6fa79dd77f5435781a48c356e3f8b38a6be66424
4
+ data.tar.gz: 8791b2a49c41bbd2464e87895acf103f8ce26d76a38e631789d5b849e12e419c
5
5
  SHA512:
6
- metadata.gz: 629e25c9bfe252c40957aebee1eb060a7a1457a4d978b12bf8662bcb5dd96752c5284d418a2a33e6d74eb26d392189ecd80eb1ef9dfbe0b6d88ab386faa3a855
7
- data.tar.gz: 76b34bba61abe721bfbed61f3e3ff272450ca40bd4fd4b4fd20003d21c19866d235bb1348b7bbc575420f2011103494933e1402459ed2709922fb26bb3032437
6
+ metadata.gz: 323d988c645a37414dc9d4c04b7932e61bd5712df6cea0313790fa8afcdec0a20fb5d46ea360906364db8988af1126459b1e40bfe6eff425c39f5ca6a3eccb32
7
+ data.tar.gz: 9bea356bd9587f6d7804b19eeb5f3f1b32b6a5601c1e97091d89e48e1f40cba24a1677afabb04c791ba1d5d9ab568dd78f210010b6c1fbc983f61a787708034b
@@ -0,0 +1,35 @@
1
+ # typed: strict
2
+
3
+ module UsePackwerk
4
+ module Private
5
+ module InteractiveCli
6
+ module UseCases
7
+ class LintPackageYml
8
+ extend T::Sig
9
+ extend T::Helpers
10
+ include Interface
11
+
12
+ sig { override.params(prompt: TTY::Prompt).void }
13
+ def perform!(prompt)
14
+ packs = PackSelector.single_or_all_pack_multi_select(prompt, question_text: 'Please select the packs you want to lint package.yml files for')
15
+ packs.each do |p|
16
+ new_package = ParsePackwerk::Package.new(
17
+ name: p.name,
18
+ enforce_privacy: p.enforce_privacy,
19
+ enforce_dependencies: p.enforce_dependencies,
20
+ dependencies: p.dependencies.uniq.sort,
21
+ metadata: p.metadata
22
+ )
23
+ ParsePackwerk.write_package_yml!(new_package)
24
+ end
25
+ end
26
+
27
+ sig { override.returns(String) }
28
+ def user_facing_name
29
+ 'Lint packs/*/package.yml for one or more packs'
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,26 @@
1
+ # typed: strict
2
+
3
+ module UsePackwerk
4
+ module Private
5
+ module InteractiveCli
6
+ module UseCases
7
+ class RegenerateRubocopTodo
8
+ extend T::Sig
9
+ extend T::Helpers
10
+ include Interface
11
+
12
+ sig { override.params(prompt: TTY::Prompt).void }
13
+ def perform!(prompt)
14
+ packs = PackSelector.single_or_all_pack_multi_select(prompt, question_text: 'Please select the packs you want to regenerate `.rubocop_todo.yml` for')
15
+ RuboCop::Packs.auto_generate_rubocop_todo(packs: packs)
16
+ end
17
+
18
+ sig { override.returns(String) }
19
+ def user_facing_name
20
+ 'Regenerate packs/*/.rubocop_todo.yml for one or more packs'
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -16,6 +16,8 @@ require 'use_packwerk/private/interactive_cli/use_cases/nest'
16
16
  require 'use_packwerk/private/interactive_cli/use_cases/rename'
17
17
  require 'use_packwerk/private/interactive_cli/use_cases/update_deprecations'
18
18
  require 'use_packwerk/private/interactive_cli/use_cases/validate'
19
+ require 'use_packwerk/private/interactive_cli/use_cases/regenerate_rubocop_todo'
20
+ require 'use_packwerk/private/interactive_cli/use_cases/lint_package_yml'
19
21
 
20
22
  module UsePackwerk
21
23
  module Private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: use_packwerk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.17
4
+ version: 0.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-15 00:00:00.000000000 Z
11
+ date: 2022-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: code_ownership
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-packs
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: sorbet-runtime
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -277,10 +291,12 @@ files:
277
291
  - lib/use_packwerk/private/interactive_cli/use_cases/create.rb
278
292
  - lib/use_packwerk/private/interactive_cli/use_cases/get_info.rb
279
293
  - lib/use_packwerk/private/interactive_cli/use_cases/interface.rb
294
+ - lib/use_packwerk/private/interactive_cli/use_cases/lint_package_yml.rb
280
295
  - lib/use_packwerk/private/interactive_cli/use_cases/make_public.rb
281
296
  - lib/use_packwerk/private/interactive_cli/use_cases/move.rb
282
297
  - lib/use_packwerk/private/interactive_cli/use_cases/nest.rb
283
298
  - lib/use_packwerk/private/interactive_cli/use_cases/query.rb
299
+ - lib/use_packwerk/private/interactive_cli/use_cases/regenerate_rubocop_todo.rb
284
300
  - lib/use_packwerk/private/interactive_cli/use_cases/rename.rb
285
301
  - lib/use_packwerk/private/interactive_cli/use_cases/update_deprecations.rb
286
302
  - lib/use_packwerk/private/interactive_cli/use_cases/validate.rb