bundler-why 0.1.2 → 0.1.3

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
2
  SHA256:
3
- metadata.gz: e4d87d484cb85734a9267fb5fb0ff166fd09aaf1094131362963b0ed9a71aad7
4
- data.tar.gz: b7d4cfc116fb9843a51e8aef3441fa2fb79e801841bc8830264652e00f701c76
3
+ metadata.gz: d16a2cb96193724a61ac24ab4a2525640d3ff09dc8f915763ade319291eda48e
4
+ data.tar.gz: 5af76d14382181cbe63bd51e77aa86928006c209928dc4372acf2f374cde871c
5
5
  SHA512:
6
- metadata.gz: cfa5182c014677edd68762685e4af125a7dae7e716bd528a6dd602c9e930f0fdacafbdbaf5cbbb5ce2c88c8c1f9fef22ac0857fadc92a4b1ec20169ace503ed6
7
- data.tar.gz: d81a3910dcc0a0b39ecb01a082bca2f9792b6854d90d33cb05f8e6c5f990a58ac604644f4467aabd0301677d604353ddc173eeedb33e4136dee315837482e87d
6
+ metadata.gz: 0ecf41516101a110418bc05e27db1f905e8e46ba4949e86dc92ca3b45ef0659aef7ca7a8ea7a936dfb0450bc03984c9ad09356022e87440384137437a4906dc9
7
+ data.tar.gz: 2955d03f7f0f00047886bd5f8068455be515898436d6bf65fdb56e89cc2852f15079a841d8def7c42f0de4783732449bda4dc9e2dcea8c75d2764d05db05346b
data/.gitignore CHANGED
@@ -7,3 +7,5 @@ Gemfile.lock
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ .idea
11
+ .ruby-version
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. So, I open two tabs, one in the bundler-why
14
- directory, the second in some project `banana` with a meaningful gemfile.
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/banana/.bundle/plugin
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
- does not provide a command to uninstall plugins][2].
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)
@@ -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 == 1
25
- specs.first
26
- else
27
- raise Error, format(
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
@@ -4,7 +4,7 @@ module Bundler
4
4
  # :nodoc:
5
5
  module Why
6
6
  def self.gem_version
7
- ::Gem::Version.new('0.1.2')
7
+ ::Gem::Version.new('0.1.3')
8
8
  end
9
9
  end
10
10
  end
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.2
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: 2020-10-28 00:00:00.000000000 Z
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.3
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