Sha256: f720632512d88da3fee760fe0b0f0c1888208377fffbd9f1f732dbbc3f687154

Contents?: true

Size: 825 Bytes

Versions: 13

Compression:

Stored size: 825 Bytes

Contents

# encoding: utf-8
require 'securerandom'

module Uploader
  autoload :Fileuploads, 'uploader/fileuploads'
  autoload :Asset, 'uploader/asset'
  
  module Helpers
    autoload :FormTagHelper, 'uploader/helpers/form_tag_helper'
    autoload :FormBuilder, 'uploader/helpers/form_builder'
    autoload :FieldTag, 'uploader/helpers/field_tag'
  end
  
  def self.guid
    SecureRandom.base64(15).tr('+/=', 'xyz').slice(0, 10)
  end
  
  def self.root_path
    @root_path ||= Pathname.new( File.dirname(File.expand_path('../', __FILE__)) )
  end
  
  def self.assets
    Dir[root_path.join('vendor/assets/javascripts/uploader/**', '*.{js,css}')].inject([]) do |list, path|
      list << Pathname.new(path).relative_path_from(root_path.join('vendor/assets/javascripts')).to_s
      list
    end
  end
end

require 'uploader/engine'

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rails-uploader-0.0.8 lib/uploader.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.7/lib/uploader.rb
rails-uploader-0.0.7 lib/uploader.rb
rails-uploader-0.0.6 lib/uploader.rb
rails-uploader-0.0.5 lib/uploader.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader.rb
rails-uploader-0.0.4 lib/uploader.rb
rails-uploader-0.0.3 lib/uploader.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/lib/uploader.rb
rails-uploader-0.0.1 lib/uploader.rb