Sha256: dbaffc8ac73b440b8898fe4a7c53bc5960cc58917c3dd04245a8e447ca6a610e

Contents?: true

Size: 1.04 KB

Versions: 34

Compression:

Stored size: 1.04 KB

Contents

# encoding: utf-8
require 'sinatra/base'
require 'sinatra/cross_origin'
require 'fileutils'
require 'sucker_punch'
require 'rufus-scheduler'
require 'similar_text'

module Sinatra

  module Hexacta
    GEM_FILE_DIR = "sinatra-hexacta"

    def gem_path
      File.expand_path("../..",__dir__)
    end

    def copy_file(original_path, link_path)
      IO.copy_stream("#{gem_path}#{original_path}",link_path) unless File.exist?(link_path) && FileUtils.compare_file("#{gem_path}#{original_path}",link_path)
    end

    def copy_all_files(original_path, link_path)
      Dir.foreach("#{gem_path}#{original_path}") do |child|
        copy_file("#{original_path}/#{child}","#{link_path}/#{child}") unless child == '.' || child == '..'
      end
    end

    def setup_dir(path)
      FileUtils.mkdir_p path
    end

    def copy_dir_structure(original_path, destination_path)
      FileUtils.copy_entry("#{gem_path}#{original_path}", destination_path)
    end
  end
end

require_relative 'helpers/init'
require_relative 'handlers/init'
require_relative 'extensions/init'

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
sinatra-hexacta-1.7.20 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.19 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.18 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.17 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.16 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.15 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.14 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.13 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.12 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.11 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.10 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.9 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.8 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.7 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.6 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.5 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.4 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.3 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.2 lib/sinatra/hexacta.rb
sinatra-hexacta-1.7.0 lib/sinatra/hexacta.rb