lib/taskwarrior-web/model/config.rb in taskwarrior-web-1.0.14 vs lib/taskwarrior-web/model/config.rb in taskwarrior-web-1.1.0

- old
+ new

@@ -20,11 +20,11 @@ 'N' => '%M', # two-digit minutes, for example 05 or 42 'S' => '%S', # two-digit seconds, for example 07 or 47 } def self.version - @version ||= Versionomy.parse(`task _version`.strip) + @version ||= Versionomy.parse(`#{TaskwarriorWeb::Runner::TASK_BIN} _version`.strip) end def self.file @file ||= ParseConfig.new("#{Dir.home}/.taskrc") end @@ -33,9 +33,16 @@ self.file[prop] end def self.dateformat self.file['dateformat'].gsub(/(\w)/, DATEFORMATS) unless self.file['dateformat'].nil? + end + + def self.supports?(feature) + case feature.to_sym + when :editing then self.version.major > 1 + else false + end end def self.method_missing(method) self.file[method.to_s] end