PodfileTool 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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/PodfileTool +5 -1
  3. data/lib/PodfileTool.rb +18 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf14ea21f2913bd6e891ba32afcfc6325b4806e6
4
- data.tar.gz: 1457d530987a6d06b7c27502262cbb98e255de05
3
+ metadata.gz: a309c7109483a8e1fcd76b358fa17799c025f98a
4
+ data.tar.gz: 69f48ff61feffc6b5aadc3446bea3e85538cd5fc
5
5
  SHA512:
6
- metadata.gz: cecc2530b4d1188f95d64a80a13412dca141894819f2ab68cce674ee6b29639e4bb7b67a12cbc177a7d57f1ba651d37b807a2ab3d5d87d4c4f4dd62f96a0f1dd
7
- data.tar.gz: ee1f5fca043a6b1af2c6887d589062b154d8b91a931583d525454326633bb5689bb6ec1e613c386d53f8c3635bfdd8e0cb60fd3e91986639497490bd4f182abf
6
+ metadata.gz: d48b3b78ed2dd60e1feb8df35893f58db8bf0b9d09795d7651da0c56453cf7af13147c137441b4f9bda1214171ec9df6795d5058b67bc77912d8c40d4197081e
7
+ data.tar.gz: 46034960642204edcbf03ce76d8a6f98ac0315cf1531f47cd2771fd7fc0d0497bd948461e2eaf3f25f21c6b15a008759e5c96db354a83ac1522d1fc71c04f844
data/bin/PodfileTool CHANGED
@@ -2,4 +2,8 @@
2
2
 
3
3
  require 'PodfileTool'
4
4
 
5
- puts PodfileTool.outputJson(ARGV[0])
5
+ if ARGV[0] == "share"
6
+ puts PodfileTool.sharePodScheme(ARGV[1])
7
+ else
8
+ puts PodfileTool.outputJson(ARGV[0])
9
+ end
data/lib/PodfileTool.rb CHANGED
@@ -50,4 +50,22 @@ class PodfileTool
50
50
  puts "Unable to open file!"
51
51
  end
52
52
  end
53
+ #
54
+ # share pod project scheme,Share a User Scheme. Basically this method move the xcscheme file from the xcuserdata folder to xcshareddata folder.
55
+ #Arguments:
56
+ # pods_project_path:(pods_project_path)
57
+ # Example3:
58
+ # >> PodfileTool.sharePodScheme("/path_of_Pod_project")
59
+ # => {json}
60
+ #
61
+ #
62
+ def self.sharePodScheme(pods_project_path)
63
+ pod_name = pods_project_path.split('/')[-4]
64
+ project = Xcodeproj::Project.open(pods_project_path)
65
+ schemes = Xcodeproj::Project.schemes(pods_project_path)
66
+ unless schemes.include? pod_name
67
+ Xcodeproj::XCScheme.share_scheme(project.path, pod_name)
68
+ end
69
+ "Success share #{pod_name}"
70
+ end
53
71
  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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - dacaiguoguo