papertrail / papertrail-cli

Command-line client for Papertrail hosted syslog & app log management service
http://papertrailapp.com/
MIT License
427 stars 46 forks source link

GPA Improvements: 1.15 to 2.02 #79

Open DannyBen opened 8 years ago

DannyBen commented 8 years ago

An assortment of small to medium changes to improve code standards:

  1. Exclude okjson from Code Climate
  2. Remove / rename unused variables, mostly in the OptionsParser blocks
  3. Add configfile method to CliHelpers to avoid repeating the confusing condition+assignment if configfile = find_configfile
  4. Reduce code duplication in http_client by adding an attempt times, wait, &block method to handle HTTP retries in a single place.

CC: #78

lmarburger commented 8 years ago

Looks great!

gj1

DannyBen commented 8 years ago

Agree with everything, had the same thoughts on all subjects. The global rescue in the attempt method is a mistake on my part. Will update later today.

lmarburger commented 8 years ago

I'll give this a run through next week before merging and cutting a release.