Skip to content

Commit

Permalink
* Fix rhenium#1
Browse files Browse the repository at this point in the history
* Increase worker
  • Loading branch information
re4k committed Mar 9, 2013
1 parent 4ba0b50 commit 11d5c26
Show file tree
Hide file tree
Showing 117 changed files with 551 additions and 829 deletions.
36 changes: 19 additions & 17 deletions .gitignore
@@ -1,26 +1,28 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Common
**.orig

# Ignore bundler config
.bundle
# Linux
.*
!.gitignore
*~

# Ignore the default SQLite database.
web/db/*.sqlite3
# SASS
*.sass-cache
*.sassc

# Ignore all logfiles and tempfiles.
web/log/*.log
web/tmp
# Rails
*.rbc
/vendor/bundle
/log/*
/tmp/*
/spec/tmp/*

web/config/settings.local.yml
web/config/settings/*.local.yml
web/config/environments/*.local.yml
web/config/initializers/secret_token.local.rb
/config/settings.local.yml
/config/settings/*.local.yml
/config/environments/*.local.yml
/config/initializers/secret_token.local.rb

# dotcloud
/dotcloud.yml
/supervisord.conf
.dotcloud

1 change: 0 additions & 1 deletion Gemfile

This file was deleted.

25 changes: 25 additions & 0 deletions Gemfile
@@ -0,0 +1,25 @@
ruby '1.9.3'
source 'https://rubygems.org'

gem 'rails', '4.0.0.beta1'
gem 'mysql2'

gem 'unicorn'

gem 'rails_config'
gem 'will_paginate', :github => 're4k/will_paginate'

group :assets do
gem 'sass-rails', '~> 4.0.0.beta1'
gem 'coffee-rails', '~> 4.0.0.beta1'
gem 'uglifier', '>= 1.0.3'
end

gem 'therubyracer'
gem 'haml-rails'

gem 'yajl-ruby', :require => "yajl"
gem 'omniauth-twitter', :github => "re4k/omniauth-twitter"
gem 'em-twitter'
gem 'twitter'

1 change: 0 additions & 1 deletion Gemfile.lock

This file was deleted.

174 changes: 174 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,174 @@
GIT
remote: git://github.com/re4k/omniauth-twitter.git
revision: 313df7eb05e78477cf3eb06bced3c9b64957840f
specs:
omniauth-twitter (0.0.14)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)

GIT
remote: git://github.com/re4k/will_paginate.git
revision: fcbbd91ced44aaabb1f369875ee9f4f651bc74fb
specs:
will_paginate (3.0.4)

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.0.beta1)
actionpack (= 4.0.0.beta1)
mail (~> 2.5.3)
actionpack (4.0.0.beta1)
activesupport (= 4.0.0.beta1)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0.beta1)
activesupport (= 4.0.0.beta1)
builder (~> 3.1.0)
activerecord (4.0.0.beta1)
activemodel (= 4.0.0.beta1)
activerecord-deprecated_finders (~> 0.0.3)
activesupport (= 4.0.0.beta1)
arel (~> 4.0.0.beta1)
activerecord-deprecated_finders (0.0.3)
activesupport (4.0.0.beta1)
i18n (~> 0.6.2)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.33)
arel (4.0.0.beta1)
atomic (1.0.1)
builder (3.1.4)
coffee-rails (4.0.0.beta1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0.beta, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.1)
em-twitter (0.2.1)
eventmachine (~> 1.0)
http_parser.rb (~> 0.5)
simple_oauth (~> 0.1)
erubis (2.7.0)
eventmachine (1.0.1)
execjs (1.4.0)
multi_json (~> 1.0)
faraday (0.8.6)
multipart-post (~> 1.1)
haml (4.0.0)
tilt
haml-rails (0.4)
actionpack (>= 3.1, < 4.1)
activesupport (>= 3.1, < 4.1)
haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
hashie (1.2.0)
hike (1.2.1)
http_parser.rb (0.5.3)
i18n (0.6.4)
json (1.7.7)
kgio (2.8.0)
libv8 (3.11.8.13)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.21)
minitest (4.6.2)
multi_json (1.6.1)
multipart-post (1.2.0)
mysql2 (0.3.11)
oauth (0.4.7)
omniauth (1.1.3)
hashie (~> 1.2)
rack
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
polyglot (0.3.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.0.beta1)
actionmailer (= 4.0.0.beta1)
actionpack (= 4.0.0.beta1)
activerecord (= 4.0.0.beta1)
activesupport (= 4.0.0.beta1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0.beta1)
sprockets-rails (~> 2.0.0.rc3)
rails_config (0.3.2)
activesupport (>= 3.0)
railties (4.0.0.beta1)
actionpack (= 4.0.0.beta1)
activesupport (= 4.0.0.beta1)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.17.0, < 2.0)
raindrops (0.10.0)
rake (10.0.3)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.2)
sass (3.2.6)
sass-rails (4.0.0.beta1)
railties (>= 4.0.0.beta, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0.rc0)
tilt (~> 1.3)
simple_oauth (0.2.0)
sprockets (2.9.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.0.rc3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
ref
thor (0.17.0)
thread_safe (0.1.0)
atomic
tilt (1.3.4)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
twitter (4.5.0)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
tzinfo (0.3.36)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.6.2)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
coffee-rails (~> 4.0.0.beta1)
em-twitter
haml-rails
mysql2
omniauth-twitter!
rails (= 4.0.0.beta1)
rails_config
sass-rails (~> 4.0.0.beta1)
therubyracer
twitter
uglifier (>= 1.0.3)
unicorn
will_paginate!
yajl-ruby
37 changes: 37 additions & 0 deletions README.md
@@ -0,0 +1,37 @@
# Aclog
Collects favs and retweets in real time by UserStreams.
A web service like Favstar.

## Aclog is
* Powered by Ruby on Rails
* Free and open source (MIT License)

## Status
* Working on ![aclog-re4k.dotcloud.com](aclog-re4k.dotcloud.com) for testing.

## Requirements
* Ruby 1.9.3+
* MySQL or SQLite

## Installation (dotCloud)
1.

git clone https://github.com/re4k/aclog.git
bundle

dotcloud push
*~(**)~*

2.

cp dotcloud.yml.sample dotcloud.yml
(Edit)

3.

cp config/settings.yml.sample config/settings.yml
(Edit)
3.

(今度書きます..)

File renamed without changes.
Binary file added app/assets/images/bird_gray_16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
3 changes: 3 additions & 0 deletions app/assets/javascripts/errors.js.coffee
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -26,11 +26,12 @@
.user
:padding 0 5px 15px
:font-weight bold
:color #666666
.name
:font-size 14px
.screen_name
:font-size 12px
a
:color #666666
.text
:font-size 18px
:line-height 25px
Expand All @@ -40,6 +41,13 @@
:padding 0 5px 15px
:color #666666
:font-size 12px
.twitter_bird
:display block
:float left
img
:vertical-align top
:margin-right 2px
:margin-top 1px
.created_at
:display block
:float left
Expand Down
Expand Up @@ -3,9 +3,12 @@
*
:margin 0
:padding 0
:font-family "Ubuntu", sans-serif
a
:text-decoration none
:color inherit
:color #3b5998
img
:border none
.clearfix:after
:content "."
:visibility hidden
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/errors.css.scss
@@ -0,0 +1,3 @@
// Place all the styles related to the errors controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -1,9 +1,11 @@
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :set_content_type
after_filter :set_content_type

def set_content_type
request.format = :xhtml if request.format == :html
if request.format == :html
response.content_type = "application/xhtml+xml"
end
end

def get_page_number(params)
Expand All @@ -17,8 +19,8 @@ def get_page_number(params)

def get_user_cache(items)
Hash[
User.find(@items
.map{|m| m.favorites.map{|u| u.user_id} + m.retweets.map{|u| u.user_id}}
User.find(items
.map{|m| [m.user_id, m.favorites.map{|u| u.user_id}, m.retweets.map{|u| u.user_id}]}
.flatten
.uniq)
.map{|m| [m.id, m]}
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/errors_controller.rb
@@ -0,0 +1,7 @@
class ErrorsController < ApplicationController
def error_404
end

def error_500
end
end
8 changes: 8 additions & 0 deletions app/controllers/i_controller.rb
@@ -0,0 +1,8 @@
class IController < ApplicationController
def show
id = params[:id].to_i
@item = Tweet.find_by(:id => id)
@user_cache = get_user_cache([@item])
@title = "\"#{ApplicationController.helpers.strip_tags(ApplicationController.helpers.format_tweet_text(@item.text))[0...30]}\" from @#{@user_cache[@item.user_id].screen_name}"
end
end
File renamed without changes.
File renamed without changes.

0 comments on commit 11d5c26

Please sign in to comment.