Sha256: 3c1bd3af114cf27186086f1c73a01d60e267bce500afdaefcddafba7ee548062

Contents?: true

Size: 712 Bytes

Versions: 2

Compression:

Stored size: 712 Bytes

Contents

# encoding: utf-8
module Sinatra
  module LibrariesHandler
    extend Hexacta

    def include_css
      slim "#{Hexacta::GEM_FILE_DIR}/libraries/include_css".to_sym
    end

    def include_js_before
      slim "#{Hexacta::GEM_FILE_DIR}/libraries/include_js_before".to_sym
    end

    def include_js_after
      slim "#{Hexacta::GEM_FILE_DIR}/libraries/include_js_after".to_sym
    end

    p "Setting up libraries directory..."
    copy_dir_structure("/lib/sinatra/public","/app/public/#{Hexacta::GEM_FILE_DIR}")
    setup_dir("/app/views/#{Hexacta::GEM_FILE_DIR}/libraries")
    symlink_all("/lib/sinatra/views/libraries","/app/views/#{Hexacta::GEM_FILE_DIR}/libraries")
  end

  helpers LibrariesHandler
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-hexacta-0.0.2 lib/sinatra/helpers/libraries.rb
sinatra-hexacta-0.0.1 lib/sinatra/helpers/libraries.rb