lapidarius 4.5.5 → 4.5.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 743d5d7b47e23ae05b54f761366dc7f7c6c8c03e082585f26be4e7a4fe965360
4
- data.tar.gz: fb1e6fbf6e9e11e4ac6c3b96f6db20e73a95c477bb8662d736bea9d2ecf6b274
3
+ metadata.gz: f6410e20cc4f3efee45608ed53cd811cc8224aa28291a6ffa9758491f9fc8231
4
+ data.tar.gz: c8cf62f885131267be57da827990ad3f97f1386928996e5434f5eb2215947e95
5
5
  SHA512:
6
- metadata.gz: '0909cbef4a840dbb432d603c00563a2da51968df8d27f3e865f1d86e6471dbbedbdc1306dbc1c35f735426a75652980506b378fa8447a38aa839262ca5c0426a'
7
- data.tar.gz: 3e5898e9aa146c21063eb0dd30314c3c820f2875e3ef36e2a7610ed7248ce3474deeca415e2f275f759b757383ceb4b711186c59b9f233668f668e33373ffdbb
6
+ metadata.gz: 42bd8fd8d3c216f6422e37938121b88c7a27aa937e043f24a568e0f002016eb0dba0fed7ee753a37685b89b15230e4a05ee3cddad8fec16f71d9095161dc41e4
7
+ data.tar.gz: 6a76ef05327afac761180811372aad11e735bad59200c336bce019caab4901fdfa31ac0b6be6b835fa3ebb604af681d412d2d294ee658e461735b31c6aa3637c
data/README.md CHANGED
@@ -31,8 +31,8 @@ gem install lapidarius
31
31
  ```
32
32
 
33
33
  ## Usage
34
- This library invokes the [Gem::Commands::DependencyCommand](https://github.com/rubygems/rubygems/blob/master/lib/rubygems/commands/dependency_command.rb) class recursively to collect all the levels of dependency.
35
- Both runtime and development dependencies are counted (identical dependencies are counted once), but just the former are printed on screen:
34
+ This library relies heavily on the [Gem::Commands::DependencyCommand](https://github.com/rubygems/rubygems/blob/master/lib/rubygems/commands/dependency_command.rb) class to recursively the dependencies tree.
35
+ Both runtime and development dependencies are counted once, but just the former are printed on screen:
36
36
 
37
37
  ```shell
38
38
  lapidarius sinatra
@@ -61,7 +61,7 @@ sinatra (1.4.7)
61
61
  ```
62
62
 
63
63
  ### Remote
64
- By default this library scan for local gems, warning if the gem is not found:
64
+ By default this library scan for local gems, warning if the gem is not installed:
65
65
  ```shell
66
66
  lapidarius rails -v 1.2.6
67
67
  No gems found matching rails (= 1.2.6)
@@ -50,11 +50,14 @@ module Lapidarius
50
50
  end
51
51
 
52
52
  def count
53
- flatten_deps.size
53
+ @count ||= flatten_deps!.size
54
54
  end
55
55
 
56
- protected def flatten_deps
57
- deps.reduce(deps) { |acc, dep| acc.concat dep.flatten_deps }.flatten.uniq(&:name)
56
+ protected def flatten_deps!
57
+ deps.reduce(deps) { |acc, dep| acc.concat dep.flatten_deps! }.tap do |deps|
58
+ deps.flatten!
59
+ deps.uniq!(&:name)
60
+ end
58
61
  end
59
62
 
60
63
  private def gem?(gem)
@@ -1,3 +1,3 @@
1
1
  module Lapidarius
2
- VERSION = "4.5.5"
2
+ VERSION = "4.5.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lapidarius
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.5
4
+ version: 4.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - costajob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-15 00:00:00.000000000 Z
11
+ date: 2018-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler