hellgrid 0.3.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -11
- data/README.md +19 -4
- data/hellgrid.gemspec +0 -1
- data/lib/hellgrid/cli.rb +7 -2
- data/lib/hellgrid/version.rb +1 -1
- data/spec/hellgrid_spec.rb +15 -0
- data/spec/spec_helper.rb +0 -3
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b2dbb5da3e867734b318f5d61cbf06987e954edea63e276cf79ad12a2c7f4d
|
4
|
+
data.tar.gz: b6b1e73ef8adf70ee4bdcf60363c356ee7087c6c89a9acc08b97fe225b9f0b6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d0853644dd857b99e243ea1ab3cc0b714bdf2cee1457b9aeee7d0bead8bcf8e037abad8048d8c5ac5b45b637185faf8fbf28239be1f526514a4ad629936acd8
|
7
|
+
data.tar.gz: bfb3fbaa42975c2bbc6d6b6692c2e4530f9c900f415c458e8b6516f26eacf3785048b6a9ed7b0abdaf5c2cb7d441ed2c0dbbeab63633f6dfc1826cd4c3a382ae
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hellgrid (0.
|
4
|
+
hellgrid (0.5.0)
|
5
5
|
bundler (>= 1.11.0, < 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
diff-lcs (1.
|
11
|
-
docile (1.3.5)
|
12
|
-
json (2.5.1)
|
10
|
+
diff-lcs (1.5.1)
|
13
11
|
rspec (3.8.0)
|
14
12
|
rspec-core (~> 3.8.0)
|
15
13
|
rspec-expectations (~> 3.8.0)
|
@@ -23,19 +21,14 @@ GEM
|
|
23
21
|
diff-lcs (>= 1.2.0, < 2.0)
|
24
22
|
rspec-support (~> 3.8.0)
|
25
23
|
rspec-support (3.8.3)
|
26
|
-
simplecov (0.16.1)
|
27
|
-
docile (~> 1.1)
|
28
|
-
json (>= 1.8, < 3)
|
29
|
-
simplecov-html (~> 0.10.0)
|
30
|
-
simplecov-html (0.10.2)
|
31
24
|
|
32
25
|
PLATFORMS
|
33
26
|
ruby
|
27
|
+
x86_64-linux
|
34
28
|
|
35
29
|
DEPENDENCIES
|
36
30
|
hellgrid!
|
37
31
|
rspec (~> 3.8.0)
|
38
|
-
simplecov (~> 0.16.0)
|
39
32
|
|
40
33
|
BUNDLED WITH
|
41
|
-
|
34
|
+
2.5.9
|
data/README.md
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
|
3
3
|
Utility which will output a table containing gem versions used across your projects.
|
4
4
|
|
5
|
-
[](https://codeclimate.com/github/FundingCircle/hellgrid/maintainability)
|
5
|
+
[](https://github.com/FundingCircle/hellgrid/actions/workflows/build-and-test.yml)
|
7
6
|
|
8
7
|
## Install
|
9
8
|
|
@@ -16,12 +15,14 @@ gem install hellgrid
|
|
16
15
|
Let say that you have a directory `/path/to/root/dir` somewhere in which the Ruby projects `foo` and `bar` could be found.
|
17
16
|
|
18
17
|
Executing:
|
18
|
+
|
19
19
|
```bash
|
20
20
|
hellgrid /path/to/root/dir
|
21
21
|
```
|
22
22
|
|
23
23
|
To search recursively (should you have nested projects), use the `-r ` flag:
|
24
|
-
|
24
|
+
|
25
|
+
```bash
|
25
26
|
hellgrid -r /path/to/root/dir
|
26
27
|
```
|
27
28
|
|
@@ -36,7 +37,21 @@ Should result in:
|
|
36
37
|
rspec-mocks | 2.0.0 | 3.0.4
|
37
38
|
rake | 10.0.0 | 11.1.0
|
38
39
|
rspec-support | x | 3.0.4
|
39
|
-
|
40
|
+
```
|
41
|
+
|
42
|
+
To have the gems as columns, use the `-t` flag:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
hellgrid -t /path/to/root/dir
|
46
|
+
```
|
47
|
+
|
48
|
+
Should result in:
|
49
|
+
|
50
|
+
```bash
|
51
|
+
x | diff-lcs | rake | rspec | rspec-core | rspec-expectations | rspec-mocks | rspec-support
|
52
|
+
--------+----------+--------+-------+------------+--------------------+-------------+---------------
|
53
|
+
bar | 1.2.5 | 10.0.0 | 2.0.0 | 2.0.0 | 2.0.0 | 2.0.0 | x
|
54
|
+
foo | 1.2.5 | 11.1.0 | 3.0.0 | 3.0.4 | 3.0.4 | 3.0.4 | 3.0.4
|
40
55
|
```
|
41
56
|
|
42
57
|
## License
|
data/hellgrid.gemspec
CHANGED
data/lib/hellgrid/cli.rb
CHANGED
@@ -12,19 +12,24 @@ module Hellgrid
|
|
12
12
|
|
13
13
|
def start
|
14
14
|
recursive_search = !!(argv.delete('-r'))
|
15
|
+
transpose = !!(argv.delete('-t'))
|
16
|
+
|
15
17
|
folders = argv.empty? ? [Dir.pwd] : argv
|
16
18
|
|
17
19
|
folders.each do |folder|
|
18
20
|
matrix = Hellgrid::Matrix.new
|
19
21
|
|
20
22
|
Find.find(folder) do |path|
|
21
|
-
if File.directory?(path) && File.
|
23
|
+
if File.directory?(path) && File.exist?(File.join(path, 'Gemfile.lock'))
|
22
24
|
matrix.add_project(Hellgrid::Project.new(folder, path))
|
23
25
|
Find.prune unless recursive_search
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
|
-
|
29
|
+
data = matrix.sorted_by_most_used
|
30
|
+
data = data.transpose if transpose
|
31
|
+
|
32
|
+
view = Hellgrid::Views::Console.new(data)
|
28
33
|
|
29
34
|
view.render
|
30
35
|
end
|
data/lib/hellgrid/version.rb
CHANGED
data/spec/hellgrid_spec.rb
CHANGED
@@ -132,4 +132,19 @@ TABLE
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
end
|
135
|
+
|
136
|
+
context 'when passing -t' do
|
137
|
+
it 'transposes the result and the project names on the left' do
|
138
|
+
expected_result = <<-TABLE
|
139
|
+
x | diff-lcs | rake | rspec | rspec-core | rspec-expectations | rspec-mocks | rspec-support
|
140
|
+
--------+----------+--------+-------+------------+--------------------+-------------+---------------
|
141
|
+
bar | 1.2.5 | 10.0.0 | 2.0.0 | 2.0.0 | 2.0.0 | 2.0.0 | x
|
142
|
+
in/foo | 1.2.5 | 11.1.0 | 3.0.0 | 3.0.4 | 3.0.4 | 3.0.4 | 3.0.4
|
143
|
+
TABLE
|
144
|
+
|
145
|
+
with_unbundled_env do
|
146
|
+
expect(`cd #{PROJECT_ROOT}/spec/tmp && #{PROJECT_ROOT}/bin/hellgrid -t`).to eq(expected_result)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
135
150
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellgrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Deyan Dobrinov
|
8
8
|
- Aleksandar Ivanov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -45,20 +45,6 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 3.8.0
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: simplecov
|
50
|
-
requirement: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.16.0
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.16.0
|
62
48
|
description: Display gem versions used across your projects in a table
|
63
49
|
email:
|
64
50
|
- engineering+hellgrid@fundingcircle.com
|
@@ -88,7 +74,7 @@ homepage: https://github.com/FundingCircle/hellgrid
|
|
88
74
|
licenses:
|
89
75
|
- BSD-3-Clause
|
90
76
|
metadata: {}
|
91
|
-
post_install_message:
|
77
|
+
post_install_message:
|
92
78
|
rdoc_options: []
|
93
79
|
require_paths:
|
94
80
|
- lib
|
@@ -103,8 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
89
|
- !ruby/object:Gem::Version
|
104
90
|
version: '0'
|
105
91
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
107
|
-
signing_key:
|
92
|
+
rubygems_version: 3.5.9
|
93
|
+
signing_key:
|
108
94
|
specification_version: 4
|
109
95
|
summary: Gem version dependency matrix
|
110
96
|
test_files:
|