lib/sup/message-chunks.rb in sup-0.12.1 vs lib/sup/message-chunks.rb in sup-0.13.0

- old
+ new

@@ -1,6 +1,7 @@ require 'tempfile' +require 'rbconfig' ## Here we define all the "chunks" that a message is parsed ## into. Chunks are used by ThreadViewMode to render a message. Chunks ## are used for both MIME stuff like attachments, for Sup's parsing of ## the message body into text, quote, and signature regions, and for @@ -144,11 +145,11 @@ def inlineable?; false end def expandable?; !viewable? end def initial_state; :open end def viewable?; @lines.nil? end def view_default! path - case Config::CONFIG['arch'] + case RbConfig::CONFIG['arch'] when /darwin/ cmd = "open '#{path}'" else cmd = "/usr/bin/run-mailcap --action=view '#{@content_type}:#{path}'" end @@ -196,11 +197,11 @@ class Quote attr_reader :lines def initialize lines @lines = lines end - + def inlineable?; @lines.length == 1 end def quotable?; true end def expandable?; !inlineable? end def viewable?; false end @@ -270,9 +271,10 @@ end def patina_color case status when :valid then :cryptosig_valid_color + when :valid_untrusted then :cryptosig_valid_untrusted_color when :invalid then :cryptosig_invalid_color else :cryptosig_unknown_color end end def color; patina_color end