<NME> feeds_controller.rb
<BEF> class FeedsController < ApplicationController
  before_action :correct_user, only: :update

  def update
    @user = current_user
    @feed = Feed.find(params[:id])
    @taggings = @feed.tag_with_params(params, @user)
    head :ok
  end

  def rename
    @user = current_user
    @subscription = @user.subscriptions.where(feed_id: params[:feed_id]).first!
    title = params[:feed][:title]
    @subscription.title = title.empty? ? nil : title
    @subscription.save
    @feed_order = @user.feed_order
  end

  def auto_update
    get_feeds_list
  end

  def search
    @user = current_user
    if twitter_feed?(params[:q]) && !@user.twitter_enabled?
      session[:subscribe_query] = params[:q]
      render js: "window.location = '#{new_twitter_authentication_path}';"
    else
      @feeds = FeedFinder.feeds(params[:q], twitter_auth: @user.twitter_auth, username: params[:username], password: params[:password])
      @feeds.map { |feed| feed.priority_refresh(@user) }
      @tag_editor = TagEditor.new(@user, nil)
    end
  rescue Feedkit::Unauthorized => exception
    @feeds = nil
    if exception.basic_auth?
      @basic_auth = true
      @feed_url = params[:q]
    end
  rescue => exception
    ErrorService.notify(exception)
    @feeds = nil
  end

  private

  def twitter_feed?(url)
    url = url.strip
    url.start_with?("@", "#", "http://twitter.com", "https://twitter.com", "http://mobile.twitter.com", "https://mobile.twitter.com", "twitter.com", "mobile.twitter.com")
  end

  def correct_user
    unless current_user.subscribed_to?(params[:id])
          render_404
        else
          @feed.update_attributes(push_expiration: Time.now + (params['hub.lease_seconds'].to_i/2).seconds)
          render text: params['hub.challenge']
        end
      else
        # Handle unsubscriptions confirmation

<MSG> Updated to Rails 4.1. Updated dependencies.

<DFF> @@ -54,7 +54,7 @@ class FeedsController < ApplicationController
           render_404
         else
           @feed.update_attributes(push_expiration: Time.now + (params['hub.lease_seconds'].to_i/2).seconds)
-          render text: params['hub.challenge']
+          render plain: params['hub.challenge']
         end
       else
         # Handle unsubscriptions confirmation

{'commit': "diff --git a/Gemfile b/Gemfile\nindex 8abed2ce..4e0bec72 100644\n--- a/Gemfile\n+++ b/Gemfile\n@@ -1,7 +1,7 @@\n source 'https://rubygems.org'\n ruby '2.1.1'\n \n-gem 'rails', '~>4.0.0'\n+gem 'rails'\n \n group :development do\n   gem 'better_errors'\n@@ -25,10 +25,11 @@ gem 'feedzirra',             github: 'feedbin/feedzirra',           ref: 'c7a1f1\n gem 'html-pipeline',         github: 'benubois/html-pipeline',      ref: '0d85834'\n gem 'grocer-pushpackager',   github: 'feedbin/grocer-pushpackager', ref: 'e190796', require: 'grocer/pushpackager'\n gem 'html_diff',             github: 'feedbin/html_diff',           ref: 'c7c15ce'\n+gem 'tire',                  github: 'feedbin/retire',              ref: '0595d9e'\n \n-gem 'sass-rails', '~>4.0.0'\n-gem 'coffee-rails', '~>4.0.0'\n-gem 'uglifier', '>= 1.0.3'\n+gem 'sass-rails'\n+gem 'coffee-rails'\n+gem 'uglifier'\n gem 'autoprefixer-rails'\n gem 'rubyzip', '= 1.1.0'\n \n@@ -49,12 +50,11 @@ gem 'request_exception_handler'\n gem 'bcrypt-ruby'\n gem 'honeybadger'\n gem 'addressable', require: 'addressable/uri'\n-gem 'librato-rails', '= 0.9.0'\n+gem 'librato-rails'\n gem 'foreman'\n gem 'yajl-ruby', require: nil\n gem 'readability_parser'\n gem 'lograge'\n-gem 'tire'\n gem 'grocer'\n gem 'cocoon'\n gem 'gctools', require: false\ndiff --git a/Gemfile.lock b/Gemfile.lock\nindex 20509a2b..95131cae 100644\n--- a/Gemfile.lock\n+++ b/Gemfile.lock\n@@ -41,6 +41,20 @@ GIT\n     opml_saw (0.0.2)\n       nokogiri\n \n+GIT\n+  remote: git://github.com/feedbin/retire.git\n+  revision: 0595d9e9df852f42d30f43b75d80a234160d7e32\n+  ref: 0595d9e\n+  specs:\n+    tire (0.6.2)\n+      activemodel (>= 3.0)\n+      activesupport\n+      ansi\n+      hashr (~> 0.0.19)\n+      multi_json (~> 1.3)\n+      rake\n+      rest-client (~> 1.6)\n+\n GIT\n   remote: git://github.com/sosedoff/capistrano-unicorn.git\n   revision: 52376ad3d1fb20c21b7d79806bcf79fb91c78471\n@@ -52,37 +66,39 @@ GIT\n GEM\n   remote: https://rubygems.org/\n   specs:\n-    actionmailer (4.0.5)\n-      actionpack (= 4.0.5)\n+    actionmailer (4.1.1)\n+      actionpack (= 4.1.1)\n+      actionview (= 4.1.1)\n       mail (~> 2.5.4)\n-    actionpack (4.0.5)\n-      activesupport (= 4.0.5)\n-      builder (~> 3.1.0)\n-      erubis (~> 2.7.0)\n+    actionpack (4.1.1)\n+      actionview (= 4.1.1)\n+      activesupport (= 4.1.1)\n       rack (~> 1.5.2)\n       rack-test (~> 0.6.2)\n-    activemodel (4.0.5)\n-      activesupport (= 4.0.5)\n-      builder (~> 3.1.0)\n-    activerecord (4.0.5)\n-      activemodel (= 4.0.5)\n-      activerecord-deprecated_finders (~> 1.0.2)\n-      activesupport (= 4.0.5)\n-      arel (~> 4.0.0)\n-    activerecord-deprecated_finders (1.0.3)\n+    actionview (4.1.1)\n+      activesupport (= 4.1.1)\n+      builder (~> 3.1)\n+      erubis (~> 2.7.0)\n+    activemodel (4.1.1)\n+      activesupport (= 4.1.1)\n+      builder (~> 3.1)\n+    activerecord (4.1.1)\n+      activemodel (= 4.1.1)\n+      activesupport (= 4.1.1)\n+      arel (~> 5.0.0)\n     activerecord-import (0.5.0)\n       activerecord (>= 3.0)\n-    activesupport (4.0.5)\n+    activesupport (4.1.1)\n       i18n (~> 0.6, >= 0.6.9)\n-      minitest (~> 4.2)\n-      multi_json (~> 1.3)\n+      json (~> 1.7, >= 1.7.7)\n+      minitest (~> 5.1)\n       thread_safe (~> 0.1)\n-      tzinfo (~> 0.3.37)\n-    addressable (2.3.5)\n+      tzinfo (~> 1.1)\n+    addressable (2.3.6)\n     aggregate (0.2.2)\n     ansi (1.4.3)\n-    arel (4.0.2)\n-    autoprefixer-rails (1.1.20140319)\n+    arel (5.0.1.20140414130214)\n+    autoprefixer-rails (1.1.20140521)\n       execjs\n     bcrypt (3.1.7)\n     bcrypt-ruby (3.1.5)\n@@ -90,7 +106,7 @@ GEM\n     better_errors (1.1.0)\n       coderay (>= 1.0.0)\n       erubis (>= 2.6.6)\n-    builder (3.1.4)\n+    builder (3.2.2)\n     bust_rails_etags (0.0.5)\n     capistrano (2.15.5)\n       highline\n@@ -103,13 +119,13 @@ GEM\n       activesupport (>= 3.2.0)\n       json (>= 1.7)\n       mime-types (>= 1.16)\n-    carrierwave_direct (0.0.13)\n+    carrierwave_direct (0.0.14)\n       carrierwave\n       fog\n       uuidtools\n     celluloid (0.15.2)\n       timers (~> 1.1.0)\n-    clockwork (0.7.2)\n+    clockwork (0.7.5)\n       activesupport\n       tzinfo\n     cocoon (1.2.6)\n@@ -123,33 +139,35 @@ GEM\n     coffee-script-source (1.7.0)\n     connection_pool (2.0.0)\n     curb (0.8.5)\n-    dalli (2.7.0)\n-    dotenv (0.10.0)\n-    dotenv-rails (0.10.0)\n-      dotenv (= 0.10.0)\n+    dalli (2.7.2)\n+    dotenv (0.11.1)\n+      dotenv-deployment (~> 0.0.2)\n+    dotenv-deployment (0.0.2)\n+    dotenv-rails (0.11.1)\n+      dotenv (= 0.11.1)\n     erubis (2.7.0)\n     evernote-thrift (1.25.1)\n     evernote_oauth (0.2.3)\n       evernote-thrift\n       oauth (>= 0.4.1)\n-    excon (0.32.1)\n+    excon (0.33.0)\n     execjs (2.0.2)\n     faraday (0.8.9)\n       multipart-post (~> 1.2.0)\n-    faraday_middleware (0.9.0)\n-      faraday (>= 0.7.4, < 0.9)\n-    fog (1.21.0)\n+    faraday_middleware (0.9.1)\n+      faraday (>= 0.7.4, < 0.10)\n+    fog (1.22.0)\n       fog-brightbox\n       fog-core (~> 1.21, >= 1.21.1)\n       fog-json\n       nokogiri (~> 1.5, >= 1.5.11)\n-    fog-brightbox (0.0.1)\n+    fog-brightbox (0.0.2)\n       fog-core\n       fog-json\n-    fog-core (1.21.1)\n+    fog-core (1.22.0)\n       builder\n-      excon (~> 0.32)\n-      formatador (~> 0.2.0)\n+      excon (~> 0.33)\n+      formatador (~> 0.2)\n       mime-types\n       net-scp (~> 1.1)\n       net-ssh (>= 2.1.3)\n@@ -165,33 +183,35 @@ GEM\n     hashr (0.0.22)\n     highline (1.6.21)\n     hike (1.2.3)\n-    honeybadger (1.11.2)\n+    honeybadger (1.13.1)\n       json\n-    httparty (0.13.0)\n+    httparty (0.13.1)\n       json (~> 1.8)\n       multi_xml (>= 0.5.2)\n     i18n (0.6.9)\n-    jbuilder (2.0.4)\n-      activesupport (>= 3.0.0)\n-      multi_json (>= 1.2.0)\n+    jbuilder (2.0.7)\n+      activesupport (>= 3.0.0, < 5)\n+      multi_json (~> 1.2)\n     jquery-rails (3.1.0)\n       railties (>= 3.0, < 5.0)\n       thor (>= 0.14, < 2.0)\n     json (1.8.1)\n     kgio (2.9.2)\n-    librato-metrics (1.1.1)\n+    librato-metrics (1.4.0)\n       aggregate (~> 0.2.2)\n       faraday (~> 0.7)\n       multi_json\n-    librato-rails (0.9.0)\n-      librato-metrics (~> 1.1.0)\n+    librato-rack (0.4.5)\n+      librato-metrics (~> 1.1)\n+    librato-rails (0.10.2)\n+      librato-rack (~> 0.4.2)\n       rails (>= 3.0)\n     libv8 (3.16.14.3)\n     lograge (0.3.0)\n       actionpack (>= 3)\n       activesupport (>= 3)\n       railties (>= 3)\n-    logster (0.0.4)\n+    logster (0.0.9)\n     longurl (0.1.6)\n       json\n     loofah (1.2.1)\n@@ -200,45 +220,47 @@ GEM\n       mime-types (~> 1.16)\n       treetop (~> 1.4.8)\n     mime-types (1.25.1)\n-    mini_portile (0.5.2)\n-    minitest (4.7.5)\n+    mini_portile (0.6.0)\n+    minitest (5.3.4)\n     multi_json (1.7.9)\n     multi_xml (0.5.5)\n     multipart-post (1.2.0)\n-    net-scp (1.1.2)\n+    net-scp (1.2.1)\n       net-ssh (>= 2.6.5)\n     net-sftp (2.1.2)\n       net-ssh (>= 2.6.5)\n-    net-ssh (2.8.0)\n+    net-ssh (2.9.1)\n     net-ssh-gateway (1.2.0)\n       net-ssh (>= 2.6.5)\n-    nokogiri (1.6.1)\n-      mini_portile (~> 0.5.0)\n+    nokogiri (1.6.2.1)\n+      mini_portile (= 0.6.0)\n     oauth (0.4.7)\n     pg (0.17.1)\n     polyglot (0.3.4)\n     quiet_assets (1.0.2)\n       railties (>= 3.1, < 5.0)\n     rack (1.5.2)\n-    rack-protection (1.5.2)\n+    rack-protection (1.5.3)\n       rack\n     rack-test (0.6.2)\n       rack (>= 1.0)\n-    rails (4.0.5)\n-      actionmailer (= 4.0.5)\n-      actionpack (= 4.0.5)\n-      activerecord (= 4.0.5)\n-      activesupport (= 4.0.5)\n+    rails (4.1.1)\n+      actionmailer (= 4.1.1)\n+      actionpack (= 4.1.1)\n+      actionview (= 4.1.1)\n+      activemodel (= 4.1.1)\n+      activerecord (= 4.1.1)\n+      activesupport (= 4.1.1)\n       bundler (>= 1.3.0, < 2.0)\n-      railties (= 4.0.5)\n-      sprockets-rails (~> 2.0.0)\n-    railties (4.0.5)\n-      actionpack (= 4.0.5)\n-      activesupport (= 4.0.5)\n+      railties (= 4.1.1)\n+      sprockets-rails (~> 2.0)\n+    railties (4.1.1)\n+      actionpack (= 4.1.1)\n+      activesupport (= 4.1.1)\n       rake (>= 0.8.7)\n       thor (>= 0.18.1, < 2.0)\n     raindrops (0.13.0)\n-    rake (10.3.1)\n+    rake (10.3.2)\n     readability_parser (0.0.4)\n       faraday (~> 0.8.4)\n       faraday_middleware (~> 0.9.0)\n@@ -256,23 +278,23 @@ GEM\n     rubyzip (1.1.0)\n     sanitize (2.1.0)\n       nokogiri (>= 1.4.4)\n-    sass (3.2.16)\n-    sass-rails (4.0.2)\n+    sass (3.2.19)\n+    sass-rails (4.0.3)\n       railties (>= 4.0.0, < 5.0)\n       sass (~> 3.2.0)\n       sprockets (~> 2.8, <= 2.11.0)\n-      sprockets-rails (~> 2.0.0)\n+      sprockets-rails (~> 2.0)\n     sax-machine (0.2.1)\n       nokogiri (~> 1.6.0)\n-    sidekiq (2.17.7)\n+    sidekiq (3.0.2)\n       celluloid (>= 0.15.2)\n-      connection_pool (>= 1.0.0)\n+      connection_pool (>= 2.0.0)\n       json\n       redis (>= 3.0.6)\n       redis-namespace (>= 1.3.1)\n     silencer (0.6.0)\n       railties (>= 3)\n-    sinatra (1.4.4)\n+    sinatra (1.4.5)\n       rack (~> 1.4)\n       rack-protection (~> 1.4)\n       tilt (~> 1.3, >= 1.3.4)\n@@ -281,7 +303,7 @@ GEM\n       multi_json (~> 1.0)\n       rack (~> 1.0)\n       tilt (~> 1.1, != 1.3.0)\n-    sprockets-rails (2.0.1)\n+    sprockets-rails (2.1.3)\n       actionpack (>= 3.0)\n       activesupport (>= 3.0)\n       sprockets (~> 2.8)\n@@ -289,7 +311,7 @@ GEM\n       mime-types (~> 1.25)\n       multi_json (>= 1.0.4, < 2)\n       rest-client (~> 1.4)\n-    stripe_event (1.0.0)\n+    stripe_event (1.1.0)\n       activesupport (>= 3.1)\n       stripe (~> 1.6)\n     therubyracer (0.12.1)\n@@ -299,22 +321,15 @@ GEM\n     thread_safe (0.3.3)\n     tilt (1.4.1)\n     timers (1.1.0)\n-    tire (0.6.2)\n-      activemodel (>= 3.0)\n-      activesupport\n-      ansi\n-      hashr (~> 0.0.19)\n-      multi_json (~> 1.3)\n-      rake\n-      rest-client (~> 1.6)\n     treetop (1.4.15)\n       polyglot\n       polyglot (>= 0.3.1)\n-    tzinfo (0.3.39)\n+    tzinfo (1.1.0)\n+      thread_safe (~> 0.1)\n     uglifier (2.5.0)\n       execjs (>= 0.3.0)\n       json (>= 1.8.0)\n-    unicorn (4.8.2)\n+    unicorn (4.8.3)\n       kgio (~> 2.6)\n       rack\n       raindrops (~> 0.7)\n@@ -338,7 +353,7 @@ DEPENDENCIES\n   carrierwave_direct\n   clockwork\n   cocoon\n-  coffee-rails (~> 4.0.0)\n+  coffee-rails\n   connection_pool\n   dalli\n   dotenv-rails\n@@ -355,7 +370,7 @@ DEPENDENCIES\n   httparty\n   jbuilder\n   jquery-rails\n-  librato-rails (= 0.9.0)\n+  librato-rails\n   lograge\n   logster\n   longurl\n@@ -363,21 +378,21 @@ DEPENDENCIES\n   opml_saw!\n   pg\n   quiet_assets\n-  rails (~> 4.0.0)\n+  rails\n   readability_parser\n   redis (>= 3.0.5)\n   request_exception_handler\n   rubyzip (= 1.1.0)\n   sanitize\n-  sass-rails (~> 4.0.0)\n+  sass-rails\n   sidekiq\n   silencer\n   sinatra\n   stripe (= 1.9.9)\n   stripe_event\n   therubyracer\n-  tire\n-  uglifier (>= 1.0.3)\n+  tire!\n+  uglifier\n   unicorn\n   will_paginate\n   yajl-ruby\ndiff --git a/Procfile b/Procfile\nindex 5cdade88..ea03ba92 100644\n--- a/Procfile\n+++ b/Procfile\n@@ -1,3 +1,3 @@\n-worker: env DB_POOL=12 bundle exec sidekiq -c 12 -q critical,2 -q feed_refresher_receiver,1 -q default\n+worker: env DB_POOL=12 LIBRATO_AUTORUN=1 bundle exec sidekiq -c 12 -q critical,2 -q feed_refresher_receiver,1 -q default\n worker_slow: env DB_POOL=1 bundle exec sidekiq -c 1 -q worker_slow_critical,2 -q worker_slow,1\n clock: bundle exec clockwork lib/clock.rb\n\\ No newline at end of file\ndiff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb\nindex 0f736c76..02f5bdc6 100644\n--- a/app/controllers/feeds_controller.rb\n+++ b/app/controllers/feeds_controller.rb\n@@ -54,7 +54,7 @@ class FeedsController < ApplicationController\n           render_404\n         else\n           @feed.update_attributes(push_expiration: Time.now + (params['hub.lease_seconds'].to_i/2).seconds)\n-          render text: params['hub.challenge']\n+          render plain: params['hub.challenge']\n         end\n       else\n         # Handle unsubscriptions confirmation\n", 'commit_subject': 'Updated to Rails 4.1. Updated dependencies.', 'repo_name': 'feedbin/feedbin', 'committer': {'name': 'Ben Ubois', 'email': '73675debcd8a436be48ec22211dcf44fe0df0a64@benubois.com', 'time_sec': '1400840938', 'tz_offset': '-420', 'date': {'seconds': '1400840938'}}, 'commit_tree': 'fb88bc1607cbc2d28548ce4f6bd693678e7a9ee9', 'commit_message': 'Updated to Rails 4.1. Updated dependencies.\n', 'language_name': 'JavaScript', 'license': 'mit', 'hunks': "@@ -54,7 +54,7 @@ class FeedsController < ApplicationController\n           render_404\n         else\n           @feed.update_attributes(push_expiration: Time.now + (params['hub.lease_seconds'].to_i/2).seconds)\n-          render text: params['hub.challenge']\n+          render plain: params['hub.challenge']\n         end\n       else\n         # Handle unsubscriptions confirmation\n", 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/app/controllers/feeds_controller.rb', 'tgt_file': 'b/app/controllers/feeds_controller.rb', 'file_extension': '.rb', 'before_file': 'class FeedsController < ApplicationController\n  before_action :correct_user, only: :update\n\n  def update\n    @user = current_user\n    @feed = Feed.find(params[:id])\n    @taggings = @feed.tag_with_params(params, @user)\n    head :ok\n  end\n\n  def rename\n    @user = current_user\n    @subscription = @user.subscriptions.where(feed_id: params[:feed_id]).first!\n    title = params[:feed][:title]\n    @subscription.title = title.empty? ? nil : title\n    @subscription.save\n    @feed_order = @user.feed_order\n  end\n\n  def auto_update\n    get_feeds_list\n  end\n\n  def search\n    @user = current_user\n    if twitter_feed?(params[:q]) && !@user.twitter_enabled?\n      session[:subscribe_query] = params[:q]\n      render js: "window.location = \'#{new_twitter_authentication_path}\';"\n    else\n      @feeds = FeedFinder.feeds(params[:q], twitter_auth: @user.twitter_auth, username: params[:username], password: params[:password])\n      @feeds.map { |feed| feed.priority_refresh(@user) }\n      @tag_editor = TagEditor.new(@user, nil)\n    end\n  rescue Feedkit::Unauthorized => exception\n    @feeds = nil\n    if exception.basic_auth?\n      @basic_auth = true\n      @feed_url = params[:q]\n    end\n  rescue => exception\n    ErrorService.notify(exception)\n    @feeds = nil\n  end\n\n  private\n\n  def twitter_feed?(url)\n    url = url.strip\n    url.start_with?("@", "#", "http://twitter.com", "https://twitter.com", "http://mobile.twitter.com", "https://mobile.twitter.com", "twitter.com", "mobile.twitter.com")\n  end\n\n  def correct_user\n    unless current_user.subscribed_to?(params[:id])\n          render_404\n        else\n          @feed.update_attributes(push_expiration: Time.now + (params[\'hub.lease_seconds\'].to_i/2).seconds)\n          render text: params[\'hub.challenge\']\n        end\n      else\n        # Handle unsubscriptions confirmation\n', 'message': 'Updated to Rails 4.1. Updated dependencies.\n', 'author_name': 'Ben Ubois', 'lang': 'rb'}