Skip to content
Newer
Older
100644 74 lines (43 sloc) 3.05 KB
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
1 = rack_datamapper
2
3 * http://github.com/mkristian/rack_datamapper
4
6fbf4b3 @mkristian * added more specs for the session store
authored
5 * http://rack-datamapper.rubyforge.org
6
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
7 == DESCRIPTION:
8
9 this collection of plugins helps to add datamapper functionality to Rack. there is a IdentityMaps plugin which wrappes the request and with it all database actions are using that identity map. the transaction related plugin TransactionBoundaries and RestfulTransactions wrappes the request into a transaction. for using datamapper to store session data there is the DatamapperStore.
10
a2e4c66 @mkristian added some note on the gem name
authored
11 === NAMING of the GEM
12
13 due to some restrictions on rubyforge I could not use the under score in the gem name, so the gem name is
14
15 rack-datamapper
16
17 sorry for the confusion this might cause. see also http://gemcutter.org/search?query=rack-datamapper
18
6fbf4b3 @mkristian * added more specs for the session store
authored
19 === DataMapper::Session::Abstract::Store
20
21 this is actual store class which can be wrapped to be used in a specific environement, i.e. Rack::Session::Datamapper. this store can the same options as the session store from rack, see
22
23 * http://rack.rubyforge.org/doc/Rack/Session/Pool.html
24
25 * http://rack.rubyforge.org/doc/Rack/Session/Abstract/ID.html
26
27 there are two more options
28
29 * :session_class - (optional) must be a DataMapper::Resource with session_id, data properties.
30
31 * :cache - Boolean (default: false) if set to true the store will first try to retrieve the session from a memory cache otherwise fallback to the session_class resource. in case the platform is java (jruby) the cache uses SoftReferences which clears the cache on severe memory shortage, but it needs java 1.5 or higher for this.
32
33 == Rack Middleware
34
35 all these middleware take the name of the datamapper repository (which you configure via DataMapper.setup(:name, ....) as second constructor argument (default is :default)
36
37 === DataMapper::RestfulTransactions
38
39 wrappers the request inside an transaction for POST,PUT,DELETE methods
40
41 === DataMapper::TransactionBoundaries
42
43 wrappers the all request inside an transaction
44
45 === DataMapper::IdentityMaps
46
47 wrappers the all request inside an identity scope
48
49
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
50 == LICENSE:
51
52 (The MIT License)
53
54 Copyright (c) 2009 Kristian Meier
55
56 Permission is hereby granted, free of charge, to any person obtaining
57 a copy of this software and associated documentation files (the
58 'Software'), to deal in the Software without restriction, including
59 without limitation the rights to use, copy, modify, merge, publish,
60 distribute, sublicense, and/or sell copies of the Software, and to
61 permit persons to whom the Software is furnished to do so, subject to
62 the following conditions:
63
64 The above copyright notice and this permission notice shall be
65 included in all copies or substantial portions of the Software.
66
67 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
68 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
69 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
70 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
71 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
72 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
73 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.