Extract check of production in its own function
To make things DRYer, let's extract the ENV["NANOC_ENV"] == 'production'
conditional in a function is_production?
.
Raised in #747 (closed).
There are some remaining entries, but they don't apply to that change (searched for NANOC_ENV
):
dockerfiles/Dockerfile.builder.onbuild
6:ONBUILD ARG NANOC_ENV
Dockerfile.master
11:ARG NANOC_ENV
lib/helpers/generic.rb
6: # Check if NANOC_ENV is set to production
9: ENV['NANOC_ENV'] == 'production'
content/404.html
32:<div data-archives-path="/archives/" data-environment="<%= ENV['NANOC_ENV'] %>" data-offline-versions="<%= @items['/_data/versions.yaml'][:offline].to_s.tr('[]" ', '') %>" id="offline-versions"></div>
Edited by Achilleas Pipinellis