Permalink
Browse files

Fixes Ruby 1.8 compatibility

  • Loading branch information...
1 parent 8a800c8 commit 5dc2d763b9945e989ede8faaba4e198989c70fed @stephenmckinney stephenmckinney committed Jan 17, 2013
Showing with 9 additions and 2 deletions.
  1. +2 −2 lib/pomo/configuration.rb
  2. +7 −0 lib/pomo/github_task.rb
@@ -38,7 +38,7 @@ def initialize(options = {})
# Load configuration file or default_options. Passed options take precedence.
def self.load(options = {})
- options.select!{|k,v| [:notifier, :progress, :tmux].include? k}
+ options.reject!{|k,v| ![:notifier, :progress, :tmux].include? k}
if !(File.exists? config_file)
File.open(config_file, 'w') { |file| YAML::dump(default_options, file) }
@@ -54,7 +54,7 @@ def self.load(options = {})
def self.save(options = {})
force_save = options.delete :force
- options.select!{|k,v| [:notifier, :progress, :tmux].include? k}
+ options.reject!{|k,v| ![:notifier, :progress, :tmux].include? k}
options = default_options.merge(options)
View
@@ -1,3 +1,10 @@
+# This is to make sure Faraday doesn't warn the user about the `system_timer` gem missing in Ruby 1.8
+old_warn, $-w = $-w, nil
+begin
+ require 'faraday'
+ensure
+ $-w = old_warn
+end
require 'octokit'
module Pomo

0 comments on commit 5dc2d76

Please sign in to comment.