Skip to content

Commit

Permalink
Switch to Open3
Browse files Browse the repository at this point in the history
  • Loading branch information
dropofwill committed Mar 16, 2015
1 parent f96e5ed commit 02a58a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rtasklib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
require_relative "rtasklib/serializer"
require_relative "rtasklib/taskrc"

require "open3"

module Rtasklib

class TaskWarrior
attr_reader :taskrc, :version

def initialize rc="#{Dir.home}/.taskrc"
# Check TW version, and throw warning
@version = Gem::Version.new(`task _version`.chomp)
raw_version = Open3.capture2("task _version")
@version = Gem::Version.new(raw_version[0].chomp)
# @version = Gem::Version.new(`task _version`.chomp)

if @version < Gem::Version.new('2.4.0')
warn "#{@version} is untested"
Expand Down

0 comments on commit 02a58a7

Please sign in to comment.