From 0f1e0ef3f97a2e9990b1793150360d53a14c8624 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 21:49:48 +0100 Subject: [PATCH 01/53] fixed missing profile-header --- app/views/user/show_follow.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/user/show_follow.html.haml b/app/views/user/show_follow.html.haml index a93a0f61..6550f6d1 100644 --- a/app/views/user/show_follow.html.haml +++ b/app/views/user/show_follow.html.haml @@ -1,3 +1,4 @@ +.profile--header .container.j2-page .col-md-3.col-xs-12.col-sm-3 = render 'user/profile_info' From e483714f44a398e39a656d960dbbdff78f72a0af Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:11:49 +0100 Subject: [PATCH 02/53] fix headings --- app/assets/stylesheets/base.css.scss | 4 ++++ app/views/user/show_follow.html.haml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index c2f74b76..8bb46eb2 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -53,4 +53,8 @@ body { .smiles { margin-bottom: 7px; +} + +.j2-lh { + color: #fff; } \ No newline at end of file diff --git a/app/views/user/show_follow.html.haml b/app/views/user/show_follow.html.haml index 6550f6d1..89e428de 100644 --- a/app/views/user/show_follow.html.haml +++ b/app/views/user/show_follow.html.haml @@ -4,7 +4,7 @@ = render 'user/profile_info' .hidden-xs= render 'shared/links' .col-md-9.col-xs-12.col-sm-9 - %h1= @title + %h1.j2-lh= @title #users - @users.each do |user| .col-sm-6 From 46c9ccc0ac466057e835974de9761577379eb3de Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:34:24 +0100 Subject: [PATCH 03/53] question page added --- app/controllers/user_controller.rb | 6 ++++++ app/views/user/questions.html.haml | 17 +++++++++++++++++ app/views/user/questions.js.erb | 8 ++++++++ config/routes.rb | 1 + 4 files changed, 32 insertions(+) create mode 100644 app/views/user/questions.html.haml create mode 100644 app/views/user/questions.js.erb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 32d0229f..52351d6b 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -36,4 +36,10 @@ class UserController < ApplicationController @type = :friend render 'show_follow' end + + def questions + @title = 'Questions' + @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first + @questions = @user.questions.reverse_order.paginate(page: params[:page]) + end end diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml new file mode 100644 index 00000000..d6ae7e05 --- /dev/null +++ b/app/views/user/questions.html.haml @@ -0,0 +1,17 @@ +.profile--header +.container.j2-page + .col-md-3.col-xs-12.col-sm-3 + = render 'user/profile_info' + .hidden-xs= render 'shared/links' + .col-md-9.col-xs-12.col-sm-9 + %h1.j2-lh= @title + #questions + - @questions.each do |a| + = render 'shared/answerbox', a: a + + #pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false + + - if @questions.next_page + %button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @questions.current_page }} + Load more + .visible-xs= render 'shared/links' diff --git a/app/views/user/questions.js.erb b/app/views/user/questions.js.erb new file mode 100644 index 00000000..f648a149 --- /dev/null +++ b/app/views/user/questions.js.erb @@ -0,0 +1,8 @@ +$('#questions').append('<% @questions.each do |a| + %><%= j render 'shared/answerbox', a: a +%><% end %>'); +<% if @questions.next_page %> +$('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>'); +<% else %> +$('#pagination, #load-more-btn').remove(); +<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 6e268567..663b0705 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -71,4 +71,5 @@ Rails.application.routes.draw do match '/:username/q/:id', to: 'question#show', via: 'get', as: :show_user_question_alt match '/:username/followers(/p/:page)', to: 'user#followers', via: 'get', as: :show_user_followers_alt, defaults: {page: 1} match '/:username/friends(/p/:page)', to: 'user#friends', via: 'get', as: :show_user_friends_alt, defaults: {page: 1} + match '/:username/questions(/p/:page)', to: 'user#questions', via: 'get', as: :show_user_questions, defaults: {page: 1} end From 75bca2430b556a14e987e6f4954f2a382104d31d Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:37:04 +0100 Subject: [PATCH 04/53] added links to pages --- app/views/user/_profile_info.html.haml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index de1376a0..0489c121 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -33,10 +33,12 @@ %h4.entry-text#friend-count= @user.friend_count %h6.entry-subtext Following .row - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#asked-count= @user.asked_count - %h6.entry-subtext Questions - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#answered-count= @user.answered_count - %h6.entry-subtext Answers + %a{href: show_user_questions_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#asked-count= @user.asked_count + %h6.entry-subtext Questions + %a{href: show_user_profile_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#answered-count= @user.answered_count + %h6.entry-subtext Answers = render 'user/actions', user: @user, type: :follower \ No newline at end of file From e9985ed0aa2721e45b67759be35a04e1f6369a9b Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:52:12 +0100 Subject: [PATCH 05/53] how about new template --- app/assets/stylesheets/scss/answerbox.scss | 2 +- app/views/shared/_question.html.haml | 14 ++++++++++++++ app/views/user/questions.html.haml | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 app/views/shared/_question.html.haml diff --git a/app/assets/stylesheets/scss/answerbox.scss b/app/assets/stylesheets/scss/answerbox.scss index 45524a49..af1595fe 100644 --- a/app/assets/stylesheets/scss/answerbox.scss +++ b/app/assets/stylesheets/scss/answerbox.scss @@ -1,4 +1,4 @@ -.answerbox .text-muted a, .answerbox .text-muted a:hover { +.text-muted a, .answerbox .text-muted a:hover { color: $gray-dark; text-decoration: none; } diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml new file mode 100644 index 00000000..4636b78d --- /dev/null +++ b/app/views/shared/_question.html.haml @@ -0,0 +1,14 @@ +.panel.panel-default + .media + .media-body + %h6.media-heading.text-muted.answerbox--question-user + = user_screen_name a.question.user + asked + = time_ago_in_words(a.question.created_at) + ago + - if a.question.answer_count > 1 + · + %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} + #{a.question.answer_count} answers + %p.answerbox--question-text + = a.question.content \ No newline at end of file diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index d6ae7e05..1f7411c9 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -7,7 +7,7 @@ %h1.j2-lh= @title #questions - @questions.each do |a| - = render 'shared/answerbox', a: a + = render 'shared/question', a: a #pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false From f7e35a3977403ba5e216f45c8b3332abb151b169 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:56:16 +0100 Subject: [PATCH 06/53] fix stuff --- app/views/shared/_question.html.haml | 10 +++++----- app/views/user/questions.html.haml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index 4636b78d..c5513a2e 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -2,13 +2,13 @@ .media .media-body %h6.media-heading.text-muted.answerbox--question-user - = user_screen_name a.question.user + = user_screen_name q.user asked - = time_ago_in_words(a.question.created_at) + = time_ago_in_words(q.created_at) ago - - if a.question.answer_count > 1 + - if q.answer_count > 1 · - %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} - #{a.question.answer_count} answers + %a{href: show_user_question_path(q.user.screen_name, q.id)} + #{q.answer_count} answers %p.answerbox--question-text = a.question.content \ No newline at end of file diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index 1f7411c9..e9835732 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -6,8 +6,8 @@ .col-md-9.col-xs-12.col-sm-9 %h1.j2-lh= @title #questions - - @questions.each do |a| - = render 'shared/question', a: a + - @questions.each do |q| + = render 'shared/question', a: q #pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false From 20796654f59a28f4072d5a5dc2d780bc865e3688 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:57:08 +0100 Subject: [PATCH 07/53] more fix --- app/views/user/questions.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index e9835732..ef62b70c 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -7,7 +7,7 @@ %h1.j2-lh= @title #questions - @questions.each do |q| - = render 'shared/question', a: q + = render 'shared/question', q: q #pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false From c1f0388da43deebc86b97a08cc1eea16b3c64f70 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 22:58:06 +0100 Subject: [PATCH 08/53] I reached the end of the file, fixing this I finally did it --- app/views/shared/_question.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index c5513a2e..7158cda5 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -11,4 +11,4 @@ %a{href: show_user_question_path(q.user.screen_name, q.id)} #{q.answer_count} answers %p.answerbox--question-text - = a.question.content \ No newline at end of file + = q.content \ No newline at end of file From a76463253818ac02d5d9be650a10ec3e147027fd Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:03:03 +0100 Subject: [PATCH 09/53] more fixes and updates --- app/views/shared/_question.html.haml | 27 ++++++++++++++------------- app/views/user/questions.js.erb | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index 7158cda5..f1d6100e 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -1,14 +1,15 @@ .panel.panel-default - .media - .media-body - %h6.media-heading.text-muted.answerbox--question-user - = user_screen_name q.user - asked - = time_ago_in_words(q.created_at) - ago - - if q.answer_count > 1 - · - %a{href: show_user_question_path(q.user.screen_name, q.id)} - #{q.answer_count} answers - %p.answerbox--question-text - = q.content \ No newline at end of file + .panel-body + .media + .media-body + %h6.media-heading.text-muted.answerbox--question-user + = user_screen_name q.user + asked + = time_ago_in_words(q.created_at) + ago + - if q.answer_count > 1 + · + %a{href: show_user_question_path(q.user.screen_name, q.id)} + #{q.answer_count} answers + %p.answerbox--question-text + = q.content \ No newline at end of file diff --git a/app/views/user/questions.js.erb b/app/views/user/questions.js.erb index f648a149..b444b715 100644 --- a/app/views/user/questions.js.erb +++ b/app/views/user/questions.js.erb @@ -1,5 +1,5 @@ $('#questions').append('<% @questions.each do |a| - %><%= j render 'shared/answerbox', a: a + %><%= j render 'shared/question', a: a %><% end %>'); <% if @questions.next_page %> $('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>'); From bdff6f4110abb7c82eeee008f1a566808cfa4895 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:05:45 +0100 Subject: [PATCH 10/53] the journey of fixes has finally an end --- app/views/user/questions.js.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/user/questions.js.erb b/app/views/user/questions.js.erb index b444b715..01344836 100644 --- a/app/views/user/questions.js.erb +++ b/app/views/user/questions.js.erb @@ -1,5 +1,5 @@ -$('#questions').append('<% @questions.each do |a| - %><%= j render 'shared/question', a: a +$('#questions').append('<% @questions.each do |q| + %><%= j render 'shared/question', q: q %><% end %>'); <% if @questions.next_page %> $('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>'); From aa3f11833281bbdf33dd4579e44acf9ba0afb355 Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 19 Dec 2014 23:12:19 +0100 Subject: [PATCH 11/53] fixed anonymous questions being shown --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 52351d6b..740e35a4 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -40,6 +40,6 @@ class UserController < ApplicationController def questions @title = 'Questions' @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first - @questions = @user.questions.reverse_order.paginate(page: params[:page]) + @questions = @user.questions.where(author_is_anonymous: false).reverse_order.paginate(page: params[:page]) end end From f6882d7fff5e46658acfeab25c2b5122f6815e85 Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 19 Dec 2014 23:20:33 +0100 Subject: [PATCH 12/53] added justask:fix_notifications task --- Rakefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Rakefile b/Rakefile index 83db07a0..6a893c89 100644 --- a/Rakefile +++ b/Rakefile @@ -79,4 +79,22 @@ namespace :justask do puts "#{sprintf "%3d", u.id}. #{u.screen_name}" end end + + desc "Fixes the notifications" + task fix_notifications: :environment do + format = '%t (%c/%C) [%b>%i] %e' + total = Notification.count + progress = ProgressBar.create title: 'Processing notifications', format: format, starting_at: 0, total: total + destroyed_count = 0 + + Notification.all.each do |n| + if n.target.nil? + n.destroy + destroyed_count += 1 + end + progress.increment + end + + puts "\nPurged #{destroyed_count} dead notifications." + end end From 23746221d43275126e2d888d6d3787321a3e4e8e Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 19 Dec 2014 23:21:15 +0100 Subject: [PATCH 13/53] removed \n --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 6a893c89..7f7ed899 100644 --- a/Rakefile +++ b/Rakefile @@ -95,6 +95,6 @@ namespace :justask do progress.increment end - puts "\nPurged #{destroyed_count} dead notifications." + puts "Purged #{destroyed_count} dead notifications." end end From 7543da2701df142afb49189958c34c94e0b0f07e Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:33:42 +0100 Subject: [PATCH 14/53] move profile things into something different --- app/assets/stylesheets/scss/user.scss | 7 +++++++ app/views/user/_profile_info.html.haml | 21 ++------------------- app/views/user/_stats.html.haml | 21 +++++++++++++++++++++ 3 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 app/views/user/_stats.html.haml diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 8e51907e..6b02e728 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -33,4 +33,11 @@ height: 40vh; background-color: darken($navbar-inverse-bg, 10%); background-size: cover; +} + +.profile--panel .panel-heading { + color: $brand-primary; + border-bottom: 2px solid $brand-primary; + background-color: #fff; + text-transform: uppercase; } \ No newline at end of file diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index 0489c121..a9c59c48 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -23,22 +23,5 @@ %p.profile--text %i.fa.fa-location-arrow = @user.location - .row - %a{href: show_user_followers_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#follower-count= @user.follower_count - %h6.entry-subtext Followers - %a{href: show_user_friends_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#friend-count= @user.friend_count - %h6.entry-subtext Following - .row - %a{href: show_user_questions_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#asked-count= @user.asked_count - %h6.entry-subtext Questions - %a{href: show_user_profile_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#answered-count= @user.answered_count - %h6.entry-subtext Answers - = render 'user/actions', user: @user, type: :follower \ No newline at end of file + = render 'user/actions', user: @user, type: :follower += render 'user/stats', user: @user \ No newline at end of file diff --git a/app/views/user/_stats.html.haml b/app/views/user/_stats.html.haml new file mode 100644 index 00000000..2660d7ed --- /dev/null +++ b/app/views/user/_stats.html.haml @@ -0,0 +1,21 @@ +.panel.panel-default.profile--panel + .panel-heading + %h3.panel-title Stats + .row + %a{href: show_user_followers_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#follower-count= @user.follower_count + %h6.entry-subtext Followers + %a{href: show_user_friends_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#friend-count= @user.friend_count + %h6.entry-subtext Following + .row + %a{href: show_user_questions_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#asked-count= @user.asked_count + %h6.entry-subtext Questions + %a{href: show_user_profile_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#answered-count= @user.answered_count + %h6.entry-subtext Answers \ No newline at end of file From b074abad4dcfbfd5f9041d74ea5c4e220923e85b Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:35:54 +0100 Subject: [PATCH 15/53] fuck panel-body --- app/views/user/_stats.html.haml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/views/user/_stats.html.haml b/app/views/user/_stats.html.haml index 2660d7ed..cbdf19c5 100644 --- a/app/views/user/_stats.html.haml +++ b/app/views/user/_stats.html.haml @@ -1,21 +1,22 @@ .panel.panel-default.profile--panel .panel-heading %h3.panel-title Stats - .row - %a{href: show_user_followers_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#follower-count= @user.follower_count - %h6.entry-subtext Followers - %a{href: show_user_friends_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#friend-count= @user.friend_count - %h6.entry-subtext Following + .panel-body .row - %a{href: show_user_questions_path(@user.screen_name)} + %a{href: show_user_followers_path(@user.screen_name)} .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#asked-count= @user.asked_count - %h6.entry-subtext Questions - %a{href: show_user_profile_path(@user.screen_name)} + %h4.entry-text#follower-count= @user.follower_count + %h6.entry-subtext Followers + %a{href: show_user_friends_path(@user.screen_name)} .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#answered-count= @user.answered_count - %h6.entry-subtext Answers \ No newline at end of file + %h4.entry-text#friend-count= @user.friend_count + %h6.entry-subtext Following + .row + %a{href: show_user_questions_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#asked-count= @user.asked_count + %h6.entry-subtext Questions + %a{href: show_user_profile_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#answered-count= @user.answered_count + %h6.entry-subtext Answers \ No newline at end of file From 5d19a975f30d928f33a52cb3a8c13d8dd39cea8e Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:38:09 +0100 Subject: [PATCH 16/53] indentation is my best friend --- app/views/user/_stats.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/user/_stats.html.haml b/app/views/user/_stats.html.haml index cbdf19c5..b6ff4d5d 100644 --- a/app/views/user/_stats.html.haml +++ b/app/views/user/_stats.html.haml @@ -11,12 +11,12 @@ .col-md-6.col-sm-6.col-xs-6 %h4.entry-text#friend-count= @user.friend_count %h6.entry-subtext Following - .row - %a{href: show_user_questions_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#asked-count= @user.asked_count - %h6.entry-subtext Questions - %a{href: show_user_profile_path(@user.screen_name)} - .col-md-6.col-sm-6.col-xs-6 - %h4.entry-text#answered-count= @user.answered_count - %h6.entry-subtext Answers \ No newline at end of file + .row + %a{href: show_user_questions_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#asked-count= @user.asked_count + %h6.entry-subtext Questions + %a{href: show_user_profile_path(@user.screen_name)} + .col-md-6.col-sm-6.col-xs-6 + %h4.entry-text#answered-count= @user.answered_count + %h6.entry-subtext Answers \ No newline at end of file From cc3dcdddd5f6e818b657f597a15f549843229820 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Fri, 19 Dec 2014 23:41:15 +0100 Subject: [PATCH 17/53] more view fixes --- app/assets/stylesheets/scss/user.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 6b02e728..3b6b19fa 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -40,4 +40,8 @@ border-bottom: 2px solid $brand-primary; background-color: #fff; text-transform: uppercase; +} + +.profile--panel .panel-body { + padding-top: 0px; } \ No newline at end of file From 368949a031f3a2b83d7c92a5a9ceac7e02090837 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 20 Dec 2014 00:03:07 +0100 Subject: [PATCH 18/53] fix design stuff --- app/views/user/questions.html.haml | 3 ++- app/views/user/show_follow.html.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index ef62b70c..b70324e7 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -4,7 +4,8 @@ = render 'user/profile_info' .hidden-xs= render 'shared/links' .col-md-9.col-xs-12.col-sm-9 - %h1.j2-lh= @title + %h1.j2-lh.hidden-xs= @title + %h1.visible-xs= @title #questions - @questions.each do |q| = render 'shared/question', q: q diff --git a/app/views/user/show_follow.html.haml b/app/views/user/show_follow.html.haml index 89e428de..c7c0cdea 100644 --- a/app/views/user/show_follow.html.haml +++ b/app/views/user/show_follow.html.haml @@ -4,7 +4,8 @@ = render 'user/profile_info' .hidden-xs= render 'shared/links' .col-md-9.col-xs-12.col-sm-9 - %h1.j2-lh= @title + %h1.j2-lh.hidden-xs= @title + %h1.visible-xs= @title #users - @users.each do |user| .col-sm-6 From 5aa6248cb135f28937668590316be30204b57183 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 20 Dec 2014 01:37:05 +0100 Subject: [PATCH 19/53] icon bar animation shows up when you have new notifications --- app/views/layouts/_header.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 977f37c9..32bab7a8 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -4,7 +4,7 @@ %button.navbar-toggle{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"} %span.sr-only Toggle navigation - if user_signed_in? - - unless inbox_count.nil? + - unless inbox_count.nil? or notification_count.nil? %span.icon-bar.navbar--inbox-animation %span.icon-bar.navbar--inbox-animation %span.icon-bar.navbar--inbox-animation From ba9b6d1e1288afee205168f37a4a9cf6a2bb441b Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 20 Dec 2014 02:14:27 +0100 Subject: [PATCH 20/53] add link to question/answer in question display --- app/views/shared/_question.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index f1d6100e..d2b79ee3 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -5,8 +5,9 @@ %h6.media-heading.text-muted.answerbox--question-user = user_screen_name q.user asked - = time_ago_in_words(q.created_at) - ago + %a{href: show_user_question_path(q.user.screen_name, q.id)} + = time_ago_in_words(q.created_at) + ago - if q.answer_count > 1 · %a{href: show_user_question_path(q.user.screen_name, q.id)} From 000fa09a5e29177e1c0d07a880937b5491947899 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 20 Dec 2014 14:37:14 +0100 Subject: [PATCH 21/53] restructure inbox design --- app/assets/stylesheets/scss/user.scss | 14 ++++++++++++++ app/views/inbox/show.html.haml | 20 +++++++++++++------- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 3b6b19fa..896a8f4b 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -44,4 +44,18 @@ .profile--panel .panel-body { padding-top: 0px; +} + +.inbox--panel .panel-heading { + color: $brand-info; + border-bottom: 2px solid $brand-info; + background-color: #fff; + text-transform: uppercase; +} + +.warning--panel .panel-heading { + color: $brand-danger; + border-bottom: 2px solid $brand-danger; + background-color: #fff; + text-transform: uppercase; } \ No newline at end of file diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 7506b491..a71ab125 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -1,12 +1,18 @@ .container.j2-page + .row + .col-md-3.col-xs-12.col-sm-3 + .panel.panel-default.inbox--panel + .panel-heading + %h3 Out of questions? + .panel-body + %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question + .panel.panel-default.warning--panel + .panel-heading + %h3 Actions + .panel-body + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions + .col-md-9.col-xs-12.col-sm-9 = render 'layouts/messages' - .alert.alert-info - .row - .col-md-9.col-sm-8.col-xs-12 - Out of questions? - .col-md-3.col-sm-5.col-xs-12 - %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question - #entries - @inbox.each do |i| = render 'inbox/entry', i: i From 55f1680c18c23a34e9901c1b5fdc4405a5faa94d Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 20 Dec 2014 16:15:59 +0100 Subject: [PATCH 22/53] hide delete inbox for now --- app/views/inbox/show.html.haml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index a71ab125..d1e91e77 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -6,11 +6,12 @@ %h3 Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question - .panel.panel-default.warning--panel - .panel-heading - %h3 Actions - .panel-body - %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions + / + .panel.panel-default.warning--panel + .panel-heading + %h3 Actions + .panel-body + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions .col-md-9.col-xs-12.col-sm-9 = render 'layouts/messages' #entries From 1ba34c59d0c46d3b3ad168b0e0eb2d8a63fca5bf Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 13:41:57 +0100 Subject: [PATCH 23/53] added "delete all questions" button thing --- app/assets/javascripts/inbox.coffee | 25 ++++++++++++++++++++++++ app/controllers/ajax/inbox_controller.rb | 16 +++++++++++++++ app/views/inbox/show.html.haml | 23 +++++++++++----------- config/routes.rb | 1 + 4 files changed, 53 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index 87bd87e9..100f5d5c 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -14,12 +14,36 @@ complete: (jqxhr, status) -> btn.button "reset" + +($ document).on "click", "button#ib-delete-all", -> + if confirm 'Are you sure?' + btn = ($ this) + btn.button "loading" + $.ajax + url: '/ajax/delete_all_inbox' + type: 'POST' + dataType: 'json' + success: (data, status, jqxhr) -> + if data.success + entries = ($ "div#entries") + entries.slideUp 400, -> + entries.html("Nothing to see here.") + entries.fadeIn() + btn.attr("disabled", "disabled") + error: (jqxhr, status, error) -> + console.log jqxhr, status, error + showNotification "An error occurred, a developer should check the console for details", false + complete: (jqxhr, status) -> + btn.button "reset" + + $(document).on "keydown", "textarea[name=ib-answer]", (evt) -> iid = $(this)[0].dataset.id if evt.keyCode == 13 and evt.ctrlKey # trigger warning: $("button[name=ib-answer][data-ib-id=#{iid}]").trigger 'click' + $(document).on "click", "button[name=ib-answer]", -> btn = $(this) btn.button "loading" @@ -48,6 +72,7 @@ $(document).on "click", "button[name=ib-answer]", -> btn.button "reset" $("textarea[name=ib-answer][data-id=#{iid}]").removeAttr "readonly" + $(document).on "click", "button[name=ib-destroy]", -> if confirm 'Are you sure?' btn = $(this) diff --git a/app/controllers/ajax/inbox_controller.rb b/app/controllers/ajax/inbox_controller.rb index 88393659..21ff83dc 100644 --- a/app/controllers/ajax/inbox_controller.rb +++ b/app/controllers/ajax/inbox_controller.rb @@ -85,4 +85,20 @@ class Ajax::InboxController < ApplicationController @message = "Successfully deleted question." @success = true end + + def remove_all + begin + Inbox.where(user: current_user).each { |i| i.remove } + rescue + @status = :err + @message = "An error occurred" + @success = false + return + end + + @status = :okay + @message = "Successfully deleted questions." + @success = true + render 'ajax/inbox/remove' + end end diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index d1e91e77..4a432471 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -6,21 +6,20 @@ %h3 Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question - / - .panel.panel-default.warning--panel - .panel-heading - %h3 Actions - .panel-body - %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions + .panel.panel-default.warning--panel + .panel-heading + %h3 Actions + .panel-body + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions .col-md-9.col-xs-12.col-sm-9 - = render 'layouts/messages' - #entries - - @inbox.each do |i| - = render 'inbox/entry', i: i + = render 'layouts/messages' + #entries + - @inbox.each do |i| + = render 'inbox/entry', i: i - - if @inbox.empty? + - if @inbox.empty? - Nothing to see here. + Nothing to see here. = render "shared/links" - @inbox.update_all(new: false) \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 663b0705..cc6ccb8a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -46,6 +46,7 @@ Rails.application.routes.draw do match '/answer', to: 'inbox#destroy', via: :post, as: :answer match '/generate_question', to: 'inbox#create', via: :post, as: :generate_question match '/delete_inbox', to: 'inbox#remove', via: :post, as: :delete_inbox + match '/delete_all_inbox', to: 'inbox#remove_all', via: :post, as: :delete_all_inbox match '/destroy_answer', to: 'answer#destroy', via: :post, as: :destroy_answer match '/create_friend', to: 'friend#create', via: :post, as: :create_friend match '/destroy_friend', to: 'friend#destroy', via: :post, as: :destroy_friend From 7a1879024196b69ade12b9d771f26d4e93a6420a Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 14:11:35 +0100 Subject: [PATCH 24/53] added disable attribute if there are no questions in the inbox --- app/assets/javascripts/inbox.coffee | 5 ++++- app/views/inbox/show.html.haml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index 100f5d5c..b4b28998 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -19,22 +19,25 @@ if confirm 'Are you sure?' btn = ($ this) btn.button "loading" + succ = no $.ajax url: '/ajax/delete_all_inbox' type: 'POST' dataType: 'json' success: (data, status, jqxhr) -> if data.success + succ = yes entries = ($ "div#entries") entries.slideUp 400, -> entries.html("Nothing to see here.") entries.fadeIn() - btn.attr("disabled", "disabled") error: (jqxhr, status, error) -> console.log jqxhr, status, error showNotification "An error occurred, a developer should check the console for details", false complete: (jqxhr, status) -> btn.button "reset" + if succ + btn.attr "disabled", "disabled" # this doesn't really work like I wanted it to… $(document).on "keydown", "textarea[name=ib-answer]", (evt) -> diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 4a432471..a585a294 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -10,7 +10,7 @@ .panel-heading %h3 Actions .panel-body - %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all'} Delete all questions + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (@inbox.empty? ? 'disabled' : nil)} Delete all questions .col-md-9.col-xs-12.col-sm-9 = render 'layouts/messages' #entries From dc0b105b4600843a40bdad03c7b92a05237f5a75 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 14:28:33 +0100 Subject: [PATCH 25/53] added .panel-title --- app/views/inbox/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index a585a294..afce224b 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -3,12 +3,12 @@ .col-md-3.col-xs-12.col-sm-3 .panel.panel-default.inbox--panel .panel-heading - %h3 Out of questions? + %h3.panel-title Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question .panel.panel-default.warning--panel .panel-heading - %h3 Actions + %h3.panel-title Actions .panel-body %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (@inbox.empty? ? 'disabled' : nil)} Delete all questions .col-md-9.col-xs-12.col-sm-9 From 36f069d9589605324a3d71d474b4dac7c15e23e5 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 15:31:18 +0100 Subject: [PATCH 26/53] modified error pages a bit --- public/404.html | 110 ++++++++++++++++++------------- public/422.html | 110 ++++++++++++++++++------------- public/500.html | 112 +++++++++++++++++++------------- public/502.html | 86 ++++++++++++++++++++++++ public/images/angry_unicorn.png | Bin 0 -> 37581 bytes 5 files changed, 282 insertions(+), 136 deletions(-) create mode 100644 public/502.html create mode 100644 public/images/angry_unicorn.png diff --git a/public/404.html b/public/404.html index 5503b7e7..220d07c4 100644 --- a/public/404.html +++ b/public/404.html @@ -1,59 +1,75 @@ - The page you were looking for doesn't exist (404) + Page not found!!1! (404) -
@@ -62,5 +78,9 @@

If you think you found a bug, please let us know.

+ diff --git a/public/422.html b/public/422.html index 1c971ab3..b364fad1 100644 --- a/public/422.html +++ b/public/422.html @@ -4,63 +4,83 @@ The change you wanted was rejected (422) -

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

-

If you think you found a bug, please let us know.

+

If you think you found a bug, please please let us know.

+
+ diff --git a/public/500.html b/public/500.html index eb240d94..c528dbb8 100644 --- a/public/500.html +++ b/public/500.html @@ -4,62 +4,82 @@ We're sorry, but something went wrong (500) -
-

We're sorry, but something went wrong.

+

Looks like something went wrong!

-

If you think you found a bug, please let us know.

+

This usually happens due to an error in our code. If you think you found a bug, please let us know.

+
+ diff --git a/public/502.html b/public/502.html new file mode 100644 index 00000000..f92daf76 --- /dev/null +++ b/public/502.html @@ -0,0 +1,86 @@ + + + + Unicorn! (502) + + + + +
+
+

This page takes way too long to load!

+ Unicorn +
+

Sorry about that. Please try refreshing and contact us if the problem persists.

+
+ + + diff --git a/public/images/angry_unicorn.png b/public/images/angry_unicorn.png new file mode 100644 index 0000000000000000000000000000000000000000..86b2beb60dcb0b237b33b22ebf2e3451cfa932e8 GIT binary patch literal 37581 zcmV(~K+nI4P)n=-25L8qYL5hGN&E6Bc(b!Gw z1?kO>f}&WXVsG^N`G4k_*(|Z-k}IB3eZAhV8D@7DSf2NM%k%8`Q1(N{5BPcTI&mZq zXFqr^?ily|8}KtChNNaccpn}J@_?K8kkpfi><90~13@0}J-U%21jIJ`!Ta$*kUPL5 zp*-L(NzYo|4g4{Vi zBkg1ZdGjvmQhAcENpmKp$fO)|-!jMe$5r65#rOMQeIUr4>2BVz2jWOF+S#VzYo?2g4`J%C2uMFaRdt2i2r}#`#ny6 zuS6^_rcFs?Be_6Yr6`d>(#RO{#p`C+8f=ftyVU^vvC`C9668G3ed&H5tPcdabCF{L znMOiL3&B{K4(>bto3H;Y=}r1kfG;?>a~Tn;Ir!Tp8N~N`)EMKRP+|O2DolUb3`;(< zL{5l3s^__(?yyD@LvW=+jR|}XUuV+&K2RSBa%b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un, 21 Dec 2014 15:32:49 +0100 Subject: [PATCH 27/53] the 404 page is shown again if an user was not found --- app/controllers/user_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 740e35a4..cc560d54 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -1,6 +1,6 @@ class UserController < ApplicationController def show - @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first + @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @answers = @user.answers.reverse_order.paginate(page: params[:page]) respond_to do |format| format.html @@ -23,7 +23,7 @@ class UserController < ApplicationController def followers @title = 'Followers' - @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first + @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @users = @user.followers.reverse_order.paginate(page: params[:page]) @type = :friend render 'show_follow' @@ -31,7 +31,7 @@ class UserController < ApplicationController def friends @title = 'Following' - @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first + @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @users = @user.friends.reverse_order.paginate(page: params[:page]) @type = :friend render 'show_follow' @@ -39,7 +39,7 @@ class UserController < ApplicationController def questions @title = 'Questions' - @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first + @user = User.where('LOWER(screen_name) = ?', params[:username].downcase).first! @questions = @user.questions.where(author_is_anonymous: false).reverse_order.paginate(page: params[:page]) end end From 2169a866154c86a5781f2493ef626f7d1aa2f161 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 15:36:57 +0100 Subject: [PATCH 28/53] added a count --- app/assets/javascripts/inbox.coffee | 6 ++++-- app/views/inbox/show.html.haml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index b4b28998..39c32445 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -16,8 +16,9 @@ ($ document).on "click", "button#ib-delete-all", -> - if confirm 'Are you sure?' - btn = ($ this) + btn = ($ this) + count = btn[0].dataset.ibCount + if confirm "Really delete #{count} questions?" btn.button "loading" succ = no $.ajax @@ -38,6 +39,7 @@ btn.button "reset" if succ btn.attr "disabled", "disabled" # this doesn't really work like I wanted it to… + btn[0].dataset.ibCount = 0 $(document).on "keydown", "textarea[name=ib-answer]", (evt) -> diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index afce224b..22394fe5 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -10,7 +10,7 @@ .panel-heading %h3.panel-title Actions .panel-body - %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (@inbox.empty? ? 'disabled' : nil)} Delete all questions + %button.btn.btn-block.btn-danger{type: :button, id: 'ib-delete-all', disabled: (@inbox.empty? ? 'disabled' : nil), data: { ib_count: @inbox.count }} Delete all questions .col-md-9.col-xs-12.col-sm-9 = render 'layouts/messages' #entries From e8f4c2662ac962af09f4349344e1f01c5a988ccb Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 16:40:10 +0100 Subject: [PATCH 29/53] goddamnit Karim --- app/assets/javascripts/inbox.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index 39c32445..32abdec6 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -8,6 +8,10 @@ success: (data, status, jqxhr) -> if data.success ($ "div#entries").prepend(data.render) # TODO: slideDown or something + # GitHub issue #26: + del_all_btn = ($ "button#ib-delete-all") + del_all_btn.removeAttr 'disabled' + del_all_btn[0].dataset.ibCount = 1 error: (jqxhr, status, error) -> console.log jqxhr, status, error showNotification "An error occurred, a developer should check the console for details", false From 6ac9af787e059648fddf15277b765f06882791d6 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 22:12:59 +0100 Subject: [PATCH 30/53] added Capistrano --- .capistrano/metrics | 1 + Capfile | 24 ++++++++++++++ Gemfile | 5 +++ Gemfile.lock | 26 +++++++++++++++ bin/cap | 16 +++++++++ bin/capify | 16 +++++++++ config/deploy.rb | 31 ++++++++++++++++++ config/deploy/production.rb | 7 ++++ config/deploy/staging.rb | 45 ++++++++++++++++++++++++++ lib/{assets => capistrano/tasks}/.keep | 0 spec/factories/notifications.rb | 9 ++++++ spec/models/notification_spec.rb | 5 +++ 12 files changed, 185 insertions(+) create mode 100644 .capistrano/metrics create mode 100644 Capfile create mode 100755 bin/cap create mode 100755 bin/capify create mode 100644 config/deploy.rb create mode 100644 config/deploy/production.rb create mode 100644 config/deploy/staging.rb rename lib/{assets => capistrano/tasks}/.keep (100%) create mode 100644 spec/factories/notifications.rb create mode 100644 spec/models/notification_spec.rb diff --git a/.capistrano/metrics b/.capistrano/metrics new file mode 100644 index 00000000..94a4335e --- /dev/null +++ b/.capistrano/metrics @@ -0,0 +1 @@ +full \ No newline at end of file diff --git a/Capfile b/Capfile new file mode 100644 index 00000000..6e64843e --- /dev/null +++ b/Capfile @@ -0,0 +1,24 @@ +# Load DSL and set up stages +require 'capistrano/setup' + +# Include default deployment tasks +require 'capistrano/deploy' + +# Include tasks from other gems included in your Gemfile +# +# For documentation on these, see for example: +# +# https://github.com/capistrano/rvm +# https://github.com/capistrano/rbenv +# https://github.com/capistrano/chruby +# https://github.com/capistrano/bundler +# https://github.com/capistrano/rails +# https://github.com/capistrano/passenger +# +require 'capistrano/rvm' +require 'capistrano/bundler' +require 'capistrano/rails' +require 'capistrano/console' + +# Load custom tasks from `lib/capistrano/tasks' if you have any defined +Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } diff --git a/Gemfile b/Gemfile index 3db7a191..af1d4a74 100644 --- a/Gemfile +++ b/Gemfile @@ -48,6 +48,11 @@ gem 'foreman' group :development do gem 'spring' + + # Capistrano for deployment + gem 'capistrano', '~> 3.1' + gem 'capistrano-rvm', group: :rvm + gem 'capistrano-rails', '~> 1.1' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 438e7b2f..c19e111c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,6 +44,21 @@ GEM railties (>= 3.1) buftok (0.2.0) builder (3.2.2) + capistrano (3.3.5) + capistrano-stats (~> 1.1.0) + i18n + rake (>= 10.0.0) + sshkit (~> 1.3) + capistrano-bundler (1.1.3) + capistrano (~> 3.1) + sshkit (~> 1.2) + capistrano-rails (1.1.2) + capistrano (~> 3.1) + capistrano-bundler (~> 1.1) + capistrano-rvm (0.1.2) + capistrano (~> 3.0) + sshkit (~> 1.2) + capistrano-stats (1.1.1) capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -60,6 +75,7 @@ GEM coffee-script-source execjs coffee-script-source (1.8.0) + colorize (0.7.5) connection_pool (2.1.0) daemons (1.1.9) database_cleaner (1.3.0) @@ -131,6 +147,9 @@ GEM mysql2 (0.3.17) naught (1.0.0) nested_form (0.3.2) + net-scp (1.2.1) + net-ssh (>= 2.6.5) + net-ssh (2.9.1) nokogiri (1.6.5) mini_portile (~> 0.6.0) nprogress-rails (0.1.6.3) @@ -254,6 +273,10 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) + sshkit (1.6.1) + colorize (>= 0.7.0) + net-scp (>= 1.1.2) + net-ssh (>= 2.8.0) thin (1.6.3) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0) @@ -302,6 +325,9 @@ DEPENDENCIES bootstrap-sass (~> 3.2.0.1) bootstrap_form bootswatch-rails + capistrano (~> 3.1) + capistrano-rails (~> 1.1) + capistrano-rvm capybara coffee-rails (~> 4.1.0) database_cleaner diff --git a/bin/cap b/bin/cap new file mode 100755 index 00000000..30352d4d --- /dev/null +++ b/bin/cap @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'cap' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('capistrano', 'cap') diff --git a/bin/capify b/bin/capify new file mode 100755 index 00000000..0f486e81 --- /dev/null +++ b/bin/capify @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'capify' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('capistrano', 'capify') diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 00000000..01f44e6d --- /dev/null +++ b/config/deploy.rb @@ -0,0 +1,31 @@ +# config valid only for current version of Capistrano +lock '3.3.5' + +set :application, 'justask' +set :repo_url, 'git@git.rrerr.net:justask/justask.git' +ask :branch, :master +set :deploy_to, '/home/justask/cap/' +set :scm, :git +set :format, :pretty +set :log_level, :debug + +# RVM +set :rvm_type, :user +set :rvm_ruby_version, '2.0.0' + +# Rails +set :conditionally_migrate, true + +namespace :deploy do + + after :updated do + + end + + after :restart, :clear_cache do + on roles(:web), in: :groups, limit: 3, wait: 10 do + + end + end + +end diff --git a/config/deploy/production.rb b/config/deploy/production.rb new file mode 100644 index 00000000..d79adf18 --- /dev/null +++ b/config/deploy/production.rb @@ -0,0 +1,7 @@ +server 'rrerr.net', user: 'justask', roles: %w{web app} + +set :ssh_options, { + keys: %w(~/.ssh/id_rsa), + forward_agent: false, + auth_methods: %w(publickey) +} diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb new file mode 100644 index 00000000..e664a6cd --- /dev/null +++ b/config/deploy/staging.rb @@ -0,0 +1,45 @@ +# Simple Role Syntax +# ================== +# Supports bulk-adding hosts to roles, the primary server in each group +# is considered to be the first unless any hosts have the primary +# property set. Don't declare `role :all`, it's a meta role. + +role :app, %w{deploy@example.com} +role :web, %w{deploy@example.com} +role :db, %w{deploy@example.com} + + +# Extended Server Syntax +# ====================== +# This can be used to drop a more detailed server definition into the +# server list. The second argument is a, or duck-types, Hash and is +# used to set extended properties on the server. + +server 'example.com', user: 'deploy', roles: %w{web app}, my_property: :my_value + + +# Custom SSH Options +# ================== +# You may pass any option but keep in mind that net/ssh understands a +# limited set of options, consult[net/ssh documentation](http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start). +# +# Global options +# -------------- +# set :ssh_options, { +# keys: %w(/home/rlisowski/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(password) +# } +# +# And/or per server (overrides global) +# ------------------------------------ +# server 'example.com', +# user: 'user_name', +# roles: %w{web app}, +# ssh_options: { +# user: 'user_name', # overrides user setting above +# keys: %w(/home/user_name/.ssh/id_rsa), +# forward_agent: false, +# auth_methods: %w(publickey password) +# # password: 'please use keys' +# } diff --git a/lib/assets/.keep b/lib/capistrano/tasks/.keep similarity index 100% rename from lib/assets/.keep rename to lib/capistrano/tasks/.keep diff --git a/spec/factories/notifications.rb b/spec/factories/notifications.rb new file mode 100644 index 00000000..79eaba4b --- /dev/null +++ b/spec/factories/notifications.rb @@ -0,0 +1,9 @@ +FactoryGirl.define do + factory :notification do + target_type "MyString" +target_id 1 +recipient_id 1 +new false + end + +end diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb new file mode 100644 index 00000000..f79213f9 --- /dev/null +++ b/spec/models/notification_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Notification, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end From b45b273f50a83553f43ee42fd4f4a63e9d907f79 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 22:29:52 +0100 Subject: [PATCH 31/53] I TAKE A LOOK AT MY ENORMOUS MEMES --- .../javascripts/application.js.erb.coffee | 1 + app/assets/javascripts/memes.coffee | 5 + lib/assets/javascripts/cheet.js | 279 ++++++++++++++++++ 3 files changed, 285 insertions(+) create mode 100644 app/assets/javascripts/memes.coffee create mode 100644 lib/assets/javascripts/cheet.js diff --git a/app/assets/javascripts/application.js.erb.coffee b/app/assets/javascripts/application.js.erb.coffee index 3693840e..f37ea0b7 100644 --- a/app/assets/javascripts/application.js.erb.coffee +++ b/app/assets/javascripts/application.js.erb.coffee @@ -6,6 +6,7 @@ #= require nprogress #= require nprogress-turbolinks #= require growl +#= require cheet #= require_tree . NProgress.configure diff --git a/app/assets/javascripts/memes.coffee b/app/assets/javascripts/memes.coffee new file mode 100644 index 00000000..6f01e963 --- /dev/null +++ b/app/assets/javascripts/memes.coffee @@ -0,0 +1,5 @@ +memes = 'up up down down left right left right b a' +cheet memes, -> + cheet.disable memes + ($ "body").addClass 'fa-spin' + ($ "p.answerbox--question-text").each (i) -> ($ this).html ":^)" \ No newline at end of file diff --git a/lib/assets/javascripts/cheet.js b/lib/assets/javascripts/cheet.js new file mode 100644 index 00000000..dd0806f3 --- /dev/null +++ b/lib/assets/javascripts/cheet.js @@ -0,0 +1,279 @@ +/* +The MIT License (MIT) + +Copyright (c) 2013 Louis Acresti + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + + +(function (global) { + 'use strict'; + + var cheet, + sequences = {}, + keys = { + backspace: 8, + tab: 9, + enter: 13, + 'return': 13, + shift: 16, + '⇧': 16, + control: 17, + ctrl: 17, + '⌃': 17, + alt: 18, + option: 18, + '⌥': 18, + pause: 19, + capslock: 20, + esc: 27, + space: 32, + pageup: 33, + pagedown: 34, + end: 35, + home: 36, + left: 37, + L: 37, + '←': 37, + up: 38, + U: 38, + '↑': 38, + right: 39, + R: 39, + '→': 39, + down: 40, + D: 40, + '↓': 40, + insert: 45, + 'delete': 46, + '0': 48, + '1': 49, + '2': 50, + '3': 51, + '4': 52, + '5': 53, + '6': 54, + '7': 55, + '8': 56, + '9': 57, + a: 65, + b: 66, + c: 67, + d: 68, + e: 69, + f: 70, + g: 71, + h: 72, + i: 73, + j: 74, + k: 75, + l: 76, + m: 77, + n: 78, + o: 79, + p: 80, + q: 81, + r: 82, + s: 83, + t: 84, + u: 85, + v: 86, + w: 87, + x: 88, + y: 89, + z: 90, + '⌘': 91, + command: 91, + kp_0: 96, + kp_1: 97, + kp_2: 98, + kp_3: 99, + kp_4: 100, + kp_5: 101, + kp_6: 102, + kp_7: 103, + kp_8: 104, + kp_9: 105, + kp_multiply: 106, + kp_plus: 107, + kp_minus: 109, + kp_decimal: 110, + kp_divide: 111, + f1: 112, + f2: 113, + f3: 114, + f4: 115, + f5: 116, + f6: 117, + f7: 118, + f8: 119, + f9: 120, + f10: 121, + f11: 122, + f12: 123, + equal: 187, + '=': 187, + comma: 188, + ',': 188, + minus: 189, + '-': 189, + period: 190, + '.': 190 + }, + Sequence, + NOOP = function NOOP() {}, + held = {}; + + Sequence = function Sequence (str, next, fail, done) { + var i; + + this.str = str; + this.next = next ? next : NOOP; + this.fail = fail ? fail : NOOP; + this.done = done ? done : NOOP; + + this.seq = str.split(' '); + this.keys = []; + + for (i=0; i 0) { + this.reset(); + this.fail(this.str); + cheet.__fail(this.str); + } + return; + } + + this.next(this.str, this.seq[i], i, this.seq); + cheet.__next(this.str, this.seq[i], i, this.seq); + + if (++this.idx === this.keys.length) { + this.done(this.str); + cheet.__done(this.str); + this.reset(); + } + }; + + Sequence.prototype.reset = function () { + this.idx = 0; + }; + + cheet = function cheet (str, handlers) { + var next, fail, done; + + if (typeof handlers === 'function') { + done = handlers; + } else if (handlers !== null && handlers !== undefined) { + next = handlers.next; + fail = handlers.fail; + done = handlers.done; + } + + sequences[str] = new Sequence(str, next, fail, done); + }; + + cheet.disable = function disable (str) { + delete sequences[str]; + }; + + function keydown (e) { + var id, + k = e ? e.keyCode : event.keyCode; + + if (held[k]) return; + held[k] = true; + + for (id in sequences) { + sequences[id].keydown(k); + } + } + + function keyup (e) { + var k = e ? e.keyCode : event.keyCode; + held[k] = false; + } + + function resetHeldKeys (e) { + var k; + for (k in held) { + held[k] = false; + } + } + + function on (obj, type, fn) { + if (obj.addEventListener) { + obj.addEventListener(type, fn, false); + } else if (obj.attachEvent) { + obj['e' + type + fn] = fn; + obj[type + fn] = function () { + obj['e' + type + fn](window.event); + }; + obj.attachEvent('on' + type, obj[type + fn]); + } + } + + on(window, 'keydown', keydown); + on(window, 'keyup', keyup); + on(window, 'blur', resetHeldKeys); + on(window, 'focus', resetHeldKeys); + + cheet.__next = NOOP; + cheet.next = function next (fn) { + cheet.__next = fn === null ? NOOP : fn; + }; + + cheet.__fail = NOOP; + cheet.fail = function fail (fn) { + cheet.__fail = fn === null ? NOOP : fn; + }; + + cheet.__done = NOOP; + cheet.done = function done (fn) { + cheet.__done = fn === null ? NOOP : fn; + }; + + cheet.reset = function reset (id) { + var seq = sequences[id]; + if (!(seq instanceof Sequence)) { + console.warn('cheet: Unknown sequence: ' + id); + return; + } + + seq.reset(); + }; + + global.cheet = cheet; + + if (typeof define === 'function' && define.amd) { + define([], function () { return cheet; }); + } else if (typeof module !== 'undefined' && module !== null) { + module.exports = cheet; + } + +})(this); From 2aea87d305f834f8b1d6e4ab7fe14398a8ef819f Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 22:41:14 +0100 Subject: [PATCH 32/53] Meymeys --- app/assets/javascripts/memes.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/memes.coffee b/app/assets/javascripts/memes.coffee index 6f01e963..873d34d0 100644 --- a/app/assets/javascripts/memes.coffee +++ b/app/assets/javascripts/memes.coffee @@ -1,5 +1,3 @@ -memes = 'up up down down left right left right b a' -cheet memes, -> - cheet.disable memes +cheet 'up up down down left right left right b a', -> ($ "body").addClass 'fa-spin' ($ "p.answerbox--question-text").each (i) -> ($ this).html ":^)" \ No newline at end of file From 23af34494e223b6c5f0bd150f8d90818c5996442 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sun, 21 Dec 2014 23:01:21 +0100 Subject: [PATCH 33/53] add share on Twitter button --- app/views/inbox/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index afce224b..8b948093 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -6,6 +6,8 @@ %h3.panel-title Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question + %br + %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_path(@user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From 6201b7043b54e645dd882df5af6dc2b7412562ea Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sun, 21 Dec 2014 23:05:53 +0100 Subject: [PATCH 34/53] how to stupid fix --- app/views/inbox/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 616900d2..0caac770 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -7,7 +7,7 @@ .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question %br - %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_path(@user.screen_name)}"} Share on Twitter + %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_path(current_user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From 40b0097149da34cca56ce8692a852adecc4e32a8 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sun, 21 Dec 2014 23:07:01 +0100 Subject: [PATCH 35/53] more fix --- app/views/inbox/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 0caac770..924df601 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -7,7 +7,7 @@ .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question %br - %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_path(current_user.screen_name)}"} Share on Twitter + %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From 98e9fe098fdc80e76578392d01d10259b2676797 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 23:07:56 +0100 Subject: [PATCH 36/53] Meymeys --- app/views/inbox/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 924df601..29ca2b20 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -7,7 +7,7 @@ .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question %br - %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything?url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter + %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything&url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From 7429aca0440b62915535f100d58b9528ea20bc2a Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sun, 21 Dec 2014 23:09:16 +0100 Subject: [PATCH 37/53] remove br --- app/views/inbox/show.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 29ca2b20..47f39c65 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -6,8 +6,7 @@ %h3.panel-title Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question - %br - %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything&url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter + %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From 22838ebfda36ca2afbddcf5678f657d05f3bc4b3 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 23:10:26 +0100 Subject: [PATCH 38/53] Meymeys --- app/views/inbox/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/inbox/show.html.haml b/app/views/inbox/show.html.haml index 47f39c65..2838789d 100644 --- a/app/views/inbox/show.html.haml +++ b/app/views/inbox/show.html.haml @@ -6,7 +6,7 @@ %h3.panel-title Out of questions? .panel-body %button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'} Get new question - %a.btn.btn-block.btn-primary{href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter + %a.btn.btn-block.btn-primary{target: '_blank', href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"} Share on Twitter .panel.panel-default.warning--panel .panel-heading %h3.panel-title Actions From a67acf4097330f628d03ff8677303b90614ce640 Mon Sep 17 00:00:00 2001 From: nilsding Date: Sun, 21 Dec 2014 23:18:36 +0100 Subject: [PATCH 39/53] added iconses!!! --- public/apple-touch-icon.png | Bin 0 -> 8804 bytes public/favicon.ico | Bin 0 -> 1150 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/apple-touch-icon.png diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7d16acd55906a716aef85c74b30161594870ad7b GIT binary patch literal 8804 zcmV-qBAeZbP)005u}1^@s6i_d2*00004XF*Lt006O% z3;baP0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F}00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_03l{cL_t(|+UtzzL$O$C^ zv*__gaetv%-3O;gE%`rmZypI{5{KBvynW+Oe*!#kS#_E zMx>m#j9D;}a-vY~lK~+KNnDbU((?(33Xe=0;svDiW)*=K95W}O+`Et z84+I2tf&glCFBptLLd=|BP<jn|eC!DWh?>eYt z9%(oR0>-G^#8OY=AegpgmiJ;#3K+m_j}Kgu zirzYvh`z)O{t>kgwbF1hDtW{NOh`T>;ee3s7Mhp$u_QHng5f`hKt1y)5%oKURdGnm zQlGexjuleLqa)#n2$)3W8YG$OSQtYj{sXrQ;;CSsR3r-^SFf7opX`u`188hR#Hi%a z*@Yt@U<~r%Z}^hQu{*BBGK+aNfs*m;(xZVO~bKtvbdihUSJ zKMurkGo+G7Pr{4@RLQ408wpgdQR)?T-pIjh@j-{|Lm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3#Y6i05O( zJ&5F3pfvB_5R(WAM5UpzMuJ34hW=MB*R45;Q0uP%gNYWm?S#n(jGTb}1u}_bigOaE zWFTS>nmlI4ln222qzzQFRMqRQ1|d=$0MI)Ri9K7HWaCx2D#p}@GR7_pRI)4$sZX+q zgCa{m-#%2AaRlv{fmCF;d&o$A!iBPqVX)l{QqZ)0upG)VM3;>iW9-BmXBYZ6tdoX{ zgo_xD%)E?AFDfW6cU;LR-HRH7i%2;j*0G44mfsZ+CEs|6=VJoB$YWG;AOY1(8pIPZ zM6%dK42mQly5|phTbxr zr!1}NPn#s7q{1U)^f#AmCT%fJU~;64a}bp6NV9z~jf7-Npl(Bx<0qbv3D?n3rJ=Me zcrc1u4v|Yaj_<5QBHR+805UK!G%YbQEipAzF*!Ol zH99dfD=;xSFfan{7SjL#03~!qSaf7zbY(hiZ)9m^c>ppnF*GePGA%JRR53X^GB!Fg aG%GMMIxsN$mpOs}0000m1^+=isA>v zQbApb;+IwzisCQSyr#{kjZL&^w2eiLX>B>)GwF;$5Tp|ByKnB?bLPBz??kC-@~f;= z@~l?7rzyd8Tidf4s+1r8c#zmTonDRRFjNWtWFmQV>ave>WD30K3>^_RQC`N~p z=ogMc`X!QQ*TSP7o>|r-)-K+%T+VI4@QVv5X5XQ^sTzY1LKy#%N9xi>WNz$4{KSgC z)Y%bj3z2I-qV4C%2dz1IW(~#*L&)6Rg>Q*=WbgVW>+pLvOncIKo8smq%{%@N-W-8a)muK8`FpX2B`x>#!G*m>qGXblpJ9bbx`<|VdAR-14q xPOe1y+BU5(>~rj0u=6YW^$ZJ-#W7|~I5;Pre#g%5|K1;S52t#6&Hunu{V)8qi46b% literal 0 HcmV?d00001 From a09c01cc4483102817eaf4cc18588f9148d2f1e5 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Thu, 25 Dec 2014 14:22:49 +0100 Subject: [PATCH 40/53] fixed text display for anon questionbox --- app/views/shared/_questionbox.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_questionbox.html.haml b/app/views/shared/_questionbox.html.haml index dfaff539..e9d066b7 100644 --- a/app/views/shared/_questionbox.html.haml +++ b/app/views/shared/_questionbox.html.haml @@ -23,7 +23,7 @@ - unless user_signed_in? #question-box-promote.row{:style => "display: none;"} .row - .col-xs-12 + .col-xs-12.text-center %strong Your question has been sent. .row .col-sm-1 From 4f777968e529ee4259c9b4f36be931175dfada8a Mon Sep 17 00:00:00 2001 From: Andreas N Date: Thu, 25 Dec 2014 14:26:35 +0100 Subject: [PATCH 41/53] readded links to questions on user profile --- app/views/shared/_answerbox.html.haml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 791f7e7f..54bcfcae 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -8,9 +8,15 @@ .media-body %h6.text-muted.media-heading.answerbox--question-user = user_screen_name a.question.user, a.question.author_is_anonymous - asked - = time_ago_in_words(a.question.created_at) - ago + - if @user.nil? + asked + = time_ago_in_words(a.question.created_at) + ago + - else + asked + %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} + = time_ago_in_words(a.question.created_at) + ago - unless a.question.author_is_anonymous - if a.question.answer_count > 1 · From de1ef57a8af258201ad4d7782cc6e4568d26d493 Mon Sep 17 00:00:00 2001 From: nilsding Date: Thu, 25 Dec 2014 15:13:52 +0100 Subject: [PATCH 42/53] dose that work --- app/views/shared/_answerbox.html.haml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 54bcfcae..09a72c83 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -8,15 +8,13 @@ .media-body %h6.text-muted.media-heading.answerbox--question-user = user_screen_name a.question.user, a.question.author_is_anonymous - - if @user.nil? - asked + asked + - if @user.nil? and a.question.author_is_anonymous = time_ago_in_words(a.question.created_at) - ago - else - asked %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} = time_ago_in_words(a.question.created_at) - ago + ago - unless a.question.author_is_anonymous - if a.question.answer_count > 1 · From 4e2cfd5188b17ac598abfb60003dcbe9d9a3a3cc Mon Sep 17 00:00:00 2001 From: nilsding Date: Thu, 25 Dec 2014 15:16:10 +0100 Subject: [PATCH 43/53] ??? --- app/views/shared/_answerbox.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 09a72c83..8673f2ce 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -9,7 +9,7 @@ %h6.text-muted.media-heading.answerbox--question-user = user_screen_name a.question.user, a.question.author_is_anonymous asked - - if @user.nil? and a.question.author_is_anonymous + - if @user.nil? and a.question.author_is_anonymous and !a.question.user.nil? = time_ago_in_words(a.question.created_at) - else %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} From b927b3bc87f4e74030dbde62ccda83d250601a70 Mon Sep 17 00:00:00 2001 From: nilsding Date: Thu, 25 Dec 2014 15:16:57 +0100 Subject: [PATCH 44/53] orrrr --- app/views/shared/_answerbox.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 8673f2ce..f703c030 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -9,7 +9,7 @@ %h6.text-muted.media-heading.answerbox--question-user = user_screen_name a.question.user, a.question.author_is_anonymous asked - - if @user.nil? and a.question.author_is_anonymous and !a.question.user.nil? + - if @user.nil? or a.question.author_is_anonymous = time_ago_in_words(a.question.created_at) - else %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} From e900b794d3969ee4956d85568b5e2efc471f2370 Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Fri, 26 Dec 2014 13:45:29 +0100 Subject: [PATCH 45/53] increased sidebar size on profile --- app/views/user/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/user/show.html.haml b/app/views/user/show.html.haml index 1e6e72eb..ff2c55be 100644 --- a/app/views/user/show.html.haml +++ b/app/views/user/show.html.haml @@ -1,9 +1,9 @@ .profile--header .container.j2-page - .col-md-3.col-xs-12.col-sm-3 + .col-md-4.col-xs-12.col-sm-4 = render 'user/profile_info' .hidden-xs= render 'shared/links' - .col-md-9.col-xs-12.col-sm-9 + .col-md-8.col-xs-12.col-sm-8 = render 'shared/questionbox' #answers - @answers.each do |a| From 40dc6a140d821d1c271addb41f7c6d7f0c97deed Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Fri, 26 Dec 2014 13:48:20 +0100 Subject: [PATCH 46/53] fix margin if content is empty --- app/assets/stylesheets/scss/user.scss | 4 ++++ app/views/user/_actions.html.haml | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 896a8f4b..1c04aa9b 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -58,4 +58,8 @@ border-bottom: 2px solid $brand-danger; background-color: #fff; text-transform: uppercase; +} + +.profile--follow-btn { + margin-top: 5px; } \ No newline at end of file diff --git a/app/views/user/_actions.html.haml b/app/views/user/_actions.html.haml index 7a6b277d..730c1e1d 100644 --- a/app/views/user/_actions.html.haml +++ b/app/views/user/_actions.html.haml @@ -1,11 +1,11 @@ - if user_signed_in? - type ||= :nil - if user == current_user - %a.btn.btn-default.btn-block{href: edit_user_profile_path} Edit profile + %a.btn.btn-default.btn-block.profile--follow-btn{href: edit_user_profile_path} Edit profile - else - if current_user.following? user - %button#editprofile.btn.btn-default.btn-block{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }} + %button#editprofile.btn.btn-default.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name }} Unfollow - else - %button#editprofile.btn.btn-primary.btn-block{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }} + %button#editprofile.btn.btn-primary.btn-block.profile--follow-btn{type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name }} Follow \ No newline at end of file From da8e76edb0fb7ec568406e1902895daa77d94cac Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 26 Dec 2014 15:28:53 +0100 Subject: [PATCH 47/53] added follow user spec --- spec/features/users/follow_user_spec.rb | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 spec/features/users/follow_user_spec.rb diff --git a/spec/features/users/follow_user_spec.rb b/spec/features/users/follow_user_spec.rb new file mode 100644 index 00000000..3d03347f --- /dev/null +++ b/spec/features/users/follow_user_spec.rb @@ -0,0 +1,28 @@ +include Warden::Test::Helpers +Warden.test_mode! + +feature "User profile page", :devise do + + after :each do + Warden.test_reset! + end + + scenario "user gets followed", js: true do + me = FactoryGirl.create(:user) + other = FactoryGirl.create(:user) + + login_as me, scope: :user + visit show_user_profile_path(other.screen_name) + page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true + + click_button "Follow" + wait_for_ajax + page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true + + expect(page).to have_text("FOLLOWING") + + click_link 'Followers' + page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_3.png"), full: true + expect(page).to have_text(me.screen_name) + end +end From 32ace00f8428cf95618fbf8e02341c643066e88e Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Fri, 26 Dec 2014 15:32:53 +0100 Subject: [PATCH 48/53] forgot the extra profile pages --- app/views/user/questions.html.haml | 4 ++-- app/views/user/show_follow.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index b70324e7..b271b69a 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -1,9 +1,9 @@ .profile--header .container.j2-page - .col-md-3.col-xs-12.col-sm-3 + .col-md-4.col-xs-12.col-sm-4 = render 'user/profile_info' .hidden-xs= render 'shared/links' - .col-md-9.col-xs-12.col-sm-9 + .col-md-8.col-xs-12.col-sm-8 %h1.j2-lh.hidden-xs= @title %h1.visible-xs= @title #questions diff --git a/app/views/user/show_follow.html.haml b/app/views/user/show_follow.html.haml index c7c0cdea..04bd7f2d 100644 --- a/app/views/user/show_follow.html.haml +++ b/app/views/user/show_follow.html.haml @@ -1,9 +1,9 @@ .profile--header .container.j2-page - .col-md-3.col-xs-12.col-sm-3 + .col-md-4.col-xs-12.col-sm-4 = render 'user/profile_info' .hidden-xs= render 'shared/links' - .col-md-9.col-xs-12.col-sm-9 + .col-md-8.col-xs-12.col-sm-8 %h1.j2-lh.hidden-xs= @title %h1.visible-xs= @title #users From 4961a44d59e4340dcff8260996d1966cb5127814 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 27 Dec 2014 00:33:45 +0100 Subject: [PATCH 49/53] add collapsed view for single answerbox --- app/views/shared/_answerbox.html.haml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index f703c030..2a613203 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -49,6 +49,11 @@ .row .col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right = render 'shared/answerbox_buttons', a: a - .panel-footer{id: "ab-comments-section-#{a.id}", style: 'display: none'} - %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a - %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a + -if @display_all.nil? + .panel-footer{id: "ab-comments-section-#{a.id}", style: 'display: none'} + %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a + %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a + - else + .panel-footer{id: "ab-comments-section-#{a.id}"} + %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a + %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a \ No newline at end of file From 20c173442d4fb96898cbd15ead20475cf2a18bbf Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 27 Dec 2014 00:37:42 +0100 Subject: [PATCH 50/53] remove that button --- app/views/shared/_answerbox.html.haml | 2 +- app/views/shared/_answerbox_buttons.html.haml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 2a613203..a09db5bd 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -49,7 +49,7 @@ .row .col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right = render 'shared/answerbox_buttons', a: a - -if @display_all.nil? + - if @display_all.nil? .panel-footer{id: "ab-comments-section-#{a.id}", style: 'display: none'} %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a diff --git a/app/views/shared/_answerbox_buttons.html.haml b/app/views/shared/_answerbox_buttons.html.haml index d2b05016..924036ae 100644 --- a/app/views/shared/_answerbox_buttons.html.haml +++ b/app/views/shared/_answerbox_buttons.html.haml @@ -12,9 +12,10 @@ %button.btn.btn-info.btn-sm{type: :button, name: 'ab-smile', data: { a_id: a.id, action: :smile }} %i.fa.fa-smile-o %span{id: "ab-smile-count-#{a.id}"}= a.smile_count -%button.btn.btn-primary.btn-sm{type: :button, name: 'ab-comments', data: { a_id: a.id, state: :hidden }} - %i.fa.fa-comments - %span{id: "ab-comment-count-#{a.id}"}= a.comment_count +- unless @display_all + %button.btn.btn-primary.btn-sm{type: :button, name: 'ab-comments', data: { a_id: a.id, state: :hidden }} + %i.fa.fa-comments + %span{id: "ab-comment-count-#{a.id}"}= a.comment_count - if privileged? a.user %button.btn.btn-danger.btn-sm{name: 'ab-destroy', data: { a_id: a.id }} %i.fa.fa-trash-o \ No newline at end of file From c817f32b1831ab4bec03ff845cf2dfb16efd708a Mon Sep 17 00:00:00 2001 From: nilsding Date: Sat, 27 Dec 2014 00:39:03 +0100 Subject: [PATCH 51/53] j --- app/views/shared/_answerbox.html.haml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index 2a613203..8a53cdaa 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -49,11 +49,6 @@ .row .col-md-6.col-md-offset-6.col-sm-8.col-sm-offset-4.col-xs-6.col-xs-offset-6.text-right = render 'shared/answerbox_buttons', a: a - -if @display_all.nil? - .panel-footer{id: "ab-comments-section-#{a.id}", style: 'display: none'} - %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a - %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a - - else - .panel-footer{id: "ab-comments-section-#{a.id}"} - %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a - %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a \ No newline at end of file + .panel-footer{id: "ab-comments-section-#{a.id}", style: @display_all.nil? ? 'display: none' : nil } + %div{id: "ab-smiles-#{a.id}"}= render 'shared/smiles', a: a + %div{id: "ab-comments-#{a.id}"}= render 'shared/comments', a: a \ No newline at end of file From 88e9d7599df316c6e5e1de8b50ca3e8242dcd60c Mon Sep 17 00:00:00 2001 From: nilsding Date: Sat, 27 Dec 2014 01:22:13 +0100 Subject: [PATCH 52/53] dragons --- app/models/user.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index b89dddcd..c202d696 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -33,6 +33,14 @@ class User < ActiveRecord::Base # validates :website, format: { with: WEBSITE_REGEX } + before_save do + self.website = if website.match %r{\Ahttps?://} + website + else + "http://#{website}" + end unless website.blank? + end + def login=(login) @login = login end From e570f40a362103e4556a6b11d31b27592a5d201a Mon Sep 17 00:00:00 2001 From: nilsding Date: Sat, 27 Dec 2014 01:45:24 +0100 Subject: [PATCH 53/53] WRYYYYYYYYYYYYYYYYYY --- app/models/user.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/user.rb b/app/models/user.rb index c202d696..45b3626a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -34,6 +34,7 @@ class User < ActiveRecord::Base # validates :website, format: { with: WEBSITE_REGEX } before_save do + self.display_name = 'WRYYYYYYYY' if display_name == 'Dio Brando' self.website = if website.match %r{\Ahttps?://} website else