Skip to content

Commit

Permalink
Revert "Merge pull request exercism#3422 from nilbus/please-update-cl…
Browse files Browse the repository at this point in the history
…i-banner"

This reverts commit 55c705c, reversing
changes made to 57b2a2c.

Conflicts:

- app/routes/profile.rb [removed relevant lines]
- db/migrate/201703212321_add_client_version_notification_dismissed_at_to_users.rb [kept]
- lib/exercism/client_version.rb [removed]
- test/exercism/client_version_test.rb [removed]

The migration was kept and will be reversed in a subsequent commit.

Closes exercism#3416
  • Loading branch information
nilbus committed Jun 23, 2017
1 parent ee5d757 commit 23e549a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 98 deletions.
11 changes: 0 additions & 11 deletions app/routes/profile.rb
@@ -1,17 +1,6 @@
module ExercismWeb
module Routes
class Profile < Core
before do
if page_request? && $flipper[:advertise_cli_update].enabled?(current_user)
client_version = ClientVersion.new(user: current_user)
flash.now[:notice] ||= client_version.notice_when_client_outdated
end
end

def page_request?
request.env['HTTP_ACCEPT'].to_s.include? 'text/html'
end

get '/profiles/:username/:share_key' do |username, key|
user = ::User.find_by(username: username, share_key: key)
if user
Expand Down
13 changes: 0 additions & 13 deletions app/routes/user.rb
Expand Up @@ -16,19 +16,6 @@ class User < Core
end
end

post '/:username/clear_client_version_notice' do |username|
please_login
user = ::User.find_by_username(username)

if user == current_user
ClientVersion.new(user: current_user).dismiss_notice!
json 'result' => 'success'
else
status 403
json 'result' => 'forbidden'
end
end

# linked to from the /looks page
get '/:username/:key' do |username, key|
please_login
Expand Down
10 changes: 0 additions & 10 deletions frontend/app/js/app.coffee
Expand Up @@ -23,16 +23,6 @@ $ ->
if location.pathname.match(/submissions/)
initCommentMemory()

clientOutdatedNotice = $('.close + .client-outdated')
clientOutdatedNotice.prev('.close').click ->
username = clientOutdatedNotice.data('username')
$.ajax
url: "/#{username}/clear_client_version_notice"
method: 'post'
dataType: 'json'
error: (xhr) ->
console.log("Failed to mark notice as cleared: #{xhr.responseText}")

$("#current_submission").theiaStickySidebar(additionalMarginTop: 70)

$('.manager_delete').on 'click', ->
Expand Down
1 change: 0 additions & 1 deletion lib/exercism.rb
Expand Up @@ -7,7 +7,6 @@
require 'exercism/acl'
require 'exercism/assumable_user'
require 'exercism/authentication'
require 'exercism/client_version'
require 'exercism/comment'
require 'exercism/conversation_subscription'
require 'exercism/converts_markdown_to_html'
Expand Down
30 changes: 0 additions & 30 deletions lib/exercism/client_version.rb

This file was deleted.

33 changes: 0 additions & 33 deletions test/exercism/client_version_test.rb

This file was deleted.

0 comments on commit 23e549a

Please sign in to comment.