tw 0.2.5 → 0.2.6

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.
Files changed (4) hide show
  1. data/History.txt +4 -0
  2. data/lib/tw.rb +1 -1
  3. data/lib/tw/app/render.rb +4 -2
  4. metadata +4 -4
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.6 2012-10-10
2
+
3
+ * bugfix merging users and lists
4
+
1
5
  === 0.2.5 2012-10-10
2
6
 
3
7
  * JSON print format : --format=json
data/lib/tw.rb CHANGED
@@ -20,7 +20,7 @@ require 'tw/client/stream'
20
20
  require 'tw/client/error'
21
21
 
22
22
  module Tw
23
- VERSION = '0.2.5'
23
+ VERSION = '0.2.6'
24
24
  class Conf
25
25
  REQUIRE_VERSION = '0.1.0'
26
26
  end
data/lib/tw/app/render.rb CHANGED
@@ -9,9 +9,11 @@ module Tw::App
9
9
 
10
10
  def self.display(arr, format)
11
11
  arr = [arr] unless arr.kind_of? Array
12
- arr.flatten.sort{|a,b|
12
+ arr.flatten.inject({}){
13
+ |h,i| h[i.id]=i; h
14
+ }.values.sort{|a,b|
13
15
  a.id <=> b.id
14
- }.uniq.each{|m|
16
+ }.each{|m|
15
17
  puts case format
16
18
  when 'text'
17
19
  user = m.user.kind_of?(Hash) ? "@#{m.user[:from]} > @#{m.user[:to]}" : "@#{m.user}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tw
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sho Hashimoto
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-09 00:00:00 Z
18
+ date: 2012-10-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false