Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Make sure there are no spaces between the comma-separated list of paths of direc
`bin/packs move packs/destination_pack path/to/file.rb path/to/directory`

This is used for moving files into a pack (the pack must already exist).
Note this works for moving files to packs from the monolith or from other packs
Note this works for moving files to packs from the monolith or from other packs.

Make sure there are no spaces between the comma-separated list of paths of directories.

Expand Down
2 changes: 1 addition & 1 deletion advanced_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Packs.create_pack!(
### Per-file Processors
Your application may have specific needs when moving files. `Packs` gives a way to inject application-specific behavior into the file move process.

You can pass in an array of application specific behavior into the `per_file_processors` parameter of the main method.
You can pass in an array of application-specific behavior into the `per_file_processors` parameter of the main method.

See `rubocop_post_processor.rb` as an example of renaming files in `.rubocop_todo.yml` automatically, which is something you may want to do (as you do not want to fix all style errors when you're just moving a file).

Expand Down
12 changes: 6 additions & 6 deletions lib/packs/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def add_dependency(from_pack, to_pack)
exit_successfully
end

POSIBLE_TYPES = T.let(%w[dependency privacy layer], T::Array[String])
POSSIBLE_TYPES = T.let(%w[dependency privacy layer], T::Array[String])
desc 'list_top_violations type [ packs/your_pack ]', 'List the top violations of a specific type for packs/your_pack.'
long_desc <<~LONG_DESC
Possible types are: #{POSIBLE_TYPES.join(', ')}.
Possible types are: #{POSSIBLE_TYPES.join(', ')}.

Want to see who is depending on you? Not sure how your pack's code is being used in an unstated way? You can use this command to list the top dependency violations.

Expand All @@ -60,7 +60,7 @@ def add_dependency(from_pack, to_pack)
).void
end
def list_top_violations(type, pack_name = nil)
raise StandardError, "Invalid type #{type}. Possible types are: #{POSIBLE_TYPES.join(', ')}" unless POSIBLE_TYPES.include?(type)
raise StandardError, "Invalid type #{type}. Possible types are: #{POSSIBLE_TYPES.join(', ')}" unless POSSIBLE_TYPES.include?(type)

Packs.list_top_violations(
type: type,
Expand All @@ -85,7 +85,7 @@ def make_public(*paths)
desc 'move packs/destination_pack path/to/file.rb path/to/directory', 'Move files or directories from one pack to another'
long_desc <<~LONG_DESC
This is used for moving files into a pack (the pack must already exist).
Note this works for moving files to packs from the monolith or from other packs
Note this works for moving files to packs from the monolith or from other packs.

Make sure there are no spaces between the comma-separated list of paths of directories.
LONG_DESC
Expand Down Expand Up @@ -135,8 +135,8 @@ def update
sig { params(pack_names: String).void }
def get_info(*pack_names)
selected_types = options[:types].to_s.downcase.split(',')
invalid_types = selected_types - POSIBLE_TYPES
raise StandardError, "Invalid type(s): #{invalid_types.join(', ')}. Possible types are: #{POSIBLE_TYPES.join(', ')}" unless invalid_types.empty?
invalid_types = selected_types - POSSIBLE_TYPES
raise StandardError, "Invalid type(s): #{invalid_types.join(', ')}. Possible types are: #{POSSIBLE_TYPES.join(', ')}" unless invalid_types.empty?

Private.get_info(
packs: parse_pack_names(pack_names),
Expand Down
2 changes: 1 addition & 1 deletion lib/packs/private.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def self.load_client_configuration
def self.bust_cache!
Packs.config.bust_cache!
# This comes explicitly after `Packs.config.bust_cache!` because
# otherwise `Packs.config` will attempt to reload the client configuratoin.
# otherwise `Packs.config` will attempt to reload the client configuration.
@loaded_client_configuration = false
end

Expand Down
Loading