Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:ferbass/trollwitter-rails
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoy committed Mar 2, 2011
2 parents 16d7731 + 7a7b5bf commit 3e7233c
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application.rb
@@ -1,6 +1,7 @@
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
require 'environment'
require 'open-uri'
require 'sinatra'
require 'json'
require 'trollwitter'

3 changes: 3 additions & 0 deletions lib/trollwitter.rb
@@ -1,3 +1,6 @@

get '/' do
response = open("http://search.twitter.com/search.json?q=%23troll+%23trollando+%23trollaliance+%23trollwitter+%23trollface+%23trolado").read
@results = JSON.parse(response)['results']
erb :index
end
9 changes: 9 additions & 0 deletions public/css/application.css
@@ -0,0 +1,9 @@
header, section{ display: block; }
div {
margin: 0 auto;
width: 900px;
}
div header {
background: url("images/header_background.png");
height: 299px
}
48 changes: 48 additions & 0 deletions public/css/reset.css
@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
File renamed without changes
16 changes: 16 additions & 0 deletions views/index.erb
@@ -0,0 +1,16 @@
<html>
<head>
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/application.css" />
</head>
<body>
<div>
<header>
<h1> TrollWitter </h1>
</header>
<section id="content">

</section>
</div>
</body>
</html>

0 comments on commit 3e7233c

Please sign in to comment.