cocoapods-podfile_info 0.0.2 → 1.0.0
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/lib/pod/command/podfile_info.rb +18 -10
- data/lib/podfile_info/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b0be0aeda1d2cf0746cc61d0c17ae6e5198e408
|
4
|
+
data.tar.gz: b7e866b54fc6f410842bdb2cf7dd54b04a8138ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a8b395ab38944d88b0953090d33b2c0e0e7373463ed24fd1053db27834277a50ddc3057c5bb50dc0ea10bd84f30856622ced0c9ce9d7034931a5f06575176fa
|
7
|
+
data.tar.gz: 881fc0ac867ceb0b6ea637eca094216996328af1c755849a783033ff2a5f4ac9ea5b134be55ec984c6a4de5bce1eacdc6962c8d736f4b9d7024ff5c1bdb425be
|
@@ -15,14 +15,18 @@ module Pod
|
|
15
15
|
def self.options
|
16
16
|
[
|
17
17
|
["--all", "Show information about all Pods with dependencies that are used in a project"],
|
18
|
-
["--md", "Output information in Markdown format"]
|
18
|
+
["--md", "Output information in Markdown format"],
|
19
|
+
["--csv", "Output information in CSV format"]
|
19
20
|
].concat(super)
|
20
21
|
end
|
21
22
|
|
22
23
|
def initialize(argv)
|
23
24
|
@info_all = argv.flag?('all')
|
24
|
-
|
25
|
-
@
|
25
|
+
|
26
|
+
@type = :text
|
27
|
+
@type = :md if argv.flag?('md')
|
28
|
+
@type = :csv if argv.flag?('csv')
|
29
|
+
|
26
30
|
@podfile_path = argv.shift_argument
|
27
31
|
super
|
28
32
|
end
|
@@ -49,7 +53,7 @@ module Pod
|
|
49
53
|
end
|
50
54
|
|
51
55
|
UI.puts "\nPods used:\n".yellow unless @info_in_md
|
52
|
-
pods_info(pods, @
|
56
|
+
pods_info(pods, @type)
|
53
57
|
end
|
54
58
|
|
55
59
|
def pods_from_podfile(podfile)
|
@@ -59,7 +63,7 @@ module Pod
|
|
59
63
|
pods.collect! {|pod| (pod.is_a?(Hash)) ? pod.keys.first : pod}
|
60
64
|
end
|
61
65
|
|
62
|
-
def pods_info_hash(pods, keys=[:name, :homepage, :summary, :license])
|
66
|
+
def pods_info_hash(pods, keys=[:name, :version, :homepage, :summary, :license])
|
63
67
|
pods_info = []
|
64
68
|
pods.each do |pod|
|
65
69
|
spec = (Pod::SourcesManager.search_by_name(pod).first rescue nil)
|
@@ -72,14 +76,18 @@ module Pod
|
|
72
76
|
pods_info
|
73
77
|
end
|
74
78
|
|
75
|
-
def pods_info(pods,
|
76
|
-
pods = pods_info_hash(pods, [:name, :homepage, :summary, :license])
|
79
|
+
def pods_info(pods, type)
|
80
|
+
pods = pods_info_hash(pods, [:name, :version, :homepage, :summary, :license])
|
81
|
+
UI.puts "name,version,homepage,summary,license" if type == :csv
|
77
82
|
|
78
83
|
pods.each do |pod|
|
79
|
-
|
80
|
-
|
84
|
+
case type
|
85
|
+
when :md
|
86
|
+
UI.puts "* [#{pod[:name]} - #{pod[:version]}](#{pod[:homepage]}) [#{pod[:license][:type]}] - #{pod[:summary]}"
|
87
|
+
when :csv
|
88
|
+
UI.puts "#{pod[:name]},#{pod[:version]},#{pod[:homepage]},\"#{pod[:summary]}\",\"#{pod[:license][:type]}\""
|
81
89
|
else
|
82
|
-
UI.puts "- #{pod[:name]} [#{pod[:license][:type]}]".green
|
90
|
+
UI.puts "- #{pod[:name]} (#{pod[:version]}) [#{pod[:license][:type]}]".green
|
83
91
|
UI.puts " #{pod[:summary]}\n\n"
|
84
92
|
end
|
85
93
|
end
|
data/lib/podfile_info/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-podfile_info
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taras Kalapun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|