Sha256: 9dee01dd6b0e89ec31e27bb0e4c9605a16aa69f0ba4ce2d26582c116dea0dea6

Contents?: true

Size: 844 Bytes

Versions: 63

Compression:

Stored size: 844 Bytes

Contents

class Application < Rhosync::Base
  class << self
    def authenticate(username,password,session)
      true # do some interesting authentication here...
    end
    
    # Add hooks for application startup here
    # Don't forget to call super at the end!
    def initializer(path)
      super
    end
    
    # Calling super here returns rack tempfile path:
    # i.e. /var/folders/J4/J4wGJ-r6H7S313GEZ-Xx5E+++TI
    # Note: This tempfile is removed when server stops or crashes...
    # See http://rack.rubyforge.org/doc/Multipart.html for more info
    # 
    # Override this by creating a copy of the file somewhere
    # and returning the path to that file (then don't call super!):
    # i.e. /mnt/myimages/soccer.png
    def store_blob(blob)
      super #=> returns blob[:tempfile]
    end
  end
end

Application.initializer(ROOT_PATH)

Version data entries

63 entries across 25 versions & 1 rubygems

Version Path
rhosync-2.1.0.beta.1 generators/templates/application/application.rb
rhosync-2.1.0.beta.1 examples/simple/application.rb
rhosync-2.1.0.beta.1 bench/benchapp/application.rb
rhosync-2.0.9 examples/simple/application.rb
rhosync-2.0.9 bench/benchapp/application.rb
rhosync-2.0.9 generators/templates/application/application.rb
rhosync-2.0.8 generators/templates/application/application.rb
rhosync-2.0.8 bench/benchapp/application.rb
rhosync-2.0.8 examples/simple/application.rb
rhosync-2.0.7 bench/benchapp/application.rb
rhosync-2.0.7 generators/templates/application/application.rb
rhosync-2.0.7 examples/simple/application.rb
rhosync-2.0.6 bench/benchapp/application.rb
rhosync-2.0.6 generators/templates/application/application.rb
rhosync-2.0.6 examples/simple/application.rb
rhosync-2.0.5 bench/benchapp/application.rb
rhosync-2.0.5 generators/templates/application/application.rb
rhosync-2.0.5 examples/simple/application.rb
rhosync-2.0.4 bench/benchapp/application.rb
rhosync-2.0.4 examples/simple/application.rb