wpb 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/Changelog.md +9 -3
  2. data/bin/wpb +3 -5
  3. data/doc/Bash.html +222 -0
  4. data/doc/Comment.html +411 -0
  5. data/doc/Gemfile.html +110 -0
  6. data/doc/Page.html +315 -0
  7. data/doc/PagePost.html +422 -0
  8. data/doc/Post.html +164 -0
  9. data/doc/Rakefile.html +107 -0
  10. data/doc/Setting.html +164 -0
  11. data/doc/User.html +415 -0
  12. data/doc/WPB.html +188 -0
  13. data/doc/WPB/AddType.html +254 -0
  14. data/doc/WPB/App.html +231 -0
  15. data/doc/bin/wpb.html +54 -0
  16. data/doc/created.rid +13 -0
  17. data/doc/index.html +114 -0
  18. data/doc/lib/wpb/bash_rb.html +56 -0
  19. data/doc/lib/wpb/comment_rb.html +54 -0
  20. data/doc/lib/wpb/page_rb.html +203 -0
  21. data/doc/lib/wpb/pagepost_rb.html +54 -0
  22. data/doc/lib/wpb/post_rb.html +52 -0
  23. data/doc/lib/wpb/setting_rb.html +54 -0
  24. data/doc/lib/wpb/user_rb.html +54 -0
  25. data/doc/lib/wpb/version_rb.html +52 -0
  26. data/doc/lib/wpb_rb.html +68 -0
  27. data/doc/rdoc.css +706 -0
  28. data/lib/wpb.rb +36 -29
  29. data/lib/wpb/bash.rb +18 -0
  30. data/lib/wpb/clamp/attribute.rb +37 -0
  31. data/lib/wpb/clamp/attribute_declaration.rb +40 -0
  32. data/lib/wpb/clamp/command.rb +137 -0
  33. data/lib/wpb/clamp/errors.rb +26 -0
  34. data/lib/wpb/clamp/help.rb +69 -0
  35. data/lib/wpb/clamp/option.rb +77 -0
  36. data/lib/wpb/clamp/option/declaration.rb +58 -0
  37. data/lib/wpb/clamp/option/parsing.rb +45 -0
  38. data/lib/wpb/clamp/parameter.rb +70 -0
  39. data/lib/wpb/clamp/parameter/declaration.rb +28 -0
  40. data/lib/wpb/clamp/parameter/parsing.rb +28 -0
  41. data/lib/wpb/clamp/subcommand.rb +23 -0
  42. data/lib/wpb/clamp/subcommand/declaration.rb +40 -0
  43. data/lib/wpb/clamp/subcommand/execution.rb +37 -0
  44. data/lib/wpb/clamp/version.rb +3 -0
  45. data/lib/wpb/comment.rb +51 -5
  46. data/lib/wpb/page.rb +46 -0
  47. data/lib/wpb/pagepost.rb +29 -16
  48. data/lib/wpb/user.rb +25 -0
  49. data/lib/wpb/version.rb +4 -1
  50. metadata +43 -2
data/doc/WPB.html ADDED
@@ -0,0 +1,188 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: WPB</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="module">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="./lib/wpb/version_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/wpb/version.rb">lib/wpb/version.rb</a></li>
43
+
44
+ <li><a href="./lib/wpb_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="lib/wpb.rb">lib/wpb.rb</a></li>
46
+
47
+ </ul>
48
+ </div>
49
+ </div>
50
+
51
+
52
+ </div>
53
+
54
+ <div id="class-metadata">
55
+
56
+ <!-- Parent Class -->
57
+
58
+
59
+ <!-- Namespace Contents -->
60
+
61
+ <div id="namespace-list-section" class="section">
62
+ <h3 class="section-header">Namespace</h3>
63
+ <ul class="link-list">
64
+
65
+ <li><span class="type">CLASS</span> <a href="WPB/AddType.html">WPB::AddType</a></li>
66
+
67
+ <li><span class="type">CLASS</span> <a href="WPB/App.html">WPB::App</a></li>
68
+
69
+ </ul>
70
+ </div>
71
+
72
+
73
+ <!-- Method Quickref -->
74
+
75
+
76
+ <!-- Included Modules -->
77
+
78
+ </div>
79
+
80
+ <div id="project-metadata">
81
+
82
+
83
+ <div id="fileindex-section" class="section project-section">
84
+ <h3 class="section-header">Files</h3>
85
+ <ul>
86
+
87
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
88
+
89
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+
95
+ <div id="classindex-section" class="section project-section">
96
+ <h3 class="section-header">Class Index
97
+ <span class="search-toggle"><img src="./images/find.png"
98
+ height="16" width="16" alt="[+]"
99
+ title="show/hide quicksearch" /></span></h3>
100
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
101
+ <fieldset>
102
+ <legend>Quicksearch</legend>
103
+ <input type="text" name="quicksearch" value=""
104
+ class="quicksearch-field" />
105
+ </fieldset>
106
+ </form>
107
+
108
+ <ul class="link-list">
109
+
110
+ <li><a href="./WPB.html">WPB</a></li>
111
+
112
+ <li><a href="./WPB/AddType.html">WPB::AddType</a></li>
113
+
114
+ <li><a href="./WPB/App.html">WPB::App</a></li>
115
+
116
+ <li><a href="./Bash.html">Bash</a></li>
117
+
118
+ <li><a href="./Comment.html">Comment</a></li>
119
+
120
+ <li><a href="./Page.html">Page</a></li>
121
+
122
+ <li><a href="./PagePost.html">PagePost</a></li>
123
+
124
+ <li><a href="./Post.html">Post</a></li>
125
+
126
+ <li><a href="./Setting.html">Setting</a></li>
127
+
128
+ <li><a href="./User.html">User</a></li>
129
+
130
+ </ul>
131
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
132
+ </div>
133
+
134
+
135
+ </div>
136
+ </div>
137
+
138
+ <div id="documentation">
139
+ <h1 class="module">WPB</h1>
140
+
141
+ <div id="description">
142
+ <p>
143
+ The wrapper for the wpb gem
144
+ </p>
145
+
146
+ </div>
147
+
148
+ <!-- Constants -->
149
+
150
+ <div id="constants-list" class="section">
151
+ <h3 class="section-header">Constants</h3>
152
+ <dl>
153
+
154
+ <dt><a name="VERSION">VERSION</a></dt>
155
+
156
+ <dd class="description"><p>
157
+ The version of <a href="WPB.html">WPB</a> you are using
158
+ </p></dd>
159
+
160
+
161
+ </dl>
162
+ </div>
163
+
164
+
165
+ <!-- Attributes -->
166
+
167
+
168
+ <!-- Methods -->
169
+
170
+
171
+ </div>
172
+
173
+
174
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
175
+
176
+ <p>Disabled; run with --debug to generate this.</p>
177
+
178
+ </div>
179
+
180
+ <div id="validator-badges">
181
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
182
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
183
+ Rdoc Generator</a> 1.1.6</small>.</p>
184
+ </div>
185
+
186
+ </body>
187
+ </html>
188
+
@@ -0,0 +1,254 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: WPB::AddType</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../lib/wpb_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/wpb.rb">lib/wpb.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">ActiveRecord::Migration</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#method-c-down">::down</a></li>
73
+
74
+ <li><a href="#method-c-up">::up</a></li>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+
80
+ <!-- Included Modules -->
81
+
82
+ </div>
83
+
84
+ <div id="project-metadata">
85
+
86
+
87
+ <div id="fileindex-section" class="section project-section">
88
+ <h3 class="section-header">Files</h3>
89
+ <ul>
90
+
91
+ <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
92
+
93
+ <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
94
+
95
+ </ul>
96
+ </div>
97
+
98
+
99
+ <div id="classindex-section" class="section project-section">
100
+ <h3 class="section-header">Class Index
101
+ <span class="search-toggle"><img src="../images/find.png"
102
+ height="16" width="16" alt="[+]"
103
+ title="show/hide quicksearch" /></span></h3>
104
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
105
+ <fieldset>
106
+ <legend>Quicksearch</legend>
107
+ <input type="text" name="quicksearch" value=""
108
+ class="quicksearch-field" />
109
+ </fieldset>
110
+ </form>
111
+
112
+ <ul class="link-list">
113
+
114
+ <li><a href="../WPB.html">WPB</a></li>
115
+
116
+ <li><a href="../WPB/AddType.html">WPB::AddType</a></li>
117
+
118
+ <li><a href="../WPB/App.html">WPB::App</a></li>
119
+
120
+ <li><a href="../Bash.html">Bash</a></li>
121
+
122
+ <li><a href="../Comment.html">Comment</a></li>
123
+
124
+ <li><a href="../Page.html">Page</a></li>
125
+
126
+ <li><a href="../PagePost.html">PagePost</a></li>
127
+
128
+ <li><a href="../Post.html">Post</a></li>
129
+
130
+ <li><a href="../Setting.html">Setting</a></li>
131
+
132
+ <li><a href="../User.html">User</a></li>
133
+
134
+ </ul>
135
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
136
+ </div>
137
+
138
+
139
+ </div>
140
+ </div>
141
+
142
+ <div id="documentation">
143
+ <h1 class="class">WPB::AddType</h1>
144
+
145
+ <div id="description">
146
+
147
+ </div>
148
+
149
+ <!-- Constants -->
150
+
151
+
152
+ <!-- Attributes -->
153
+
154
+
155
+ <!-- Methods -->
156
+
157
+ <div id="public-class-method-details" class="method-section section">
158
+ <h3 class="section-header">Public Class Methods</h3>
159
+
160
+
161
+ <div id="down-method" class="method-detail ">
162
+ <a name="method-c-down"></a>
163
+
164
+ <div class="method-heading">
165
+
166
+ <span class="method-name">down</span><span
167
+ class="method-args">()</span>
168
+ <span class="method-click-advice">click to toggle source</span>
169
+
170
+ </div>
171
+
172
+ <div class="method-description">
173
+
174
+
175
+
176
+
177
+
178
+ <div class="method-source-code"
179
+ id="down-source">
180
+ <pre>
181
+ <span class="ruby-comment cmt"># File lib/wpb.rb, line 24</span>
182
+ 24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">down</span>
183
+ 25: <span class="ruby-identifier">remove_column</span> <span class="ruby-value">:wp_posts</span>, <span class="ruby-value">:type</span>
184
+ 26: <span class="ruby-keyword kw">end</span></pre>
185
+ </div>
186
+
187
+ </div>
188
+
189
+
190
+
191
+
192
+ </div>
193
+
194
+
195
+ <div id="up-method" class="method-detail ">
196
+ <a name="method-c-up"></a>
197
+
198
+ <div class="method-heading">
199
+
200
+ <span class="method-name">up</span><span
201
+ class="method-args">()</span>
202
+ <span class="method-click-advice">click to toggle source</span>
203
+
204
+ </div>
205
+
206
+ <div class="method-description">
207
+
208
+
209
+
210
+
211
+
212
+ <div class="method-source-code"
213
+ id="up-source">
214
+ <pre>
215
+ <span class="ruby-comment cmt"># File lib/wpb.rb, line 15</span>
216
+ 15: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">up</span>
217
+ 16: <span class="ruby-identifier">suppress_messages</span> <span class="ruby-keyword kw">do</span>
218
+ 17: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">column_exists?</span> <span class="ruby-value">:wp_posts</span>, <span class="ruby-value">:type</span>
219
+ 18: <span class="ruby-identifier">add_column</span> <span class="ruby-value">:wp_posts</span>, <span class="ruby-value">:type</span>, <span class="ruby-value">:string</span>
220
+ 19: <span class="ruby-constant">PagePost</span>.<span class="ruby-identifier">reset_column_information</span>
221
+ 20: <span class="ruby-keyword kw">end</span>
222
+ 21: <span class="ruby-keyword kw">end</span>
223
+ 22: <span class="ruby-keyword kw">end</span></pre>
224
+ </div>
225
+
226
+ </div>
227
+
228
+
229
+
230
+
231
+ </div>
232
+
233
+
234
+ </div>
235
+
236
+
237
+ </div>
238
+
239
+
240
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
241
+
242
+ <p>Disabled; run with --debug to generate this.</p>
243
+
244
+ </div>
245
+
246
+ <div id="validator-badges">
247
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
248
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
249
+ Rdoc Generator</a> 1.1.6</small>.</p>
250
+ </div>
251
+
252
+ </body>
253
+ </html>
254
+
data/doc/WPB/App.html ADDED
@@ -0,0 +1,231 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: WPB::App</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="../index.html">Home</a>
29
+ <a href="../index.html#classes">Classes</a>
30
+ <a href="../index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="../lib/wpb_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/wpb.rb">lib/wpb.rb</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">Object</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#method-c-run">::run</a></li>
73
+
74
+ </ul>
75
+ </div>
76
+
77
+
78
+ <!-- Included Modules -->
79
+
80
+ </div>
81
+
82
+ <div id="project-metadata">
83
+
84
+
85
+ <div id="fileindex-section" class="section project-section">
86
+ <h3 class="section-header">Files</h3>
87
+ <ul>
88
+
89
+ <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
90
+
91
+ <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
92
+
93
+ </ul>
94
+ </div>
95
+
96
+
97
+ <div id="classindex-section" class="section project-section">
98
+ <h3 class="section-header">Class Index
99
+ <span class="search-toggle"><img src="../images/find.png"
100
+ height="16" width="16" alt="[+]"
101
+ title="show/hide quicksearch" /></span></h3>
102
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
103
+ <fieldset>
104
+ <legend>Quicksearch</legend>
105
+ <input type="text" name="quicksearch" value=""
106
+ class="quicksearch-field" />
107
+ </fieldset>
108
+ </form>
109
+
110
+ <ul class="link-list">
111
+
112
+ <li><a href="../WPB.html">WPB</a></li>
113
+
114
+ <li><a href="../WPB/AddType.html">WPB::AddType</a></li>
115
+
116
+ <li><a href="../WPB/App.html">WPB::App</a></li>
117
+
118
+ <li><a href="../Bash.html">Bash</a></li>
119
+
120
+ <li><a href="../Comment.html">Comment</a></li>
121
+
122
+ <li><a href="../Page.html">Page</a></li>
123
+
124
+ <li><a href="../PagePost.html">PagePost</a></li>
125
+
126
+ <li><a href="../Post.html">Post</a></li>
127
+
128
+ <li><a href="../Setting.html">Setting</a></li>
129
+
130
+ <li><a href="../User.html">User</a></li>
131
+
132
+ </ul>
133
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
134
+ </div>
135
+
136
+
137
+ </div>
138
+ </div>
139
+
140
+ <div id="documentation">
141
+ <h1 class="class">WPB::App</h1>
142
+
143
+ <div id="description">
144
+
145
+ </div>
146
+
147
+ <!-- Constants -->
148
+
149
+
150
+ <!-- Attributes -->
151
+
152
+
153
+ <!-- Methods -->
154
+
155
+ <div id="public-class-method-details" class="method-section section">
156
+ <h3 class="section-header">Public Class Methods</h3>
157
+
158
+
159
+ <div id="run-method" class="method-detail ">
160
+ <a name="method-c-run"></a>
161
+
162
+ <div class="method-heading">
163
+
164
+ <span class="method-name">run</span><span
165
+ class="method-args">()</span>
166
+ <span class="method-click-advice">click to toggle source</span>
167
+
168
+ </div>
169
+
170
+ <div class="method-description">
171
+
172
+
173
+
174
+
175
+
176
+ <div class="method-source-code"
177
+ id="run-source">
178
+ <pre>
179
+ <span class="ruby-comment cmt"># File lib/wpb.rb, line 30</span>
180
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">run</span>
181
+ 31: <span class="ruby-identifier">config</span> = {
182
+ 32: <span class="ruby-value">:adapter</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;mysql&quot;</span>,
183
+ 33: <span class="ruby-value">:socket</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;/Applications/MAMP/tmp/mysql/mysql.sock&quot;</span>, <span class="ruby-comment cmt">#/tmp/mysql.sock</span>
184
+ 34: <span class="ruby-value">:host</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;localhost&quot;</span>,
185
+ 35: <span class="ruby-value">:username</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;root&quot;</span>,
186
+ 36: <span class="ruby-value">:password</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;root&quot;</span>,
187
+ 37: <span class="ruby-value">:database</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;wordpress&quot;</span>
188
+ 38: }
189
+ 39:
190
+ 40: <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">config</span>)
191
+ 41:
192
+ 42: <span class="ruby-constant">AddType</span><span class="ruby-operator">::</span><span class="ruby-identifier">up</span>
193
+ 43: <span class="ruby-constant">PagePost</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
194
+ 44: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">type</span> = <span class="ruby-identifier">p</span>.<span class="ruby-identifier">post_type</span>.<span class="ruby-identifier">capitalize</span>
195
+ 45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">post_type</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;post&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">p</span>.<span class="ruby-identifier">post_type</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;page&quot;</span>
196
+ 46: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">type</span> = <span class="ruby-value str">&quot;Post&quot;</span>
197
+ 47: <span class="ruby-keyword kw">end</span>
198
+ 48: <span class="ruby-identifier">p</span>.<span class="ruby-identifier">save</span>
199
+ 49: <span class="ruby-keyword kw">end</span>
200
+ 50: <span class="ruby-keyword kw">end</span></pre>
201
+ </div>
202
+
203
+ </div>
204
+
205
+
206
+
207
+
208
+ </div>
209
+
210
+
211
+ </div>
212
+
213
+
214
+ </div>
215
+
216
+
217
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
218
+
219
+ <p>Disabled; run with --debug to generate this.</p>
220
+
221
+ </div>
222
+
223
+ <div id="validator-badges">
224
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
225
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
226
+ Rdoc Generator</a> 1.1.6</small>.</p>
227
+ </div>
228
+
229
+ </body>
230
+ </html>
231
+