depdump 0.1.1 → 0.1.2

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: 8eb1460c84fc8bc7588b057836ae7b85d414a14b03b8a03e6a807c78e3873da0
4
- data.tar.gz: af33ebf76ff569f3ae0172adc87813320f6eef8e240adaf2bf91afe9e4cfb331
3
+ metadata.gz: 0fbba294fa454bdfb09bad8c0312a80a12a80f0a82b50b341d3f01578c5b343a
4
+ data.tar.gz: a8b0bd4d13e15aa4761b6992229659de22453c2137138c6ff37d7967cdc3b338
5
5
  SHA512:
6
- metadata.gz: 95563ad1d80f10b5c0b8c3d7165ef8a648c78460b97655b75f4a61bbd815ef3e215e20b225cab35282a96964ee399bfabc2888037decd1958b34c0cd735d5d57
7
- data.tar.gz: b0276067cc1df6053ee1536127251841f9c94436aa8e7868f33cd66892b70506bd2eed5f07b49a6a41446aceb087504a1c09a3f6d367fe83dd521b01da7ae266
6
+ metadata.gz: 0e5d7c9e36006378a9e1c99b367f7de479222f690654fe93b574b964b5d6ac1b05bd630f5f6f82577fe9e12d2dff465623a91e47885a2e3b282a75243d2f2b12
7
+ data.tar.gz: 60e6d47ee17e72a47df6735c6c48c3b33ebfb397719a43ade3526567400922826e5465cf19b3aaa7f2e1facf51e8f6c14c2ff0be4022c42620539a3c105c3f9e
data/README.md CHANGED
@@ -32,7 +32,7 @@ Quick start:
32
32
 
33
33
  Or, specify files and directories.
34
34
 
35
- $ depdump lib/greate_module.rb app
35
+ $ depdump lib/great_module.rb app
36
36
 
37
37
  Then, the dependency graph appeared as a JSON string in stdout.
38
38
 
@@ -49,7 +49,9 @@ Then, the dependency graph appeared as a JSON string in stdout.
49
49
  ]
50
50
  }
51
51
 
52
- And some execution warnings are written in `depdump-error.log`.
52
+ And some execution warnings and errors are written in `depdump-error.log`.
53
+
54
+ Additionaly, option `-o [output file]` and `-f [format json/table]` are available.
53
55
 
54
56
  ## Development
55
57
 
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_runtime_dependency "parser", "~> 2.6"
30
30
 
31
- spec.add_development_dependency "bundler", "~> 2.1.a"
31
+ spec.add_development_dependency "bundler", '>= 1.17.0', ">= 2.0.0"
32
32
  spec.add_development_dependency "rake"
33
33
  end
@@ -5,6 +5,7 @@ require_relative "depdump/registry"
5
5
  require_relative "depdump/tracer"
6
6
  require_relative "depdump/version"
7
7
 
8
+ require "set"
8
9
  require "parser/current"
9
10
 
10
11
  module Depdump
@@ -25,12 +25,11 @@ module Depdump
25
25
 
26
26
  def resolve(partial_namespaces, entry_node)
27
27
  current_node = entry_node
28
- prev_node = nil
29
28
  resolved_node = nil
30
29
 
31
30
  while current_node && resolved_node.nil?
32
31
  resolved_node = current_node.dig(partial_namespaces)
33
- prev_node, current_node = current_node, current_node&.parent
32
+ current_node = current_node&.parent
34
33
  end
35
34
 
36
35
  resolved_node
@@ -1,3 +1,3 @@
1
1
  module Depdump
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depdump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - upinetree
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-09 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.17.0
34
+ - - ">="
32
35
  - !ruby/object:Gem::Version
33
- version: 2.1.a
36
+ version: 2.0.0
34
37
  type: :development
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.17.0
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: 2.1.a
46
+ version: 2.0.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement