PodfileTool 0.0.2 → 0.0.3
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/PodfileTool.rb +19 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e2df3af18b1a742210c4eb011bbbb490422db46
|
4
|
+
data.tar.gz: 71c30ac49009a1e367a644c4b76f9a6b0512dad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa8bbb8a8bc0bde65741f90a0bdc205a9c8efbdff847e0c9dc46499a7a3579e190bf22c15e6808f244fc58750ccc91bcd733f771eed0833661d26485e4a69ecf
|
7
|
+
data.tar.gz: 4fbd5fbfe2377be609b1b1936acf01244bb2163f4e747af25ceb638e188188fff1ed1ef4937b34168a151b8098abfde6b1f21e37c9ca6dc0182b1248718db505
|
data/lib/PodfileTool.rb
CHANGED
@@ -19,9 +19,25 @@ class PodfileTool
|
|
19
19
|
# Arguments:
|
20
20
|
# path: (path_of_Podfile)
|
21
21
|
def self.outputJson(path)
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
if path
|
23
|
+
if path.empty?
|
24
|
+
puts 'need good Podfile Path!!!'
|
25
|
+
else
|
26
|
+
if File.exist?(path)
|
27
|
+
if File.file?(path)
|
28
|
+
podfile_hash = Pod::Podfile.from_file(path).to_hash
|
29
|
+
podfile_json = JSON.pretty_generate(podfile_hash)
|
30
|
+
podfile_json
|
31
|
+
else
|
32
|
+
puts 'Podfile Path is not a file!!!'
|
33
|
+
end
|
34
|
+
else
|
35
|
+
puts 'need exist Podfile Path!!!'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
else
|
39
|
+
puts 'need Podfile Path!!!'
|
40
|
+
end
|
25
41
|
end
|
26
42
|
|
27
43
|
def self.outputJsonFile(path)
|