bundler-why 0.1.2 → 0.1.3
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/.gitignore +2 -0
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +9 -5
- data/README.md +2 -5
- data/lib/bundler/why/command.rb +6 -6
- data/lib/bundler/why/version.rb +1 -1
- metadata +3 -4
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16a2cb96193724a61ac24ab4a2525640d3ff09dc8f915763ade319291eda48e
|
4
|
+
data.tar.gz: 5af76d14382181cbe63bd51e77aa86928006c209928dc4372acf2f374cde871c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ecf41516101a110418bc05e27db1f905e8e46ba4949e86dc92ca3b45ef0659aef7ca7a8ea7a936dfb0450bc03984c9ad09356022e87440384137437a4906dc9
|
7
|
+
data.tar.gz: 2955d03f7f0f00047886bd5f8068455be515898436d6bf65fdb56e89cc2852f15079a841d8def7c42f0de4783732449bda4dc9e2dcea8c75d2764d05db05346b
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
This project follows [semver 2.0.0](http://semver.org/spec/v2.0.0.html) and the
|
4
4
|
recommendations of [keepachangelog.com](http://keepachangelog.com/).
|
5
5
|
|
6
|
+
## 0.1.3
|
7
|
+
|
8
|
+
### Fixed
|
9
|
+
|
10
|
+
- Change error to warning: When specs.length != 1
|
11
|
+
|
6
12
|
## 0.1.2
|
7
13
|
|
8
14
|
### Fixed
|
data/CONTRIBUTING.md
CHANGED
@@ -10,21 +10,25 @@ The "Running your plugin locally" section of the
|
|
10
10
|
[How to write a Bundler plugin][1] instructions seems to be wrong, per
|
11
11
|
https://github.com/rubygems/rubygems/issues/3209#issuecomment-652107633
|
12
12
|
|
13
|
-
However, `--git` seems to work.
|
14
|
-
|
13
|
+
However, `--git` seems to work.
|
14
|
+
(https://github.com/rubygems/bundler-site/pull/464)
|
15
|
+
|
16
|
+
So, I open two tabs, one in the bundler-why directory, the second in some
|
17
|
+
project with a meaningful gemfile.
|
15
18
|
|
16
19
|
To test a change, in the first tab I make a WIP commit then in the second tab I
|
17
20
|
|
18
21
|
```
|
19
|
-
rm -rf /Users/jared/git/
|
22
|
+
rm -rf /Users/jared/git/my_project/.bundle/plugin
|
20
23
|
bundler plugin install bundler-why \
|
21
24
|
--git file:///Users/jared/git/bundler-why --branch trunk \
|
22
25
|
--verbose --retry=1
|
23
26
|
bundle why tzinfo
|
24
27
|
```
|
25
28
|
|
26
|
-
Deleting the `plugin` directory is a workaround for the fact that [bundler
|
27
|
-
|
29
|
+
Deleting the `plugin` directory is a workaround for the fact that [bundler does
|
30
|
+
not provide a command to uninstall plugins][2], though it will soon, in 2.2.0.
|
31
|
+
(https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md#220rc1-july-2-2020)
|
28
32
|
|
29
33
|
[1]: https://bundler.io/v2.0/guides/bundler_plugins.html
|
30
34
|
[2]: https://github.com/rubygems/rubygems/issues/3187
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Bundler::Why
|
2
2
|
|
3
|
-
Explains the presence of a dependency.
|
3
|
+
Explains the presence of a dependency, like [`yarn why`][4].
|
4
4
|
|
5
5
|
```bash
|
6
6
|
bundle why tzinfo
|
@@ -20,6 +20,7 @@ By using this software you accept the terms of the license.
|
|
20
20
|
|
21
21
|
```bash
|
22
22
|
bundler plugin install bundler-why
|
23
|
+
bundler plugin uninstall bundler-why # requires bundler 2.2.0
|
23
24
|
```
|
24
25
|
|
25
26
|
## Usage
|
@@ -36,10 +37,6 @@ If you like [graphs][1], you'll enjoy knowing that Bundler uses a [directed
|
|
36
37
|
acyclic graph][2] and `why` is printing all [directed paths][3] to the specified
|
37
38
|
gem.
|
38
39
|
|
39
|
-
## Inspired by
|
40
|
-
|
41
|
-
[`yarn why`][4]
|
42
|
-
|
43
40
|
[1]: https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
|
44
41
|
[2]: https://en.wikipedia.org/wiki/Directed_acyclic_graph
|
45
42
|
[3]: https://en.wikipedia.org/wiki/Path_(graph_theory)
|
data/lib/bundler/why/command.rb
CHANGED
@@ -21,14 +21,14 @@ module Bundler
|
|
21
21
|
# @return Bundler::StubSpecification
|
22
22
|
def find_one_spec_in_set(spec_set, gem_name)
|
23
23
|
specs = spec_set[gem_name]
|
24
|
-
if specs.length
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
'Expected gem name to match exactly 1 spec, got %d',
|
24
|
+
if specs.length != 1
|
25
|
+
warn format(
|
26
|
+
'Expected %s to match exactly 1 spec, got %d',
|
27
|
+
gem_name,
|
29
28
|
specs.length
|
30
29
|
)
|
31
30
|
end
|
31
|
+
specs.first
|
32
32
|
end
|
33
33
|
|
34
34
|
# @param path Array[Bundler::StubSpecification]
|
@@ -41,7 +41,7 @@ module Bundler
|
|
41
41
|
# @void
|
42
42
|
def why(gem_name)
|
43
43
|
runtime = Bundler.load
|
44
|
-
spec_set = runtime.specs
|
44
|
+
spec_set = runtime.specs # delegates to Bundler::Definition#specs
|
45
45
|
spec = find_one_spec_in_set(spec_set, gem_name)
|
46
46
|
traverse(spec_set, spec)
|
47
47
|
end
|
data/lib/bundler/why/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler-why
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Beck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -19,7 +19,6 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- ".rubocop.yml"
|
22
|
-
- ".ruby-version"
|
23
22
|
- ".travis.yml"
|
24
23
|
- CHANGELOG.md
|
25
24
|
- CONTRIBUTING.md
|
@@ -55,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
54
|
- !ruby/object:Gem::Version
|
56
55
|
version: '0'
|
57
56
|
requirements: []
|
58
|
-
rubygems_version: 3.1.
|
57
|
+
rubygems_version: 3.1.6
|
59
58
|
signing_key:
|
60
59
|
specification_version: 4
|
61
60
|
summary: Explains the presence of a dependency.
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.7.1
|