bin/lux in lux-fw-0.1.35 vs bin/lux in lux-fw-0.2.1
- old
+ new
@@ -27,10 +27,15 @@
Dotenv.load
@port = 3000
lux_root = File.expand_path '../..', __FILE__
+if Dir.exists?('.git')
+ test_root = `bundle show lux-fw`.chomp
+ lux_root = test_root if test_root.include?('lux')
+end
+
puts 'Lux (%s, v%s)' % [lux_root, File.read('%s/.version' % lux_root)] unless ARGV[0]
ARGV.options do |opts|
opts.on("-e", "--environment=val", "RACK_ENV enviroment", String) do |v|
v = 'production' if v[0,1] == 'p'
@@ -38,10 +43,13 @@
ENV['RACK_ENV'] = v if v
end
opts.on("-p", "--port=val", "port (3000)", String) do |v|
@port = v.to_i
end
+ opts.on("-f", "--flags=val", "CRSL", String) do |v|
+ @flags = v
+ end
end.parse!
commands = {}
commands['am'] = 'auto migrate'
commands['assets'] = 'precompile assets and genereate mainifest.json'
@@ -49,16 +57,17 @@
commands['dev'] = 'dev on port 3000 with hot reload on code change'
commands['eval'] = 'eval code or file'
commands['exceptions'] = 'show stored exceptions, last created first'
commands['generate'] = 'generates models and views based on templates'
commands['get'] = 'get local URL'
-# commands['job_que'] = 'process job que with loaded enviroment'
commands['nginx'] = 'parse and install config/nginx.conf'
commands['production'] = 'run puma in production mode'
commands['routes'] = 'list routes'
+commands['render'] = 'render single page'
commands['server'] = 'run puma development server'
commands['systemd'] = 'parse and install config/systemd.conf'
commands['stat'] = 'goaccess stat to public/goaccess.html'
+# commands['job_que'] = 'process job que with loaded enviroment'
command = ARGV.shift
if command
for c in commands