diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..156cd51 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,70 @@ +PATH + remote: . + specs: + ronn-ng (0.10.1.pre1) + kramdown (~> 2.1) + kramdown-parser-gfm (~> 1.0.1) + mustache (~> 1.0) + nokogiri (~> 1.9, >= 1.9.0) + +GEM + remote: https://rubygems.org/ + specs: + ast (2.4.1) + kramdown (2.3.1) + rexml + kramdown-parser-gfm (1.0.1) + kramdown (~> 2.0) + mini_portile2 (2.4.0) + mustache (1.1.1) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + parallel (1.20.1) + parser (2.7.2.0) + ast (~> 2.4.1) + power_assert (1.2.0) + rack (2.2.3) + rack-protection (2.1.0) + rack + rainbow (3.0.0) + rake (12.3.3) + regexp_parser (2.0.1) + rexml (3.2.5) + rubocop (0.93.1) + parallel (~> 1.10) + parser (>= 2.7.1.5) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8) + rexml + rubocop-ast (>= 0.6.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (1.3.0) + parser (>= 2.7.1.5) + ruby-progressbar (1.10.1) + ruby2_keywords (0.0.2) + sinatra (2.1.0) + mustermann (~> 1.0) + rack (~> 2.2) + rack-protection (= 2.1.0) + tilt (~> 2.0) + test-unit (3.3.7) + power_assert + tilt (2.0.10) + unicode-display_width (1.7.0) + +PLATFORMS + ruby + +DEPENDENCIES + rack (~> 2.2, >= 2.2.3) + rake (~> 12.3, >= 12.3.3) + ronn-ng! + rubocop (~> 0.88, >= 0.88.0) + sinatra (~> 2.0, >= 2.0.8) + test-unit (~> 3.3, >= 3.3.6) + +BUNDLED WITH + 2.1.4 diff --git a/lib/ronn/document.rb b/lib/ronn/document.rb index 9a25373..15bef2c 100644 --- a/lib/ronn/document.rb +++ b/lib/ronn/document.rb @@ -179,11 +179,14 @@ def title end # The date the man page was published. If not set explicitly, - # this is the file's modified time or, if no file is given, + # it first checks for "SOURCE_DATE_EPOCH" to support reproducible + # builds, then the file's modified time or, if no file is given, # the current time. Center displayed in the document footer. def date return @date if @date + return Time.at(ENV['SOURCE_DATE_EPOCH'].to_i).gmtime if ENV['SOURCE_DATE_EPOCH'] + return File.mtime(path) if File.exist?(path) Time.now