Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmks/asdf-discover
Simple command to discover what should be in ASDF's .tool-versions file
https://github.com/jmks/asdf-discover
Last synced: 3 days ago
JSON representation
Simple command to discover what should be in ASDF's .tool-versions file
- Host: GitHub
- URL: https://github.com/jmks/asdf-discover
- Owner: jmks
- License: mit
- Created: 2020-10-21T01:21:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T22:59:45.000Z (almost 4 years ago)
- Last Synced: 2024-11-27T19:50:54.136Z (2 months ago)
- Language: Ruby
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# asdf-discover
A gem that provides an executable to populate [asdf](http://asdf-vm.com/)'s `.tool-versions` file.
## Changelog
[Changelog](./CHANGELOG.md) following https://keepachangelog.com
## Installation
```
$ gem install asdf-discover
```## Usage
Run `asdf-discover` in a project directory.
## Languages / Versions Discovered
| Lanuage | File |
|---------|---------------|
| Go | go.mod |
| Ruby | .ruby-version |
| Ruby | .rvmrc |
| node.js | .nvmrc |
| node.js | .node-version |## TODO
* If a version comes from multiple sources, list them all (currently displays the first found)
* Select a version from `asdf list tool` for versions specified with a requirement, e.g. "~> 1.10"
* There seems to be 2 ways to find a version:
* The contents of a file (e.g. .ruby-version)
* A line in a file (e.g. go.mod)Consider a DSL for adding more:
```ruby
class GoMod
include Asdf::Searcherscan_file "go.mod", for: /go ([0-9.]+)$/
endclass DotRubyVersion
include Asdf::Searcherfile_contents ".ruby-version"
end
```## Development
After checking out the repo, run `bundle install`.
Then, run `rake spec` to run the tests.You can run the binary locally with: `ruby -Ilib ./exe/asdf-discover path/to/directory`
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/jmks/asdf-discover.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).