mack-data_mapper 0.6.1.1 → 0.6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/doc/classes/DataMapper/Resource.html +154 -0
  2. data/doc/classes/DataMapper/Timestamp.html +105 -0
  3. data/doc/classes/Mack/Database.html +210 -0
  4. data/doc/classes/Mack/Testing/DataMapperHelpers.html +151 -0
  5. data/doc/classes/Mack/Testing/Helpers.html +118 -0
  6. data/doc/classes/Mack/ViewHelpers/DataMapperHelpers.html +281 -0
  7. data/doc/classes/Mack.html +127 -0
  8. data/doc/classes/MigrationGenerator.html +161 -0
  9. data/doc/classes/ModelGenerator.html +183 -0
  10. data/doc/classes/ScaffoldGenerator.html +123 -0
  11. data/doc/created.rid +1 -0
  12. data/doc/files/README.html +230 -0
  13. data/doc/files/lib/mack-data_mapper/database_rb.html +101 -0
  14. data/doc/files/lib/mack-data_mapper/dm_patches/dm-timestamps_rb.html +101 -0
  15. data/doc/files/lib/mack-data_mapper/dm_patches/migrations_rb.html +101 -0
  16. data/doc/files/lib/mack-data_mapper/genosaurus_helpers_rb.html +101 -0
  17. data/doc/files/lib/mack-data_mapper/helpers/orm_helpers_rb.html +101 -0
  18. data/doc/files/lib/mack-data_mapper/migration_generator/migration_generator_rb.html +151 -0
  19. data/doc/files/lib/mack-data_mapper/model_column_rb.html +101 -0
  20. data/doc/files/lib/mack-data_mapper/model_generator/model_generator_rb.html +173 -0
  21. data/doc/files/lib/mack-data_mapper/resource_rb.html +101 -0
  22. data/doc/files/lib/mack-data_mapper/runner_rb.html +101 -0
  23. data/doc/files/lib/mack-data_mapper/scaffold_generator/scaffold_generator_rb.html +114 -0
  24. data/doc/files/lib/mack-data_mapper/test_extensions_rb.html +109 -0
  25. data/doc/files/lib/mack-data_mapper_rb.html +109 -0
  26. data/doc/files/lib/mack-data_mapper_tasks_rb.html +101 -0
  27. data/doc/fr_class_index.html +36 -0
  28. data/doc/fr_file_index.html +41 -0
  29. data/doc/fr_method_index.html +35 -0
  30. data/doc/index.html +24 -0
  31. data/doc/rdoc-style.css +208 -0
  32. metadata +33 -2
@@ -0,0 +1,161 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: MigrationGenerator</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">MigrationGenerator</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mack-data_mapper/migration_generator/migration_generator_rb.html">
59
+ lib/mack-data_mapper/migration_generator/migration_generator.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Genosaurus
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ This will generate a migration for your application.
84
+ </p>
85
+ <p>
86
+ Example without columns:
87
+ </p>
88
+ <pre>
89
+ rake generate:migration name=create_users
90
+ </pre>
91
+ <p>
92
+ db/migrations/&lt;number&gt;_create_users.rb:
93
+ </p>
94
+ <pre>
95
+ migration &lt;number&gt;, :create_users do
96
+ up do
97
+ end
98
+
99
+ down do
100
+ end
101
+ end
102
+ </pre>
103
+ <p>
104
+ Example with columns:
105
+ </p>
106
+ <pre>
107
+ rake generate:migration name=create_users cols=username:string,email_address:string,created_at:date_time,updated_at:date_time
108
+ </pre>
109
+ <p>
110
+ db/migrations/&lt;number&gt;_create_users.rb:
111
+ </p>
112
+ <pre>
113
+ migration &lt;number&gt;, :create_users do
114
+ up do
115
+ create_table :users do
116
+ column :id, Integer, :serial =&gt; true
117
+ column :username, String, :size =&gt; 50
118
+ column :email, String, :size =&gt; 50
119
+ column :created_at, DateTime
120
+ column :updated_at, DateTime
121
+ end
122
+ end
123
+
124
+ down do
125
+ drop_table :users
126
+ end
127
+ end
128
+ </pre>
129
+
130
+ </div>
131
+
132
+
133
+ </div>
134
+
135
+
136
+ </div>
137
+
138
+
139
+ <!-- if includes -->
140
+
141
+ <div id="section">
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <!-- if method_list -->
151
+
152
+
153
+ </div>
154
+
155
+
156
+ <div id="validator-badges">
157
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
158
+ </div>
159
+
160
+ </body>
161
+ </html>
@@ -0,0 +1,183 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ModelGenerator</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ModelGenerator</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mack-data_mapper/model_generator/model_generator_rb.html">
59
+ lib/mack-data_mapper/model_generator/model_generator.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Genosaurus
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ This will generate an ORM &#8216;model&#8217; for your application based on
84
+ the specified ORM you&#8216;re using.
85
+ </p>
86
+ <p>
87
+ Example without columns:
88
+ </p>
89
+ <pre>
90
+ rake generate:model name=user
91
+ </pre>
92
+ <p>
93
+ app/models/user.rb:
94
+ </p>
95
+ <pre>
96
+ class User
97
+ include DataMapper::Resource
98
+
99
+ end
100
+ </pre>
101
+ <p>
102
+ db/migrations/&lt;number&gt;_create_users.rb:
103
+ </p>
104
+ <pre>
105
+ migration &lt;number&gt;, :create_users do
106
+ up do
107
+ end
108
+
109
+ down do
110
+ end
111
+ end
112
+ </pre>
113
+ <p>
114
+ Example with columns:
115
+ </p>
116
+ <pre>
117
+ rake generate:model name=user cols=username:string,email_address:string,created_at:datetime,updated_at:datetime
118
+ </pre>
119
+ <p>
120
+ app/models/user.rb:
121
+ </p>
122
+ <pre>
123
+ class User
124
+ include DataMapper::Resource
125
+
126
+ property :username, String
127
+ property :email_address, String
128
+ property :created_at, DateTime
129
+ property :updated_at, DateTime
130
+ end
131
+ </pre>
132
+ <p>
133
+ db/migrations/&lt;number&gt;_create_users.rb:
134
+ </p>
135
+ <pre>
136
+ migration &lt;number&gt;, :create_users do
137
+ up do
138
+ create_table :users do
139
+ column :username, String, :size =&gt; 50
140
+ column :email, String, :size =&gt; 50
141
+ column :created_at, DateTime
142
+ column :updated_at, DateTime
143
+ end
144
+ end
145
+
146
+ down do
147
+ drop_table :users
148
+ end
149
+ end
150
+ </pre>
151
+
152
+ </div>
153
+
154
+
155
+ </div>
156
+
157
+
158
+ </div>
159
+
160
+
161
+ <!-- if includes -->
162
+
163
+ <div id="section">
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+ <!-- if method_list -->
173
+
174
+
175
+ </div>
176
+
177
+
178
+ <div id="validator-badges">
179
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
180
+ </div>
181
+
182
+ </body>
183
+ </html>
@@ -0,0 +1,123 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ScaffoldGenerator</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ScaffoldGenerator</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mack-data_mapper/scaffold_generator/scaffold_generator_rb.html">
59
+ lib/mack-data_mapper/scaffold_generator/scaffold_generator.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Genosaurus
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Generates scaffold for <a href="Mack.html">Mack</a> applications.
84
+ </p>
85
+ <p>
86
+ Example:
87
+ </p>
88
+ <pre>
89
+ rake generate:scaffold name=post
90
+ </pre>
91
+
92
+ </div>
93
+
94
+
95
+ </div>
96
+
97
+
98
+ </div>
99
+
100
+
101
+ <!-- if includes -->
102
+
103
+ <div id="section">
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <!-- if method_list -->
113
+
114
+
115
+ </div>
116
+
117
+
118
+ <div id="validator-badges">
119
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
120
+ </div>
121
+
122
+ </body>
123
+ </html>
data/doc/created.rid ADDED
@@ -0,0 +1 @@
1
+ Fri, 29 Aug 2008 11:16:49 -0400
@@ -0,0 +1,230 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Aug 25 10:11:28 -0400 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ This gem provides <a href="../classes/Mack.html">Mack</a> integration with
74
+ the ORM Framework, DataMapper.
75
+ </p>
76
+ <p>
77
+ For more information on DataMapper please visit:
78
+ </p>
79
+ <p>
80
+ <a href="http://www.datamapper.org">www.datamapper.org</a>
81
+ </p>
82
+ <h2>Notes</h2>
83
+ <p>
84
+ The database.yml file for a DataMapper backed application would look
85
+ something like this:
86
+ </p>
87
+ <pre>
88
+ # MySQL:
89
+ development:
90
+ default:
91
+ adapter: mysql
92
+ database: my_app_development
93
+ host: localhost
94
+ username: my_db_user
95
+ password: password
96
+
97
+ test:
98
+ default:
99
+ adapter: mysql
100
+ database: my_app_test
101
+ host: localhost
102
+ username: my_db_user
103
+ password: password
104
+
105
+ production:
106
+ default:
107
+ adapter: mysql
108
+ database: my_app_production
109
+ host: localhost
110
+ username: my_db_user
111
+ password: password
112
+
113
+ # PostgreSQL:
114
+ development:
115
+ default:
116
+ adapter: postgres
117
+ database: my_app_development
118
+ host: localhost
119
+ username: my_db_user
120
+ password: password
121
+
122
+ test:
123
+ default:
124
+ adapter: postgres
125
+ database: my_app_test
126
+ host: localhost
127
+ username: my_db_user
128
+ password: password
129
+
130
+ production:
131
+ default:
132
+ adapter: postgres
133
+ database: my_app_production
134
+ host: localhost
135
+ username: my_db_user
136
+ password: password
137
+
138
+ # SQLite3:
139
+ development:
140
+ default:
141
+ adapter: sqlite3
142
+ database: db/my_app_development.db
143
+
144
+ test:
145
+ default:
146
+ adapter: sqlite3
147
+ database: db/my_app_test.db
148
+
149
+ production:
150
+ default:
151
+ adapter: sqlite3
152
+ database: db/my_app_production.db
153
+ </pre>
154
+ <h2>Testing</h2>
155
+ <p>
156
+ Tests are wrapped in a transaction so that any database activities get
157
+ rolled back at the end of the test. This works with both RSpec and
158
+ Test::Unit::TestCase
159
+ </p>
160
+ <h2>Rake tasks</h2>
161
+ <pre>
162
+ # Drops (if it exists) the database and then creates it for your environment.
163
+ rake db:recreate
164
+
165
+ # Creates the database for your environment.
166
+ rake db:create
167
+
168
+ # Drops the database for your environment.
169
+ rake db:drop
170
+
171
+ # Creates your test and development databases. Does NOT create your production database!
172
+ rake db:create:all
173
+
174
+ # Drops your test and development databases. Does NOT create your production database!
175
+ rake db:drop:all
176
+
177
+ # Drops and creates your test and development databases. Does NOT create your production database!
178
+ rake db:recreate:all
179
+
180
+ # Migrate the database through scripts in db/migrations.
181
+ rake db:migrate
182
+
183
+ # Rolls the schema back to the previous version. Specify the number of steps with STEP=n.
184
+ rake db:rollback
185
+
186
+ # Raises an error if there are pending migrations.
187
+ rake db:abort_if_pending_migrations
188
+
189
+ # Generates a controller, a model, a migration, and tests for the given resource.
190
+ rake generate:scaffold
191
+
192
+ # Generates a model, a migration, and a test for the given resource.
193
+ rake generate:model
194
+
195
+ # Generates a migration for the given columns
196
+ rake generate:migration
197
+ </pre>
198
+
199
+ </div>
200
+
201
+
202
+ </div>
203
+
204
+
205
+ </div>
206
+
207
+
208
+ <!-- if includes -->
209
+
210
+ <div id="section">
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <!-- if method_list -->
220
+
221
+
222
+ </div>
223
+
224
+
225
+ <div id="validator-badges">
226
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
227
+ </div>
228
+
229
+ </body>
230
+ </html>