sup 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.15.1 / 2013-12-04
2
+
3
+ * Thread children are sorted last-activity latest (bottom).
4
+
1
5
  == 0.15.0 / 2013-11-07
2
6
 
3
7
  * Maildir Syncback has now been merged into main sup! This is a
data/ReleaseNotes CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.15.1:
2
+
3
+ Sort threads last-activity-first and bug fix.
4
+
1
5
  Release 0.15.0:
2
6
 
3
7
  Maildir Syncback has been included. Refer to the wiki for more information on
data/lib/sup/crypto.rb CHANGED
@@ -261,7 +261,11 @@ EOS
261
261
  plain_data = nil
262
262
  else
263
263
  signed_text_data = nil
264
- plain_data = GPGME::Data.empty
264
+ if GPGME::Data.respond_to?('empty')
265
+ plain_data = GPGME::Data.empty
266
+ else
267
+ plain_data = GPGME::Data.empty!
268
+ end
265
269
  end
266
270
  begin
267
271
  ctx.verify(sig_data, signed_text_data, plain_data)
data/lib/sup/maildir.rb CHANGED
@@ -119,7 +119,7 @@ class Maildir < Source
119
119
  next if prev_ctime >= ctime
120
120
  @ctimes[d] = ctime
121
121
 
122
- old_ids = benchmark(:maildir_read_index) { Enumerator.new(Index.instance, :each_source_info, self.id, "#{d}/").to_a }
122
+ old_ids = benchmark(:maildir_read_index) { Index.instance.enum_for(:each_source_info, self.id, "#{d}/").to_a }
123
123
  new_ids = benchmark(:maildir_read_dir) { Dir.glob("#{subdir}/*").map { |x| File.join(d,File.basename(x)) }.sort }
124
124
  added += new_ids - old_ids
125
125
  deleted += old_ids - new_ids
@@ -46,7 +46,7 @@ class TextMode < ScrollMode
46
46
 
47
47
  def << line
48
48
  @lines = [0] if @text.empty?
49
- @text << line
49
+ @text << line.fix_encoding!
50
50
  @lines << @text.length
51
51
  if buffer
52
52
  ensure_mode_validity
data/lib/sup/person.rb CHANGED
@@ -6,7 +6,10 @@ class Person
6
6
  def initialize name, email
7
7
  raise ArgumentError, "email can't be nil" unless email
8
8
 
9
+ email.fix_encoding!
10
+
9
11
  @name = if name
12
+ name.fix_encoding!
10
13
  name = name.strip.gsub(/\s+/, " ")
11
14
  name =~ /^(['"]\s*)(.*?)(\s*["'])$/ ? $2 : name
12
15
  name.gsub('\\\\', '\\')
data/lib/sup/thread.rb CHANGED
@@ -172,7 +172,7 @@ class Container
172
172
 
173
173
  def each_with_stuff parent=nil
174
174
  yield self, 0, parent
175
- @children.each do |c|
175
+ @children.sort_by(&:sort_key).each do |c|
176
176
  c.each_with_stuff(self) { |cc, d, par| yield cc, d + 1, par }
177
177
  end
178
178
  end
@@ -239,6 +239,10 @@ class Container
239
239
  indent += 3
240
240
  @children.each { |c| c.dump_recursive f, indent, false, self }
241
241
  end
242
+
243
+ def sort_key
244
+ empty? ? [Time.now.to_i, ""] : [@message.date.to_i, @message.id]
245
+ end
242
246
  end
243
247
 
244
248
  ## A set of threads, so a forest. Is integrated with the index and
data/lib/sup/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redwood
2
- VERSION = "0.15.0"
2
+ VERSION = "0.15.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 15
9
- - 0
10
- hash: 3778501713049268347
9
+ - 1
10
+ hash: -3773962691868465541
11
11
  platform: ruby
12
12
  authors:
13
13
  - William Morgan
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
- date: 2013-11-07 00:00:00.000000000 Z
20
+ date: 2013-12-04 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: xapian-ruby