https://github.com/rubyatscale/packs-specification
The specification for `packs` in the `rubyatscale` ecosystem.
https://github.com/rubyatscale/packs-specification
Last synced: 4 months ago
JSON representation
The specification for `packs` in the `rubyatscale` ecosystem.
- Host: GitHub
- URL: https://github.com/rubyatscale/packs-specification
- Owner: rubyatscale
- License: mit
- Created: 2022-10-05T14:11:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-12T23:39:56.000Z (over 1 year ago)
- Last Synced: 2025-05-18T00:46:15.995Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 48.8 KB
- Stars: 22
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# packs-specification
This is a low-dependency gem that allows your production environment to query simple information about [`packs`](https://github.com/rubyatscale/packs).
## Usage
```ruby
require 'packs-specification'
# Getting all packs
# Example use: adding pack paths to a list of fixture paths
# Returns a T::Array[Packs::Pack]
Packs.all
# Getting the pack for a specific file
# Example use: Associating a file with an owner via a pack owner
# Returns a T.nilable(Packs::Pack)
Packs.for_file('/path/to/file.rb')
Packs.for_file(Pathname.new('/path/to/file.rb')) # also works
# Getting a pack with a specific name
# Example use: Special casing certain behavior for a specific pack
# Example use: Development tools that operate on user inputted pack names
# Returns a T.nilable(Packs::Pack)
Packs.find('packs/my_pack')
```