medea 0.6.4 → 0.6.5

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.
@@ -123,6 +123,14 @@ module Medea
123
123
  end
124
124
  false
125
125
  end
126
+
127
+ def last
128
+ self[-1]
129
+ end
130
+
131
+ def first
132
+ self[0]
133
+ end
126
134
  #end array interface
127
135
 
128
136
  def execute_query content=true
@@ -1,5 +1,5 @@
1
1
  module Medea
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
 
4
4
  #When the templates are changed, this version should be incremented
5
5
  #This version is used when uploading/updating the templates
@@ -33,4 +33,14 @@ describe "Deferred Query" do
33
33
  end
34
34
 
35
35
  it "should be able to fetch those since a particular time"
36
+
37
+ it "should return the last element" do
38
+ u = User.all
39
+ u.last.should eq(u[-1])
40
+ end
41
+
42
+ it "should return the first element" do
43
+ u = User.all
44
+ u.first.should eq(u[0])
45
+ end
36
46
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 4
9
- version: 0.6.4
8
+ - 5
9
+ version: 0.6.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Jensen