https://github.com/emsk/bundle_outdated_formatter
Formatter for `bundle outdated` command
https://github.com/emsk/bundle_outdated_formatter
bundler cli formatter gem ruby
Last synced: 8 months ago
JSON representation
Formatter for `bundle outdated` command
- Host: GitHub
- URL: https://github.com/emsk/bundle_outdated_formatter
- Owner: emsk
- License: mit
- Created: 2017-06-10T07:42:42.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T02:28:56.000Z (over 4 years ago)
- Last Synced: 2025-04-27T23:19:48.987Z (8 months ago)
- Topics: bundler, cli, formatter, gem, ruby
- Language: Ruby
- Size: 171 KB
- Stars: 19
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# BundleOutdatedFormatter
[](https://badge.fury.io/rb/bundle_outdated_formatter)
[](https://github.com/emsk/bundle_outdated_formatter/actions/workflows/build.yml)
[](https://travis-ci.org/emsk/bundle_outdated_formatter)
[](https://ci.appveyor.com/project/emsk/bundle-outdated-formatter)
[](https://dev.azure.com/emsk/bundle_outdated_formatter/_build/latest?definitionId=3&branchName=main)
[](https://codecov.io/gh/emsk/bundle_outdated_formatter)
[](https://codeclimate.com/github/emsk/bundle_outdated_formatter)
[](http://inch-ci.org/github/emsk/bundle_outdated_formatter)
[](LICENSE.txt)
BundleOutdatedFormatter is a command-line tool to format output of `bundle outdated`.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'bundle_outdated_formatter'
```
And then execute:
```sh
$ bundle
```
Or install it yourself as:
```sh
$ gem install bundle_outdated_formatter
```
## Usage
```sh
$ bundle outdated | bof
```
## Command Options
| Option | Alias | Description | Default |
| :----- | :---- | :---------- | :------ |
| `--format` | `-f` | Format. `terminal`, `markdown`, `json`, `yaml`, `csv`, `tsv`, `xml`, or `html`. | `terminal` |
| `--pretty` | `-p` | `true` if pretty output.
This option is available in `json`, `xml`, or `html` formats. | `false` |
| `--style` | `-s` | Terminal table style. `unicode` or `ascii`.
This option is available in `terminal` format. | `unicode` |
| `--column` | `-c` | Output columns. The columns are sorted in specified order. | `gem newest installed requested groups` |
## Examples
Output of `bundle outdated`:
```
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Outdated gems included in the bundle:
* faker (newest 1.6.6, installed 1.6.5, requested ~> 1.4) in groups "development, test"
* hashie (newest 3.4.6, installed 1.2.0, requested = 1.2.0) in group "default"
* headless (newest 2.3.1, installed 2.2.3)
```
### Convert to Terminal
Unicode style:
```
┌──────────┬────────┬───────────┬───────────┬───────────────────┐
│ gem │ newest │ installed │ requested │ groups │
├──────────┼────────┼───────────┼───────────┼───────────────────┤
│ faker │ 1.6.6 │ 1.6.5 │ ~> 1.4 │ development, test │
│ hashie │ 3.4.6 │ 1.2.0 │ = 1.2.0 │ default │
│ headless │ 2.3.1 │ 2.2.3 │ │ │
└──────────┴────────┴───────────┴───────────┴───────────────────┘
```
ASCII style:
```
+----------+--------+-----------+-----------+-------------------+
| gem | newest | installed | requested | groups |
+----------+--------+-----------+-----------+-------------------+
| faker | 1.6.6 | 1.6.5 | ~> 1.4 | development, test |
| hashie | 3.4.6 | 1.2.0 | = 1.2.0 | default |
| headless | 2.3.1 | 2.2.3 | | |
+----------+--------+-----------+-----------+-------------------+
```
### Convert to Markdown
```
| gem | newest | installed | requested | groups |
| --- | --- | --- | --- | --- |
| faker | 1.6.6 | 1.6.5 | ~> 1.4 | development, test |
| hashie | 3.4.6 | 1.2.0 | = 1.2.0 | default |
| headless | 2.3.1 | 2.2.3 | | |
```
### Convert to JSON
Normal output:
```
[{"gem":"faker","newest":"1.6.6","installed":"1.6.5","requested":"~> 1.4","groups":"development, test"},{"gem":"hashie","newest":"3.4.6","installed":"1.2.0","requested":"= 1.2.0","groups":"default"},{"gem":"headless","newest":"2.3.1","installed":"2.2.3","requested":"","groups":""}]
```
Pretty output:
```
[
{
"gem": "faker",
"newest": "1.6.6",
"installed": "1.6.5",
"requested": "~> 1.4",
"groups": "development, test"
},
{
"gem": "hashie",
"newest": "3.4.6",
"installed": "1.2.0",
"requested": "= 1.2.0",
"groups": "default"
},
{
"gem": "headless",
"newest": "2.3.1",
"installed": "2.2.3",
"requested": "",
"groups": ""
}
]
```
### Convert to YAML
```
---
- gem: faker
newest: 1.6.6
installed: 1.6.5
requested: "~> 1.4"
groups: development, test
- gem: hashie
newest: 3.4.6
installed: 1.2.0
requested: "= 1.2.0"
groups: default
- gem: headless
newest: 2.3.1
installed: 2.2.3
requested: ''
groups: ''
```
### Convert to CSV
```
"gem","newest","installed","requested","groups"
"faker","1.6.6","1.6.5","~> 1.4","development, test"
"hashie","3.4.6","1.2.0","= 1.2.0","default"
"headless","2.3.1","2.2.3","",""
```
### Convert to TSV
```
"gem" "newest" "installed" "requested" "groups"
"faker" "1.6.6" "1.6.5" "~> 1.4" "development, test"
"hashie" "3.4.6" "1.2.0" "= 1.2.0" "default"
"headless" "2.3.1" "2.2.3" "" ""
```
### Convert to XML
Normal output:
```
faker1.6.61.6.5~> 1.4development, testhashie3.4.61.2.0= 1.2.0defaultheadless2.3.12.2.3
```
Pretty output:
```
faker
1.6.6
1.6.5
~> 1.4
development, test
hashie
3.4.6
1.2.0
= 1.2.0
default
headless
2.3.1
2.2.3
```
### Convert to HTML
Normal output:
```
gemnewestinstalledrequestedgroupsfaker1.6.61.6.5~> 1.4development, testhashie3.4.61.2.0= 1.2.0defaultheadless2.3.12.2.3
```
Pretty output:
```
gem
newest
installed
requested
groups
faker
1.6.6
1.6.5
~> 1.4
development, test
hashie
3.4.6
1.2.0
= 1.2.0
default
headless
2.3.1
2.2.3
```
## Related
* [bundle-outdated-formatter](https://github.com/emsk/bundle-outdated-formatter) - A Node.js implementation of the bundle_outdated_formatter
## Supported Ruby Versions
Ruby 2.0.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0
## Contributing
Bug reports and pull requests are welcome.
## License
[MIT](LICENSE.txt)