dm-redis-adapter 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README.textile +3 -4
  3. data/lib/dm_redis.rb +5 -6
  4. metadata +3 -3
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 Dan Herrera
1
+ Copyright (c) 2010 Dan Herrera
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
data/README.textile CHANGED
@@ -12,15 +12,14 @@ h1. Install
12
12
 
13
13
  Prerequisites:
14
14
  * Redis:
15
- ** <a href="http://code.google.com/p/redis/">Redis, v1.0</a>
15
+ ** <a href="http://code.google.com/p/redis/">Redis, v1.2.1</a>
16
16
  * Gems:
17
- ** <a href="http://github.com/datamapper/extlib">extlib</a>, dependency for dm-core
18
- ** <a href="http://github.com/datamapper/dm-core/">dm-core</a> v0.10
17
+ ** <a href="http://github.com/datamapper/dm-core/">dm-core</a> v0.10.2
19
18
 
20
19
  Install the dm-redis adapter:
21
20
  <pre>
22
21
  <code>
23
- > sudo gem install whoahbot-dm-redis-adapter
22
+ > gem install dm-redis-adapter
24
23
  </code>
25
24
  </pre>
26
25
 
data/lib/dm_redis.rb CHANGED
@@ -45,7 +45,6 @@ module DataMapper
45
45
  end
46
46
 
47
47
  records = query.match_records(records)
48
- records = query.limit_records(records)
49
48
  records = query.sort_records(records)
50
49
  records
51
50
  end
@@ -141,11 +140,11 @@ module DataMapper
141
140
  end
142
141
  end
143
142
 
144
- # if query.limit
145
- # @redis.sort("#{query.model.to_s.downcase}:#{redis_key_for(query.model)}:all", :limit => [query.offset, query.limit]).each do |val|
146
- # keys << {"#{redis_key_for(query.model)}" => val.to_i}
147
- # end
148
- # end
143
+ if query.limit
144
+ @redis.sort("#{query.model.to_s.downcase}:#{redis_key_for(query.model)}:all", :limit => [query.offset, query.limit]).each do |val|
145
+ keys << {"#{redis_key_for(query.model)}" => val.to_i}
146
+ end
147
+ end
149
148
 
150
149
  # Keys are empty, fall back and load all the values for this model
151
150
  if keys.empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-redis-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Herrera
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-01 00:00:00 -08:00
12
+ date: 2010-02-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.10.0
23
+ version: 0.10.2
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redis