bundle_outdated_formatter 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 01ca034f54fe1038725483780bd66d5ffaa54dd4
4
- data.tar.gz: 4d73ac36a9fbc80284074eef08d8e277b69a031d
2
+ SHA256:
3
+ metadata.gz: a5e107a14ffcf92456621390c3e5f5aee6bfeaef1703a2e968e31a880c5e9158
4
+ data.tar.gz: df7eeddbdff35e240dbc1ed16b97daccc2a8a92209e6895a3569b44a14eb3210
5
5
  SHA512:
6
- metadata.gz: bd843a7fe2d0ea2d97d4a1517576db6dc6b9cc4272ca5573e1330d9de37dd1d13203b17572bf978e3aa018f82f6dcfbe5bb31ece0129198307cdc6a5b096a035
7
- data.tar.gz: 5c8ffeeb1c97cb179bee7ffe33d2de0355b3c3c827eef1bd1715fb10b8df779f9ee10cb448bc8b1314511e6054c72b57d0e9c1bd9243ec85c2d19b08833e9288
6
+ metadata.gz: 1be74f024a0dca333790b0d57f20aeab970f92406b917f56d13350906ca43b58214c371b801880d841492f391f213adc187c190a16dcc6bd10741557a948598a
7
+ data.tar.gz: cbac144cc506b72ca567c54b32cc5e4c7551855c85b88eddb165e2b654cfe8d8c0d9b19b6870105561a371ff072f06755a7e67842dc4cab3a353d34827c969f6
data/.rubocop.yml CHANGED
@@ -20,3 +20,6 @@ Metrics/BlockLength:
20
20
 
21
21
  Metrics/LineLength:
22
22
  Enabled: false
23
+
24
+ Naming/HeredocDelimiterNaming:
25
+ Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-07-08 13:45:56 +0900 using RuboCop version 0.49.1.
3
+ # on 2017-10-27 22:55:43 +0900 using RuboCop version 0.51.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
data/.travis.yml CHANGED
@@ -3,10 +3,12 @@ language: ruby
3
3
  rvm:
4
4
  - 2.0.0
5
5
  - 2.1.10
6
- - 2.2.7
7
- - 2.3.4
8
- - 2.4.1
6
+ - 2.2.9
7
+ - 2.3.6
8
+ - 2.4.3
9
+ - 2.5.0
9
10
  - ruby-head
10
11
  before_install:
11
12
  - stty cols 160
12
- - gem install bundler -v 1.15.1
13
+ - gem update --system
14
+ - gem update bundler
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.4.0 (2017-12-29)
4
+
5
+ ### Features
6
+
7
+ * Support Terminal (ASCII table) format
8
+ * Change default format from Markdown to Terminal
9
+
3
10
  ## 0.3.0 (2017-07-08)
4
11
 
5
12
  ### Features
data/Gemfile CHANGED
@@ -2,3 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in bundle_outdated_formatter.gemspec
4
4
  gemspec
5
+
6
+ if Gem::Version.create(RUBY_VERSION) < Gem::Version.create('2.1.0')
7
+ gem 'rubocop', '< 0.51.0'
8
+ end
data/README.md CHANGED
@@ -40,7 +40,7 @@ $ bundle outdated | bof
40
40
 
41
41
  | Option | Alias | Description | Default |
42
42
  | :----- | :---- | :---------- | :------ |
43
- | `--format` | `-f` | Format. `markdown`, `json`, `yaml`, `csv`, `xml`, or `html`. | `markdown` |
43
+ | `--format` | `-f` | Format. `terminal`, `markdown`, `json`, `yaml`, `csv`, `tsv`, `xml`, or `html`. | `terminal` |
44
44
  | `--pretty` | `-p` | `true` if pretty output.<br>This option is available in `json`, `xml`, or `html` formats. | `false` |
45
45
 
46
46
  ## Examples
@@ -59,6 +59,18 @@ Outdated gems included in the bundle:
59
59
  * headless (newest 2.3.1, installed 2.2.3)
60
60
  ```
61
61
 
62
+ ### Convert to Terminal
63
+
64
+ ```
65
+ +----------+--------+-----------+-----------+-------------------+
66
+ | gem | newest | installed | requested | groups |
67
+ +----------+--------+-----------+-----------+-------------------+
68
+ | faker | 1.6.6 | 1.6.5 | ~> 1.4 | development, test |
69
+ | hashie | 3.4.6 | 1.2.0 | = 1.2.0 | default |
70
+ | headless | 2.3.1 | 2.2.3 | | |
71
+ +----------+--------+-----------+-----------+-------------------+
72
+ ```
73
+
62
74
  ### Convert to Markdown
63
75
 
64
76
  ```
@@ -231,6 +243,7 @@ Pretty output:
231
243
  * Ruby 2.2
232
244
  * Ruby 2.3
233
245
  * Ruby 2.4
246
+ * Ruby 2.5
234
247
 
235
248
  ## Contributing
236
249
 
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'bundle_outdated_formatter/version'
@@ -23,11 +21,12 @@ Gem::Specification.new do |spec|
23
21
  spec.require_paths = ['lib']
24
22
 
25
23
  spec.add_runtime_dependency 'psych', '~> 2.2'
24
+ spec.add_runtime_dependency 'terminal-table', '~> 1.8'
26
25
  spec.add_runtime_dependency 'thor', '~> 0.19'
27
- spec.add_development_dependency 'bundler', '~> 1.15'
26
+ spec.add_development_dependency 'bundler', '~> 1.16'
28
27
  spec.add_development_dependency 'coveralls', '~> 0.8'
29
- spec.add_development_dependency 'rake', '~> 12.0'
30
- spec.add_development_dependency 'rspec', '~> 3.6'
31
- spec.add_development_dependency 'rubocop', '~> 0.49'
28
+ spec.add_development_dependency 'rake', '~> 12.3'
29
+ spec.add_development_dependency 'rspec', '~> 3.7'
30
+ spec.add_development_dependency 'rubocop', '~> 0.52'
32
31
  spec.add_development_dependency 'simplecov', '~> 0.14'
33
32
  end
@@ -1,5 +1,6 @@
1
1
  require 'thor'
2
2
  require 'bundle_outdated_formatter/error'
3
+ require 'bundle_outdated_formatter/formatter/terminal_formatter'
3
4
  require 'bundle_outdated_formatter/formatter/markdown_formatter'
4
5
  require 'bundle_outdated_formatter/formatter/json_formatter'
5
6
  require 'bundle_outdated_formatter/formatter/yaml_formatter'
@@ -12,6 +13,7 @@ module BundleOutdatedFormatter
12
13
  # Command-line interface of {BundleOutdatedFormatter}
13
14
  class CLI < Thor
14
15
  FORMATTERS = {
16
+ 'terminal' => TerminalFormatter,
15
17
  'markdown' => MarkdownFormatter,
16
18
  'json' => JSONFormatter,
17
19
  'yaml' => YAMLFormatter,
@@ -24,7 +26,7 @@ module BundleOutdatedFormatter
24
26
  default_command :output
25
27
 
26
28
  desc 'output', 'Format output of `bundle outdated`'
27
- option :format, type: :string, aliases: '-f', default: 'markdown', desc: 'Format. (markdown, json, yaml, csv, tsv, xml, html)'
29
+ option :format, type: :string, aliases: '-f', default: 'terminal', desc: 'Format. (terminal, markdown, json, yaml, csv, tsv, xml, html)'
28
30
  option :pretty, type: :boolean, aliases: '-p', desc: '`true` if pretty output.'
29
31
 
30
32
  def output
@@ -0,0 +1,18 @@
1
+ require 'terminal-table'
2
+ require 'bundle_outdated_formatter/formatter'
3
+
4
+ module BundleOutdatedFormatter
5
+ # Formatter for Terminal
6
+ class TerminalFormatter < Formatter
7
+ def convert
8
+ table = Terminal::Table.new do |t|
9
+ t << COLUMNS
10
+ t << :separator
11
+ @outdated_gems.each do |gem|
12
+ t << gem.values
13
+ end
14
+ end
15
+ table.render.chomp
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module BundleOutdatedFormatter
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundle_outdated_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - emsk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-08 00:00:00.000000000 Z
11
+ date: 2017-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: psych
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: terminal-table
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.8'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.8'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: thor
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +58,14 @@ dependencies:
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '1.15'
61
+ version: '1.16'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '1.15'
68
+ version: '1.16'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: coveralls
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -72,42 +86,42 @@ dependencies:
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '12.0'
89
+ version: '12.3'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '12.0'
96
+ version: '12.3'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '3.6'
103
+ version: '3.7'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '3.6'
110
+ version: '3.7'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rubocop
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0.49'
117
+ version: '0.52'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0.49'
124
+ version: '0.52'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: simplecov
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -153,6 +167,7 @@ files:
153
167
  - lib/bundle_outdated_formatter/formatter/html_formatter.rb
154
168
  - lib/bundle_outdated_formatter/formatter/json_formatter.rb
155
169
  - lib/bundle_outdated_formatter/formatter/markdown_formatter.rb
170
+ - lib/bundle_outdated_formatter/formatter/terminal_formatter.rb
156
171
  - lib/bundle_outdated_formatter/formatter/tsv_formatter.rb
157
172
  - lib/bundle_outdated_formatter/formatter/xml_formatter.rb
158
173
  - lib/bundle_outdated_formatter/formatter/yaml_formatter.rb
@@ -177,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
192
  version: '0'
178
193
  requirements: []
179
194
  rubyforge_project:
180
- rubygems_version: 2.6.10
195
+ rubygems_version: 2.7.3
181
196
  signing_key:
182
197
  specification_version: 4
183
198
  summary: Formatter for `bundle outdated`