Permalink
Browse files

replace ENV[DEBUG] with ENV[JETS_DEBUG], conflicts with some other li…

…brary
  • Loading branch information...
tongueroo committed Aug 27, 2018
1 parent cd60dc0 commit 5268e330a8cc224c51416cf8a936996fa1aad558
Showing with 14 additions and 5 deletions.
  1. +9 −0 bin/release
  2. +1 −1 lib/jets/commands/base.rb
  3. +1 −1 lib/jets/core.rb
  4. +1 −1 lib/jets/erb.rb
  5. +2 −2 spec/spec_helper.rb
@@ -0,0 +1,9 @@
#!/bin/bash

# Wrapper release script so we don't forget to add submodules.
# Should still update the CHANGELOG.md and version.rb before running this script.

git submodule init
git submodule update
bundle update
rake release
@@ -64,7 +64,7 @@ def eager_load!
class_name.sub!(/Task$/, "Tasks") # special rule here for Tasks class
# NOTE: Weird thing where Jets::Commands::Db::Task => Thor::Command
# because Task is a class available to Thor I believe.
puts "eager_load! loading path: #{path} class_name: #{class_name}" if ENV['DEBUG']
puts "eager_load! loading path: #{path} class_name: #{class_name}" if ENV['JETS_DEBUG']
class_name.constantize # dont have to worry about order.
end
end
@@ -135,7 +135,7 @@ def eager_load_app
.sub(/^\.\//,'') # remove ./
.sub(/app\/\w+\//,'') # remove app/controllers or app/jobs etc
.classify
puts "eager_load! loading path: #{path} class_name: #{class_name}" if ENV['DEBUG']
puts "eager_load! loading path: #{path} class_name: #{class_name}" if ENV['JETS_DEBUG']
class_name.constantize # use constantize instead of require so dont have to worry about order.
end
end
@@ -15,7 +15,7 @@ def result(path, variables={})
ERB.new(template, nil, "-").result(binding)
rescue Exception => e
puts e
puts e.backtrace if ENV['DEBUG']
puts e.backtrace if ENV['JETS_DEBUG']

# how to know where ERB stopped? - https://www.ruby-forum.com/topic/182051
# syntax errors have the (erb):xxx info in e.message
@@ -18,10 +18,10 @@

module Helpers
def execute(cmd)
puts "Running: TEST=1 JETS_ROOT=#{ENV['JETS_ROOT']} #{cmd}" if ENV["DEBUG"]
puts "Running: TEST=1 JETS_ROOT=#{ENV['JETS_ROOT']} #{cmd}" if ENV['JETS_DEBUG']
exit
out = `#{cmd}`
puts out if ENV["DEBUG"]
puts out if ENV['JETS_DEBUG']
out
end

0 comments on commit 5268e33

Please sign in to comment.