cocoapods-testing 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 12933979c5ce8571d4fd14ba3496f69c23ee1859
4
- data.tar.gz: 768862b2662af7066c6df45660375f5c86561436
3
+ metadata.gz: 7cb965d7873bd4160bbefc1b00691b027de67ce0
4
+ data.tar.gz: 9172e8da86edf3a68467ee501d70ce888891b667
5
5
  SHA512:
6
- metadata.gz: 27639a9743847768bb5193d74d34b8cd775940151b6f282fef424d3a6172f395f734a52260e49b7657f035b9bba88769509da05d26915a678250ba789cfa6c1d
7
- data.tar.gz: f64b0656c5253822a8743d70e01a479cc9a0c71969aeeb030c790c4987efe9254293273a30e4b9b6f82151033dd13cdc82d91267a858dc4b143f24467f73fac2
6
+ metadata.gz: af0f153d55cd64a53d7eaa58c1811aac2a80e5220cfc76f811da06f231d2e00469c91da990009033a673027302adc8915dca5f3c895e617550989840b976073c
7
+ data.tar.gz: f41829b35a342f667201b0afa2227b46e27876380a05aeca9723dd9ce844a28997ed18b7ad0c50a44ada65896eff28b0594ad6d2f1df14fa6a5a5dfd90dad2b0
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTesting
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Bügling