From 938c4c6f58a74678f4a34d5ef4577d17b2eab50b Mon Sep 17 00:00:00 2001 From: Judd Lillestrand Date: Wed, 12 Jun 2013 12:33:55 -0700 Subject: [PATCH 1/4] hide score --- app/views/stories/_story.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/stories/_story.html.erb b/app/views/stories/_story.html.erb index ccab945..99de626 100644 --- a/app/views/stories/_story.html.erb +++ b/app/views/stories/_story.html.erb @@ -31,7 +31,7 @@ <% end %>
<%= "#{story.vote_count} points" %>
-
<%= "#{story.score.to_f}" %>
+
<%#= "#{story.score.to_f}" %>
From 1692eaa02240aa7ebd8297bba881c959c7156db3 Mon Sep 17 00:00:00 2001 From: Judd Lillestrand Date: Wed, 12 Jun 2013 14:02:29 -0700 Subject: [PATCH 2/4] add airbrake --- Gemfile | 1 + Gemfile.lock | 5 +++++ app/controllers/sessions_controller.rb | 4 ++-- config/deploy.rb | 3 +++ config/initializers/airbrake.rb | 3 +++ 5 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 config/initializers/airbrake.rb diff --git a/Gemfile b/Gemfile index 9a15016..20d37bc 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem 'sinatra', require: false gem 'slim' gem 'capistrano-unicorn', :require => false gem 'dotenv-rails', '0.8.0' +gem 'airbrake' group :assets do gem 'sass-rails', '~> 3.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 382a178..6a19c28 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,6 +29,10 @@ GEM i18n (~> 0.6) multi_json (~> 1.0) addressable (2.3.2) + airbrake (3.1.12) + activesupport + builder + json arel (3.0.2) bootstrap-will_paginate (0.0.9) will_paginate @@ -285,6 +289,7 @@ PLATFORMS ruby DEPENDENCIES + airbrake bootstrap-will_paginate capistrano capistrano-unicorn diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 263db3d..6612ca6 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -8,13 +8,13 @@ def create auth_credentials: auth_hash.credentials.token + ':' + auth_hash.credentials.secret) end session[:user_id] = user.id - redirect_to(root_url, notice: "Successfully signed <3<3<3") + redirect_to(root_url, notice: "Successfully signed in! <3<3<3") end def destroy session[:user_id] = nil - redirect_to(root_url, notice: "Signed out Successfully <3<3<3") + redirect_to(root_url, notice: "Signed out successfully <3<3<3") end private diff --git a/config/deploy.rb b/config/deploy.rb index 45b0414..4e49c34 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -107,3 +107,6 @@ after 'deploy:finalize_update', 'deploy:stream:upstart_config' after 'deploy:finalize_update', 'deploy:sidekiq:restart' after 'deploy:finalize_update', 'deploy:stream:restart' + + require './config/boot' + require 'airbrake/capistrano' diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb new file mode 100644 index 0000000..75a56c5 --- /dev/null +++ b/config/initializers/airbrake.rb @@ -0,0 +1,3 @@ +Airbrake.configure do |config| + config.api_key = '670411b4d22cbf4d4d501804da5c7711' +end From 188b12fe9c1155deef82370f3fab1cbe4677f86f Mon Sep 17 00:00:00 2001 From: Judd Lillestrand Date: Wed, 12 Jun 2013 14:07:21 -0700 Subject: [PATCH 3/4] disable reply checker --- app/models/comment.rb | 2 +- app/models/story.rb | 2 +- app/models/vote.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 898becb..049d1e0 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,7 +1,7 @@ class Comment < Post belongs_to :story - after_create :queue_reply_checker + # after_create :queue_reply_checker attr_accessible :post_to_twitter attr_accessor :post_to_twitter diff --git a/app/models/story.rb b/app/models/story.rb index 889ba44..388158e 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -3,7 +3,7 @@ class Story < Post validates :twitter_id, :uniqueness => true - after_create :queue_reply_checker + # after_create :queue_reply_checker after_save :self_love #:promote_tweet attr_accessible :twitter_id, :twitter_profile_image_url diff --git a/app/models/vote.rb b/app/models/vote.rb index 9c7cc46..c121de9 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -11,7 +11,7 @@ class Vote < ActiveRecord::Base attr_accessible :twitter_handle, :value, :twitter_id attr_accessor :twitter_id - after_create :queue_reply_checker + # after_create :queue_reply_checker def story post From d1878608280f5d2ddc20f671ac85cc98a139bbd5 Mon Sep 17 00:00:00 2001 From: Judd Lillestrand Date: Wed, 12 Jun 2013 15:04:53 -0700 Subject: [PATCH 4/4] update sidekiq --- Gemfile | 2 +- Gemfile.lock | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 20d37bc..37dd190 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ gem 'twitter-bootstrap-rails', '2.0.7' gem 'therubyracer', :platform => :ruby gem 'will_paginate' gem 'bootstrap-will_paginate' -gem "sidekiq", "~> 2.6.5" +gem "sidekiq", '~> 2.12.3' gem 'rest-client' gem 'sinatra', require: false gem 'slim' diff --git a/Gemfile.lock b/Gemfile.lock index 6a19c28..49f55a4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,8 +52,7 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 1.0.0) - celluloid (0.12.4) - facter (>= 1.6.12) + celluloid (0.14.1) timers (>= 1.0.0) childprocess (0.3.6) ffi (~> 1.0, >= 1.0.6) @@ -66,7 +65,7 @@ GEM execjs coffee-script-source (1.4.0) commonjs (0.2.6) - connection_pool (1.0.0) + connection_pool (1.1.0) daemons (1.1.9) database_cleaner (0.9.1) diff-lcs (1.1.3) @@ -77,7 +76,6 @@ GEM eventmachine (1.0.0) execjs (1.4.0) multi_json (~> 1.0) - facter (1.6.17) factory_girl (4.1.0) activesupport (>= 3.0.0) factory_girl_rails (4.1.0) @@ -131,7 +129,7 @@ GEM treetop (~> 1.4.8) method_source (0.8.1) mime-types (1.21) - multi_json (1.5.1) + multi_json (1.7.6) multipart-post (1.1.5) mysql2 (0.3.11) net-scp (1.1.1) @@ -188,8 +186,8 @@ GEM ffi (>= 0.5.0) rdoc (3.12.1) json (~> 1.4) - redis (3.0.2) - redis-namespace (1.2.1) + redis (3.0.4) + redis-namespace (1.3.0) redis (~> 3.0.0) rest-client (1.6.7) mime-types (>= 1.16) @@ -222,11 +220,11 @@ GEM sextant (0.2.2) activesupport (>= 3.2) rails (>= 3.2) - sidekiq (2.6.5) - celluloid (~> 0.12.0) - connection_pool (~> 1.0) - multi_json (~> 1) - redis (~> 3) + sidekiq (2.12.3) + celluloid (>= 0.14.1) + connection_pool (>= 1.0.0) + json + redis (>= 3.0) redis-namespace simple_oauth (0.1.9) sinatra (1.3.3) @@ -314,7 +312,7 @@ DEPENDENCIES rspec-rails sass-rails (~> 3.2.3) sextant - sidekiq (~> 2.6.5) + sidekiq (~> 2.12.3) sinatra slim sqlite3