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 CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -10,6 +10,10 @@ module Lifestream
10
10
  end
11
11
  end
12
12
 
13
+ def inspect
14
+ "#<Lifestream::Branch @published_at=#{@published_at} @title=#{@title} @body=#{@body} @channel=#{!!@channel}>"
15
+ end
16
+
13
17
  class InvalidBranch < StandardError; end
14
18
 
15
19
  end
@@ -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[0].published_at.should > @lifestream.branches[1].published_at
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifestream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hunter