zewo-dev 0.2.12 → 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/zewo.rb +250 -330
- data/lib/zewo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdedf478bcfe70fd88cdc25dbd7152bdb51ae142
|
4
|
+
data.tar.gz: c3f9a649da611eede89190e586267f853cdaa189
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65314404b5bd3c0a4122e86cc265a9243b76e0ef8f0df47d51e9949a60983029bcf5755c3421fa8b592abf480741680baf63edb8ebe50f508eb6b988b9438911
|
7
|
+
data.tar.gz: 85087f2bd77c22d72c7919a5cea09558761b3a522837a8e17b236b0909a5437292a8e9249d47079679f64519d22cc1c648f6540f5d475f0e79144cd93ddb1095
|
data/lib/zewo.rb
CHANGED
@@ -11,126 +11,119 @@ require 'colorize'
|
|
11
11
|
require 'thread'
|
12
12
|
require 'thwait'
|
13
13
|
|
14
|
-
def silent_cmd(cmd)
|
15
|
-
system("#{cmd} > /dev/null 2>&1")
|
16
|
-
end
|
17
|
-
|
18
14
|
module Zewo
|
19
15
|
class App < Thor
|
20
16
|
class Repo
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
@@repos = {}
|
18
|
+
|
19
|
+
@@lock_branches = {'CURIParser' => '0.2.0', 'CHTTPParser' => '0.2.0', 'CLibvenice' => '0.2.0'}
|
20
|
+
|
21
|
+
attr_reader :repo
|
22
|
+
@repo
|
23
|
+
attr_reader :organization
|
24
|
+
@organization
|
25
25
|
|
26
|
-
@
|
26
|
+
@xcode_project = nil
|
27
|
+
@configured = false
|
27
28
|
|
28
|
-
def initialize(
|
29
|
-
@
|
30
|
-
@
|
29
|
+
def initialize(repo, organization)
|
30
|
+
@repo = repo
|
31
|
+
@organization = organization
|
31
32
|
end
|
32
33
|
|
33
|
-
def
|
34
|
-
|
34
|
+
def clone
|
35
|
+
puts "Cloning #{path}".green
|
36
|
+
|
37
|
+
flags = ''
|
35
38
|
|
36
|
-
if
|
37
|
-
|
39
|
+
if @@lock_branches[@repo]
|
40
|
+
flags = "--branch #{@@lock_branches[@repo]}"
|
38
41
|
end
|
39
|
-
|
42
|
+
|
43
|
+
`git clone #{flags} https://github.com/#{@organization}/#{@repo} #{path} &> /dev/null`
|
40
44
|
end
|
41
45
|
|
42
|
-
def
|
43
|
-
|
44
|
-
xcode_project.native_targets.find { |t| t.name == target_name } || xcode_project.new_target(:bundle, target_name, :osx)
|
45
|
-
end
|
46
|
+
def dependencies
|
47
|
+
clone unless File.directory?(path)
|
46
48
|
|
47
|
-
|
48
|
-
r = name
|
49
|
-
r = "#{r}/#{ext}" if ext
|
50
|
-
r
|
51
|
-
end
|
49
|
+
package_swift_contents = File.read("#{path}/Package.swift")
|
52
50
|
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
# matches the packages like `VeniceX/Venice`
|
52
|
+
regex = /https:\/\/github.com\/(.*\/*)"/
|
53
|
+
matches = package_swift_contents.scan(regex).map(&:first).map { |e| e = e.chomp('.git') if e.end_with?('.git'); e }
|
54
|
+
|
55
|
+
# splits VeniceX/Venice into ['VeniceX', 'Venice']
|
56
|
+
splits = matches.map { |e| e.split('/', 2) }
|
57
|
+
|
58
|
+
# creates a Repo using VeniceX as organization and Venice as repo
|
59
|
+
repos = splits.map { |s| Repo.new(s[1], s[0]) }
|
60
|
+
|
61
|
+
cached = repos.map do |m|
|
62
|
+
# add it to global list of repositories if it isnt already in there
|
63
|
+
@@repos["#{m.organization}/#{m.repo}"] = m unless @@repos["#{m.organization}/#{m.repo}"]
|
64
|
+
@@repos["#{m.organization}/#{m.repo}"]
|
65
|
+
end
|
56
66
|
|
57
|
-
|
58
|
-
'XcodeDevelopment'
|
67
|
+
cached
|
59
68
|
end
|
60
69
|
|
61
|
-
def
|
62
|
-
|
70
|
+
def clone_dependencies
|
71
|
+
# clone all dependencies that don't exist yet
|
72
|
+
dependencies.each(&:clone_dependencies)
|
63
73
|
end
|
64
74
|
|
65
|
-
def
|
66
|
-
|
67
|
-
|
75
|
+
def setup_xcode_projects
|
76
|
+
# create xcode project
|
77
|
+
setup_xcode_project
|
78
|
+
|
79
|
+
# recursively do the same for all dependencies
|
80
|
+
dependencies.each(&:setup_xcode_projects)
|
68
81
|
end
|
69
82
|
|
70
|
-
def
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
@xcodeproj
|
83
|
+
def configure_xcode_projects
|
84
|
+
# configure xcode project
|
85
|
+
configure_xcode_project
|
86
|
+
|
87
|
+
# recursively do the same for all dependencies
|
88
|
+
dependencies.each(&:configure_xcode_projects)
|
78
89
|
end
|
79
90
|
|
80
|
-
def
|
81
|
-
|
82
|
-
next if item == '.' || item == '.DS_Store'
|
91
|
+
def flat_dependencies
|
92
|
+
result = dependencies
|
83
93
|
|
84
|
-
|
85
|
-
|
86
|
-
created_group = current_group.new_group(new_folder)
|
87
|
-
add_files("#{item}/*", created_group, main_target)
|
88
|
-
else
|
89
|
-
item = item.split('/')[1..-1].unshift('..') * '/'
|
90
|
-
i = current_group.new_file(item)
|
91
|
-
main_target.add_file_references([i]) if item.include? '.swift'
|
92
|
-
end
|
94
|
+
dependencies.each do |dep|
|
95
|
+
result += dep.flat_dependencies
|
93
96
|
end
|
97
|
+
|
98
|
+
result.uniq
|
94
99
|
end
|
95
100
|
|
96
|
-
def build_dependencies
|
97
|
-
puts "Configuring dependencies for #{name}".green
|
98
|
-
dependency_repos = File.read(dir('Package.swift')).scan(/(?<=Zewo\/|SwiftX\/|VeniceX\/|paulofaria\/)(.*?)(?=\.git)/).map(&:first)
|
99
|
-
group = xcode_project.new_group('Subprojects')
|
100
|
-
dependency_repos.each do |repo_name|
|
101
|
-
next if repo_name.end_with?('-OSX')
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
project_reference.path = "../../#{project_reference.path}"
|
106
|
-
framework_target.add_dependency(repo.framework_target) if framework_target
|
107
|
-
end
|
108
|
-
xcode_project.save
|
102
|
+
def headers
|
103
|
+
@headers ||= Dir.glob("#{path}/*.h")
|
109
104
|
end
|
110
105
|
|
111
|
-
def
|
112
|
-
|
113
|
-
|
106
|
+
def setup_xcode_project
|
107
|
+
return if @xcode_project
|
108
|
+
|
109
|
+
puts "Creating Xcode project for #{@organization}/#{@repo}".green
|
114
110
|
|
115
|
-
|
111
|
+
@xcode_project = Xcodeproj::Project.new("#{xcode_project_path}")
|
112
|
+
@xcode_project.initialize_from_scratch
|
116
113
|
|
117
114
|
framework_target.build_configurations.each do |configuration|
|
118
115
|
framework_target.build_settings(configuration.name)['HEADER_SEARCH_PATHS'] = '/usr/local/include'
|
119
116
|
framework_target.build_settings(configuration.name)['LIBRARY_SEARCH_PATHS'] = '/usr/local/lib'
|
120
117
|
framework_target.build_settings(configuration.name)['ENABLE_TESTABILITY'] = 'YES'
|
121
118
|
|
122
|
-
if File.exist?(
|
119
|
+
if File.exist?("#{path}/module.modulemap")
|
123
120
|
framework_target.build_settings(configuration.name)['MODULEMAP_FILE'] = '../module.modulemap'
|
124
121
|
end
|
125
122
|
end
|
126
123
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
if sources_dirname
|
132
|
-
group = xcode_project.new_group(sources_dirname)
|
133
|
-
add_files(dir("#{sources_dirname}/*"), group, framework_target)
|
124
|
+
if sources_path
|
125
|
+
group = @xcode_project.new_group('Sources')
|
126
|
+
add_files("#{path}/#{sources_path}/*", group, framework_target)
|
134
127
|
end
|
135
128
|
|
136
129
|
test_target.resources_build_phase
|
@@ -143,322 +136,249 @@ module Zewo
|
|
143
136
|
test_target.build_settings(configuration.name)['LIBRARY_SEARCH_PATHS'] = '/usr/local/lib'
|
144
137
|
end
|
145
138
|
|
146
|
-
group = xcode_project.new_group(
|
147
|
-
add_files(
|
139
|
+
group = @xcode_project.new_group('Tests')
|
140
|
+
add_files("#{path}/Tests/*", group, test_target)
|
148
141
|
|
149
|
-
xcode_project.save
|
142
|
+
@xcode_project.save
|
150
143
|
|
151
144
|
scheme = Xcodeproj::XCScheme.new
|
152
145
|
scheme.configure_with_targets(framework_target, test_target)
|
153
|
-
scheme.test_action.code_coverage_enabled = true
|
154
|
-
scheme.save_as(xcode_project.path, framework_target.name, true)
|
146
|
+
# scheme.test_action.code_coverage_enabled = true
|
147
|
+
scheme.save_as(@xcode_project.path, framework_target.name, true)
|
148
|
+
|
149
|
+
framework_target.frameworks_build_phase.clear
|
155
150
|
end
|
156
|
-
end
|
157
151
|
|
158
|
-
|
159
|
-
|
160
|
-
|
152
|
+
def configure_xcode_project
|
153
|
+
return if @configured
|
154
|
+
|
155
|
+
puts "Configuring Xcode project for #{path}".green
|
156
|
+
|
157
|
+
group = @xcode_project.new_group('Subprojects')
|
158
|
+
|
159
|
+
# This next block will move through the flattened dependencies of a project
|
160
|
+
# to determine whether any of them have headers associated with their module maps.
|
161
|
+
# If they do, each header must be added to the header search paths configuration
|
162
|
+
flat_dependencies.select { |d| d.headers.count > 0 }.each do |header_dep|
|
163
|
+
header_search_path = "../../../#{header_dep.path}"
|
164
|
+
|
165
|
+
[framework_target, test_target].each do |target|
|
166
|
+
target.build_configurations.each do |configuration|
|
167
|
+
existing = target.build_settings(configuration.name)['HEADER_SEARCH_PATHS']
|
168
|
+
unless existing.include? header_search_path
|
169
|
+
existing += " #{header_search_path}"
|
170
|
+
target.build_settings(configuration.name)['HEADER_SEARCH_PATHS'] = existing
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
161
175
|
|
162
|
-
|
163
|
-
|
164
|
-
request = Net::HTTP::Get.new(uri.request_uri)
|
176
|
+
dependencies.each do |repo|
|
177
|
+
next if repo.repo.end_with?('-OSX')
|
165
178
|
|
166
|
-
|
179
|
+
project_reference = group.new_file(repo.xcode_project_path.to_s)
|
180
|
+
project_reference.path = "../../../#{project_reference.path}"
|
181
|
+
framework_target.add_dependency(repo.framework_target) if framework_target
|
182
|
+
end
|
183
|
+
@xcode_project.save
|
184
|
+
@configured = true
|
185
|
+
end
|
167
186
|
|
168
|
-
|
169
|
-
|
170
|
-
|
187
|
+
def add_files(direc, current_group, main_target)
|
188
|
+
Dir.glob(direc) do |item|
|
189
|
+
next if item.start_with?('.')
|
171
190
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
191
|
+
if File.directory?(item)
|
192
|
+
new_folder = File.basename(item)
|
193
|
+
created_group = current_group.new_group(new_folder)
|
194
|
+
add_files("#{item}/*", created_group, main_target)
|
195
|
+
else
|
196
|
+
# Basically means "Remove Zewo from path and prepend '../'"
|
197
|
+
item = item.split('/')[1..-1].unshift('..', '..') * '/'
|
198
|
+
i = current_group.new_file(item)
|
199
|
+
main_target.add_file_references([i]) if item.include? '.swift'
|
176
200
|
end
|
177
|
-
else
|
178
|
-
puts 'Error loading repositories'.red
|
179
201
|
end
|
180
202
|
end
|
181
203
|
|
182
|
-
def
|
183
|
-
|
184
|
-
each_repo do |repo|
|
185
|
-
threads << Thread.new do
|
186
|
-
yield(repo)
|
187
|
-
end
|
188
|
-
end
|
189
|
-
ThreadsWait.all_waits(*threads)
|
204
|
+
def xcode_project_path
|
205
|
+
"#{path}/XcodeDevelopment/#{@repo}.xcodeproj"
|
190
206
|
end
|
191
207
|
|
192
|
-
def
|
193
|
-
|
194
|
-
next unless File.exist?(repo.dir('Package.swift'))
|
195
|
-
yield repo
|
196
|
-
end
|
208
|
+
def path
|
209
|
+
"#{@organization}/#{@repo}"
|
197
210
|
end
|
198
211
|
|
199
|
-
def
|
200
|
-
|
201
|
-
each_code_repo do |repo|
|
202
|
-
threads << Thread.new do
|
203
|
-
yield(repo)
|
204
|
-
end
|
205
|
-
end
|
206
|
-
ThreadsWait.all_waits(*threads)
|
212
|
+
def status
|
213
|
+
`cd #{path}; git status`
|
207
214
|
end
|
208
215
|
|
209
|
-
def
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
216
|
+
def call(str)
|
217
|
+
output = `cd #{path}; #{str} 2>&1`.chomp
|
218
|
+
raise output unless $?.success?
|
219
|
+
output
|
220
|
+
end
|
221
|
+
|
222
|
+
def uncommited_changes?
|
223
|
+
begin
|
224
|
+
call('git diff --quiet HEAD')
|
225
|
+
return false
|
226
|
+
rescue
|
227
|
+
return true
|
218
228
|
end
|
219
|
-
true
|
220
229
|
end
|
221
230
|
|
222
|
-
def
|
223
|
-
|
224
|
-
p = STDIN.gets.chomp
|
225
|
-
p == 'y'
|
231
|
+
def master_branch?
|
232
|
+
call('git rev-parse --abbrev-ref HEAD')
|
226
233
|
end
|
227
234
|
|
228
|
-
def
|
229
|
-
|
235
|
+
def tag
|
236
|
+
return call('git describe --abbrev=0 --tags')
|
237
|
+
rescue
|
238
|
+
return 'No tags'
|
230
239
|
end
|
231
240
|
|
232
|
-
def
|
233
|
-
|
241
|
+
def branch
|
242
|
+
call('git rev-parse --abbrev-ref HEAD')
|
234
243
|
end
|
235
244
|
|
236
|
-
def
|
237
|
-
|
245
|
+
def pull
|
246
|
+
call('git pull')
|
247
|
+
end
|
238
248
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
249
|
+
def sources_path
|
250
|
+
return 'Sources' if File.directory?("#{path}/Sources")
|
251
|
+
return 'Source' if File.directory?("#{path}/Source")
|
252
|
+
end
|
243
253
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
254
|
+
def framework_target
|
255
|
+
target_name = repo.gsub('-OSX', '').gsub('-', '_')
|
256
|
+
target_name = 'OperatingSystem' if target_name == 'OS'
|
257
|
+
@xcode_project.native_targets.find { |t| t.name == target_name } || @xcode_project.new_target(:framework, target_name, :osx)
|
258
|
+
end
|
248
259
|
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
]
|
260
|
+
def test_target
|
261
|
+
target_name = "#{framework_target.name}-Test"
|
262
|
+
@xcode_project.native_targets.find { |t| t.name == target_name } || @xcode_project.new_target(:bundle, target_name, :osx)
|
263
|
+
end
|
254
264
|
|
255
|
-
|
256
|
-
|
265
|
+
def tag_lock
|
266
|
+
@tag_lock ||= @@lock_branches[@repo]
|
257
267
|
end
|
258
268
|
|
259
|
-
def
|
260
|
-
|
261
|
-
each_osx_whitelisted_repo do |repo|
|
262
|
-
threads << Thread.new do
|
263
|
-
yield(repo)
|
264
|
-
end
|
265
|
-
end
|
266
|
-
ThreadsWait.all_waits(*threads)
|
269
|
+
def self::lock_branches
|
270
|
+
@@lock_branches
|
267
271
|
end
|
268
272
|
|
269
|
-
|
270
|
-
|
271
|
-
repos
|
272
|
-
silent_cmd("cd #{repo} && git checkout 0.2.0")
|
273
|
-
puts "Checked out #{repo} at 0.2.0".green
|
274
|
-
end
|
273
|
+
# getter/setter for class variable
|
274
|
+
def self::repos
|
275
|
+
@@repos
|
275
276
|
end
|
276
|
-
end
|
277
277
|
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
str = repo.name
|
282
|
-
str = uncommited_changes?(repo.name) ? str.red : str.green
|
283
|
-
tag = `cd #{repo.name}; git describe --abbrev=0 --tags` || 'No tag'
|
284
|
-
str += " (#{tag})"
|
285
|
-
puts str.delete("\n")
|
278
|
+
def self::repos=(value)
|
279
|
+
puts @@repos
|
280
|
+
@@repos = value
|
286
281
|
end
|
287
282
|
end
|
288
283
|
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
silent_cmd("cd #{repo.name} && git tag #{tag}")
|
295
|
-
puts repo.name.green
|
284
|
+
no_commands do
|
285
|
+
def each_repo(include_lock_branches = true)
|
286
|
+
Repo.repos.each_pair do |key, repo|
|
287
|
+
next if !include_lock_branches && Repo::lock_branches.has_key?(repo.repo)
|
288
|
+
yield key, repo
|
296
289
|
end
|
297
290
|
end
|
298
|
-
end
|
299
291
|
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
end
|
308
|
-
|
309
|
-
Dir['*/'].each do |folder_name|
|
310
|
-
folder_name = folder_name[0...-1]
|
311
|
-
matched = `cd #{folder_name} && git tag`
|
312
|
-
.split("\n")
|
313
|
-
.select { |t| t.start_with?(options[:tag]) }
|
314
|
-
.last if options[:tag]
|
315
|
-
matched = options[:branch] if options[:branch]
|
316
|
-
|
317
|
-
if matched
|
318
|
-
silent_cmd("cd #{folder_name} && git checkout #{matched}")
|
319
|
-
puts "Checked out #{folder_name} at #{matched}".green
|
320
|
-
else
|
321
|
-
puts "No matching specifiers for #{folder_name}".red
|
292
|
+
def each_repo_async(include_lock_branches = true)
|
293
|
+
threads = []
|
294
|
+
Repo.repos.each_pair do |key, repo|
|
295
|
+
next if !include_lock_branches && Repo::lock_branches.has_key?(repo.repo)
|
296
|
+
threads << Thread.new do
|
297
|
+
yield(key, repo)
|
298
|
+
end
|
322
299
|
end
|
300
|
+
threads.each { |thr| thr.join }
|
323
301
|
end
|
324
|
-
end
|
325
302
|
|
326
|
-
|
327
|
-
|
328
|
-
print "Updating all repositories...\n"
|
329
|
-
each_code_repo_async do |repo|
|
330
|
-
if uncommited_changes?(repo.name)
|
331
|
-
print "Uncommitted changes in #{repo.name}. Not updating.".red + "\n"
|
332
|
-
next
|
333
|
-
end
|
334
|
-
system("cd #{repo.name}; git pull")
|
303
|
+
def create_dotfile
|
304
|
+
FileUtils.touch('.zewodev')
|
335
305
|
end
|
336
|
-
puts 'Done!'
|
337
|
-
end
|
338
306
|
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
307
|
+
def has_dotfile
|
308
|
+
File.exist?('.zewodev')
|
309
|
+
end
|
310
|
+
|
343
311
|
end
|
344
312
|
|
345
|
-
|
346
|
-
|
347
|
-
|
313
|
+
attr_reader :top_node
|
314
|
+
|
315
|
+
def initialize(*args)
|
316
|
+
super
|
317
|
+
@top_node = Repo.new('Flux', 'Zewo')
|
318
|
+
Repo.repos['Zewo/Flux'] = @top_node
|
319
|
+
|
320
|
+
command_name = nil
|
321
|
+
|
322
|
+
args.each do |a|
|
323
|
+
next unless a.is_a? Hash
|
348
324
|
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
print "Cloning #{repo.name}...".green + "\n"
|
353
|
-
silent_cmd("git clone #{repo.data[use_ssh ? 'clone_url' : 'ssh_url']}")
|
325
|
+
if a.key? :current_command
|
326
|
+
command_name = a[:current_command].name
|
327
|
+
break
|
354
328
|
end
|
355
329
|
end
|
356
|
-
puts 'Done!'
|
357
|
-
end
|
358
330
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
unless File.directory?(repo.name)
|
364
|
-
print "Cloning #{repo.data['organization']}/#{repo.name}...".green + "\n"
|
365
|
-
silent_cmd("git clone #{repo.data['clone_url']}")
|
366
|
-
|
367
|
-
cloned_name = repo.data['clone_url'].split('/').last
|
368
|
-
if cloned_name.end_with?('-OSX')
|
369
|
-
FileUtils.mv cloned_name, cloned_name[0...-4]
|
370
|
-
end
|
331
|
+
if !command_name.nil? && command_name.to_sym != :init
|
332
|
+
unless has_dotfile
|
333
|
+
puts 'zewodev has not been initialized in this directory. Run `zewodev init` do to so.'.red
|
334
|
+
exit
|
371
335
|
end
|
372
336
|
end
|
337
|
+
|
338
|
+
top_node.clone_dependencies
|
373
339
|
end
|
374
340
|
|
375
|
-
desc :
|
376
|
-
def
|
377
|
-
|
378
|
-
|
341
|
+
desc :init, 'Initializes the current directory as a Zewo development directory'
|
342
|
+
def init
|
343
|
+
create_dotfile
|
344
|
+
invoke :rebuild_projects
|
379
345
|
end
|
380
346
|
|
381
|
-
desc :
|
382
|
-
|
383
|
-
|
384
|
-
|
347
|
+
desc :rebuild_projects, 'Rebuilds Xcode projects'
|
348
|
+
def rebuild_projects
|
349
|
+
top_node.setup_xcode_projects
|
350
|
+
top_node.configure_xcode_projects
|
351
|
+
end
|
385
352
|
|
386
|
-
|
387
|
-
|
388
|
-
|
353
|
+
desc :status, 'Checks status of all repositories'
|
354
|
+
def status
|
355
|
+
each_repo do |key, repo|
|
356
|
+
str = key
|
357
|
+
branch = repo.branch
|
358
|
+
str += " (#{repo.tag}) - #{repo.uncommited_changes? ? branch.red : branch.green}"
|
389
359
|
|
390
|
-
|
360
|
+
if repo.tag_lock
|
361
|
+
str += " Locked to #{repo.tag_lock}".yellow
|
362
|
+
end
|
391
363
|
|
392
|
-
|
364
|
+
puts str
|
365
|
+
end
|
366
|
+
end
|
393
367
|
|
394
|
-
|
368
|
+
desc :pull, 'Pulls recent changes from all repositories'
|
369
|
+
def pull
|
370
|
+
puts "Pulling changes for all repositories..."
|
371
|
+
each_repo_async(false) do |key, repo|
|
372
|
+
begin
|
373
|
+
output = repo.pull
|
374
|
+
str = "#{key}:\n".green
|
375
|
+
str += output
|
376
|
+
str += "\n\n"
|
377
|
+
puts str
|
378
|
+
rescue Exception => e
|
379
|
+
puts "#{key}: #{e.message.red}"
|
380
|
+
end
|
381
|
+
end
|
395
382
|
end
|
396
383
|
end
|
397
|
-
|
398
|
-
OSX_CODE_REPO_WHITELIST = [
|
399
|
-
|
400
|
-
# Zewo stuff
|
401
|
-
'zewo/Base64',
|
402
|
-
'zewo/BasicAuthMiddleware',
|
403
|
-
'zewo/ContentNegotiationMiddleware',
|
404
|
-
'zewo/Data',
|
405
|
-
'zewo/Event',
|
406
|
-
'zewo/HTTP',
|
407
|
-
'zewo/HTTPJSON',
|
408
|
-
'zewo/HTTPParser',
|
409
|
-
'zewo/HTTPSerializer',
|
410
|
-
'zewo/InterchangeData',
|
411
|
-
'zewo/JSON',
|
412
|
-
'zewo/JSONMediaType',
|
413
|
-
'zewo/Log',
|
414
|
-
'zewo/LogMiddleware',
|
415
|
-
'zewo/MediaType',
|
416
|
-
'zewo/Mustache',
|
417
|
-
'zewo/MySQL',
|
418
|
-
'zewo/OS',
|
419
|
-
'zewo/OpenSSL', 'paulofaria/stream', #just for OpenSSL
|
420
|
-
'zewo/POSIXRegex',
|
421
|
-
'zewo/PathParameterMiddleware',
|
422
|
-
'zewo/PostgreSQL',
|
423
|
-
'zewo/RecoveryMiddleware',
|
424
|
-
'zewo/RegexRouteMatcher',
|
425
|
-
'zewo/Router',
|
426
|
-
'zewo/SQL',
|
427
|
-
'zewo/Sideburns',
|
428
|
-
'zewo/String',
|
429
|
-
'zewo/TrieRouteMatcher',
|
430
|
-
'zewo/URI',
|
431
|
-
'zewo/URLEncodedForm',
|
432
|
-
'zewo/URLEncodedFormMediaType',
|
433
|
-
'zewo/WebSocket',
|
434
|
-
'zewo/ZeroMQ',
|
435
|
-
'zewo/Zewo',
|
436
|
-
|
437
|
-
# C stuff
|
438
|
-
'zewo/CHTTPParser',
|
439
|
-
'zewo/CLibpq-OSX',
|
440
|
-
'zewo/CMySQL-OSX',
|
441
|
-
'zewo/COpenSSL-OSX',
|
442
|
-
'zewo/CURIParser',
|
443
|
-
'zewo/CZeroMQ',
|
444
|
-
|
445
|
-
# VeniceX stuff
|
446
|
-
'venicex/CLibvenice',
|
447
|
-
'venicex/Venice',
|
448
|
-
'venicex/IP',
|
449
|
-
'venicex/TCP',
|
450
|
-
'venicex/UDP',
|
451
|
-
'venicex/HTTPServer',
|
452
|
-
'venicex/HTTPClient',
|
453
|
-
'venicex/TCPSSL',
|
454
|
-
'venicex/HTTPSServer',
|
455
|
-
'venicex/HTTPSClient',
|
456
|
-
'venicex/File',
|
457
|
-
'venicex/HTTPFile',
|
458
|
-
'venicex/ChannelStream',
|
459
|
-
|
460
|
-
# SwiftX stuff
|
461
|
-
'swiftx/S4',
|
462
|
-
'swiftx/C7'
|
463
|
-
]
|
464
384
|
end
|
data/lib/zewo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zewo-dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Ask
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
140
|
+
rubygems_version: 2.4.8
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: zewo-dev is a tool to make developing Zewo modules and tracking their status
|