Sha256: ddafbdd7a845d600b6982df138bd550841253c53bac907bd2936d1466d09d3bb

Contents?: true

Size: 804 Bytes

Versions: 68

Compression:

Stored size: 804 Bytes

Contents

##   RSence
 #   Copyright 2008 Riassence Inc.
 #   http://riassence.com/
 #
 #   You should have received a copy of the GNU General Public License along
 #   with this software package. If not, contact licensing@riassence.com
 ##


# @private Inner workings of Ticket
module TicketService
# @private Inner workings of Ticket
module Rsrc
  
  # Removes static data by ID.
  def del_rsrc( rsrc_id )
    @raw_uris.delete( rsrc_id )
  end
  
  # Serves static resources. ID returned by function.
  def serve_rsrc( content, content_type )
    
    rsrc_id = @randgen.gen
    #puts "rsrc_id: #{rsrc_id.inspect}"
    
    content_size = content.bytesize.to_s
    
    @raw_uris[rsrc_id] = [content_type,content_size,content]
    
    uri = File.join(::RSence.config[:broker_urls][:d],rsrc_id)
  end
  
end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
rsence-pre-2.3.0.15 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.14 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.13 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.12 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.11 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.10 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.9 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.8 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.7 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.6 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.5 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.4 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.3 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.2 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.1 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.0 plugins/ticket/lib/rsrc.rb
rsence-2.2.5 plugins/ticket/lib/rsrc.rb
rsence-2.2.4 plugins/ticket/lib/rsrc.rb
rsence-2.2.3 plugins/ticket/lib/rsrc.rb
rsence-2.2.2 plugins/ticket/lib/rsrc.rb