cocoapods-testing 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods_testing.rb +1 -1
- data/lib/pod/command/lib/testing.rb +24 -18
- 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: 7cb965d7873bd4160bbefc1b00691b027de67ce0
|
4
|
+
data.tar.gz: 9172e8da86edf3a68467ee501d70ce888891b667
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af0f153d55cd64a53d7eaa58c1811aac2a80e5220cfc76f811da06f231d2e00469c91da990009033a673027302adc8915dca5f3c895e617550989840b976073c
|
7
|
+
data.tar.gz: f41829b35a342f667201b0afa2227b46e27876380a05aeca9723dd9ce844a28997ed18b7ad0c50a44ada65896eff28b0594ad6d2f1df14fa6a5a5dfd90dad2b0
|
data/lib/cocoapods_testing.rb
CHANGED
@@ -17,6 +17,23 @@ module Pod
|
|
17
17
|
]
|
18
18
|
end
|
19
19
|
|
20
|
+
def initialize(argv)
|
21
|
+
@@verbose = argv.flag?('verbose')
|
22
|
+
@@args = argv.arguments!
|
23
|
+
super
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.handle_workspaces_in_dir(dir)
|
27
|
+
workspaces_in_dir(dir).each do |workspace_path|
|
28
|
+
next if workspace_path.end_with?('.xcodeproj')
|
29
|
+
|
30
|
+
workspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace_path)
|
31
|
+
yield workspace, workspace_path
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
:private
|
36
|
+
|
20
37
|
def handle_workspace(workspace, workspace_location)
|
21
38
|
workspace.file_references.each do |ref|
|
22
39
|
if ref.path.end_with?('.xcodeproj')
|
@@ -88,7 +105,7 @@ module Pod
|
|
88
105
|
Rake::Task['test:unit'].invoke
|
89
106
|
end
|
90
107
|
|
91
|
-
def workspaces_in_dir(dir)
|
108
|
+
def self.workspaces_in_dir(dir)
|
92
109
|
glob_match = Dir.glob("#{dir}/**/*.xc{odeproj,workspace}")
|
93
110
|
glob_match = glob_match.reject do |p|
|
94
111
|
next true if p.include?('Pods.xcodeproj')
|
@@ -98,34 +115,23 @@ module Pod
|
|
98
115
|
end
|
99
116
|
end
|
100
117
|
|
101
|
-
def handle_workspaces_in_dir(dir)
|
102
|
-
workspaces_in_dir(dir).each do |workspace|
|
103
|
-
next if workspace.end_with?('.xcodeproj')
|
104
|
-
|
105
|
-
wrkspace = Xcodeproj::Workspace.new_from_xcworkspace(workspace)
|
106
|
-
handle_workspace(wrkspace, workspace)
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
def initialize(argv)
|
111
|
-
@@verbose = argv.flag?('verbose')
|
112
|
-
@@args = argv.arguments!
|
113
|
-
super
|
114
|
-
end
|
115
|
-
|
116
118
|
def run
|
117
119
|
podspecs_to_check.each do # |path|
|
118
120
|
# TODO: How to link specs to projects/workspaces?
|
119
121
|
# spec = Specification.from_file(path)
|
120
122
|
|
121
|
-
handle_workspaces_in_dir(Pathname.pwd)
|
123
|
+
self.class.handle_workspaces_in_dir(Pathname.pwd) do |workspace, workspace_path|
|
124
|
+
handle_workspace(workspace, workspace_path)
|
125
|
+
end
|
122
126
|
|
123
127
|
Dir['*'].each do |dir|
|
124
128
|
next if !File.directory?(dir)
|
125
129
|
original_dir = Pathname.pwd
|
126
130
|
Dir.chdir(dir)
|
127
131
|
|
128
|
-
handle_workspaces_in_dir(Pathname.pwd)
|
132
|
+
self.class.handle_workspaces_in_dir(Pathname.pwd) do |workspace, workspace_path|
|
133
|
+
handle_workspace(workspace, workspace_path)
|
134
|
+
end
|
129
135
|
|
130
136
|
Dir.chdir(original_dir)
|
131
137
|
end
|