Sha256: 6ed2d5827ba55fcb9949f5b28775100acf3176fb031f7f1fe2c798b02c4e6c6b
Contents?: true
Size: 749 Bytes
Versions: 5
Compression:
Stored size: 749 Bytes
Contents
module LSD module Packages extend self def package_list Dir.entries(LSD.gem_folder + 'Packages').select do |package| package[0, 1] != '.' end end def link_to_public(options = {}) packages_folder = Rails.root + 'public/javascripts/Packages' FileUtils.mkdir_p(packages_folder) package_list.each do |package| FileUtils.rm(packages_folder + package) if options[:recreate] && File.symlink?(packages_folder + package) if !File.exists?(packages_folder + package) FileUtils.ln_s(LSD.gem_folder + 'Packages' + package, packages_folder + package) else puts "#{packages_folder + package} already exists" end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lsd_rails-0.1.6 | lib/lsd/packages.rb |
lsd_rails-0.1.5 | lib/lsd/packages.rb |
lsd_rails-0.1.4 | lib/lsd/packages.rb |
lsd_rails-0.1.3 | lib/lsd/packages.rb |
lsd_rails-0.1.2 | lib/lsd/packages.rb |