-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
351 lines (254 loc) · 14.2 KB
/
index.html
File metadata and controls
351 lines (254 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README - Decko
— Documentation by YARD 0.9.37
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "README";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: README - Decko</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="decko-you-hold-the-cards">Decko: you hold the cards</h1>
<p><a href="https://badge.fury.io/rb/decko"><img src="https://badge.fury.io/rb/decko.svg" alt="Gem Version" title="Gem Version" /></a>
<a href="https://decko.semaphoreci.com/projects/decko"><img src="https://decko.semaphoreci.com/badges/decko/branches/main.svg" alt="Semaphore Build" title="Semaphore Build" /></a>
<a href="https://codeclimate.com/github/decko-commons/decko/maintainability"><img src="https://api.codeclimate.com/v1/badges/6ef82d42115889ea81c7/maintainability" alt="Code Climate Badge" title="Code Climate Badge" /></a>
<a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg" alt="License: GPL v3" /></a></p>
<ul>
<li><a href="#basics">Basics</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#upgrading">Upgrading</a></li>
<li><a href="#mods">Mods</a></li>
<li><a href="#more-resources">More Resources</a></li>
</ul>
<h2 id="basics">Basics</h2>
<p>Decko (formerly “Wagn”) makes elegant web development fun.</p>
<p>Install a new deck, and you can immediately open a browser and start collaborating
on content, design, and structure. Decko creators, or “Card Sharks”,
use Decko to create open community sites, private knowledge management sites, project
management systems, wikis, blogs, journals, forums, and more.</p>
<p>Ruby developers can take these creations even further with Decko’s development framework.
As a Decko “Monkey”, you can use the innovative Mods API to create sophisticated
web systems that integrate seamlessly with structures that “Sharks” create on the site.</p>
<h3 id="start-sharking">Start Sharking</h3>
<p><a href="#installation">Installation</a> help is below. And there’s lots of info at <a href="https://decko.org">Decko.org</a>,
including:</p>
<ul>
<li><a href="https://decko.org/Features">Features</a></li>
<li><a href="https://decko.org/Syntax_Reference">Syntax Reference</a></li>
<li><a href="https://decko.org/troubleshooting">Installation Troubleshooting</a></li>
</ul>
<p>And info about contributing to Decko is <a href="https://docs.decko.org/docs/file/CONTRIBUTING.md">right next door</a>.</p>
<h3 id="start-monkeying">Start Monkeying</h3>
<p>On our <a href="https://docs.decko.org">docs site</a>:</p>
<ul>
<li><a href="https://docs.decko.org/docs/file/card/README.md">intro to monkeying</a></li>
<li><a href="https://docs.decko.org/docs/Cardio/Mod">generating a mod</a></li>
<li><a href="https://docs.decko.org/docs/Card/Set">set modules</a></li>
<li><a href="https://docs.decko.org/docs/Card">card objects</a></li>
</ul>
<p>Elsewhere on Github:
- <a href="https://github.com/decko-commons/card-mods/">optional mods</a></p>
<p>We also have <a href="https://app.swaggerhub.com/apis-docs/Decko/decko-api/0.8.0">API Docs on Swaggerhub</a>.</p>
<h2 id="installation">Installation</h2>
<h3 id="install-dependencies">1. install dependencies</h3>
<table>
<thead>
<tr>
<th>requirement</th>
<th>variants</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="http://www.ruby-lang.org/en/">Ruby</a></td>
<td>2.5+</td>
</tr>
<tr>
<td><a href="http://gembundler.com/">Bundler</a></td>
<td>1.0+</td>
</tr>
<tr>
<td><a href="http://www.imagemagick.org/">ImageMagick</a></td>
<td>6.7.8+</td>
</tr>
<tr>
<td>A database engine</td>
<td><a href="http://www.mysql.com/">MySQL</a> (5.7+) or <a href="http://www.postgresql.org/">PostgreSQL</a> (9.4+)</td>
</tr>
<tr>
<td>A JavaScript runtime</td>
<td><a href="https://nodejs.org/">Node.js</a> (8.9+) or <a href="https://github.com/sstephenson/execjs">other</a></td>
</tr>
</tbody>
</table>
<h3 id="install-the-gem">2. install the gem</h3>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='id identifier rubyid_install'>install</span> <span class='id identifier rubyid_decko'>decko</span>
</code></pre>
<p>Watch carefully for errors!</p>
<h3 id="create-a-new-deck">3. create a new deck</h3>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_new'>new</span> <span class='const'>MY_DECK</span>
</code></pre>
<p><code>MY_DECK</code> is, of course, a variable. Use any name you like.</p>
<p>Options:</p>
<pre class="code ruby"><code class="ruby">-f, [--force] # Overwrite files that already exist
-p, [--pretend], [--no-pretend] # Run but do not make any changes
-q, [--quiet], [--no-quiet] # Suppress status output
-s, [--skip], [--no-skip] # Skip files that already exist
-M, [--monkey], [--no-monkey] # Prepare deck for monkey (mod developer)
-P, [--platypus], [--no-core-dev] # Prepare deck for platypus (core developer)
-R, [--repo-path=PATH] # Path to local decko repository.
# Can also specify via `env DECKO_REPO_PATH=PATH`
-I, [--interactive], [--no-interactive] # Prompt with dynamic installation options
</code></pre>
<h3 id="create--seed-database">4. create / seed database</h3>
<p>Edit the config/database.yml file as necessary. More about database
configuration at https://www.decko.org/database_configuration.</p>
<p>Then run</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_cd'>cd</span> <span class='const'>MY_DECK</span>
<span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_setup'>setup</span>
</code></pre>
<p>..to create and seed the database</p>
<p>Options:</p>
<pre class="code ruby"><code class="ruby">-p, --production decko:seed production database (default)
-t, --test decko:seed test database
-d, --development decko:seed development database
-a, --all decko:seed production, test, and development database
</code></pre>
<h3 id="start-your-server">5. start your server</h3>
<p>To fire up the default, built-in WEBrick server, just run:</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_server'>server</span>
</code></pre>
<p>…and point your browser to http://localhost:3000 (unless otherwise
configured).</p>
<p>Options:</p>
<pre class="code ruby"><code class="ruby">-p, [--port=port] # Runs Decko on the specified port.
Defaults to 3000.
-b, [--binding=IP] # Binds Decko to the specified IP.
Defaults to 'localhost' in development
and '0.0.0.0' in other environments'.
-c, [--config=file] # Uses a custom rackup configuration.
Default is config.ru.
-d, [--daemon], [--no-daemon] # Runs server as a Daemon.
-e, [--environment=name] # Specifies the environment in which to run
this server (development/test/production).
-P, [--pid=PID] # Specifies the PID file.
Default is tmp/pids/server.pid.
[--early-hints], [--no-early-hints] # Enables HTTP/2 early hints.
</code></pre>
<p>For more information, see https://decko.org/get_started.</p>
<h2 id="upgrading">Upgrading</h2>
<h3 id="standard-upgrade">Standard Upgrade</h3>
<h4 id="backups">1. Backups</h4>
<p>Always back up your database and uploaded files.</p>
<h4 id="update-libraries">2. Update Libraries</h4>
<p>From your decko root directory run:</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_update'>update</span>
</code></pre>
<h4 id="update-database">3. Update Database</h4>
<p>Run the following:</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_update'>update</span>
</code></pre>
<h4 id="restart-your-server">4. Restart your server.</h4>
<h3 id="upgrade-from-wagn-to-decko">Upgrade from Wagn to Decko</h3>
<p>If you have an old site (pre 2018), haven’t upgraded in a long time, and see many
references to “Wagn” in your deck, you may need to do a more involved update.</p>
<h4 id="update-references-to-wagn-in-file-content">1. update references to “wagn” in file content</h4>
<p>In your decko’s root directory, edit <code>Gemfile</code>, <code>config/application.rb</code>,
<code>config/routes.rb</code>, and <code>script/wagn</code>, replacing “wagn” with “decko”. (Keep the
same capitalization pattern.)</p>
<h4 id="update-references-to-wagn-in-file-names">2. update references to “wagn” in file names.</h4>
<p>From your decko root directory run:</p>
<pre class="code ruby"><code class="ruby">mv script/wagn script/decko
</code></pre>
<h4 id="continue-as-with-standard-upgrade">3. continue as with Standard Upgrade</h4>
<p>See above.</p>
<h3 id="upgrade-pre-gem-wagn-site">Upgrade pre-gem Wagn site</h3>
<p>First check the Wagn version of your existing site.</p>
<h4 id="version-110-or-newer">Version 1.10 or newer</h4>
<ol>
<li>Create a new deck using steps 1 and 2 from the installation section above.</li>
<li>Copy <code>config/database.yml</code> from the old site to the new one.</li>
<li>Copy the old <code>local/files</code> contents to the new <code>files</code> directory.</li>
<li>If you have edited <code>wagn.yml</code> in your old site, make the corresponding
changes to the new <code>config/application.rb</code> file.</li>
<li>Follow the standard upgrade procedure above.</li>
</ol>
<h4 id="older-than-version-110">Older than Version 1.10</h4>
<p>Ho. Ly. Cow. Welcome back!</p>
<p>First update your Wagn to version 1.10 via the old update mechanisms, and then
follow the directions above.</p>
<h2 id="mods">Mods</h2>
<p>Mods are little bits of code that alter Decko behavior.</p>
<h3 id="installing-mods">Installing Mods</h3>
<p>Many mods have been made into ruby gems that follow the naming pattern <code>card-mod-X</code>.
All you have to do to install one of these mods is:</p>
<h4 id="add-the-mod-or-mods-to-your-gemfile">1. add the mod (or mods) to your Gemfile</h4>
<pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>card-mod-mymod</span><span class='tstring_end'>"</span></span>
</code></pre>
<h4 id="download-and-install-the-gem">2. download and install the gem</h4>
<pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_bundle'>bundle</span> <span class='id identifier rubyid_update'>update</span>
</code></pre>
<h4 id="run-any-migrations-mergers-or-scripts">3. run any migrations, mergers, or scripts:</h4>
<pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_update'>update</span>
</code></pre>
<p>…and then restart your server.</p>
<h3 id="creating--editing-mods">Creating / Editing mods</h3>
<h4 id="development-environment">Development Environment</h4>
<p>If you’re interested in making your own mod, the first thing to do is set up a good
development environment. This is most easily done by creating a new deck with the
<code>--monkey</code> (or <code>-M</code>) options, eg:</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_decko'>decko</span> <span class='id identifier rubyid_new'>new</span> <span class='const'>MY_DECK</span> <span class='op'>-</span><span class='op'>-</span><span class='id identifier rubyid_monkey'>monkey</span>
</code></pre>
<p>If you’re working on an existing deck, it’s often easiest just to do the above and then
make the new deck use your existing files and database. However, if that’s not an option,
you can instead follow the following procedure:</p>
<ol>
<li>Make sure you have all the monkey-friendly gems in your Gemfile. If your deck was
generated recently, you’ll probably already have several references to these gems
(eg card-mod-monkey) and will just need to uncomment them. If not, you can run the
above command to create a dummy deck and copy the Gemfile over to your real one.</li>
<li>In your real deck, comment out <code>ENV['RAILS_ENV'] ||= 'production'</code> in
<code>config/boot.rb</code>. This will mean your default mode is now “development.”</li>
<li>Configure <code>config/database.yml</code> to your liking.</li>
</ol>
</div></div>
<div id="footer">
Generated on Tue Sep 16 17:44:20 2025 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.2.2).
</div>
</div>
</body>
</html>