nyx 0.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/nyx +29 -0
- data/lib/nyx.rb +510 -5
- metadata +100 -8
- checksums.yaml +0 -15
data/bin/nyx
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'nyx'
|
5
|
+
|
6
|
+
if ARGV.length > 0
|
7
|
+
nyx = Nyx.new;
|
8
|
+
actual_command = ARGV.shift
|
9
|
+
command = actual_command.gsub ':', '_'
|
10
|
+
if nyx.respond_to? command
|
11
|
+
nyx.send command, ARGV
|
12
|
+
else # ! nyx.respond_to? command
|
13
|
+
puts " err: unknown command #{actual_command}"
|
14
|
+
end#if
|
15
|
+
else # ARGV.length == 0
|
16
|
+
|
17
|
+
puts
|
18
|
+
puts <<eos
|
19
|
+
Commands
|
20
|
+
------------------------------------------------------------------------------
|
21
|
+
nyx version - current interface version
|
22
|
+
nyx compile [<dir>] - builds nyx.json from the directory
|
23
|
+
nyx watch:scripts <dir> - initiate script monitors
|
24
|
+
nyx compile:scripts <dir> - compile scripts
|
25
|
+
nyx watch:style <dir> - initiate style monitors
|
26
|
+
nyx compile:style <dir> - compile style
|
27
|
+
eos
|
28
|
+
|
29
|
+
end#if
|
data/lib/nyx.rb
CHANGED
@@ -1,5 +1,510 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# native
|
2
|
+
require 'Logger'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'net/http'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
# gems
|
8
|
+
require 'git'
|
9
|
+
require 'json'
|
10
|
+
require 'zip/zipfilesystem'
|
11
|
+
require 'fssm'
|
12
|
+
|
13
|
+
class Nyx
|
14
|
+
|
15
|
+
VERSION = '1.2.0'
|
16
|
+
|
17
|
+
def compile_scripts(args = nil)
|
18
|
+
|
19
|
+
# @todo CLEANUP properly read "silent" parameter
|
20
|
+
|
21
|
+
if args != nil
|
22
|
+
if args.length != 0
|
23
|
+
dirpath = args[0].sub(/(\/)+$/,'')+'/'
|
24
|
+
silent = false
|
25
|
+
else # no parameters, assume .
|
26
|
+
dirpath = './'
|
27
|
+
silent = false
|
28
|
+
end#if
|
29
|
+
else # direct invokation
|
30
|
+
dirpath = './'
|
31
|
+
silent = false
|
32
|
+
end#if
|
33
|
+
|
34
|
+
dirpath = File.expand_path(dirpath) + '/'
|
35
|
+
|
36
|
+
if ! File.exist? dirpath
|
37
|
+
puts ' Err: target directory does not exist.'
|
38
|
+
return;
|
39
|
+
end#if
|
40
|
+
|
41
|
+
conf = self.mjolnir_config(dirpath, '+scripts.php');
|
42
|
+
|
43
|
+
self.do_cleanup_scripts dirpath, conf, silent
|
44
|
+
|
45
|
+
self.ensure_closure_compiler(dirpath)
|
46
|
+
|
47
|
+
puts
|
48
|
+
puts " Recompiling..."
|
49
|
+
puts " ----------------------------------------------------------------------- "
|
50
|
+
conf = self.read_script_configuration(dirpath);
|
51
|
+
self.recompile_scripts(conf, dirpath);
|
52
|
+
puts " >>> all files regenarated "
|
53
|
+
|
54
|
+
end#def
|
55
|
+
|
56
|
+
def read_script_configuration(dirpath)
|
57
|
+
conf = self.mjolnir_config(dirpath, '+scripts.php');
|
58
|
+
|
59
|
+
if conf['targeted-common'] == nil
|
60
|
+
conf['targeted-common'] = [];
|
61
|
+
else # not nil
|
62
|
+
conf['targeted-common'] = conf['targeted-common'].find_all do |item|
|
63
|
+
item !~ /(^[a-z]+:\/\/|^\/\/).*$/
|
64
|
+
end#find_all
|
65
|
+
end#def
|
66
|
+
|
67
|
+
# remove aliased keys
|
68
|
+
conf['targeted-mapping'].each do |key, files|
|
69
|
+
if files.is_a? String
|
70
|
+
conf['targeted-mapping'].delete(key);
|
71
|
+
end#if
|
72
|
+
end#each
|
73
|
+
|
74
|
+
# include common files
|
75
|
+
conf['targeted-mapping'].each do |key, files|
|
76
|
+
files = files.find_all do |item|
|
77
|
+
item !~ /(^[a-z]+:\/\/|^\/\/).*$/
|
78
|
+
end#find_all
|
79
|
+
conf['targeted-mapping'][key] = conf['targeted-common'].clone;
|
80
|
+
files.each do |file|
|
81
|
+
if ( ! conf['targeted-mapping'][key].include?(file))
|
82
|
+
conf['targeted-mapping'][key].push(file)
|
83
|
+
end#if
|
84
|
+
end#each
|
85
|
+
end#each
|
86
|
+
|
87
|
+
# convert to paths
|
88
|
+
conf['targeted-mapping'].each do |key, files|
|
89
|
+
files = files.find_all do |item|
|
90
|
+
item !~ /(^[a-z]+:\/\/|^\/\/).*$/
|
91
|
+
end#find_all
|
92
|
+
files.collect! do |file|
|
93
|
+
'src/'+file+'.js';
|
94
|
+
end#collect
|
95
|
+
conf['targeted-mapping'][key] = files
|
96
|
+
end#each
|
97
|
+
|
98
|
+
# convert to paths
|
99
|
+
files = conf['complete-mapping']
|
100
|
+
files = files.find_all do |item|
|
101
|
+
item !~ /(^[a-z]+:\/\/|^\/\/).*$/
|
102
|
+
end#find_all
|
103
|
+
files.collect! do |file|
|
104
|
+
'src/'+file+'.js';
|
105
|
+
end#collect
|
106
|
+
conf['complete-mapping'] = files
|
107
|
+
|
108
|
+
return conf
|
109
|
+
end#def
|
110
|
+
|
111
|
+
def watch_scripts(args = nil)
|
112
|
+
puts " todo: watch scripts code"
|
113
|
+
end#def
|
114
|
+
|
115
|
+
def compile_style(args = nil)
|
116
|
+
|
117
|
+
# @todo CLEANUP properly read "silent" parameter
|
118
|
+
|
119
|
+
if args != nil
|
120
|
+
if args.length != 0
|
121
|
+
dirpath = args[0].sub(/(\/)+$/,'')+'/'
|
122
|
+
silent = false
|
123
|
+
else # no parameters, assume .
|
124
|
+
dirpath = './'
|
125
|
+
silent = false
|
126
|
+
end#if
|
127
|
+
else # direct invokation
|
128
|
+
dirpath = './'
|
129
|
+
silent = false
|
130
|
+
end#if
|
131
|
+
|
132
|
+
if ! File.exist? dirpath
|
133
|
+
puts ' Err: target directory does not exist.'
|
134
|
+
return;
|
135
|
+
end#if
|
136
|
+
|
137
|
+
conf = self.mjolnir_config(dirpath, '+style.php');
|
138
|
+
|
139
|
+
self.do_cleanup_style dirpath, conf, silent
|
140
|
+
|
141
|
+
Kernel.exec('compass compile -c bin/etc/compass/production.rb --environment production')
|
142
|
+
|
143
|
+
end#def
|
144
|
+
|
145
|
+
def watch_style(path = nil)
|
146
|
+
puts " todo: watch scripts code"
|
147
|
+
end#def
|
148
|
+
|
149
|
+
def compile(args)
|
150
|
+
if args.length != 0
|
151
|
+
dirpath = args[0].sub(/(\/)+$/,'')+'/'
|
152
|
+
else # no parameters, assume .
|
153
|
+
dirpath = './'
|
154
|
+
end#if
|
155
|
+
|
156
|
+
if ! File.exist? dirpath
|
157
|
+
self.fail 'Target directory does not exist.'
|
158
|
+
return;
|
159
|
+
end#if
|
160
|
+
|
161
|
+
jsonconfigfile = dirpath+'nyx.json'
|
162
|
+
if ! File.exist? jsonconfigfile
|
163
|
+
self.fail 'Missing nyx.json file in target directory.'
|
164
|
+
return;
|
165
|
+
end#if
|
166
|
+
|
167
|
+
conf = JSON.parse(open(jsonconfigfile).read)
|
168
|
+
|
169
|
+
# ensure nyx.json interface isn't newer
|
170
|
+
|
171
|
+
conf_interface = '1.0.0'
|
172
|
+
if (conf != nil && conf.has_key?('interface'))
|
173
|
+
conf_interface = conf['interface'];
|
174
|
+
end#if
|
175
|
+
|
176
|
+
self.check_interface_version(conf_interface, 'nyx.json');
|
177
|
+
|
178
|
+
# core processing
|
179
|
+
|
180
|
+
conf['cores'].each do |wpcoreconf|
|
181
|
+
self.core dirpath, wpcoreconf
|
182
|
+
end#each
|
183
|
+
|
184
|
+
puts ""
|
185
|
+
puts " fin"
|
186
|
+
end#def
|
187
|
+
|
188
|
+
def version(args)
|
189
|
+
puts " #{Nyx::VERSION}"
|
190
|
+
end#def
|
191
|
+
|
192
|
+
#
|
193
|
+
# Work methods
|
194
|
+
#
|
195
|
+
|
196
|
+
def core(path, conf)
|
197
|
+
Dir.chdir path
|
198
|
+
corepath = conf['path'].sub(/(\/)+$/, '')
|
199
|
+
|
200
|
+
puts " processing #{corepath}"
|
201
|
+
# remove the core if it exists
|
202
|
+
FileUtils.rm_rf corepath
|
203
|
+
# clone a fresh copy
|
204
|
+
puts " cloning #{conf['repo']} -> #{conf['version']}"
|
205
|
+
g = Git.clone conf['repo'], corepath
|
206
|
+
g.checkout conf['version']
|
207
|
+
FileUtils.rm_rf corepath+'/.git'
|
208
|
+
|
209
|
+
# process "keep" rules
|
210
|
+
if conf.has_key? 'keep'
|
211
|
+
srcpath = File.expand_path(corepath)
|
212
|
+
keep = conf['keep']
|
213
|
+
filecount = Dir["#{srcpath}/**/*"].length
|
214
|
+
fileidx = 0
|
215
|
+
removed = 0
|
216
|
+
print " - keep: #{fileidx} files processed (#{removed} removed)"
|
217
|
+
Dir.glob("#{srcpath}/**/*", File::FNM_DOTMATCH) do |file|
|
218
|
+
basename = File.basename(file)
|
219
|
+
next if basename == '.' or basename == '..'
|
220
|
+
fileidx += 1
|
221
|
+
print (' ' * 79) + "\r"
|
222
|
+
print " - keep: #{fileidx} files processed (#{removed} removed)"
|
223
|
+
filepath = File.expand_path(file)
|
224
|
+
filesubpath = filepath.sub(srcpath, '').gsub(/^\//, '')
|
225
|
+
|
226
|
+
keepfile = false
|
227
|
+
keep.each do |path|
|
228
|
+
if filesubpath.start_with? path
|
229
|
+
keepfile = true
|
230
|
+
break
|
231
|
+
end#if
|
232
|
+
end#each
|
233
|
+
|
234
|
+
if ! keepfile
|
235
|
+
FileUtils.rm_rf filepath
|
236
|
+
removed += 1
|
237
|
+
end#if
|
238
|
+
end#glob
|
239
|
+
puts
|
240
|
+
end#if
|
241
|
+
end#def
|
242
|
+
|
243
|
+
def do_cleanup_scripts(dirpath, conf, silent)
|
244
|
+
if ( ! silent)
|
245
|
+
puts
|
246
|
+
end#if
|
247
|
+
|
248
|
+
basedir = dirpath.gsub /\/$/, ''
|
249
|
+
|
250
|
+
# cleanup config
|
251
|
+
conf['root'].gsub! /[\/\\]$/, ''
|
252
|
+
conf['sources'].gsub! /[\/\\]$/, ''
|
253
|
+
|
254
|
+
rootdir = basedir+'/'+conf['root'];
|
255
|
+
|
256
|
+
self.purge_dir(rootdir)
|
257
|
+
|
258
|
+
# copy all files to the root
|
259
|
+
srcdir = basedir+'/'+conf['sources'];
|
260
|
+
|
261
|
+
Dir["#{srcdir}/**/*"].each do |file|
|
262
|
+
if (file.to_s.gsub(srcdir.to_s, '') !~ /\/(test|tests|docs|demos|examples|demo|example)(\/|$)/)
|
263
|
+
if file !~ /^\..*$/ && file !~ /^.*\.(js|json)$/ &&
|
264
|
+
rootfile = rootdir + (file.gsub srcdir, '')
|
265
|
+
# check if file is non-empty directory
|
266
|
+
if File.directory?(file) && ! (Dir.entries(file) - %w[ . .. ]).empty?
|
267
|
+
if ( ! silent)
|
268
|
+
puts " moving #{file.gsub(basedir, '')} => #{rootfile.gsub(basedir, '')}"
|
269
|
+
end#if
|
270
|
+
FileUtils.cp_r(file, rootfile)
|
271
|
+
else # file
|
272
|
+
if ( ! silent)
|
273
|
+
puts " moving #{file.gsub(basedir, '')} => #{rootfile.gsub(basedir, '')}"
|
274
|
+
end#if
|
275
|
+
FileUtils.cp(file, rootfile)
|
276
|
+
end#if
|
277
|
+
end#if
|
278
|
+
end#if
|
279
|
+
end#each
|
280
|
+
|
281
|
+
if ( ! silent)
|
282
|
+
puts
|
283
|
+
end#if
|
284
|
+
end#def
|
285
|
+
|
286
|
+
def do_cleanup_style(dirpath, conf, silent)
|
287
|
+
if ( ! silent)
|
288
|
+
puts
|
289
|
+
end#if
|
290
|
+
|
291
|
+
basedir = File.expand_path(dirpath)
|
292
|
+
|
293
|
+
# cleanup config
|
294
|
+
conf['root'].gsub! /[\/\\]$/, ''
|
295
|
+
conf['sources'].gsub! /[\/\\]$/, ''
|
296
|
+
|
297
|
+
rootdir = basedir + '/' + conf['root'];
|
298
|
+
|
299
|
+
self.purge_dir(rootdir)
|
300
|
+
|
301
|
+
# copy all non .scss files to the root; compass only copies images/
|
302
|
+
srcdir = basedir + '/' + conf['sources'];
|
303
|
+
|
304
|
+
Dir["#{srcdir}/**/*"].each do |file|
|
305
|
+
if (file.to_s.gsub(srcdir.to_s, '') !~ /\/(jquery|test|tests|docs|js|javascript|less|demos|examples|demo|example)(\/|$)/)
|
306
|
+
if file !~ /^\..*$/ && file !~ /^.*\.(scss|sass|json|md)$/
|
307
|
+
rootfile = rootdir + (file.gsub srcdir, '')
|
308
|
+
# check if file is non-empty directory
|
309
|
+
if File.directory?(file) && ! (Dir.entries(file) - %w[ . .. ]).empty?
|
310
|
+
if ( ! silent)
|
311
|
+
puts " moving #{file.gsub(basedir, '')} => #{rootfile.gsub(basedir, '')}"
|
312
|
+
end#if
|
313
|
+
if ! File.exist? rootfile
|
314
|
+
begin
|
315
|
+
# FileUtils.cp_r(file, rootfile)
|
316
|
+
FileUtils.mkdir(rootfile)
|
317
|
+
rescue
|
318
|
+
puts " failed to copy directory!"
|
319
|
+
end#rescue
|
320
|
+
end#if
|
321
|
+
elsif ! File.directory?(file)
|
322
|
+
if ( ! silent)
|
323
|
+
puts " moving #{file.gsub(basedir, '')} => #{rootfile.gsub(basedir, '')}"
|
324
|
+
end#if
|
325
|
+
begin
|
326
|
+
FileUtils.cp(file, rootfile)
|
327
|
+
rescue
|
328
|
+
puts " failed to copy file!"
|
329
|
+
end#rescue
|
330
|
+
end#if
|
331
|
+
end#if
|
332
|
+
end#if
|
333
|
+
end#each
|
334
|
+
|
335
|
+
if ( ! silent)
|
336
|
+
puts
|
337
|
+
end#if
|
338
|
+
end#def
|
339
|
+
|
340
|
+
def ensure_closure_compiler(basedir)
|
341
|
+
# ensure closure compiler jar is present
|
342
|
+
tmpdir = basedir.gsub(/[\/\\]$/, '') + '/bin/tmp'
|
343
|
+
if ! File.exists? tmpdir + '/compiler.jar'
|
344
|
+
Dir.chdir tmpdir
|
345
|
+
if ! File.exists? tmpdir+"/closure.zip"
|
346
|
+
download("closure-compiler.googlecode.com", "/files/compiler-latest.zip", tmpdir+"/closure.zip")
|
347
|
+
end
|
348
|
+
Zip::ZipFile.open(tmpdir+"/closure.zip") do |zipfile|
|
349
|
+
zipfile.each do |file|
|
350
|
+
if file.name == 'compiler.jar'
|
351
|
+
puts "extracting #{file}"
|
352
|
+
zipfile.extract(file.name, tmpdir + '/compiler.jar')
|
353
|
+
end#if
|
354
|
+
end#each
|
355
|
+
end#open
|
356
|
+
end#def
|
357
|
+
Dir.chdir basedir
|
358
|
+
end#def
|
359
|
+
|
360
|
+
def recompile_scripts(conf, dirpath)
|
361
|
+
if (conf['mode'] == 'complete')
|
362
|
+
self.regenerate_scripts('master', conf['complete-mapping'], conf)
|
363
|
+
else # targeted mode
|
364
|
+
conf['targeted-mapping'].each do |key, files|
|
365
|
+
self.regenerate_scripts(key, files, conf)
|
366
|
+
end#each
|
367
|
+
end#if
|
368
|
+
end#def
|
369
|
+
|
370
|
+
def regenerate_scripts(key, files, conf)
|
371
|
+
if conf['closure.flags'] != nil
|
372
|
+
compiler_options = conf['closure.flags'].join ' '
|
373
|
+
else # no flags
|
374
|
+
compiler_options = ''
|
375
|
+
end#if
|
376
|
+
|
377
|
+
rootdir = conf['root'];
|
378
|
+
if files.size > 0
|
379
|
+
puts " compiling #{key}"
|
380
|
+
`java -jar bin/tmp/compiler.jar #{compiler_options} --js #{files.join(' ')} --js_output_file ./#{rootdir}#{key}.min.js --create_source_map ./#{rootdir}#{key}.min.js.map --source_map_format=V3`;
|
381
|
+
end
|
382
|
+
end#def
|
383
|
+
|
384
|
+
def process_scripts(r, conf)
|
385
|
+
|
386
|
+
if r.eql? '+scripts.php'
|
387
|
+
puts ' >>> recompiling all...'
|
388
|
+
# reload confuration
|
389
|
+
conf = self.read_script_configuration(dirpath);
|
390
|
+
if conf['mode'] == 'complete'
|
391
|
+
self.regenerate_scripts('master', conf['complete-mapping'])
|
392
|
+
else # non-complete mode
|
393
|
+
# regenerate all
|
394
|
+
conf['targeted-mapping'].each do |key, files|
|
395
|
+
self.regenerate_scripts(key, files)
|
396
|
+
end#each
|
397
|
+
end#if
|
398
|
+
end
|
399
|
+
|
400
|
+
if conf['mode'] == 'complete'
|
401
|
+
|
402
|
+
conf['complete-mapping'].each do |file|
|
403
|
+
if file.eql? r
|
404
|
+
puts " >>> recompiling [complete-script]"
|
405
|
+
# regenerate the closure
|
406
|
+
self.recompile_scripts(conf, dirpath)
|
407
|
+
break;
|
408
|
+
end#if
|
409
|
+
end#each
|
410
|
+
|
411
|
+
else # non-complete mode
|
412
|
+
|
413
|
+
# search configuration for file
|
414
|
+
conf['targeted-mapping'].each do |key, files|
|
415
|
+
files.each do |file|
|
416
|
+
if file.eql? r
|
417
|
+
puts " >>> recompiling [#{key}]"
|
418
|
+
# regenerate the closure
|
419
|
+
self.regenerate_scripts(key, files);
|
420
|
+
end#if
|
421
|
+
end#each
|
422
|
+
end#each
|
423
|
+
|
424
|
+
end#if
|
425
|
+
|
426
|
+
end#def
|
427
|
+
|
428
|
+
#
|
429
|
+
# Helpers
|
430
|
+
#
|
431
|
+
|
432
|
+
def download(domain, file, to)
|
433
|
+
Net::HTTP.start(domain) do |http|
|
434
|
+
resp = http.get(file)
|
435
|
+
open(to, "wb") do |file|
|
436
|
+
file.write(resp.body)
|
437
|
+
end#open
|
438
|
+
end#http.start
|
439
|
+
end#def
|
440
|
+
|
441
|
+
def mjolnir_config(path, configname)
|
442
|
+
# located mjolnir.php or etc/mjolnir.php
|
443
|
+
bootstrap_path = self.locate_up(path, 'etc/mjolnir.php')
|
444
|
+
if bootstrap_path == nil
|
445
|
+
bootstrap_path = self.locate_up(path, 'mjolnir.php')
|
446
|
+
end#if
|
447
|
+
|
448
|
+
if bootstrap_path == nil
|
449
|
+
self.fail 'Failed to locate mjolnir bootstrap file.'
|
450
|
+
end#if
|
451
|
+
|
452
|
+
json_config = `php -r "chdir('#{path}'); require '#{bootstrap_path}'; echo json_encode(include '#{configname}');"`
|
453
|
+
return JSON.parse json_config
|
454
|
+
end#def
|
455
|
+
|
456
|
+
def locate_up(path, filename)
|
457
|
+
if File.exist?(path + filename)
|
458
|
+
return path + filename
|
459
|
+
else # didnt find file
|
460
|
+
parent = File.expand_path(path + '..').sub /\/$/, ''
|
461
|
+
rawfilepath = parent.sub /^[a-zA-Z]:/, ''
|
462
|
+
if rawfilepath.length != 0
|
463
|
+
return self.locate_up(parent + '/', filename)
|
464
|
+
else # file system root
|
465
|
+
return nil # failed to find file
|
466
|
+
end#if
|
467
|
+
end#if
|
468
|
+
end#def
|
469
|
+
|
470
|
+
# remove all non dot files
|
471
|
+
def purge_dir(directory)
|
472
|
+
Dir["#{directory}/*"].each do |file|
|
473
|
+
next if file == '.' || file == '..'
|
474
|
+
if File.directory? file
|
475
|
+
self.purge_dir(File.expand_path(file))
|
476
|
+
if (Dir.entries(file) - %w[ . .. ]).empty?
|
477
|
+
Dir.rmdir file
|
478
|
+
end#if
|
479
|
+
elsif file !~ /^\..*$/ # ignore dot files
|
480
|
+
FileUtils.rm_rf file, :noop => false, :verbose => false
|
481
|
+
end#if
|
482
|
+
end#each
|
483
|
+
end#def
|
484
|
+
|
485
|
+
def check_interface_version(interface, source)
|
486
|
+
nyxi = Nyx::VERSION.split '.'
|
487
|
+
jsoni = interface.split '.'
|
488
|
+
|
489
|
+
if jsoni[0] != nyxi[0]
|
490
|
+
self.failed_version_check interface, source
|
491
|
+
else # major versions are equal
|
492
|
+
if jsoni[1] > nyxi[1]
|
493
|
+
# ie. json requires extra features
|
494
|
+
self.failed_version_check interface, source
|
495
|
+
elsif jsoni[1] == nyxi[1] && jsoni[2] > nyxi[2]
|
496
|
+
# ie. potential problems with bugfix'es
|
497
|
+
self.failed_version_check interface, source
|
498
|
+
end#if
|
499
|
+
end#if
|
500
|
+
end#def
|
501
|
+
|
502
|
+
def failed_version_check(interface, source)
|
503
|
+
self.fail "Incompatible versions: #{source} @ #{interface} but nyx.gem @ #{Nyx::VERSION}"
|
504
|
+
end#def
|
505
|
+
|
506
|
+
def fail(msg)
|
507
|
+
puts " Err: #{msg}"
|
508
|
+
end#def
|
509
|
+
|
510
|
+
end#class
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- srcspider
|
@@ -9,36 +10,127 @@ autorequire:
|
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
date: 2013-08-09 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: git
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.2.6
|
22
|
+
- - <
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '2.0'
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.2.6
|
33
|
+
- - <
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '2.0'
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: json
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.8'
|
44
|
+
- - <
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '2.0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.8'
|
55
|
+
- - <
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '2.0'
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rubyzip
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.9.9
|
66
|
+
- - <
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.0.0
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.9.9
|
77
|
+
- - <
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.0.0
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: fssm
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0.2'
|
88
|
+
- - <
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0.3'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0.2'
|
99
|
+
- - <
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0.3'
|
102
|
+
description: Ibidem Project Utilities
|
14
103
|
email: source.spider@gmail.com
|
15
|
-
executables:
|
104
|
+
executables:
|
105
|
+
- nyx
|
16
106
|
extensions: []
|
17
107
|
extra_rdoc_files: []
|
18
108
|
files:
|
19
109
|
- lib/nyx.rb
|
110
|
+
- bin/nyx
|
20
111
|
homepage: http://rubygems.org/gems/nyx
|
21
112
|
licenses:
|
22
113
|
- MIT
|
23
|
-
metadata: {}
|
24
114
|
post_install_message:
|
25
115
|
rdoc_options: []
|
26
116
|
require_paths:
|
27
117
|
- lib
|
28
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
29
120
|
requirements:
|
30
121
|
- - ! '>='
|
31
122
|
- !ruby/object:Gem::Version
|
32
123
|
version: '0'
|
33
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
34
126
|
requirements:
|
35
127
|
- - ! '>='
|
36
128
|
- !ruby/object:Gem::Version
|
37
129
|
version: '0'
|
38
130
|
requirements: []
|
39
131
|
rubyforge_project:
|
40
|
-
rubygems_version:
|
132
|
+
rubygems_version: 1.8.24
|
41
133
|
signing_key:
|
42
|
-
specification_version:
|
43
|
-
summary:
|
134
|
+
specification_version: 3
|
135
|
+
summary: project management helpers
|
44
136
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
ODJjODY3YmNiNzYwMmE0YTg4Yzg1NDQ5NWI5MjNjYzE0Y2U4NjE4Nw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NmZjZWI1Yzk4NjkzMjQ2YTRjZTMzOTM4ZDQ0YzVlZWE2YTUyZmRlNQ==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
OWM3MTRlNWUwNmE4NGRhMmU2N2EwNjA5NmIyNjA5M2E4YjYxYWJmY2QwNjk2
|
10
|
-
MThiMTQ5OTUzOTllYWZjZDFiZjNlYmU2NThmZTZkOWJkM2U1YTBkMjdlYjM0
|
11
|
-
MTczNjkzODM2MjQ0ZjIxNmJmNWQ2YTkwN2RlYmMwMGVhZmFhMGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Njg1NjRlMDI0ODA1NmNkYmNmNGRjNTcxODVmYzkzYTMwODI4ZThkZWQ5ODk3
|
14
|
-
ZWUxYzRiYTZjYzg2ZTdiMGUyMzI2MTZmNWIyYzQ5MDg5ZmVkZDk4NzlkMmI3
|
15
|
-
MGJmZTIyZDlhN2QzNWUyYmJlZWRjYTYzMDI2NWFkZDU5NzM5Njk=
|