hellgrid 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +18 -2
- data/lib/hellgrid/cli.rb +6 -1
- data/lib/hellgrid/version.rb +1 -1
- data/spec/hellgrid_spec.rb +15 -0
- metadata +3 -3
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
data/README.md
CHANGED
@@ -15,12 +15,14 @@ gem install hellgrid
|
|
15
15
|
Let say that you have a directory `/path/to/root/dir` somewhere in which the Ruby projects `foo` and `bar` could be found.
|
16
16
|
|
17
17
|
Executing:
|
18
|
+
|
18
19
|
```bash
|
19
20
|
hellgrid /path/to/root/dir
|
20
21
|
```
|
21
22
|
|
22
23
|
To search recursively (should you have nested projects), use the `-r ` flag:
|
23
|
-
|
24
|
+
|
25
|
+
```bash
|
24
26
|
hellgrid -r /path/to/root/dir
|
25
27
|
```
|
26
28
|
|
@@ -35,7 +37,21 @@ Should result in:
|
|
35
37
|
rspec-mocks | 2.0.0 | 3.0.4
|
36
38
|
rake | 10.0.0 | 11.1.0
|
37
39
|
rspec-support | x | 3.0.4
|
38
|
-
|
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
|
39
55
|
```
|
40
56
|
|
41
57
|
## License
|
data/lib/hellgrid/cli.rb
CHANGED
@@ -12,6 +12,8 @@ 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|
|
@@ -24,7 +26,10 @@ module Hellgrid
|
|
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
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
|
-
rubygems_version: 3.5.
|
92
|
+
rubygems_version: 3.5.9
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: Gem version dependency matrix
|