Sha256: ff38c141c7b5b264db334966d1a4f39678604ec8a99190ab3bde7f55b78c3229

Contents?: true

Size: 1013 Bytes

Versions: 20

Compression:

Stored size: 1013 Bytes

Contents

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

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

20 entries across 20 versions & 1 rubygems

Version Path
sinatra-hexacta-0.4.2 lib/sinatra/hexacta.rb
sinatra-hexacta-0.4.1 lib/sinatra/hexacta.rb
sinatra-hexacta-0.4.0 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.18 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.17 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.16 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.15 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.14 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.13 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.12 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.11 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.10 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.9 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.8 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.7 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.6 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.5 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.4 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.3 lib/sinatra/hexacta.rb
sinatra-hexacta-0.3.2 lib/sinatra/hexacta.rb