netlinx-workspace 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +206 -6
- data/bin/netlinx-workspace +27 -0
- data/doc/NetLinx.html +18 -7
- data/doc/NetLinx/Compile.html +15 -4
- data/doc/NetLinx/Compile/Extension.html +15 -4
- data/doc/NetLinx/Compile/Extension/APW.html +8 -8
- data/doc/NetLinx/Project.html +334 -90
- data/doc/NetLinx/Rake.html +128 -0
- data/doc/NetLinx/Rake/Workspace.html +128 -0
- data/doc/NetLinx/Rake/Workspace/CreateWorkspaceConfig.html +387 -0
- data/doc/NetLinx/Rake/Workspace/GenerateAPW.html +371 -0
- data/doc/NetLinx/System.html +1341 -217
- data/doc/NetLinx/SystemFile.html +454 -51
- data/doc/NetLinx/Workspace.html +434 -69
- data/doc/NetLinx/Workspace/YAML.html +398 -0
- data/doc/_index.html +66 -4
- data/doc/class_list.html +6 -2
- data/doc/file.README.html +218 -10
- data/doc/file.license.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +218 -10
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +171 -23
- data/doc/top-level-namespace.html +3 -3
- data/lib/netlinx/compile/extension/apw.rb +3 -0
- data/lib/netlinx/rake/workspace.rb +14 -0
- data/lib/netlinx/rake/workspace/create_workspace_config.rb +49 -0
- data/lib/netlinx/rake/workspace/generate_apw.rb +41 -0
- data/lib/netlinx/workspace.rb +58 -14
- data/lib/netlinx/workspace/project.rb +107 -0
- data/lib/netlinx/workspace/system.rb +226 -0
- data/lib/netlinx/workspace/system_file.rb +98 -0
- data/lib/netlinx/workspace/yaml.rb +217 -0
- data/license.txt +1 -1
- metadata +53 -28
- data/lib/netlinx-workspace.rb +0 -1
- data/lib/netlinx/project.rb +0 -83
- data/lib/netlinx/system.rb +0 -122
- data/lib/netlinx/system_file.rb +0 -36
data/doc/js/full_list.js
CHANGED
@@ -123,7 +123,10 @@ function linkList() {
|
|
123
123
|
}
|
124
124
|
}
|
125
125
|
if (clicked) clicked.removeClass('clicked');
|
126
|
-
var win
|
126
|
+
var win;
|
127
|
+
try {
|
128
|
+
win = window.top.frames.main ? window.top.frames.main : window.parent;
|
129
|
+
} catch (e) { win = window.parent; }
|
127
130
|
if (this.tagName.toLowerCase() == "a") {
|
128
131
|
clicked = $(this).parents('li').addClass('clicked');
|
129
132
|
win.location = this.href;
|
data/doc/method_list.html
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
</head>
|
21
21
|
<body>
|
22
22
|
<script type="text/javascript" charset="utf-8">
|
23
|
-
|
23
|
+
var hasFrames = false;
|
24
|
+
try {
|
25
|
+
hasFrames = window.top.frames.main ? true : false;
|
26
|
+
} catch (e) { }
|
27
|
+
if (hasFrames) {
|
24
28
|
document.getElementById('base_target').target = 'main';
|
25
29
|
document.body.className = 'frames';
|
26
30
|
}
|
@@ -48,11 +52,23 @@
|
|
48
52
|
|
49
53
|
|
50
54
|
<li class="r1 ">
|
55
|
+
<span class='object_link'><a href="NetLinx/SystemFile.html#%3C%3C-instance_method" title="NetLinx::SystemFile#<< (method)">#<<</a></span>
|
56
|
+
<small>NetLinx::SystemFile</small>
|
57
|
+
</li>
|
58
|
+
|
59
|
+
|
60
|
+
<li class="r2 ">
|
51
61
|
<span class='object_link'><a href="NetLinx/Project.html#%3C%3C-instance_method" title="NetLinx::Project#<< (method)">#<<</a></span>
|
52
62
|
<small>NetLinx::Project</small>
|
53
63
|
</li>
|
54
64
|
|
55
65
|
|
66
|
+
<li class="r1 ">
|
67
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#%3C%3C-instance_method" title="NetLinx::Workspace#<< (method)">#<<</a></span>
|
68
|
+
<small>NetLinx::Workspace</small>
|
69
|
+
</li>
|
70
|
+
|
71
|
+
|
56
72
|
<li class="r2 ">
|
57
73
|
<span class='object_link'><a href="NetLinx/System.html#%3C%3C-instance_method" title="NetLinx::System#<< (method)">#<<</a></span>
|
58
74
|
<small>NetLinx::System</small>
|
@@ -60,23 +76,35 @@
|
|
60
76
|
|
61
77
|
|
62
78
|
<li class="r1 ">
|
63
|
-
<span class='object_link'><a href="NetLinx/
|
64
|
-
<small>NetLinx::
|
79
|
+
<span class='object_link'><a href="NetLinx/System.html#active-instance_method" title="NetLinx::System#active (method)">#active</a></span>
|
80
|
+
<small>NetLinx::System</small>
|
65
81
|
</li>
|
66
82
|
|
67
83
|
|
68
84
|
<li class="r2 ">
|
69
|
-
<span class='object_link'><a href="NetLinx/System.html#
|
85
|
+
<span class='object_link'><a href="NetLinx/System.html#baud_rate-instance_method" title="NetLinx::System#baud_rate (method)">#baud_rate</a></span>
|
70
86
|
<small>NetLinx::System</small>
|
71
87
|
</li>
|
72
88
|
|
73
89
|
|
74
90
|
<li class="r1 ">
|
91
|
+
<span class='object_link'><a href="NetLinx/System.html#com_port-instance_method" title="NetLinx::System#com_port (method)">#com_port</a></span>
|
92
|
+
<small>NetLinx::System</small>
|
93
|
+
</li>
|
94
|
+
|
95
|
+
|
96
|
+
<li class="r2 ">
|
75
97
|
<span class='object_link'><a href="NetLinx/Project.html#compile-instance_method" title="NetLinx::Project#compile (method)">#compile</a></span>
|
76
98
|
<small>NetLinx::Project</small>
|
77
99
|
</li>
|
78
100
|
|
79
101
|
|
102
|
+
<li class="r1 ">
|
103
|
+
<span class='object_link'><a href="NetLinx/System.html#compile-instance_method" title="NetLinx::System#compile (method)">#compile</a></span>
|
104
|
+
<small>NetLinx::System</small>
|
105
|
+
</li>
|
106
|
+
|
107
|
+
|
80
108
|
<li class="r2 ">
|
81
109
|
<span class='object_link'><a href="NetLinx/Workspace.html#compile-instance_method" title="NetLinx::Workspace#compile (method)">#compile</a></span>
|
82
110
|
<small>NetLinx::Workspace</small>
|
@@ -108,53 +136,77 @@
|
|
108
136
|
|
109
137
|
|
110
138
|
<li class="r1 ">
|
111
|
-
<span class='object_link'><a href="NetLinx/
|
112
|
-
<small>NetLinx::
|
139
|
+
<span class='object_link'><a href="NetLinx/System.html#data_bits-instance_method" title="NetLinx::System#data_bits (method)">#data_bits</a></span>
|
140
|
+
<small>NetLinx::System</small>
|
113
141
|
</li>
|
114
142
|
|
115
143
|
|
116
144
|
<li class="r2 ">
|
117
|
-
<span class='object_link'><a href="NetLinx/
|
118
|
-
<small>NetLinx::
|
145
|
+
<span class='object_link'><a href="NetLinx/Project.html#dealer-instance_method" title="NetLinx::Project#dealer (method)">#dealer</a></span>
|
146
|
+
<small>NetLinx::Project</small>
|
119
147
|
</li>
|
120
148
|
|
121
149
|
|
122
150
|
<li class="r1 ">
|
151
|
+
<span class='object_link'><a href="NetLinx/SystemFile.html#description-instance_method" title="NetLinx::SystemFile#description (method)">#description</a></span>
|
152
|
+
<small>NetLinx::SystemFile</small>
|
153
|
+
</li>
|
154
|
+
|
155
|
+
|
156
|
+
<li class="r2 ">
|
123
157
|
<span class='object_link'><a href="NetLinx/Project.html#description-instance_method" title="NetLinx::Project#description (method)">#description</a></span>
|
124
158
|
<small>NetLinx::Project</small>
|
125
159
|
</li>
|
126
160
|
|
127
161
|
|
128
|
-
<li class="
|
162
|
+
<li class="r1 ">
|
129
163
|
<span class='object_link'><a href="NetLinx/System.html#description-instance_method" title="NetLinx::System#description (method)">#description</a></span>
|
130
164
|
<small>NetLinx::System</small>
|
131
165
|
</li>
|
132
166
|
|
133
167
|
|
134
|
-
<li class="
|
135
|
-
<span class='object_link'><a href="NetLinx/
|
136
|
-
<small>NetLinx::
|
168
|
+
<li class="r2 ">
|
169
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#description-instance_method" title="NetLinx::Workspace#description (method)">#description</a></span>
|
170
|
+
<small>NetLinx::Workspace</small>
|
137
171
|
</li>
|
138
172
|
|
139
173
|
|
140
|
-
<li class="
|
174
|
+
<li class="r1 ">
|
141
175
|
<span class='object_link'><a href="NetLinx/Project.html#designer-instance_method" title="NetLinx::Project#designer (method)">#designer</a></span>
|
142
176
|
<small>NetLinx::Project</small>
|
143
177
|
</li>
|
144
178
|
|
145
179
|
|
180
|
+
<li class="r2 ">
|
181
|
+
<span class='object_link'><a href="NetLinx/SystemFile.html#devices-instance_method" title="NetLinx::SystemFile#devices (method)">#devices</a></span>
|
182
|
+
<small>NetLinx::SystemFile</small>
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
146
186
|
<li class="r1 ">
|
187
|
+
<span class='object_link'><a href="NetLinx/System.html#ensure_availability-instance_method" title="NetLinx::System#ensure_availability (method)">#ensure_availability</a></span>
|
188
|
+
<small>NetLinx::System</small>
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
<li class="r2 ">
|
147
193
|
<span class='object_link'><a href="NetLinx/Workspace.html#file-instance_method" title="NetLinx::Workspace#file (method)">#file</a></span>
|
148
194
|
<small>NetLinx::Workspace</small>
|
149
195
|
</li>
|
150
196
|
|
151
197
|
|
152
|
-
<li class="
|
198
|
+
<li class="r1 ">
|
153
199
|
<span class='object_link'><a href="NetLinx/System.html#files-instance_method" title="NetLinx::System#files (method)">#files</a></span>
|
154
200
|
<small>NetLinx::System</small>
|
155
201
|
</li>
|
156
202
|
|
157
203
|
|
204
|
+
<li class="r2 ">
|
205
|
+
<span class='object_link'><a href="NetLinx/System.html#flow_control-instance_method" title="NetLinx::System#flow_control (method)">#flow_control</a></span>
|
206
|
+
<small>NetLinx::System</small>
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
158
210
|
<li class="r1 ">
|
159
211
|
<span class='object_link'><a href="NetLinx/Compile/Extension/APW.html#get_handler-class_method" title="NetLinx::Compile::Extension::APW.get_handler (method)">get_handler</a></span>
|
160
212
|
<small>NetLinx::Compile::Extension::APW</small>
|
@@ -204,11 +256,59 @@
|
|
204
256
|
|
205
257
|
|
206
258
|
<li class="r1 ">
|
259
|
+
<span class='object_link'><a href="NetLinx/Rake/Workspace/GenerateAPW.html#initialize-instance_method" title="NetLinx::Rake::Workspace::GenerateAPW#initialize (method)">#initialize</a></span>
|
260
|
+
<small>NetLinx::Rake::Workspace::GenerateAPW</small>
|
261
|
+
</li>
|
262
|
+
|
263
|
+
|
264
|
+
<li class="r2 ">
|
207
265
|
<span class='object_link'><a href="NetLinx/SystemFile.html#initialize-instance_method" title="NetLinx::SystemFile#initialize (method)">#initialize</a></span>
|
208
266
|
<small>NetLinx::SystemFile</small>
|
209
267
|
</li>
|
210
268
|
|
211
269
|
|
270
|
+
<li class="r1 ">
|
271
|
+
<span class='object_link'><a href="NetLinx/Rake/Workspace/CreateWorkspaceConfig.html#initialize-instance_method" title="NetLinx::Rake::Workspace::CreateWorkspaceConfig#initialize (method)">#initialize</a></span>
|
272
|
+
<small>NetLinx::Rake::Workspace::CreateWorkspaceConfig</small>
|
273
|
+
</li>
|
274
|
+
|
275
|
+
|
276
|
+
<li class="r2 ">
|
277
|
+
<span class='object_link'><a href="NetLinx/System.html#ip_address-instance_method" title="NetLinx::System#ip_address (method)">#ip_address</a></span>
|
278
|
+
<small>NetLinx::System</small>
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li class="r1 ">
|
283
|
+
<span class='object_link'><a href="NetLinx/System.html#ip_port-instance_method" title="NetLinx::System#ip_port (method)">#ip_port</a></span>
|
284
|
+
<small>NetLinx::System</small>
|
285
|
+
</li>
|
286
|
+
|
287
|
+
|
288
|
+
<li class="r2 ">
|
289
|
+
<span class='object_link'><a href="NetLinx/System.html#name-instance_method" title="NetLinx::System#name (method)">#name</a></span>
|
290
|
+
<small>NetLinx::System</small>
|
291
|
+
</li>
|
292
|
+
|
293
|
+
|
294
|
+
<li class="r1 ">
|
295
|
+
<span class='object_link'><a href="NetLinx/Rake/Workspace/GenerateAPW.html#name-instance_method" title="NetLinx::Rake::Workspace::GenerateAPW#name (method)">#name</a></span>
|
296
|
+
<small>NetLinx::Rake::Workspace::GenerateAPW</small>
|
297
|
+
</li>
|
298
|
+
|
299
|
+
|
300
|
+
<li class="r2 ">
|
301
|
+
<span class='object_link'><a href="NetLinx/SystemFile.html#name-instance_method" title="NetLinx::SystemFile#name (method)">#name</a></span>
|
302
|
+
<small>NetLinx::SystemFile</small>
|
303
|
+
</li>
|
304
|
+
|
305
|
+
|
306
|
+
<li class="r1 ">
|
307
|
+
<span class='object_link'><a href="NetLinx/Rake/Workspace/CreateWorkspaceConfig.html#name-instance_method" title="NetLinx::Rake::Workspace::CreateWorkspaceConfig#name (method)">#name</a></span>
|
308
|
+
<small>NetLinx::Rake::Workspace::CreateWorkspaceConfig</small>
|
309
|
+
</li>
|
310
|
+
|
311
|
+
|
212
312
|
<li class="r2 ">
|
213
313
|
<span class='object_link'><a href="NetLinx/Workspace.html#name-instance_method" title="NetLinx::Workspace#name (method)">#name</a></span>
|
214
314
|
<small>NetLinx::Workspace</small>
|
@@ -222,29 +322,41 @@
|
|
222
322
|
|
223
323
|
|
224
324
|
<li class="r2 ">
|
225
|
-
<span class='object_link'><a href="NetLinx/
|
226
|
-
<small>NetLinx::
|
325
|
+
<span class='object_link'><a href="NetLinx/System.html#parity-instance_method" title="NetLinx::System#parity (method)">#parity</a></span>
|
326
|
+
<small>NetLinx::System</small>
|
227
327
|
</li>
|
228
328
|
|
229
329
|
|
230
330
|
<li class="r1 ">
|
231
|
-
<span class='object_link'><a href="NetLinx/
|
232
|
-
<small>NetLinx::
|
331
|
+
<span class='object_link'><a href="NetLinx/Workspace/YAML.html#parse-class_method" title="NetLinx::Workspace::YAML.parse (method)">parse</a></span>
|
332
|
+
<small>NetLinx::Workspace::YAML</small>
|
233
333
|
</li>
|
234
334
|
|
235
335
|
|
236
336
|
<li class="r2 ">
|
237
|
-
<span class='object_link'><a href="NetLinx/Workspace.html#
|
238
|
-
<small>NetLinx::Workspace</small>
|
337
|
+
<span class='object_link'><a href="NetLinx/Workspace/YAML.html#parse_file-class_method" title="NetLinx::Workspace::YAML.parse_file (method)">parse_file</a></span>
|
338
|
+
<small>NetLinx::Workspace::YAML</small>
|
239
339
|
</li>
|
240
340
|
|
241
341
|
|
242
342
|
<li class="r1 ">
|
343
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#parse_xml-instance_method" title="NetLinx::Workspace#parse_xml (method)">#parse_xml</a></span>
|
344
|
+
<small>NetLinx::Workspace</small>
|
345
|
+
</li>
|
346
|
+
|
347
|
+
|
348
|
+
<li class="r2 ">
|
243
349
|
<span class='object_link'><a href="NetLinx/SystemFile.html#path-instance_method" title="NetLinx::SystemFile#path (method)">#path</a></span>
|
244
350
|
<small>NetLinx::SystemFile</small>
|
245
351
|
</li>
|
246
352
|
|
247
353
|
|
354
|
+
<li class="r1 ">
|
355
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#path-instance_method" title="NetLinx::Workspace#path (method)">#path</a></span>
|
356
|
+
<small>NetLinx::Workspace</small>
|
357
|
+
</li>
|
358
|
+
|
359
|
+
|
248
360
|
<li class="r2 ">
|
249
361
|
<span class='object_link'><a href="NetLinx/System.html#project-instance_method" title="NetLinx::System#project (method)">#project</a></span>
|
250
362
|
<small>NetLinx::System</small>
|
@@ -276,17 +388,29 @@
|
|
276
388
|
|
277
389
|
|
278
390
|
<li class="r1 ">
|
391
|
+
<span class='object_link'><a href="NetLinx/System.html#stop_bits-instance_method" title="NetLinx::System#stop_bits (method)">#stop_bits</a></span>
|
392
|
+
<small>NetLinx::System</small>
|
393
|
+
</li>
|
394
|
+
|
395
|
+
|
396
|
+
<li class="r2 ">
|
279
397
|
<span class='object_link'><a href="NetLinx/SystemFile.html#system-instance_method" title="NetLinx::SystemFile#system (method)">#system</a></span>
|
280
398
|
<small>NetLinx::SystemFile</small>
|
281
399
|
</li>
|
282
400
|
|
283
401
|
|
284
|
-
<li class="
|
402
|
+
<li class="r1 ">
|
285
403
|
<span class='object_link'><a href="NetLinx/Project.html#systems-instance_method" title="NetLinx::Project#systems (method)">#systems</a></span>
|
286
404
|
<small>NetLinx::Project</small>
|
287
405
|
</li>
|
288
406
|
|
289
407
|
|
408
|
+
<li class="r2 ">
|
409
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#to_s-instance_method" title="NetLinx::Workspace#to_s (method)">#to_s</a></span>
|
410
|
+
<small>NetLinx::Workspace</small>
|
411
|
+
</li>
|
412
|
+
|
413
|
+
|
290
414
|
<li class="r1 ">
|
291
415
|
<span class='object_link'><a href="NetLinx/System.html#to_s-instance_method" title="NetLinx::System#to_s (method)">#to_s</a></span>
|
292
416
|
<small>NetLinx::System</small>
|
@@ -294,23 +418,47 @@
|
|
294
418
|
|
295
419
|
|
296
420
|
<li class="r2 ">
|
421
|
+
<span class='object_link'><a href="NetLinx/Project.html#to_s-instance_method" title="NetLinx::Project#to_s (method)">#to_s</a></span>
|
422
|
+
<small>NetLinx::Project</small>
|
423
|
+
</li>
|
424
|
+
|
425
|
+
|
426
|
+
<li class="r1 ">
|
297
427
|
<span class='object_link'><a href="NetLinx/SystemFile.html#to_s-instance_method" title="NetLinx::SystemFile#to_s (method)">#to_s</a></span>
|
298
428
|
<small>NetLinx::SystemFile</small>
|
299
429
|
</li>
|
300
430
|
|
301
431
|
|
432
|
+
<li class="r2 ">
|
433
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#to_xml-instance_method" title="NetLinx::Workspace#to_xml (method)">#to_xml</a></span>
|
434
|
+
<small>NetLinx::Workspace</small>
|
435
|
+
</li>
|
436
|
+
|
437
|
+
|
302
438
|
<li class="r1 ">
|
303
|
-
<span class='object_link'><a href="NetLinx/Workspace.html#
|
439
|
+
<span class='object_link'><a href="NetLinx/Workspace.html#to_xml_element-instance_method" title="NetLinx::Workspace#to_xml_element (method)">#to_xml_element</a></span>
|
304
440
|
<small>NetLinx::Workspace</small>
|
305
441
|
</li>
|
306
442
|
|
307
443
|
|
308
444
|
<li class="r2 ">
|
309
|
-
<span class='object_link'><a href="NetLinx/
|
445
|
+
<span class='object_link'><a href="NetLinx/SystemFile.html#to_xml_element-instance_method" title="NetLinx::SystemFile#to_xml_element (method)">#to_xml_element</a></span>
|
446
|
+
<small>NetLinx::SystemFile</small>
|
447
|
+
</li>
|
448
|
+
|
449
|
+
|
450
|
+
<li class="r1 ">
|
451
|
+
<span class='object_link'><a href="NetLinx/Project.html#to_xml_element-instance_method" title="NetLinx::Project#to_xml_element (method)">#to_xml_element</a></span>
|
310
452
|
<small>NetLinx::Project</small>
|
311
453
|
</li>
|
312
454
|
|
313
455
|
|
456
|
+
<li class="r2 ">
|
457
|
+
<span class='object_link'><a href="NetLinx/System.html#to_xml_element-instance_method" title="NetLinx::System#to_xml_element (method)">#to_xml_element</a></span>
|
458
|
+
<small>NetLinx::System</small>
|
459
|
+
</li>
|
460
|
+
|
461
|
+
|
314
462
|
<li class="r1 ">
|
315
463
|
<span class='object_link'><a href="NetLinx/SystemFile.html#type-instance_method" title="NetLinx::SystemFile#type (method)">#type</a></span>
|
316
464
|
<small>NetLinx::SystemFile</small>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Top Level Namespace
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -103,9 +103,9 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Tue Feb 24 17:43:02 2015 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
|
-
0.8.7.
|
108
|
+
0.8.7.6 (ruby-2.1.3).
|
109
109
|
</div>
|
110
110
|
|
111
111
|
</body>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative 'workspace/create_workspace_config'
|
2
|
+
require_relative 'workspace/generate_apw'
|
3
|
+
|
4
|
+
module NetLinx
|
5
|
+
# :nodoc:
|
6
|
+
module Rake
|
7
|
+
# NetLinx Workspace rake tasks.
|
8
|
+
module Workspace
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
NetLinx::Rake::Workspace::CreateWorkspaceConfig.new
|
14
|
+
NetLinx::Rake::Workspace::GenerateAPW.new
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/tasklib'
|
3
|
+
|
4
|
+
module NetLinx
|
5
|
+
module Rake
|
6
|
+
module Workspace
|
7
|
+
|
8
|
+
# Create a workspace config.yaml file.
|
9
|
+
class CreateWorkspaceConfig < ::Rake::TaskLib
|
10
|
+
|
11
|
+
attr_accessor :name
|
12
|
+
|
13
|
+
def initialize name = :create_workspace_config
|
14
|
+
@name = name
|
15
|
+
yield self if block_given?
|
16
|
+
|
17
|
+
desc "Create a workspace config.yaml file."
|
18
|
+
|
19
|
+
task(name) do
|
20
|
+
config_file = 'workspace.config.yaml'
|
21
|
+
|
22
|
+
if File.exists? config_file
|
23
|
+
puts "Aborted: #{config_file} already exists."
|
24
|
+
next
|
25
|
+
end
|
26
|
+
|
27
|
+
File.open config_file, 'w' do |f|
|
28
|
+
f.write <<EOS
|
29
|
+
systems:
|
30
|
+
-
|
31
|
+
name: Client - Room
|
32
|
+
connection: 192.168.1.2
|
33
|
+
touch_panels:
|
34
|
+
-
|
35
|
+
path: Touch Panel.TP4
|
36
|
+
dps: 10001:1:0
|
37
|
+
ir:
|
38
|
+
-
|
39
|
+
path: IR.irl
|
40
|
+
dps: 5001:1:0
|
41
|
+
EOS
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|