Sha256: 355527f128a1ef9855444c7d5493e1bf200679c6003a60266a5106af8f9694e3

Contents?: true

Size: 677 Bytes

Versions: 16

Compression:

Stored size: 677 Bytes

Contents

require 'date'
require 'pathname'

require 'jazzy/gem_version'

module Jazzy
  class Doc < Mustache
    self.template_path = Pathname(__FILE__).parent.parent

    def date
      # Fake date is used to keep integration tests consistent
      ENV['JAZZY_FAKE_DATE'] || DateTime.now.strftime('%Y-%m-%d')
    end

    def year
      # Fake date is used to keep integration tests consistent
      if ENV['JAZZY_FAKE_DATE']
        ENV['JAZZY_FAKE_DATE'][0..3]
      else
        DateTime.now.strftime('%Y')
      end
    end

    def jazzy_version
      # Fake version is used to keep integration tests consistent
      ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
jazzy-0.2.1 lib/jazzy/doc.rb
jazzy-0.2.0 lib/jazzy/doc.rb
jazzy-0.1.6 lib/jazzy/doc.rb
jazzy-0.1.5 lib/jazzy/doc.rb
jazzy-0.1.4 lib/jazzy/doc.rb
jazzy-0.1.3 lib/jazzy/doc.rb
jazzy-0.1.2 lib/jazzy/doc.rb
jazzy-0.1.1 lib/jazzy/doc.rb
jazzy-0.1.0 lib/jazzy/doc.rb
jazzy-0.0.20 lib/jazzy/doc.rb
jazzy-0.0.19 lib/jazzy/doc.rb
jazzy-0.0.18 lib/jazzy/doc.rb
jazzy-0.0.17 lib/jazzy/doc.rb
jazzy-0.0.16 lib/jazzy/doc.rb
jazzy-0.0.15 lib/jazzy/doc.rb
jazzy-0.0.14 lib/jazzy/doc.rb