objc-dependency-tree-generator 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 8b6b0351faa1f74bd5a917b14aa2e7128a691072
4
- data.tar.gz: da939623b1714a74fc5d169138aa05811a9f77dc
3
+ metadata.gz: 548f057251a2f5d77282e284e526962c84f0df9d
4
+ data.tar.gz: d3c60e4691d585f01011fe16a79dd5bdf6afedf6
5
5
  SHA512:
6
- metadata.gz: 6c8f1df4fb705e21ac0483e70d5a970eabf971b930adb4cd61135c854588b78fbfa31c28aef2dfc14f0edc42aec5c2c7d8ef90209d3e7ce8fdc23ffb00826ae7
7
- data.tar.gz: 543b476b3a16346fc2438dbcb812925d3eac677198b1e864940cfd01ffdc66a2a2386725a8932be0f5c0e6111227852c84d86524e05e2a081d9216de66fa7a29
6
+ metadata.gz: de36097bc21f116fecf3f4fa765fcaa183dbca5571b0767db55214b3673c0d1144f1585636314dbf482a67de4832c4323393f53f210ba20f9b4a05ecfa183a3d
7
+ data.tar.gz: 2d4a371bc43eef680017f2868fcf2e840dd4ceb27485c1eb58ce8ac0c580ad3201607b6ba4e6e6755cb0e1ee6a412031ea3e6da0bd8672bf78423286febce451
@@ -51,7 +51,7 @@ class ObjCDependencyTreeGenerator
51
51
  o.on('-w', '--swift-dependencies', 'Generate swift project dependencies') { |v|
52
52
  options[:swift_dependencies] = v
53
53
  }
54
- o.on('-f FORMAT', 'Output format. json by default. Possible values are [json-pretty|json|json-var|yaml]') { |f|
54
+ o.on('-f FORMAT', 'Output format. json by default. Possible values are [dot|json-pretty|json|json-var|yaml]') { |f|
55
55
  options[:output_format] = f
56
56
  }
57
57
 
@@ -124,10 +124,18 @@ class ObjCDependencyTreeGenerator
124
124
  json_result['source_files_count'] = links.length
125
125
  json_result['links_count'] = links_count
126
126
 
127
-
128
- s = s + JSON.pretty_generate(json_result) if @options[:output_format] == 'json-pretty'
129
- s = s + json_result.to_json if @options[:output_format] == 'json' || @options[:output_format] == 'json-var'
130
- s = s + json_result.to_yaml if @options[:output_format] == 'yaml'
127
+ if @options[:output_format] == 'dot'
128
+ indent = "\t"
129
+ s = "digraph dependencies {\n#{indent}node [fontname=monospace, fontsize=9, shape=box, style=rounded]\n"
130
+ json_links.each do |link|
131
+ s += "#{indent}#{link['source']} -> #{link['dest']}\n"
132
+ end
133
+ s += "}\n"
134
+ else
135
+ s = s + JSON.pretty_generate(json_result) if @options[:output_format] == 'json-pretty'
136
+ s = s + json_result.to_json if @options[:output_format] == 'json' || @options[:output_format] == 'json-var'
137
+ s = s + json_result.to_yaml if @options[:output_format] == 'yaml'
138
+ end
131
139
  s
132
140
  end
133
141
 
@@ -39,7 +39,7 @@ def find_project_output_directory(derived_data_paths, project_prefix, project_su
39
39
  end
40
40
 
41
41
  def is_primitive_swift_type?(dest)
42
- /^(BOOL|Int|Int32|Int64|Int16|Int8|UInt|UInt32|UInt64|UInt16|UInt8|String|Character|Bool|Float|Double|Dictionary|Array|Set|AnyObject|Void)$/.match(dest) != nil
42
+ /^(BOOL|alignofValue|anyGenerator|anyGenerator|assert|assertionFailure|debugPrint|debugPrint|dump|dump|fatalError|getVaList|isUniquelyReferenced|isUniquelyReferencedNonObjC|isUniquelyReferencedNonObjC|max|max|min|abs|alignof|min|numericCast|numericCast|numericCast|numericCast|precondition|preconditionFailure|print|print|readLine|sizeof|sizeofValue|strideof|strideofValue|swap|transcode|unsafeAddressOf|unsafeBitCast|unsafeDowncast|unsafeUnwrap|withExtendedLifetime|withExtendedLifetime|withUnsafeMutablePointer|withUnsafeMutablePointers|withUnsafeMutablePointers|withUnsafePointer|withUnsafePointers|withUnsafePointers|withVaList|withVaList|zip|Any|AnyClass|BooleanLiteralType|CBool|CChar|CChar16|CChar32|CDouble|CFloat|CInt|CLong|CLongLong|CShort|CSignedChar|CUnsignedChar|CUnsignedInt|CUnsignedLong|CUnsignedLongLong|CUnsignedShort|CWideChar|ExtendedGraphemeClusterType|Float32|Float64|FloatLiteralType|IntMax|IntegerLiteralType|StringLiteralType|UIntMax|UnicodeScalarType|Void|AnyBidirectionalCollection|AnyBidirectionalIndex|AnyForwardCollection|AnyForwardIndex|AnyRandomAccessCollection|AnyRandomAccessIndex|AnySequence|Array|ArraySlice|AutoreleasingUnsafeMutablePointer|Bool|COpaquePointer|CVaListPointer|Character|ClosedInterval|CollectionOfOne|ContiguousArray|Dictionary|DictionaryGenerator|DictionaryIndex|DictionaryLiteral|Double|EmptyGenerator|EnumerateGenerator|EnumerateSequence|FlattenBidirectionalCollection|FlattenBidirectionalCollectionIndex|FlattenCollectionIndex|FlattenSequence|Float|GeneratorSequence|HalfOpenInterval|IndexingGenerator|Int|Int16|Int32|Int64|Int8|JoinGenerator|JoinSequence|LazyCollection|LazyFilterCollection|LazyFilterGenerator|LazyFilterIndex|LazyFilterSequence|LazyMapCollection|LazyMapGenerator|LazyMapSequence|LazySequence|ManagedBufferPointer|Mirror|MutableSlice|ObjectIdentifier|PermutationGenerator|Range|RangeGenerator|RawByte|Repeat|ReverseCollection|ReverseIndex|ReverseRandomAccessCollection|ReverseRandomAccessIndex|Set|SetGenerator|SetIndex|Slice|StaticString|StrideThrough|StrideThroughGenerator|StrideTo|StrideToGenerator|String|String.CharacterView|String.CharacterView.Index|String.UTF16View|String.UTF16View.Index|String.UTF8View|String.UTF8View.Index|String.UnicodeScalarView|String.UnicodeScalarView.Generator|String.UnicodeScalarView.Index|UInt|UInt16|UInt32|UInt64|UInt8|UTF16|UTF32|UTF8|UnicodeScalar|Unmanaged|UnsafeBufferPointer|UnsafeBufferPointerGenerator|UnsafeMutableBufferPointer|UnsafeMutablePointer|UnsafePointer|Zip2Generator|Zip2Sequence)$/.match(dest) != nil
43
43
  end
44
44
 
45
45
  def is_filtered_swift_type?(dest)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: objc-dependency-tree-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Taykalo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Tool that allows to generate Objective-C and Swift dependency tree from object files
@@ -20,11 +20,11 @@ executables:
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
+ - bin/objc_dependency_tree_generator
24
+ - lib/objc_dependencies_generator.rb
23
25
  - lib/objc_dependency_tree_generator.rb
24
26
  - lib/objc_dependency_tree_generator_helper.rb
25
- - lib/objc_dependencies_generator.rb
26
27
  - lib/swift_dependencies_generator.rb
27
- - bin/objc_dependency_tree_generator
28
28
  homepage: https://github.com/PaulTaykalo/objc-dependency-visualizer
29
29
  licenses:
30
30
  - MIT
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  version: '0'
46
46
  requirements: []
47
47
  rubyforge_project:
48
- rubygems_version: 2.0.14
48
+ rubygems_version: 2.4.8
49
49
  signing_key:
50
50
  specification_version: 4
51
51
  summary: Objective-C and Swift dependency tree generator