<commit_before>-# -*- coding: utf-8 -*-
.chat_room_top= raw(call_hook(:chat_room_top, :room => @room))
.audio
 %audio{:src => "#{root_path}audio/sound.mp3", :id => :audio}
.yield
 - cache :roominfo do
  = render :partial => "shared/room_info", :locals => { :room => @room, :has_button => true }
  = render :partial => "search/search_form", :locals => {:advanced => false, :room => @room}
 %div{:id => 'read-more', :class => 'read-more' }
  read more
 .message-list
  - @messages.reverse_each do |message|
   - cache message do
    = render :partial => 'message', :locals => { :message => message, :room => @room }
 - if logged?
  - cache :inputfield do
   .input
    = form_for :chat, :url => {:controller => :chat, :action => :message, :room_id => @room.id }, :html => {:class => :inputarea} do |f|
     =text_area_tag :message, '', :class => :text, :autofocus=>true, :placeholder=> t('placeholder_message')
     =submit_tag t(:send), :class => 'submit red button large', :id => 'send'
.chat_room_bottom= raw(call_hook(:chat_room_bottom, :room => @room))

= content_for :javascripts do
 - cache :javascript do
  - AsakusaSatellite::MessagePusher.jsFiles.each do|file|
   = javascript_include_tag file
  = javascript_include_tag "room"
  = javascript_include_tag "jquery.websocket"
  = javascript_include_tag "jquery.chat"
  = javascript_include_tag "jquery.pagination"
  = javascript_include_tag "jquery.append-hack"
  = javascript_include_tag "jquery.autoscroll"
  = javascript_include_tag "jquery.watch"
  = javascript_include_tag "jquery.dropUploader"
  = javascript_include_tag "jquery.multiline"
  = javascript_include_tag "jquery.notify"
  = javascript_include_tag "jquery.jeditable.mini"
  = javascript_include_tag "jquery.onthespot"
  = javascript_include_tag "jquery.scrollTo-min"
  = javascript_include_tag "jquery.desktopnotify"
 :javascript
  var AsakusaSatellite = {
    current : {
        user : "#{current_user && current_user.screen_name}",
        room : "#{@room.id}"
    },
    pusher    : #{AsakusaSatellite::MessagePusher.jsClass},
    form_auth : "#{form_authenticity_token}",
    url : {
        create  : "#{url_for(:controller=>'api/v1/message', :action=>'create')}",
        update  : "#{url_for(:action => 'update_message_on_the_spot')}",
        destroy : "#{url_for(:controller=>'api/v1/message', :action=>'destroy', :id => nil)}",
        message : "#{url_for(:controller => 'chat', :action => 'message')}",
        prev    : "#{url_for(:action => :prev)}"
    },
    t : {
        are_you_sure_you_want_to_delete_this_message : '#{t(:are_you_sure_you_want_to_delete_this_message)}'
    },
    resouces : {
        ajaxLoader : '#{image_tag("ajax-loader.gif")}',
        connect    : "#{image_path('connection.gif')}",
        disconnect : "#{image_path('connection_fail.gif')}"
    }
  }
<commit_msg>bugfix: incorrect caching<commit_after>-# -*- coding: utf-8 -*-
.chat_room_top= raw(call_hook(:chat_room_top, :room => @room))
.audio
 %audio{:src => "#{root_path}audio/sound.mp3", :id => :audio}
.yield
 - cache :roominfo do
  = render :partial => "shared/room_info", :locals => { :room => @room, :has_button => true }
  = render :partial => "search/search_form", :locals => {:advanced => false, :room => @room}
 %div{:id => 'read-more', :class => 'read-more' }
  read more
 .message-list
  - @messages.reverse_each do |message|
   - cache message do
    = render :partial => 'message', :locals => { :message => message, :room => @room }
 - if logged?
  - cache [:inputfield, @room_id] do
   .input
    = form_for :chat, :url => {:controller => :chat, :action => :message, :room_id => @room.id }, :html => {:class => :inputarea} do |f|
     =text_area_tag :message, '', :class => :text, :autofocus=>true, :placeholder=> t('placeholder_message')
     =submit_tag t(:send), :class => 'submit red button large', :id => 'send'
.chat_room_bottom= raw(call_hook(:chat_room_bottom, :room => @room))

= content_for :javascripts do
 - AsakusaSatellite::MessagePusher.jsFiles.each do|file|
  = javascript_include_tag file
 = javascript_include_tag "room"
 = javascript_include_tag "jquery.websocket"
 = javascript_include_tag "jquery.chat"
 = javascript_include_tag "jquery.pagination"
 = javascript_include_tag "jquery.append-hack"
 = javascript_include_tag "jquery.autoscroll"
 = javascript_include_tag "jquery.watch"
 = javascript_include_tag "jquery.dropUploader"
 = javascript_include_tag "jquery.multiline"
 = javascript_include_tag "jquery.notify"
 = javascript_include_tag "jquery.jeditable.mini"
 = javascript_include_tag "jquery.onthespot"
 = javascript_include_tag "jquery.scrollTo-min"
 = javascript_include_tag "jquery.desktopnotify"
 :javascript
  var AsakusaSatellite = {
    current : {
        user : "#{current_user && current_user.screen_name}",
        room : "#{@room.id}"
    },
    pusher    : #{AsakusaSatellite::MessagePusher.jsClass},
    form_auth : "#{form_authenticity_token}",
    url : {
        create  : "#{url_for(:controller=>'api/v1/message', :action=>'create')}",
        update  : "#{url_for(:action => 'update_message_on_the_spot')}",
        destroy : "#{url_for(:controller=>'api/v1/message', :action=>'destroy', :id => nil)}",
        message : "#{url_for(:controller => 'chat', :action => 'message')}",
        prev    : "#{url_for(:action => :prev)}"
    },
    t : {
        are_you_sure_you_want_to_delete_this_message : '#{t(:are_you_sure_you_want_to_delete_this_message)}'
    },
    resouces : {
        ajaxLoader : '#{image_tag("ajax-loader.gif")}',
        connect    : "#{image_path('connection.gif')}",
        disconnect : "#{image_path('connection_fail.gif')}"
    }
  }

{'fraction_non_alphanumeric': 0.17185840707964603, 'fraction_numerical': 0.001415929203539823, 'mean_word_length': 4.261638733705773, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3600934', 'n_tokens_mistral': 1980, 'n_tokens_neox': 1902, 'n_words': 348}