mack-orm 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/README +3 -0
  2. data/doc/classes/Mack.html +131 -0
  3. data/doc/classes/Mack/Database.html +323 -0
  4. data/doc/classes/Mack/Database/Generators.html +140 -0
  5. data/doc/classes/Mack/Database/Migrations.html +250 -0
  6. data/doc/classes/Mack/ViewHelpers/OrmHelpers.html +105 -0
  7. data/doc/classes/ScaffoldGenerator.html +159 -0
  8. data/doc/created.rid +1 -0
  9. data/doc/files/README.html +111 -0
  10. data/doc/files/lib/mack-orm/database_migrations_rb.html +101 -0
  11. data/doc/files/lib/mack-orm/database_rb.html +101 -0
  12. data/doc/files/lib/mack-orm/generators_rb.html +101 -0
  13. data/doc/files/lib/mack-orm/genosaurus_helpers_rb.html +101 -0
  14. data/doc/files/lib/mack-orm/model_column_rb.html +101 -0
  15. data/doc/files/lib/mack-orm/orm_helpers_rb.html +101 -0
  16. data/doc/files/lib/mack-orm/scaffold_generator/scaffold_generator_rb.html +114 -0
  17. data/doc/files/lib/mack-orm_rb.html +109 -0
  18. data/doc/files/lib/mack-orm_tasks_rb.html +101 -0
  19. data/doc/fr_class_index.html +32 -0
  20. data/doc/fr_file_index.html +36 -0
  21. data/doc/fr_method_index.html +40 -0
  22. data/doc/index.html +24 -0
  23. data/doc/rdoc-style.css +208 -0
  24. data/lib/mack-orm.rb +11 -0
  25. data/lib/mack-orm/database.rb +42 -0
  26. data/lib/mack-orm/database_migrations.rb +31 -0
  27. data/lib/mack-orm/generators.rb +11 -0
  28. data/lib/mack-orm/genosaurus_helpers.rb +40 -0
  29. data/lib/mack-orm/model_column.rb +50 -0
  30. data/lib/mack-orm/orm_helpers.rb +28 -0
  31. data/lib/mack-orm/scaffold_generator/manifest.yml +31 -0
  32. data/lib/mack-orm/scaffold_generator/scaffold_generator.rb +48 -0
  33. data/lib/mack-orm/scaffold_generator/templates/app/controllers/controller.rb.template +51 -0
  34. data/lib/mack-orm/scaffold_generator/templates/app/views/edit.html.erb.template +18 -0
  35. data/lib/mack-orm/scaffold_generator/templates/app/views/index.html.erb.template +41 -0
  36. data/lib/mack-orm/scaffold_generator/templates/app/views/new.html.erb.template +18 -0
  37. data/lib/mack-orm/scaffold_generator/templates/app/views/show.html.erb.template +12 -0
  38. data/lib/mack-orm/scaffold_generator/templates/test/controllers/rspec.rb.template +47 -0
  39. data/lib/mack-orm/scaffold_generator/templates/test/controllers/test_case.rb.template +9 -0
  40. data/lib/mack-orm/tasks/db_create_drop_tasks.rake +72 -0
  41. data/lib/mack-orm/tasks/db_migration_tasks.rake +18 -0
  42. data/lib/mack-orm/tasks/test_tasks.rake +29 -0
  43. data/lib/mack-orm_tasks.rb +3 -0
  44. metadata +96 -0
@@ -0,0 +1,140 @@
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>Module: Mack::Database::Generators</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>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Database::Generators</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/mack-orm/generators_rb.html">
59
+ lib/mack-orm/generators.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000009">controller_template_location</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Class methods</h3>
104
+
105
+ <div id="method-M000009" class="method-detail">
106
+ <a name="M000009"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="#M000009" class="method-signature">
110
+ <span class="method-name">controller_template_location</span><span class="method-args">()</span>
111
+ </a>
112
+ </div>
113
+
114
+ <div class="method-description">
115
+ <p><a class="source-toggle" href="#"
116
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
117
+ <div class="method-source-code" id="M000009-source">
118
+ <pre>
119
+ <span class="ruby-comment cmt"># File lib/mack-orm/generators.rb, line 5</span>
120
+ 5: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">controller_template_location</span>
121
+ 6: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:controller_template_location</span>)
122
+ 7: <span class="ruby-keyword kw">end</span>
123
+ </pre>
124
+ </div>
125
+ </div>
126
+ </div>
127
+
128
+
129
+ </div>
130
+
131
+
132
+ </div>
133
+
134
+
135
+ <div id="validator-badges">
136
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
137
+ </div>
138
+
139
+ </body>
140
+ </html>
@@ -0,0 +1,250 @@
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>Module: Mack::Database::Migrations</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>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Database::Migrations</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/mack-orm/database_migrations_rb.html">
59
+ lib/mack-orm/database_migrations.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000012">abort_if_pending_migrations</a>&nbsp;&nbsp;
84
+ <a href="#M000010">migrate</a>&nbsp;&nbsp;
85
+ <a href="#M000014">migration_files</a>&nbsp;&nbsp;
86
+ <a href="#M000011">rollback</a>&nbsp;&nbsp;
87
+ <a href="#M000013">version</a>&nbsp;&nbsp;
88
+ </div>
89
+ </div>
90
+
91
+ </div>
92
+
93
+
94
+ <!-- if includes -->
95
+
96
+ <div id="section">
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <!-- if method_list -->
106
+ <div id="methods">
107
+ <h3 class="section-bar">Public Class methods</h3>
108
+
109
+ <div id="method-M000012" class="method-detail">
110
+ <a name="M000012"></a>
111
+
112
+ <div class="method-heading">
113
+ <a href="#M000012" class="method-signature">
114
+ <span class="method-name">abort_if_pending_migrations</span><span class="method-args">()</span>
115
+ </a>
116
+ </div>
117
+
118
+ <div class="method-description">
119
+ <p><a class="source-toggle" href="#"
120
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
121
+ <div class="method-source-code" id="M000012-source">
122
+ <pre>
123
+ <span class="ruby-comment cmt"># File lib/mack-orm/database_migrations.rb, line 15</span>
124
+ 15: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">abort_if_pending_migrations</span>
125
+ 16: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:abort_if_pending_migrations</span>)
126
+ 17: <span class="ruby-keyword kw">end</span>
127
+ </pre>
128
+ </div>
129
+ </div>
130
+ </div>
131
+
132
+ <div id="method-M000010" class="method-detail">
133
+ <a name="M000010"></a>
134
+
135
+ <div class="method-heading">
136
+ <a href="#M000010" class="method-signature">
137
+ <span class="method-name">migrate</span><span class="method-args">()</span>
138
+ </a>
139
+ </div>
140
+
141
+ <div class="method-description">
142
+ <p>
143
+ Migrates the database to the latest <a
144
+ href="Migrations.html#M000013">version</a>
145
+ </p>
146
+ <p><a class="source-toggle" href="#"
147
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
148
+ <div class="method-source-code" id="M000010-source">
149
+ <pre>
150
+ <span class="ruby-comment cmt"># File lib/mack-orm/database_migrations.rb, line 6</span>
151
+ 6: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">migrate</span>
152
+ 7: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:migrate</span>)
153
+ 8: <span class="ruby-keyword kw">end</span>
154
+ </pre>
155
+ </div>
156
+ </div>
157
+ </div>
158
+
159
+ <div id="method-M000014" class="method-detail">
160
+ <a name="M000014"></a>
161
+
162
+ <div class="method-heading">
163
+ <a href="#M000014" class="method-signature">
164
+ <span class="method-name">migration_files</span><span class="method-args">()</span>
165
+ </a>
166
+ </div>
167
+
168
+ <div class="method-description">
169
+ <p>
170
+ Returns a list of the all migration files.
171
+ </p>
172
+ <p><a class="source-toggle" href="#"
173
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
174
+ <div class="method-source-code" id="M000014-source">
175
+ <pre>
176
+ <span class="ruby-comment cmt"># File lib/mack-orm/database_migrations.rb, line 25</span>
177
+ 25: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">migration_files</span>
178
+ 26: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Mack</span>.<span class="ruby-identifier">root</span>, <span class="ruby-value str">&quot;db&quot;</span>, <span class="ruby-value str">&quot;migrations&quot;</span>, <span class="ruby-value str">&quot;*.rb&quot;</span>))
179
+ 27: <span class="ruby-keyword kw">end</span>
180
+ </pre>
181
+ </div>
182
+ </div>
183
+ </div>
184
+
185
+ <div id="method-M000011" class="method-detail">
186
+ <a name="M000011"></a>
187
+
188
+ <div class="method-heading">
189
+ <a href="#M000011" class="method-signature">
190
+ <span class="method-name">rollback</span><span class="method-args">(step = 1)</span>
191
+ </a>
192
+ </div>
193
+
194
+ <div class="method-description">
195
+ <p>
196
+ Rolls back the database by the specified number of steps. Default is 1
197
+ </p>
198
+ <p><a class="source-toggle" href="#"
199
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000011-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/mack-orm/database_migrations.rb, line 11</span>
203
+ 11: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rollback</span>(<span class="ruby-identifier">step</span> = <span class="ruby-value">1</span>)
204
+ 12: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:rollback</span>)
205
+ 13: <span class="ruby-keyword kw">end</span>
206
+ </pre>
207
+ </div>
208
+ </div>
209
+ </div>
210
+
211
+ <div id="method-M000013" class="method-detail">
212
+ <a name="M000013"></a>
213
+
214
+ <div class="method-heading">
215
+ <a href="#M000013" class="method-signature">
216
+ <span class="method-name">version</span><span class="method-args">()</span>
217
+ </a>
218
+ </div>
219
+
220
+ <div class="method-description">
221
+ <p>
222
+ Returns the current <a href="Migrations.html#M000013">version</a> of the
223
+ database
224
+ </p>
225
+ <p><a class="source-toggle" href="#"
226
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
227
+ <div class="method-source-code" id="M000013-source">
228
+ <pre>
229
+ <span class="ruby-comment cmt"># File lib/mack-orm/database_migrations.rb, line 20</span>
230
+ 20: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span>
231
+ 21: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">:version</span>)
232
+ 22: <span class="ruby-keyword kw">end</span>
233
+ </pre>
234
+ </div>
235
+ </div>
236
+ </div>
237
+
238
+
239
+ </div>
240
+
241
+
242
+ </div>
243
+
244
+
245
+ <div id="validator-badges">
246
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
247
+ </div>
248
+
249
+ </body>
250
+ </html>
@@ -0,0 +1,105 @@
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>Module: Mack::ViewHelpers::OrmHelpers</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>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::ViewHelpers::OrmHelpers</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/mack-orm/orm_helpers_rb.html">
59
+ lib/mack-orm/orm_helpers.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <!-- if method_list -->
95
+
96
+
97
+ </div>
98
+
99
+
100
+ <div id="validator-badges">
101
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
102
+ </div>
103
+
104
+ </body>
105
+ </html>