PodfileTool 0.0.5 → 0.0.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/podtool +46 -0
  3. data/lib/PodfileTool.rb +12 -0
  4. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a309c7109483a8e1fcd76b358fa17799c025f98a
4
- data.tar.gz: 69f48ff61feffc6b5aadc3446bea3e85538cd5fc
3
+ metadata.gz: 4c39e4a03e4e1a57f58c716362ca2aebe9b22e2e
4
+ data.tar.gz: 320f73794537910cfa5a135ebf80a1609d44ced8
5
5
  SHA512:
6
- metadata.gz: d48b3b78ed2dd60e1feb8df35893f58db8bf0b9d09795d7651da0c56453cf7af13147c137441b4f9bda1214171ec9df6795d5058b67bc77912d8c40d4197081e
7
- data.tar.gz: 46034960642204edcbf03ce76d8a6f98ac0315cf1531f47cd2771fd7fc0d0497bd948461e2eaf3f25f21c6b15a008759e5c96db354a83ac1522d1fc71c04f844
6
+ metadata.gz: 1d076a2765714fc44150bf3aca16a4f0bca6a1d1ba463209c93c8d3fa4d52da2ef6b4125a04e6a442ef4a89ebe5f55df23313764717b70e6be96705758d9c67c
7
+ data.tar.gz: 28368d9ef01d2db2c024a52104a7a607522d2a87500d78c3d6f8c60eac987b2c8d25ce5f5b8d346065e64f0fcff1ae288905103e43cbb6e0bbb12a47ccec3ae8
data/bin/podtool ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'commander/import'
5
+ require 'PodfileTool'
6
+
7
+ program :name, 'podtool'
8
+ program :version, '0.0.1'
9
+ program :description, 'pod tools set'
10
+
11
+ command :parse do |c|
12
+ c.syntax = 'podtool parse [options]'
13
+ c.summary = ''
14
+ c.description = ''
15
+ c.example 'description', 'command example'
16
+ c.option '--some-switch', 'Some switch that does something'
17
+ c.action do |args, options|
18
+ puts PodfileTool.outputJson(args[0])
19
+ end
20
+ end
21
+
22
+ command :share do |c|
23
+ c.syntax = 'podtool share [options]'
24
+ c.summary = ''
25
+ c.description = ''
26
+ c.example 'description', 'command example'
27
+ c.option '--some-switch', 'Some switch that does something'
28
+ c.action do |args, options|
29
+ puts PodfileTool.sharePodScheme(ARGV[1])
30
+ end
31
+ end
32
+
33
+ command :removetarget do |c|
34
+ c.syntax = 'podtool removetarget [options]'
35
+ c.summary = ''
36
+ c.description = ''
37
+ c.example 'description', 'command example'
38
+ c.option '--some-switch', 'Some switch that does something'
39
+ c.action do |args, options|
40
+ PodfileTool.removeTarget(args[0], args[1])
41
+ end
42
+ end
43
+
44
+
45
+
46
+
data/lib/PodfileTool.rb CHANGED
@@ -68,4 +68,16 @@ class PodfileTool
68
68
  end
69
69
  "Success share #{pod_name}"
70
70
  end
71
+
72
+ def self.removeTarget(project_path, target_to_remove)
73
+ project = Xcodeproj::Project.open(project_path)
74
+ project.targets.each do |target|
75
+ puts target.name
76
+ if target.name == target_to_remove
77
+ target.remove_from_project
78
+ puts "#{target.name} did remove from project!!"
79
+ end
80
+ end
81
+ project.save
82
+ end
71
83
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PodfileTool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - dacaiguoguo
@@ -14,10 +14,12 @@ description: output Cocoapods Podfile to Json
14
14
  email: dacaiguoguo@gmail.com
15
15
  executables:
16
16
  - PodfileTool
17
+ - podtool
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - bin/PodfileTool
22
+ - bin/podtool
21
23
  - lib/PodfileTool.rb
22
24
  homepage: http://rubygems.org/gems/PodfileTool
23
25
  licenses: