mack-data_mapper 0.6.0.1 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +115 -4
- data/lib/mack-data_mapper.rb +14 -12
- data/lib/{database.rb → mack-data_mapper/database.rb} +0 -0
- data/lib/mack-data_mapper/dm_patches/dm-timestamps.rb +6 -0
- data/lib/mack-data_mapper/dm_patches/migrations.rb +9 -0
- data/lib/{genosaurus_helpers.rb → mack-data_mapper/genosaurus_helpers.rb} +1 -1
- data/lib/{helpers → mack-data_mapper/helpers}/orm_helpers.rb +4 -2
- data/lib/{migration_generator → mack-data_mapper/migration_generator}/migration_generator.rb +0 -0
- data/lib/{migration_generator → mack-data_mapper/migration_generator}/templates/db/migrations/%=@migration_name%.rb.template +0 -0
- data/lib/{model_column.rb → mack-data_mapper/model_column.rb} +3 -3
- data/lib/{model_generator → mack-data_mapper/model_generator}/manifest.yml +0 -0
- data/lib/{model_generator → mack-data_mapper/model_generator}/model_generator.rb +0 -0
- data/lib/{model_generator → mack-data_mapper/model_generator}/templates/model.rb.template +0 -0
- data/lib/{model_generator → mack-data_mapper/model_generator}/templates/rspec.rb.template +0 -0
- data/lib/{model_generator → mack-data_mapper/model_generator}/templates/test_case.rb.template +0 -0
- data/lib/{resource.rb → mack-data_mapper/resource.rb} +0 -0
- data/lib/{runner.rb → mack-data_mapper/runner.rb} +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/manifest.yml +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/scaffold_generator.rb +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/controllers/controller.rb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/helpers/controllers/helper.rb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/views/edit.html.erb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/views/index.html.erb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/views/new.html.erb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/app/views/show.html.erb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/test/functional/rspec.rb.template +0 -0
- data/lib/{scaffold_generator → mack-data_mapper/scaffold_generator}/templates/test/functional/test_case.rb.template +0 -0
- data/lib/{tasks → mack-data_mapper/tasks}/db_create_drop_tasks.rake +0 -0
- data/lib/{tasks → mack-data_mapper/tasks}/db_migration_tasks.rake +3 -3
- data/lib/{tasks → mack-data_mapper/tasks}/test_tasks.rake +0 -0
- data/lib/{test_extensions.rb → mack-data_mapper/test_extensions.rb} +3 -3
- data/lib/mack-data_mapper_tasks.rb +1 -1
- metadata +103 -69
- data/doc/classes/DataMapper/Resource.html +0 -154
- data/doc/classes/Mack.html +0 -127
- data/doc/classes/Mack/Database.html +0 -210
- data/doc/classes/Mack/Genosaurus/DataMapper/Helpers.html +0 -225
- data/doc/classes/Mack/Genosaurus/DataMapper/ModelColumn.html +0 -237
- data/doc/classes/Mack/Testing/DataMapperHelpers.html +0 -151
- data/doc/classes/Mack/Testing/Helpers.html +0 -155
- data/doc/classes/Mack/ViewHelpers/DataMapperHelpers.html +0 -279
- data/doc/classes/MigrationGenerator.html +0 -161
- data/doc/classes/ModelGenerator.html +0 -183
- data/doc/classes/ScaffoldGenerator.html +0 -123
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -121
- data/doc/files/lib/database_rb.html +0 -101
- data/doc/files/lib/dm_patches/confirmation_validation_rb.html +0 -101
- data/doc/files/lib/dm_patches/dm-cli_rb.html +0 -108
- data/doc/files/lib/dm_patches/migrations_rb.html +0 -101
- data/doc/files/lib/dm_patches/pooling_rb.html +0 -109
- data/doc/files/lib/genosaurus_helpers_rb.html +0 -101
- data/doc/files/lib/helpers/orm_helpers_rb.html +0 -101
- data/doc/files/lib/mack-data_mapper_rb.html +0 -110
- data/doc/files/lib/mack-data_mapper_tasks_rb.html +0 -101
- data/doc/files/lib/migration_generator/migration_generator_rb.html +0 -151
- data/doc/files/lib/model_column_rb.html +0 -101
- data/doc/files/lib/model_generator/model_generator_rb.html +0 -173
- data/doc/files/lib/resource_rb.html +0 -101
- data/doc/files/lib/runner_rb.html +0 -101
- data/doc/files/lib/scaffold_generator/scaffold_generator_rb.html +0 -114
- data/doc/files/lib/test_extensions_rb.html +0 -109
- data/doc/fr_class_index.html +0 -37
- data/doc/fr_file_index.html +0 -43
- data/doc/fr_method_index.html +0 -42
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/lib/dm_patches/confirmation_validation.rb +0 -19
- data/lib/dm_patches/dm-cli.rb +0 -1
- data/lib/dm_patches/migrations.rb +0 -23
- data/lib/dm_patches/pooling.rb +0 -229
@@ -1,161 +0,0 @@
|
|
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/migration_generator/migration_generator_rb.html">
|
59
|
-
lib/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/<number>_create_users.rb:
|
93
|
-
</p>
|
94
|
-
<pre>
|
95
|
-
migration <number>, :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/<number>_create_users.rb:
|
111
|
-
</p>
|
112
|
-
<pre>
|
113
|
-
migration <number>, :create_users do
|
114
|
-
up do
|
115
|
-
create_table :users do
|
116
|
-
column :id, Integer, :serial => true
|
117
|
-
column :username, String, :size => 50
|
118
|
-
column :email, String, :size => 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>
|
@@ -1,183 +0,0 @@
|
|
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/model_generator/model_generator_rb.html">
|
59
|
-
lib/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 ‘model’ for your application based on
|
84
|
-
the specified ORM you‘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/<number>_create_users.rb:
|
103
|
-
</p>
|
104
|
-
<pre>
|
105
|
-
migration <number>, :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/<number>_create_users.rb:
|
134
|
-
</p>
|
135
|
-
<pre>
|
136
|
-
migration <number>, :create_users do
|
137
|
-
up do
|
138
|
-
create_table :users do
|
139
|
-
column :username, String, :size => 50
|
140
|
-
column :email, String, :size => 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>
|
@@ -1,123 +0,0 @@
|
|
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/scaffold_generator/scaffold_generator_rb.html">
|
59
|
-
lib/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>
|