bye hpricot

one of the oldest gems in workfeed

gem 'hpricot', '~> 0.8.6'

and I think @MENTION_BOT would be helpless to dig the history


            git blame Gemfile           | grep hpricot
            git blame 81f513b7^ Gemfile | grep hpricot
            git blame 566011ef^ Gemfile | grep hpricot
            git blame 51b85d27^ Gemfile | grep hpricot
            git blame 9210cf0a^ Gemfile | grep hpricot
          

it is not that small

            
              du -sh --exclude="*.html" ./gems/hpricot-0.8.6/       -> 1.9M
              du -sh --exclude="*.html" ./gems/activerecord-3.2.22/ -> 1.5M
            
          

it allocates a good number of strings ObjectSpace.count_objects(...)

w. :T_STRING=>765035

wo.:T_STRING=>755791

adds: ~10K strings

it didn't play nicely with ruby 1.9 upgrade

and it's not going to play nicely with ruby 2.2 upgrade

and we have a faster alternative already in workfeed

nokogiri: 2453.9 i/s

hpricot: 1505.4 i/s - 1.63x slower

it's used only in a couple of places

grep -r --color Hpricot --exclude-dir="log" --exclude-dir=".git" .

./app/helpers/application_helper.rb: Hpricot(text).text_transform!
./lib/letterbox/request.rb: doc = Hpricot self.html_part

primarily here: to change highlight helper Rails, why?

            
              def highlight(text, phrases, highlighter = '...')
                ... Hpricot(text).text_transform! ... { |text| }
              end
            
          

this is why

            
              commit a4e1df1072aaaf859c9f949c7d59b1477cb14e8a
              Author: Adam Pisoni 
              Date:   Thu Apr 17 13:41:48 2008 -0700
              I replaced rails highlight method with one that doesn't highlight within tags.
            
          

in Apr 2008 we had rails v2.0.x and a proper highlight method went to rails only in v2.3.2 around March 2009

but lets see how it's actually highlighting stuff...
https://www.staging.yammer.com/salmonellaville.com/#/Threads/Search?search=testing&page=1&tab=messages maybe this?, nope

but lets see how it's actually highlighting stuff...
https://www.staging.yammer.com/salmonellaville.com/#/Threads/Search?search=testing&page=1&tab=messages maybe this?, nope

but lets see how it's actually highlighting stuff...
https://www.staging.yammer.com/salmonellaville.com/#/Threads/Search?search=testing&page=1&tab=messages

Summary: ["testing i like \"swimming\" and..."] Expertise: ["testing test some < \\u0355>"]
end
              
        git diff --stat master .
         Gemfile                                      |  1 -
         Gemfile.lock                                 |  2 --
         app/helpers/application_helper.rb            | 11 -----------
         lib/extensions/hpricot_text_transform_ext.rb | 31 -------------------------------
         lib/letterbox/request.rb                     |  3 +--
         5 files changed, 1 insertion(+), 47 deletions(-)