Sha256: 01e91189bc644239f80828932e963827a37be4bf699fbc14c779b90fae78db13

Contents?: true

Size: 800 Bytes

Versions: 37

Compression:

Stored size: 800 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.size.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

37 entries across 37 versions & 2 rubygems

Version Path
rsence-pre-2.1.0.8.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.7.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.6.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.4.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.3.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.2.pre plugins/ticket/lib/rsrc.rb
rsence-pre-2.1.0.1.pre plugins/ticket/lib/rsrc.rb
rsence-2.0.9.23 plugins/ticket/lib/rsrc.rb
rsence-2.0.9.22.pre plugins/ticket/lib/rsrc.rb
rsence-2.0.9.21.pre plugins/ticket/lib/rsrc.rb
rsence-2.0.9.20.pre plugins/ticket/lib/rsrc.rb
rsence-2.0.8.19 plugins/ticket/lib/rsrc.rb
rsence-2.0.4.15 plugins/ticket/lib/rsrc.rb
rsence-2.0.3.14 plugins/ticket/lib/rsrc.rb
rsence-2.0.2.13 plugins/ticket/lib/rsrc.rb
rsence-2.0.1.12 plugins/ticket/lib/rsrc.rb
rsence-2.0.0.11 plugins/ticket/lib/rsrc.rb