netlinx-workspace 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/NetLinx.html +1 -1
- data/doc/NetLinx/Compile.html +1 -1
- data/doc/NetLinx/Compile/Extension.html +1 -1
- data/doc/NetLinx/Compile/Extension/APW.html +1 -1
- data/doc/NetLinx/Project.html +1 -1
- data/doc/NetLinx/Rake.html +1 -1
- data/doc/NetLinx/Rake/Workspace.html +1 -1
- data/doc/NetLinx/Rake/Workspace/CreateWorkspaceConfig.html +1 -1
- data/doc/NetLinx/Rake/Workspace/GenerateAPW.html +1 -1
- data/doc/NetLinx/System.html +1 -1
- data/doc/NetLinx/SystemFile.html +1 -1
- data/doc/NetLinx/Workspace.html +115 -84
- data/doc/NetLinx/Workspace/YAML.html +10 -6
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/file.license.html +1 -1
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/lib/netlinx/workspace.rb +15 -4
- data/lib/netlinx/workspace/yaml.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06af066cd47df3d68e59a126be7c0a6218fdaf4f
|
|
4
|
+
data.tar.gz: 9a04b1895ebe1f2ec6145b57324a8ddd9aaed8a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70347a1cb88a1d73594e17a42ca0d0d452b34c8868767760cb1abd72290799eaa687090abf7497a7b230300aa199b6779224bda8575213cbe38617845a73eddc
|
|
7
|
+
data.tar.gz: 8aac8035aa30ee0ba11f04a284fb7469789009999d41e25c9d329e0b73df9948b1345e08c058015cc74408d2dfa426fd7cdeadf7b261eea2ad2ff00647a7f3ca
|
data/doc/NetLinx.html
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
123
|
<div id="footer">
|
|
124
|
-
Generated on
|
|
124
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
126
126
|
0.8.7.6 (ruby-2.1.3).
|
|
127
127
|
</div>
|
data/doc/NetLinx/Compile.html
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</div>
|
|
118
118
|
|
|
119
119
|
<div id="footer">
|
|
120
|
-
Generated on
|
|
120
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
121
121
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
122
122
|
0.8.7.6 (ruby-2.1.3).
|
|
123
123
|
</div>
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
</div>
|
|
118
118
|
|
|
119
119
|
<div id="footer">
|
|
120
|
-
Generated on
|
|
120
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
121
121
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
122
122
|
0.8.7.6 (ruby-2.1.3).
|
|
123
123
|
</div>
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
</div>
|
|
211
211
|
|
|
212
212
|
<div id="footer">
|
|
213
|
-
Generated on
|
|
213
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
214
214
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
215
215
|
0.8.7.6 (ruby-2.1.3).
|
|
216
216
|
</div>
|
data/doc/NetLinx/Project.html
CHANGED
|
@@ -1339,7 +1339,7 @@
|
|
|
1339
1339
|
</div>
|
|
1340
1340
|
|
|
1341
1341
|
<div id="footer">
|
|
1342
|
-
Generated on
|
|
1342
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
1343
1343
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1344
1344
|
0.8.7.6 (ruby-2.1.3).
|
|
1345
1345
|
</div>
|
data/doc/NetLinx/Rake.html
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
<div id="footer">
|
|
122
|
-
Generated on
|
|
122
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
123
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
124
124
|
0.8.7.6 (ruby-2.1.3).
|
|
125
125
|
</div>
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
<div id="footer">
|
|
122
|
-
Generated on
|
|
122
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
123
123
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
124
124
|
0.8.7.6 (ruby-2.1.3).
|
|
125
125
|
</div>
|
|
@@ -378,7 +378,7 @@ dps: 5001:1:0
|
|
|
378
378
|
</div>
|
|
379
379
|
|
|
380
380
|
<div id="footer">
|
|
381
|
-
Generated on
|
|
381
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
382
382
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
383
383
|
0.8.7.6 (ruby-2.1.3).
|
|
384
384
|
</div>
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
</div>
|
|
363
363
|
|
|
364
364
|
<div id="footer">
|
|
365
|
-
Generated on
|
|
365
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
366
366
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
367
367
|
0.8.7.6 (ruby-2.1.3).
|
|
368
368
|
</div>
|
data/doc/NetLinx/System.html
CHANGED
|
@@ -2320,7 +2320,7 @@ master with a different ID.</p>
|
|
|
2320
2320
|
</div>
|
|
2321
2321
|
|
|
2322
2322
|
<div id="footer">
|
|
2323
|
-
Generated on
|
|
2323
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
2324
2324
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
2325
2325
|
0.8.7.6 (ruby-2.1.3).
|
|
2326
2326
|
</div>
|
data/doc/NetLinx/SystemFile.html
CHANGED
|
@@ -1041,7 +1041,7 @@
|
|
|
1041
1041
|
</div>
|
|
1042
1042
|
|
|
1043
1043
|
<div id="footer">
|
|
1044
|
-
Generated on
|
|
1044
|
+
Generated on Wed Feb 25 15:09:14 2015 by
|
|
1045
1045
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1046
1046
|
0.8.7.6 (ruby-2.1.3).
|
|
1047
1047
|
</div>
|
data/doc/NetLinx/Workspace.html
CHANGED
|
@@ -169,8 +169,6 @@
|
|
|
169
169
|
|
|
170
170
|
|
|
171
171
|
|
|
172
|
-
<span class="note title readonly">readonly</span>
|
|
173
|
-
|
|
174
172
|
|
|
175
173
|
|
|
176
174
|
|
|
@@ -256,7 +254,7 @@
|
|
|
256
254
|
<li class="public ">
|
|
257
255
|
<span class="summary_signature">
|
|
258
256
|
|
|
259
|
-
<a href="#search-class_method" title="search (class method)">+ (
|
|
257
|
+
<a href="#search-class_method" title="search (class method)">+ (NetLinx::Workspace) <strong>search</strong>(dir: nil) </a>
|
|
260
258
|
|
|
261
259
|
|
|
262
260
|
|
|
@@ -594,17 +592,17 @@ found.</p>
|
|
|
594
592
|
<pre class="lines">
|
|
595
593
|
|
|
596
594
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
595
|
+
45
|
|
596
|
+
46
|
|
597
|
+
47
|
|
598
|
+
48
|
|
599
|
+
49
|
|
600
|
+
50
|
|
601
|
+
51
|
|
602
|
+
52</pre>
|
|
605
603
|
</td>
|
|
606
604
|
<td>
|
|
607
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
605
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 45</span>
|
|
608
606
|
|
|
609
607
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span>
|
|
610
608
|
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
@@ -668,11 +666,11 @@ found.</p>
|
|
|
668
666
|
</div>
|
|
669
667
|
|
|
670
668
|
|
|
671
|
-
<span id=""></span>
|
|
669
|
+
<span id="file=-instance_method"></span>
|
|
672
670
|
<div class="method_details ">
|
|
673
671
|
<h3 class="signature " id="file-instance_method">
|
|
674
672
|
|
|
675
|
-
- (<tt>Object</tt>) <strong>file</strong>
|
|
673
|
+
- (<tt>Object</tt>) <strong>file</strong>
|
|
676
674
|
|
|
677
675
|
|
|
678
676
|
|
|
@@ -806,7 +804,7 @@ found.</p>
|
|
|
806
804
|
<div class="method_details first">
|
|
807
805
|
<h3 class="signature first" id="search-class_method">
|
|
808
806
|
|
|
809
|
-
+ (<tt>
|
|
807
|
+
+ (<tt><span class='object_link'><a href="" title="NetLinx::Workspace (class)">NetLinx::Workspace</a></span></tt>) <strong>search</strong>(dir: nil)
|
|
810
808
|
|
|
811
809
|
|
|
812
810
|
|
|
@@ -823,6 +821,19 @@ found.</p>
|
|
|
823
821
|
</div>
|
|
824
822
|
<div class="tags">
|
|
825
823
|
|
|
824
|
+
<p class="tag_title">Returns:</p>
|
|
825
|
+
<ul class="return">
|
|
826
|
+
|
|
827
|
+
<li>
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="NetLinx::Workspace (class)">NetLinx::Workspace</a></span></tt>)</span>
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
</li>
|
|
835
|
+
|
|
836
|
+
</ul>
|
|
826
837
|
|
|
827
838
|
</div><table class="source_code">
|
|
828
839
|
<tr>
|
|
@@ -830,7 +841,6 @@ found.</p>
|
|
|
830
841
|
<pre class="lines">
|
|
831
842
|
|
|
832
843
|
|
|
833
|
-
19
|
|
834
844
|
20
|
|
835
845
|
21
|
|
836
846
|
22
|
|
@@ -841,19 +851,40 @@ found.</p>
|
|
|
841
851
|
27
|
|
842
852
|
28
|
|
843
853
|
29
|
|
844
|
-
30
|
|
854
|
+
30
|
|
855
|
+
31
|
|
856
|
+
32
|
|
857
|
+
33
|
|
858
|
+
34
|
|
859
|
+
35
|
|
860
|
+
36
|
|
861
|
+
37
|
|
862
|
+
38
|
|
863
|
+
39
|
|
864
|
+
40
|
|
865
|
+
41</pre>
|
|
845
866
|
</td>
|
|
846
867
|
<td>
|
|
847
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
868
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 20</span>
|
|
848
869
|
|
|
849
870
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_search'>search</span> <span class='label'>dir:</span> <span class='kw'>nil</span>
|
|
871
|
+
<span class='id identifier rubyid_yaml_config_file_name'>yaml_config_file_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>workspace.config.yaml</span><span class='tstring_end'>'</span></span>
|
|
872
|
+
|
|
850
873
|
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>||=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span>
|
|
851
874
|
<span class='kw'>while</span> <span class='id identifier rubyid_dir'>dir</span> <span class='op'>!=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>..</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
|
|
852
|
-
<span class='id identifier
|
|
875
|
+
<span class='id identifier rubyid_workspace_files'>workspace_files</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dir'>dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/{</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_yaml_config_file_name'>yaml_config_file_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>,*.apw}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
|
853
876
|
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>..</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_dir'>dir</span><span class='rparen'>)</span>
|
|
854
|
-
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier
|
|
877
|
+
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_workspace_files'>workspace_files</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
855
878
|
|
|
856
|
-
<span class='
|
|
879
|
+
<span class='id identifier rubyid_workspace_files'>workspace_files</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_workspace_file'>workspace_file</span><span class='op'>|</span>
|
|
880
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_workspace_file'>workspace_file</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_yaml_config_file_name'>yaml_config_file_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
881
|
+
<span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_chdir'>chdir</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='id identifier rubyid_workspace_file'>workspace_file</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
|
882
|
+
<span class='kw'>return</span> <span class='const'>NetLinx</span><span class='op'>::</span><span class='const'>Workspace</span><span class='op'>::</span><span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_parse_file'>parse_file</span> <span class='id identifier rubyid_yaml_config_file_name'>yaml_config_file_name</span>
|
|
883
|
+
<span class='kw'>end</span>
|
|
884
|
+
<span class='kw'>else</span>
|
|
885
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_new'>new</span> <span class='label'>file:</span> <span class='id identifier rubyid_workspace_files'>workspace_files</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
|
886
|
+
<span class='kw'>end</span>
|
|
887
|
+
<span class='kw'>end</span>
|
|
857
888
|
<span class='kw'>end</span>
|
|
858
889
|
|
|
859
890
|
<span class='kw'>nil</span>
|
|
@@ -895,13 +926,13 @@ found.</p>
|
|
|
895
926
|
<pre class="lines">
|
|
896
927
|
|
|
897
928
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
929
|
+
55
|
|
930
|
+
56
|
|
931
|
+
57
|
|
932
|
+
58</pre>
|
|
902
933
|
</td>
|
|
903
934
|
<td>
|
|
904
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
935
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 55</span>
|
|
905
936
|
|
|
906
937
|
<span class='kw'>def</span> <span class='op'><<</span> <span class='id identifier rubyid_project'>project</span>
|
|
907
938
|
<span class='ivar'>@projects</span> <span class='op'><<</span> <span class='id identifier rubyid_project'>project</span>
|
|
@@ -938,18 +969,18 @@ found.</p>
|
|
|
938
969
|
<pre class="lines">
|
|
939
970
|
|
|
940
971
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
972
|
+
83
|
|
973
|
+
84
|
|
974
|
+
85
|
|
975
|
+
86
|
|
976
|
+
87
|
|
977
|
+
88
|
|
978
|
+
89
|
|
979
|
+
90
|
|
980
|
+
91</pre>
|
|
950
981
|
</td>
|
|
951
982
|
<td>
|
|
952
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
983
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 83</span>
|
|
953
984
|
|
|
954
985
|
<span class='kw'>def</span> <span class='id identifier rubyid_compile'>compile</span>
|
|
955
986
|
<span class='id identifier rubyid_compiler_results'>compiler_results</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
@@ -1009,19 +1040,19 @@ found.</p>
|
|
|
1009
1040
|
<pre class="lines">
|
|
1010
1041
|
|
|
1011
1042
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1043
|
+
71
|
|
1044
|
+
72
|
|
1045
|
+
73
|
|
1046
|
+
74
|
|
1047
|
+
75
|
|
1048
|
+
76
|
|
1049
|
+
77
|
|
1050
|
+
78
|
|
1051
|
+
79
|
|
1052
|
+
80</pre>
|
|
1022
1053
|
</td>
|
|
1023
1054
|
<td>
|
|
1024
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1055
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 71</span>
|
|
1025
1056
|
|
|
1026
1057
|
<span class='kw'>def</span> <span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_file'>file</span>
|
|
1027
1058
|
<span class='id identifier rubyid_included'>included</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
@@ -1082,13 +1113,13 @@ found.</p>
|
|
|
1082
1113
|
<pre class="lines">
|
|
1083
1114
|
|
|
1084
1115
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1116
|
+
123
|
|
1117
|
+
124
|
|
1118
|
+
125
|
|
1119
|
+
126</pre>
|
|
1089
1120
|
</td>
|
|
1090
1121
|
<td>
|
|
1091
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1122
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 123</span>
|
|
1092
1123
|
|
|
1093
1124
|
<span class='kw'>def</span> <span class='id identifier rubyid_parse_xml'>parse_xml</span> <span class='id identifier rubyid_string'>string</span>
|
|
1094
1125
|
<span class='id identifier rubyid_parse_xml_element'>parse_xml_element</span> <span class='const'>REXML</span><span class='op'>::</span><span class='const'>Document</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
|
|
@@ -1125,12 +1156,12 @@ found.</p>
|
|
|
1125
1156
|
<pre class="lines">
|
|
1126
1157
|
|
|
1127
1158
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1159
|
+
66
|
|
1160
|
+
67
|
|
1161
|
+
68</pre>
|
|
1131
1162
|
</td>
|
|
1132
1163
|
<td>
|
|
1133
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1164
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 66</span>
|
|
1134
1165
|
|
|
1135
1166
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
|
1136
1167
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span> <span class='ivar'>@file</span> <span class='kw'>if</span> <span class='ivar'>@file</span>
|
|
@@ -1166,12 +1197,12 @@ found.</p>
|
|
|
1166
1197
|
<pre class="lines">
|
|
1167
1198
|
|
|
1168
1199
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1200
|
+
61
|
|
1201
|
+
62
|
|
1202
|
+
63</pre>
|
|
1172
1203
|
</td>
|
|
1173
1204
|
<td>
|
|
1174
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1205
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 61</span>
|
|
1175
1206
|
|
|
1176
1207
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
|
1177
1208
|
<span class='ivar'>@name</span>
|
|
@@ -1235,19 +1266,19 @@ href="https://bugs.ruby-lang.org/issues/10864">bugs.ruby-lang.org/issues/10864</
|
|
|
1235
1266
|
<pre class="lines">
|
|
1236
1267
|
|
|
1237
1268
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1269
|
+
110
|
|
1270
|
+
111
|
|
1271
|
+
112
|
|
1272
|
+
113
|
|
1273
|
+
114
|
|
1274
|
+
115
|
|
1275
|
+
116
|
|
1276
|
+
117
|
|
1277
|
+
118
|
|
1278
|
+
119</pre>
|
|
1248
1279
|
</td>
|
|
1249
1280
|
<td>
|
|
1250
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1281
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 110</span>
|
|
1251
1282
|
|
|
1252
1283
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_xml'>to_xml</span> <span class='label'>indent:</span> <span class='op'>-</span><span class='int'>1</span>
|
|
1253
1284
|
<span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'><?xml version="1.0" encoding="UTF-8"?></span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
|
@@ -1308,20 +1339,20 @@ href="https://bugs.ruby-lang.org/issues/10864">bugs.ruby-lang.org/issues/10864</
|
|
|
1308
1339
|
<pre class="lines">
|
|
1309
1340
|
|
|
1310
1341
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1342
|
+
94
|
|
1343
|
+
95
|
|
1344
|
+
96
|
|
1345
|
+
97
|
|
1346
|
+
98
|
|
1347
|
+
99
|
|
1348
|
+
100
|
|
1349
|
+
101
|
|
1350
|
+
102
|
|
1351
|
+
103
|
|
1352
|
+
104</pre>
|
|
1322
1353
|
</td>
|
|
1323
1354
|
<td>
|
|
1324
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line
|
|
1355
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace.rb', line 94</span>
|
|
1325
1356
|
|
|
1326
1357
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_xml_element'>to_xml_element</span>
|
|
1327
1358
|
<span class='const'>REXML</span><span class='op'>::</span><span class='const'>Element</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Workspace</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_workspace'>workspace</span><span class='op'>|</span>
|
|
@@ -1344,7 +1375,7 @@ href="https://bugs.ruby-lang.org/issues/10864">bugs.ruby-lang.org/issues/10864</
|
|
|
1344
1375
|
</div>
|
|
1345
1376
|
|
|
1346
1377
|
<div id="footer">
|
|
1347
|
-
Generated on
|
|
1378
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
1348
1379
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1349
1380
|
0.8.7.6 (ruby-2.1.3).
|
|
1350
1381
|
</div>
|
|
@@ -268,7 +268,9 @@
|
|
|
268
268
|
59
|
|
269
269
|
60
|
|
270
270
|
61
|
|
271
|
-
62
|
|
271
|
+
62
|
|
272
|
+
63
|
|
273
|
+
64</pre>
|
|
272
274
|
</td>
|
|
273
275
|
<td>
|
|
274
276
|
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace/yaml.rb', line 9</span>
|
|
@@ -306,6 +308,8 @@
|
|
|
306
308
|
<span class='kw'>end</span>
|
|
307
309
|
<span class='kw'>end</span>
|
|
308
310
|
|
|
311
|
+
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.apw</span><span class='tstring_end'>"</span></span>
|
|
312
|
+
|
|
309
313
|
<span class='comment'># Ensure exactly one system in the workspace is set active.
|
|
310
314
|
</span> <span class='id identifier rubyid_a_system_is_active'>a_system_is_active</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
311
315
|
<span class='id identifier rubyid_workspace'>workspace</span><span class='period'>.</span><span class='id identifier rubyid_projects'>projects</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_project'>project</span><span class='op'>|</span>
|
|
@@ -369,12 +373,12 @@
|
|
|
369
373
|
<pre class="lines">
|
|
370
374
|
|
|
371
375
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
67
|
|
377
|
+
68
|
|
378
|
+
69</pre>
|
|
375
379
|
</td>
|
|
376
380
|
<td>
|
|
377
|
-
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace/yaml.rb', line
|
|
381
|
+
<pre class="code"><span class="info file"># File 'lib/netlinx/workspace/yaml.rb', line 67</span>
|
|
378
382
|
|
|
379
383
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_file'>parse_file</span> <span class='id identifier rubyid_file'>file</span>
|
|
380
384
|
<span class='id identifier rubyid_parse'>parse</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span>
|
|
@@ -389,7 +393,7 @@
|
|
|
389
393
|
</div>
|
|
390
394
|
|
|
391
395
|
<div id="footer">
|
|
392
|
-
Generated on
|
|
396
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
393
397
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
394
398
|
0.8.7.6 (ruby-2.1.3).
|
|
395
399
|
</div>
|
data/doc/_index.html
CHANGED
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
</div>
|
|
264
264
|
|
|
265
265
|
<div id="footer">
|
|
266
|
-
Generated on
|
|
266
|
+
Generated on Wed Feb 25 15:09:11 2015 by
|
|
267
267
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
268
268
|
0.8.7.6 (ruby-2.1.3).
|
|
269
269
|
</div>
|
data/doc/file.README.html
CHANGED
|
@@ -285,7 +285,7 @@ available.</p>
|
|
|
285
285
|
</div></div>
|
|
286
286
|
|
|
287
287
|
<div id="footer">
|
|
288
|
-
Generated on
|
|
288
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
289
289
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
290
290
|
0.8.7.6 (ruby-2.1.3).
|
|
291
291
|
</div>
|
data/doc/file.license.html
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<div id="content"><div id='filecontents'>Copyright 2013-2015 Alex McLain<br/><br/>Licensed under the Apache License, Version 2.0 (the "License");<br/>you may not use this file except in compliance with the License.<br/>You may obtain a copy of the License at<br/><br/> http://www.apache.org/licenses/LICENSE-2.0<br/><br/>Unless required by applicable law or agreed to in writing, software<br/>distributed under the License is distributed on an "AS IS" BASIS,<br/>WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br/>See the License for the specific language governing permissions and<br/>limitations under the License.</div></div>
|
|
65
65
|
|
|
66
66
|
<div id="footer">
|
|
67
|
-
Generated on
|
|
67
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
68
68
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
69
69
|
0.8.7.6 (ruby-2.1.3).
|
|
70
70
|
</div>
|
data/doc/index.html
CHANGED
|
@@ -285,7 +285,7 @@ available.</p>
|
|
|
285
285
|
</div></div>
|
|
286
286
|
|
|
287
287
|
<div id="footer">
|
|
288
|
-
Generated on
|
|
288
|
+
Generated on Wed Feb 25 15:09:12 2015 by
|
|
289
289
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
290
290
|
0.8.7.6 (ruby-2.1.3).
|
|
291
291
|
</div>
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</div>
|
|
104
104
|
|
|
105
105
|
<div id="footer">
|
|
106
|
-
Generated on
|
|
106
|
+
Generated on Wed Feb 25 15:09:13 2015 by
|
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
108
108
|
0.8.7.6 (ruby-2.1.3).
|
|
109
109
|
</div>
|
data/lib/netlinx/workspace.rb
CHANGED
|
@@ -13,17 +13,28 @@ module NetLinx
|
|
|
13
13
|
attr_accessor :name
|
|
14
14
|
attr_accessor :description
|
|
15
15
|
attr_accessor :projects
|
|
16
|
-
|
|
16
|
+
attr_accessor :file
|
|
17
17
|
|
|
18
18
|
# Search backwards through directory tree and return the first workspace found.
|
|
19
|
+
# @return [NetLinx::Workspace]
|
|
19
20
|
def self.search dir: nil
|
|
21
|
+
yaml_config_file_name = 'workspace.config.yaml'
|
|
22
|
+
|
|
20
23
|
dir ||= File.expand_path '.'
|
|
21
24
|
while dir != File.expand_path('..', dir)
|
|
22
|
-
|
|
25
|
+
workspace_files = Dir["#{dir}/{#{yaml_config_file_name},*.apw}"]
|
|
23
26
|
dir = File.expand_path('..', dir)
|
|
24
|
-
next if
|
|
27
|
+
next if workspace_files.empty?
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
workspace_files.first.tap do |workspace_file|
|
|
30
|
+
if workspace_file.end_with? "/#{yaml_config_file_name}"
|
|
31
|
+
Dir.chdir File.dirname(workspace_file) do
|
|
32
|
+
return NetLinx::Workspace::YAML.parse_file yaml_config_file_name
|
|
33
|
+
end
|
|
34
|
+
else
|
|
35
|
+
return new file: workspace_files.first
|
|
36
|
+
end
|
|
37
|
+
end
|
|
27
38
|
end
|
|
28
39
|
|
|
29
40
|
nil
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: netlinx-workspace
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex McLain
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: netlinx-compile
|