dm-redis-adapter 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +12 -11
- metadata +5 -5
data/README.textile
CHANGED
@@ -2,29 +2,25 @@ h1. dm-redis-adapter
|
|
2
2
|
|
3
3
|
This is a <a href="http://datamapper.org">DataMapper</a> adapter for the <a href="http://github.com/antirez/redis/">Redis</a> key-value database.
|
4
4
|
|
5
|
-
Redis is a very fast key-value store with some interesting data structures added. You can have a key that is a SET, LIST, or a STRING that is binary safe. Data structures like SET and LIST allow for even more interesting things. Redis is a fabulous and fast engine for data structures, and you can read more about it here: <a href="http://code.google.com/p/redis/">redis</a>. Redis is also a persistent data store, and can be used in large-scale environments with master-slave replication.
|
5
|
+
Redis is a very fast key-value store with some interesting data structures added. You can have a key that is a SET, LIST, or a STRING that is binary safe. Data structures like SET and LIST allow for even more interesting things. Redis is a fabulous and fast engine for data structures, and you can read more about it here: <a href="http://code.google.com/p/redis/">redis</a>. Redis is also a persistent data store, and can be used in large-scale environments with master-slave replication and consistent hashing on the client side.
|
6
6
|
|
7
7
|
<a href="http://datamapper.org">DataMapper</a> is a brilliant ORM that is based on the <a href="http://www.martinfowler.com/eaaCatalog/identityMap.html">IdentityMap</a> pattern. Usage of DataMapper resembles that of ActiveRecord, the popular ORM bundled with Ruby on Rails, but with some very important differences. A quote from the DM wiki: "One row in the database should equal one object reference. Pretty simple idea. Pretty profound impact." Having an identity map allows for very efficient queries to the database, as well as interesting forms of lazy loading of attributes or associations.
|
8
8
|
|
9
|
-
Marrying DataMapper to Redis allows for schema-less models, you can add fields at any time without having to create a migration. DataMapper also allows us to store non
|
9
|
+
Marrying DataMapper to Redis allows for schema-less models, you can add fields at any time without having to create a migration. DataMapper also allows us to store non-native Redis types in the db, like Date fields.
|
10
10
|
|
11
11
|
h1. Install
|
12
12
|
|
13
13
|
Prerequisites:
|
14
14
|
* Redis:
|
15
|
-
** <a href="http://code.google.com/p/redis/">Redis,
|
15
|
+
** <a href="http://code.google.com/p/redis/">Redis, v1.0</a>
|
16
16
|
* Gems:
|
17
|
-
** <a href="http://code.google.com/p/redis/">redis (0.0.3.4)</a>
|
18
17
|
** <a href="http://github.com/datamapper/extlib">extlib</a>, dependency for dm-core
|
19
|
-
** <a href="http://github.com/datamapper/dm-core/
|
20
|
-
|
21
|
-
I installed the redis gem from the redis .tgz file like so:
|
18
|
+
** <a href="http://github.com/datamapper/dm-core/">dm-core</a> v0.10
|
22
19
|
|
20
|
+
Install the dm-redis adapter:
|
23
21
|
<pre>
|
24
22
|
<code>
|
25
|
-
>
|
26
|
-
> cd redis-0.100/client-libraries/ruby
|
27
|
-
> sudo rake install
|
23
|
+
> sudo gem install whoahbot-dm-redis-adapter
|
28
24
|
</code>
|
29
25
|
</pre>
|
30
26
|
|
@@ -51,4 +47,9 @@ Setup your adapter, define your models and properties:
|
|
51
47
|
</code>
|
52
48
|
</pre>
|
53
49
|
|
54
|
-
Now you can use redis in a ORM style, and take advantage of all of the amazing things that DataMapper offers.
|
50
|
+
Now you can use redis in a ORM style, and take advantage of all of the amazing things that DataMapper offers.
|
51
|
+
|
52
|
+
h1. Badass contributors
|
53
|
+
|
54
|
+
* <a href="http://github.com/aeden">Anthony Eden (aeden)</a> Gem cleanup, update to jeweler
|
55
|
+
* <a href="http://github.com/sr">Simon Roset (sr)</a> Fixes for edge dm-core
|
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.
|
4
|
+
version: 0.0.6
|
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:
|
12
|
+
date: 2010-02-01 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -18,12 +18,12 @@ dependencies:
|
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- - "
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 0.10.0
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: redis
|
27
27
|
type: :runtime
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements: []
|
72
72
|
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 1.3.
|
74
|
+
rubygems_version: 1.3.5
|
75
75
|
signing_key:
|
76
76
|
specification_version: 2
|
77
77
|
summary: DataMapper adapter for the Redis key-value database
|