Browse Source

remove testing of local env

trunk
Thomas 6 months ago
parent
commit
56106e9514
  1. 12
      lite/bin/setup

12
lite/bin/setup

@ -7,7 +7,6 @@ def setup!
run "bundle check > /dev/null 2>&1 || bundle install"
run "yarn install" if File.exist?("yarn.lock")
run "overcommit --install" if overcommit_present?
test_local_env_contains_required_keys
run "bin/rails tmp:create db:prepare db:test:prepare db:seed"
end
end
@ -71,17 +70,6 @@ def copy(source, dest)
end
end
def test_local_env_contains_required_keys
keys = ->(f) { IO.readlines(f).map { |l| l[/^([^#\s][^=\s]*)/, 1] }.compact }
log(:yellow, "test .env.development contents") do
missing = keys["example.env"] - keys[".env.development"]
if missing.any?
die("Your .env.development file is missing #{missing.join(', ')}")
end
end
end
def log(color, message, out=$stdout, &block)
if defined?(HighLine::String)
message.sub!(/^(\S*)/) { HighLine::String.new($1).public_send(color) }

Loading…
Cancel
Save