lifestream 0.1.2 → 0.1.3
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/VERSION +1 -1
- data/lib/lifestream/branch.rb +4 -0
- data/lib/lifestream/stream.rb +1 -1
- data/test/lifestream/stream_test.rb +5 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/lifestream/branch.rb
CHANGED
data/lib/lifestream/stream.rb
CHANGED
@@ -13,7 +13,7 @@ module Lifestream
|
|
13
13
|
@channels.each do |channel|
|
14
14
|
channel.branches.each { |b| @branches << b }
|
15
15
|
end
|
16
|
-
@branches.sort { |a,b| a.published_at <=> b.published_at }.reverse
|
16
|
+
@branches.sort! { |a,b| a.published_at <=> b.published_at }.reverse!
|
17
17
|
end
|
18
18
|
|
19
19
|
end
|
@@ -8,7 +8,11 @@ class StreamTest < Test::Unit::TestCase
|
|
8
8
|
|
9
9
|
should "return its branches in descending chronological order" do
|
10
10
|
@lifestream.branches.should_not be_nil
|
11
|
-
@lifestream.branches
|
11
|
+
@lifestream.branches.each do |branch|
|
12
|
+
compare ||= branch
|
13
|
+
compare.published_at.should >= branch.published_at
|
14
|
+
compare = branch
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
end
|