29 Jun '15, 11am

Quick ruby script to find log errors

This is something I'm still working on in my own time for my automation setup. If an error occurs on the server it can be quickly flagged and fed into a report. The following ruby script will read an external text file line by line. If it finds a line of text containing the string "error" it will feed it into an array, then remove all of the duplicate errors. I've done some further editing to strip out the time, date and session information for my log format below: 2015-05-20 00:39:44.390 info http: [2241] Returning error status: NotModified, substatus: None, message: The requested resource has not been modified Hopefully someone will find this useful. $i = 0 $j = 0 log_list = File.readlines("testlog.log").grep(/error| Error/) error_message = log_list while $i < log_list.length error_message[$i].gsub!(/.+?:/im, "") # error_message[$i].gsub! ":", "" puts error_message[$i] $...

Full article: http://www.softwaretestingclub.com/profiles/blogs/quick-r...

Tweets

Web scraping - exemple de script avec ruby et nokogiri

Web scraping - exemple de script avec ruby et n...

news.humancoders.com 29 Jun '15, 10am

▲ ▲ 1 Ruby Web scraping - exemple de script avec ruby et nokogiri (fr) Partagé par Cheikh Sidya Camara il y a environ une ...

Test::Unit 3.1.2: This is an unit testing frame...

webscripts.softpedia.com 29 Jun '15, 1pm

Test:Unit versions 2.x are improved versions of the Test::Unit package bundled in Ruby 1.8.x. Test::Unit 1.2.3 is the same...

Domain Contest: Name for product software on de...

namestation.com 29 Jun '15, 4am

Find name ideas for startups, businesses, apps, brands Our intelligent name generators help you come up with creative name...

[Ruby on Rails]sorceryによる認証 – (6)部署別のアクセス制限 #1 ...

dev.classmethod.jp 06 Jul '15, 2am

$ curl -i -X POST http://localhost:3000/api/v1/users.json \ -d 'user[email][email protected]' \ -d 'user[name]=sample' \ -d ...