An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# BundleOutdatedFormatter

[![Gem Version](https://badge.fury.io/rb/bundle_outdated_formatter.svg)](https://badge.fury.io/rb/bundle_outdated_formatter)
[![Build Status](https://github.com/emsk/bundle_outdated_formatter/actions/workflows/build.yml/badge.svg)](https://github.com/emsk/bundle_outdated_formatter/actions/workflows/build.yml)
[![Build Status](https://travis-ci.org/emsk/bundle_outdated_formatter.svg?branch=main)](https://travis-ci.org/emsk/bundle_outdated_formatter)
[![Build status](https://ci.appveyor.com/api/projects/status/w2qfj0a4iicqhmhq?svg=true)](https://ci.appveyor.com/project/emsk/bundle-outdated-formatter)
[![Build Status](https://dev.azure.com/emsk/bundle_outdated_formatter/_apis/build/status/emsk.bundle_outdated_formatter?branchName=main)](https://dev.azure.com/emsk/bundle_outdated_formatter/_build/latest?definitionId=3&branchName=main)
[![Codecov](https://codecov.io/gh/emsk/bundle_outdated_formatter/branch/main/graph/badge.svg)](https://codecov.io/gh/emsk/bundle_outdated_formatter)
[![Code Climate](https://codeclimate.com/github/emsk/bundle_outdated_formatter/badges/gpa.svg)](https://codeclimate.com/github/emsk/bundle_outdated_formatter)
[![Inline docs](http://inch-ci.org/github/emsk/bundle_outdated_formatter.svg?branch=main)](http://inch-ci.org/github/emsk/bundle_outdated_formatter)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](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)