Permalink
Browse files

Merge remote branch 'upstream/master'

  • Loading branch information...
2 parents 258f28f + bdf7dba commit d2b0bffa05d2dd2d91d80c34ebe5d4771a220283 @dmorley dmorley committed May 16, 2012
View
@@ -181,7 +181,7 @@ end
group :development do
gem 'heroku'
- gem 'heroku_san', :platforms => :mri_19
+ gem 'heroku_san', :git => 'git://github.com/maxwell/heroku_san.git', :platforms => :mri_19
gem 'capistrano', :require => false
gem 'capistrano_colors', :require => false
gem 'capistrano-ext', :require => false
View
@@ -28,6 +28,16 @@ GIT
sinatra
GIT
+ remote: git://github.com/maxwell/heroku_san.git
+ revision: 8f6f53717af0736763fef790b08289effc4d1dad
+ specs:
+ heroku_san (3.0.0)
+ activesupport
+ heroku (>= 2)
+ heroku-api (>= 0.1.2)
+ rake
+
+GIT
remote: git://github.com/pivotal/jasmine-gem.git
revision: 1e075fbf5a69812fcc914c453f002ecf5bed38ab
specs:
@@ -226,11 +236,6 @@ GEM
rubyzip
heroku-api (0.1.6)
excon (~> 0.13.3)
- heroku_san (3.0.0)
- activesupport
- heroku (>= 2)
- heroku-api (>= 0.1.2)
- rake
highline (1.6.12)
hike (1.2.1)
hodel_3000_compliant_logger (0.1.0)
@@ -530,7 +535,7 @@ DEPENDENCIES
haml
handlebars_assets
heroku
- heroku_san
+ heroku_san!
http_accept_language (~> 1.0.2)
i18n-inflector-rails (~> 1.0)
jasmine!
@@ -52,16 +52,16 @@ def stats
case params[:range]
when "week"
range = 1.week
- @segment = "week"
+ @segment = t('admins.stats.week')
when "2weeks"
range = 2.weeks
- @segment = "2 week"
+ @segment = t('admins.stats.2weeks')
when "month"
range = 1.month
- @segment = "month"
+ @segment = t('admins.stats.month')
else
range = 1.day
- @segment = "daily"
+ @segment = t('admins.stats.daily')
end
[Post, Comment, AspectMembership, User].each do |model|
@@ -6,27 +6,24 @@
.span-24.last
%h1
- Usage Statistics
+ = t('.usage_statistic')
%div{:style => "float:right;"}
= form_tag('/admins/stats', :method => 'get') do
%select{:name => 'range'}
%option{:value => 'daily', :selected => ('selected' if params[:range] == 'daily')}
- Daily
+ = t('.daily')
%option{:value => 'week', :selected => ('selected' if params[:range] == 'week')}
- Week
+ = t('.week')
%option{:value => '2weeks', :selected => ('selected' if params[:range] == '2weeks')}
- 2 Weeks
+ = t('.2weeks')
%option{:value => 'month', :selected => ('selected' if params[:range] == 'month')}
- Month
+ = t('.month')
- = submit_tag 'go'
+ = submit_tag t('.go')
%br
%h3
- Displaying results from the
- %b
- = @segment
- segment
-
+ != t('.display_results', :segment => @segment)
+
%br
%br
%br
@@ -38,11 +35,16 @@
- [:posts, :comments, :aspect_memberships, :users].each do |name|
- model = eval("@#{name.to_s}")
- if name == :aspect_memberships
- - name = :shares
+ - name = t('.shares', :count => model[:yesterday])
+ - if name == :posts
+ - name = t('.posts', :count => model[:yesterday])
+ - if name == :comments
+ - name = t('.comments', :count => model[:yesterday])
+ - if name == :users
+ - name = t('.users', :count => model[:yesterday])
- .span-6{:class => ('last' if name == :users)}
+ .span-6{:class => ('last' if name == t('.users', :count => model[:yesterday]))}
%h2{:style => 'font-weight:bold;'}
- = model[:yesterday]
= name.to_s
%h4
= model[:day_before]
@@ -54,21 +56,12 @@
%br
%hr
-
%p{:style => "text-align:center;"}
- The current segment is averaging
- %b
- #{@posts[:yesterday]/@user_count.to_f}
- posts per user, from
- %b
- #{@posts[:day_before]/@user_count.to_f}
+ != t('.current_segment', :post_yest => @posts[:yesterday]/@user_count.to_f, :post_day => @posts[:day_before]/@user_count.to_f)
.span-24.last
%h3
- 50 Most Popular Tags
+ = t('.50_most')
- @popular_tags.each do |name,count|
- Tag Name:
- %b= name
- Count:
- %b= count
+ != t('.tag_name', :name_tag => name, :count_tag => count)
%br
@@ -32,7 +32,7 @@
# Raise exception on mass assignment protection for Active Record models
- config.active_record.mass_assignment_sanitizer = :strict
+ # config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
@@ -10,7 +10,7 @@
provider :tumblr, SERVICES['tumblr']['consumer_key'], SERVICES['tumblr']['consumer_secret']
end
if SERVICES['facebook'] && SERVICES['facebook']['app_id'] && SERVICES['facebook']['app_secret']
- provider :facebook, SERVICES['facebook']['app_id'], SERVICES['facebook']['app_secret'], { :display => "popup", :scope => "publish_stream,email,offline_access",
+ provider :facebook, SERVICES['facebook']['app_id'], SERVICES['facebook']['app_secret'], { :display => "popup", :scope => "publish_actions,publish_stream,offline_access",
:client_options => {:ssl => {:ca_file => EnviromentConfiguration.ca_cert_file_location}}}
end
end
@@ -102,7 +102,44 @@ en:
many: "%{count} users found"
other: "%{count} users found"
stats:
- go: go
+ week: "Week"
+ 2weeks: "2 Week"
+ month: "Month"
+ daily: "Daily"
+ usage_statistic: "Usage Statistics"
+ go: "go"
+ display_results: "Displaying results from the <b>%{segment}</b> segment"
+ posts:
+ zero: "%{count} posts"
+ one: "%{count} post"
+ two: "%{count} posts"
+ few: "%{count} posts"
+ many: "%{count} posts"
+ other: "%{count} posts"
+ comments:
+ zero: "%{count} comments"
+ one: "%{count} comment"
+ two: "%{count} comments"
+ few: "%{count} comments"
+ many: "%{count} comments"
+ other: "%{count} comments"
+ shares:
+ zero: "%{count} shares"
+ one: "%{count} share"
+ two: "%{count} shares"
+ few: "%{count} shares"
+ many: "%{count} shares"
+ other: "%{count} shares"
+ users:
+ zero: "%{count} users"
+ one: "%{count} user"
+ two: "%{count} users"
+ few: "%{count} users"
+ many: "%{count} users"
+ other: "%{count} users"
+ current_segment: "The current segment is averaging <b>%{post_yest}</b> posts per user, from <b>%{post_day}</b>"
+ 50_most: "50 Most Popular Tags"
+ tag_name: "Tag Name: <b>%{name_tag}</b> Count: <b>%{count_tag}</b>"
application:
helper:
unknown_person: "unknown person"
View
@@ -54,7 +54,7 @@ D_DB_USER="diaspora"
D_DB_PASS="diaspora"
-D_RUBY_VERSION="1.9.2-p290"
+D_RUBY_VERSION="1.9.3-p125"
#### INTERNAL VARS ####
@@ -179,7 +179,7 @@ install_or_use_ruby() {
rvm use $D_RUBY_VERSION >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "not ok"
- rvm install $D_RUBY_VERSION >/dev/null 2>&1
+ rvm --force install $D_RUBY_VERSION
else
echo "ok"
fi
@@ -202,7 +202,8 @@ load_rvmrc() {
# load .rvmrc
echo -n "loading .rvmrc ... "
- rvm rvmrc load
+ source .rvmrc
+ #rvm rvmrc load
if [ $? -eq 0 ] ; then
echo "ok"
else

0 comments on commit d2b0bff

Please sign in to comment.