Skip to content

Commit

Permalink
a few tweeks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Jul 3, 2011
1 parent 919c5fa commit 8d4e8d2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 31 deletions.
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -27,6 +27,7 @@ GEM
faraday (~> 0.5.4)
hashie (1.0.0)
http_accept_language (1.0.1)
json (1.5.3)
moji (1.5)
monkey-lib (0.5.4)
backports
Expand Down Expand Up @@ -72,6 +73,7 @@ DEPENDENCIES
em-websocket
erubis
http_accept_language
json
moji
oauth
sinatra
Expand Down
10 changes: 5 additions & 5 deletions lib/tss_em_web_socket_server.rb
Expand Up @@ -94,11 +94,11 @@ def on_web_socket_open(ws)
convert_entries(entries)
send(ws, {"entries" => entries})

if !(query =~ /\A\#[a-z0-9_]+\z/)
send(ws, {"error" => "Auto update works only for hash tags."})
ws.close_connection_after_writing()
next
end
# if !(query =~ /\A\#[a-z0-9_]+\z/)
# send(ws, {"error" => "Auto update works only for hash tags."})
# ws.close_connection_after_writing()
# next
# end
if @stream_state == :connected && @query_to_wsocks.has_key?(query)
register_web_socket(query, ws)
dump_connections()
Expand Down
6 changes: 3 additions & 3 deletions lib/tss_web_server.rb
Expand Up @@ -193,10 +193,10 @@ def search(query, template, index)
if params[:title]
@head_title = @body_title = params[:title]
elsif !@query.empty? && !index
@head_title = "%s - Tweet Search Stream" % @query
@body_title = "Tweet Search Stream"
@head_title = "%s - Raply" % @query
@body_title = "Raply"
else
@head_title = @body_title = "Tweet Search Stream"
@head_title = @body_title = "Raply"
end
@logo_url = params[:logo]

Expand Down
7 changes: 1 addition & 6 deletions views/default.css.erubis
@@ -1,10 +1,5 @@
/*
Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
License: New BSD License
*/

body {
font-size: 95%;
font-size: 125%;
}

h1 {
Expand Down
11 changes: 3 additions & 8 deletions views/login_form.erubis
@@ -1,19 +1,15 @@
<!DOCTYPE html>
<!--
Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
License: New BSD License
-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- For Android/iOS -->
<meta name="viewport" content="width=device-width">
<title>Tweet Search Stream</title>
<title>Raply</title>
<link href="/css/default.css" rel="stylesheet" type="text/css">
</head><body>

<div class="page">

<h1 class="single-column">Tweet Search Stream</h1>
<h1 class="single-column">Raply</h1>

<div class="single-column">
<p>
Expand All @@ -28,8 +24,7 @@
</div>

<div class="footer">
Created by <a href="http://gimite.net/en/" target="_blank">Gimite</a> /
<a href="http://github.com/gimite/tweet-search-stream" target="_blank">Source code</a>
copyright
</div>

</div>
Expand Down
14 changes: 5 additions & 9 deletions views/search.erubis
@@ -1,9 +1,5 @@
<%# coding: UTF-8 %>
<!DOCTYPE html>
<!--
Copyright: Hiroshi Ichikawa <http://gimite.net/en/>
License: New BSD License
-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- For Android/iOS -->
Expand Down Expand Up @@ -36,6 +32,8 @@

function onLoad() {
initialize();
// supress left column
onCloseLeftButtonClick();
}

</script>
Expand All @@ -58,7 +56,7 @@
<% if @lang == "ja" %>
English
<% else %>
Japanese
<!-- Japanese -->
<% end %>
</a>
</div>
Expand Down Expand Up @@ -152,8 +150,7 @@
</div>
<div id="buzz" class="buzz">Loading...</div>
<div class="buzz-footer">
<div>Powered by <a href="http://buzztter.com/" target="_blank">buzztter</a></div>
<div>Icon by <a href="http://www.famfamfam.com/" target="_blank">famfamfam.com</a></div>
<div></div>
</div>
</div>

Expand Down Expand Up @@ -181,8 +178,7 @@
</div>

<div class="footer">
Created by <a href="http://gimite.net/en/" target="_blank">Gimite</a> /
<a href="http://github.com/gimite/tweet-search-stream" target="_blank">Source code</a>
copyright
</div>

</div>
Expand Down

0 comments on commit 8d4e8d2

Please sign in to comment.