scicom 0.3.0-java → 0.4.0-java
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/README.md +239 -55
- data/Rakefile +58 -5
- data/config.rb +34 -2
- data/doc/Array.html +153 -0
- data/doc/Java/OrgRenjinSexp/LogicalArrayVector.html +120 -0
- data/doc/Java/OrgRenjinSexp/StringArrayVector.html +133 -0
- data/doc/Java/RbScicom/MDDoubleVector.html +133 -0
- data/doc/MDArray.html +153 -0
- data/doc/MergeObservable.html +347 -0
- data/doc/NegRange.html +166 -0
- data/doc/PackageManager.html +823 -0
- data/doc/PackageManager/ParseXML.html +595 -0
- data/doc/Range.html +243 -0
- data/doc/Renjin.html +2210 -0
- data/doc/Renjin/Attributes.html +401 -0
- data/doc/Renjin/Closure.html +181 -0
- data/doc/Renjin/ComplexVector.html +557 -0
- data/doc/Renjin/DataFrame.html +258 -0
- data/doc/Renjin/Environment.html +279 -0
- data/doc/Renjin/Function.html +243 -0
- data/doc/Renjin/Index.html +628 -0
- data/doc/Renjin/List.html +398 -0
- data/doc/Renjin/Logical.html +352 -0
- data/doc/Renjin/Primitive.html +181 -0
- data/doc/Renjin/RBSexp.html +1151 -0
- data/doc/Renjin/RubySexp.html +498 -0
- data/doc/Renjin/Vector.html +3163 -0
- data/doc/RinRuby.html +2079 -0
- data/doc/_index.html +365 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +159 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +159 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +939 -0
- data/doc/top-level-namespace.html +679 -0
- data/lib/JRubyR/attributes.rb +5 -2
- data/lib/JRubyR/callback.rb +115 -0
- data/lib/JRubyR/environment.rb +0 -1
- data/lib/JRubyR/indexed.rb +139 -0
- data/lib/JRubyR/list.rb +0 -16
- data/lib/JRubyR/logical_value.rb +0 -1
- data/lib/JRubyR/rbsexp.rb +20 -131
- data/lib/JRubyR/renjin.rb +201 -71
- data/lib/JRubyR/vector.rb +16 -15
- data/lib/scicom.rb +1 -3
- data/target/helper.jar +0 -0
- data/test/test_R_interface.rb +1 -1
- data/test/test_array.rb +1 -1
- data/test/test_assign_mdarray.rb +1 -1
- data/test/test_assign_mdarray_2d.rb +1 -1
- data/test/test_assign_mdarray_3d.rb +1 -1
- data/test/test_attributes.rb +1 -1
- data/test/test_basic.rb +7 -5
- data/test/test_callback.rb +176 -0
- data/test/test_complete.rb +1 -1
- data/test/test_creation.rb +29 -5
- data/test/test_dataframe.rb +1 -1
- data/test/test_factor.rb +1 -1
- data/test/test_functions.rb +13 -10
- data/test/test_linear_model.rb +1 -1
- data/test/test_list.rb +49 -10
- data/test/test_matrix.rb +6 -6
- data/test/test_operators.rb +1 -1
- data/test/test_package.rb +5 -5
- data/test/test_vector.rb +13 -7
- data/vendor/aether-api-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-connector-basic-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-impl-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-spi-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-transport-file-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-transport-http-1.0.2.v20150114.jar +0 -0
- data/vendor/aether-util-1.0.2.v20150114.jar +0 -0
- data/vendor/aopalliance-1.0.jar +0 -0
- data/vendor/asm-3.3.1.jar +0 -0
- data/vendor/asm-5.0.4.jar +0 -0
- data/vendor/asm-commons-5.0.4.jar +0 -0
- data/vendor/asm-tree-5.0.4.jar +0 -0
- data/vendor/asm-util-5.0.4.jar +0 -0
- data/vendor/blas-0.8.jar +0 -0
- data/vendor/cdi-api-1.0.jar +0 -0
- data/vendor/codemodel-2.6.jar +0 -0
- data/vendor/collections-generic-4.01.jar +0 -0
- data/vendor/commons-codec-1.6.jar +0 -0
- data/vendor/commons-compress-1.4.1.jar +0 -0
- data/vendor/commons-logging-1.1.1.jar +0 -0
- data/vendor/commons-math-2.2.jar +0 -0
- data/vendor/commons-vfs2-2.0.jar +0 -0
- data/vendor/datasets-0.8.1891.jar +0 -0
- data/vendor/f2jutil-0.8.jar +0 -0
- data/vendor/gcc-runtime-0.8.1891.jar +0 -0
- data/vendor/grDevices-0.8.1891.jar +0 -0
- data/vendor/graphics-0.8.1891.jar +0 -0
- data/vendor/guava-17.0.jar +0 -0
- data/vendor/httpclient-4.2.6.jar +0 -0
- data/vendor/httpcore-4.2.5.jar +0 -0
- data/vendor/javax.inject-1.jar +0 -0
- data/vendor/jcl-over-slf4j-1.6.2.jar +0 -0
- data/vendor/joda-time-2.0.jar +0 -0
- data/vendor/jsr250-api-1.0.jar +0 -0
- data/vendor/jtransforms-2.4.jar +0 -0
- data/vendor/jung-api-2.0.1.jar +0 -0
- data/vendor/jung-graph-impl-2.0.1.jar +0 -0
- data/vendor/lapack-0.8.jar +0 -0
- data/vendor/maven-aether-provider-3.1.0.jar +0 -0
- data/vendor/maven-model-3.1.0.jar +0 -0
- data/vendor/maven-model-builder-3.1.0.jar +0 -0
- data/vendor/maven-repository-metadata-3.1.0.jar +0 -0
- data/vendor/maven-scm-api-1.4.jar +0 -0
- data/vendor/maven-scm-provider-svn-commons-1.4.jar +0 -0
- data/vendor/maven-scm-provider-svnexe-1.4.jar +0 -0
- data/vendor/maven-settings-3.1.0.jar +0 -0
- data/vendor/maven-settings-builder-3.1.0.jar +0 -0
- data/vendor/methods-0.8.1891.jar +0 -0
- data/vendor/netlib-java-0.9.3-renjin-patched-2.jar +0 -0
- data/vendor/org.eclipse.sisu.inject-0.0.0.M2a.jar +0 -0
- data/vendor/org.eclipse.sisu.plexus-0.0.0.M2a.jar +0 -0
- data/vendor/plexus-cipher-1.4.jar +0 -0
- data/vendor/plexus-classworlds-2.4.jar +0 -0
- data/vendor/plexus-component-annotations-1.5.5.jar +0 -0
- data/vendor/plexus-interpolation-1.16.jar +0 -0
- data/vendor/plexus-sec-dispatcher-1.3.jar +0 -0
- data/vendor/plexus-utils-1.5.6.jar +0 -0
- data/vendor/plexus-utils-3.0.10.jar +0 -0
- data/vendor/regexp-1.3.jar +0 -0
- data/vendor/renjin-aether-package-loader-0.8.1891.jar +0 -0
- data/vendor/renjin-appl-0.8.1891.jar +0 -0
- data/vendor/renjin-core-0.8.1891.jar +0 -0
- data/vendor/renjin-gnur-runtime-0.8.1891.jar +0 -0
- data/vendor/renjin-script-engine-0.8.1891.jar +0 -0
- data/vendor/sisu-guice-3.1.0-no_aop.jar +0 -0
- data/vendor/slf4j-api-1.6.2.jar +0 -0
- data/vendor/stats-0.8.1891.jar +0 -0
- data/vendor/utils-0.8.1891.jar +0 -0
- data/vendor/xerbla-0.8.jar +0 -0
- data/vendor/xz-1.0.jar +0 -0
- data/version.rb +1 -1
- metadata +229 -127
- data/cran/AppliedPredictiveModeling.jar +0 -0
- data/cran/AppliedPredictiveModeling.xml +0 -25
- data/cran/AssetPricing.jar +0 -0
- data/cran/AssetPricing.xml +0 -25
- data/lib/env.rb +0 -12
- data/lib/rinruby.rb +0 -795
- data/test/env.rb +0 -2
- data/test/test_tmp.rb +0 -67
- data/vendor/Renjin.pdf +0 -0
- data/vendor/renjin-script-engine-0.7.0-RC7-SNAPSHOT-jar-with-dependencies.jar +0 -0
data/doc/NegRange.html
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: NegRange
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.6
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '';
|
|
20
|
+
framesUrl = "frames.html#!NegRange.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="_index.html">Index (N)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">NegRange</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Class: NegRange
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Range.html" title="Range (class)">Range</a></span></span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next"><span class='object_link'><a href="Range.html" title="Range (class)">Range</a></span></li>
|
|
82
|
+
|
|
83
|
+
<li class="next">NegRange</li>
|
|
84
|
+
|
|
85
|
+
</ul>
|
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
87
|
+
|
|
88
|
+
</dd>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
|
99
|
+
<dd class="r2 last">lib/JRubyR/ruby_classes.rb</dd>
|
|
100
|
+
|
|
101
|
+
</dl>
|
|
102
|
+
<div class="clear"></div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<h6 id="label-"></h6>
|
|
108
|
+
|
|
109
|
+
<p>Class NegRange exists to represent a negative range, e.g., -(1...10). Such
|
|
110
|
+
a range is used to index vectors and means all elements but the ones in the
|
|
111
|
+
given range. Class NegRange is parsed to become "-(1:10)" in R.</p>
|
|
112
|
+
|
|
113
|
+
<h6 id="label-"></h6>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="tags">
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<h2>Instance Attribute Summary</h2>
|
|
128
|
+
|
|
129
|
+
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Renjin/RBSexp.html" title="Renjin::RBSexp (module)">Renjin::RBSexp</a></span></h3>
|
|
130
|
+
<p class="inherited"><span class='object_link'><a href="Renjin/RBSexp.html#attr-instance_method" title="Renjin::RBSexp#attr (method)">#attr</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#rvar-instance_method" title="Renjin::RBSexp#rvar (method)">#rvar</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#scope-instance_method" title="Renjin::RBSexp#scope (method)">#scope</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#sexp-instance_method" title="Renjin::RBSexp#sexp (method)">#sexp</a></span></p>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
<h2>Method Summary</h2>
|
|
141
|
+
|
|
142
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Range.html" title="Range (class)">Range</a></span></h3>
|
|
143
|
+
<p class="inherited"><span class='object_link'><a href="Range.html#-%40-instance_method" title="Range#-@ (method)">#-@</a></span></p>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Renjin/RBSexp.html" title="Renjin::RBSexp (module)">Renjin::RBSexp</a></span></h3>
|
|
154
|
+
<p class="inherited"><span class='object_link'><a href="Renjin/RBSexp.html#destroy-instance_method" title="Renjin::RBSexp#destroy (method)">#destroy</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#ncol-instance_method" title="Renjin::RBSexp#ncol (method)">#ncol</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#nrow-instance_method" title="Renjin::RBSexp#nrow (method)">#nrow</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#pp-instance_method" title="Renjin::RBSexp#pp (method)">#pp</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#print-instance_method" title="Renjin::RBSexp#print (method)">#print</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#r-instance_method" title="Renjin::RBSexp#r (method)">#r</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#rclass-instance_method" title="Renjin::RBSexp#rclass (method)">#rclass</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#sexp%3F-instance_method" title="Renjin::RBSexp#sexp? (method)">#sexp?</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#typeof-instance_method" title="Renjin::RBSexp#typeof (method)">#typeof</a></span>, <span class='object_link'><a href="Renjin/RBSexp.html#unbind-instance_method" title="Renjin::RBSexp#unbind (method)">#unbind</a></span></p>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
<div id="footer">
|
|
160
|
+
Generated on Tue Jul 14 18:12:24 2015 by
|
|
161
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
162
|
+
0.8.7.6 (ruby-1.9.3).
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</body>
|
|
166
|
+
</html>
|
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: PackageManager
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.8.7.6
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
+
relpath = '';
|
|
20
|
+
framesUrl = "frames.html#!PackageManager.html";
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
+
|
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id="header">
|
|
32
|
+
<div id="menu">
|
|
33
|
+
|
|
34
|
+
<a href="_index.html">Index (P)</a> »
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<span class="title">PackageManager</span>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div id="search">
|
|
44
|
+
|
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
|
46
|
+
href="class_list.html">
|
|
47
|
+
Class List
|
|
48
|
+
</a>
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
|
51
|
+
href="method_list.html">
|
|
52
|
+
Method List
|
|
53
|
+
</a>
|
|
54
|
+
|
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
|
56
|
+
href="file_list.html">
|
|
57
|
+
File List
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<iframe id="search_frame"></iframe>
|
|
65
|
+
|
|
66
|
+
<div id="content"><h1>Class: PackageManager
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</h1>
|
|
71
|
+
|
|
72
|
+
<dl class="box">
|
|
73
|
+
|
|
74
|
+
<dt class="r1">Inherits:</dt>
|
|
75
|
+
<dd class="r1">
|
|
76
|
+
<span class="inheritName">Object</span>
|
|
77
|
+
|
|
78
|
+
<ul class="fullTree">
|
|
79
|
+
<li>Object</li>
|
|
80
|
+
|
|
81
|
+
<li class="next">PackageManager</li>
|
|
82
|
+
|
|
83
|
+
</ul>
|
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
85
|
+
|
|
86
|
+
</dd>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
|
97
|
+
<dd class="r2 last">lib/JRubyR/package.rb</dd>
|
|
98
|
+
|
|
99
|
+
</dl>
|
|
100
|
+
<div class="clear"></div>
|
|
101
|
+
|
|
102
|
+
<h2>Defined Under Namespace</h2>
|
|
103
|
+
<p class="children">
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="PackageManager/ParseXML.html" title="PackageManager::ParseXML (class)">ParseXML</a></span>
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</p>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<h2>
|
|
121
|
+
Instance Method Summary
|
|
122
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
123
|
+
</h2>
|
|
124
|
+
|
|
125
|
+
<ul class="summary">
|
|
126
|
+
|
|
127
|
+
<li class="public ">
|
|
128
|
+
<span class="summary_signature">
|
|
129
|
+
|
|
130
|
+
<a href="#http_download_uri-instance_method" title="#http_download_uri (instance method)">- (Object) <strong>http_download_uri</strong>(uri, filename) </a>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
</span>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<span class="summary_desc"><div class='inline'>
|
|
145
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
146
|
+
</div></span>
|
|
147
|
+
|
|
148
|
+
</li>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<li class="public ">
|
|
152
|
+
<span class="summary_signature">
|
|
153
|
+
|
|
154
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (PackageManager) <strong>initialize</strong> </a>
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</span>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<span class="note title constructor">constructor</span>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<span class="summary_desc"><div class='inline'>
|
|
171
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
172
|
+
</div></span>
|
|
173
|
+
|
|
174
|
+
</li>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<li class="public ">
|
|
178
|
+
<span class="summary_signature">
|
|
179
|
+
|
|
180
|
+
<a href="#load_package-instance_method" title="#load_package (instance method)">- (Object) <strong>load_package</strong>(name) </a>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
</span>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<span class="summary_desc"><div class='inline'>
|
|
195
|
+
<p>----------------------------------------------------------------------------------------
|
|
196
|
+
Installs a new package
|
|
197
|
+
----------------------------------------------------------------------------------------.</p>
|
|
198
|
+
</div></span>
|
|
199
|
+
|
|
200
|
+
</li>
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
<li class="public ">
|
|
204
|
+
<span class="summary_signature">
|
|
205
|
+
|
|
206
|
+
<a href="#new_text-instance_method" title="#new_text (instance method)">- (Object) <strong>new_text</strong>(text) </a>
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
</span>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<span class="summary_desc"><div class='inline'>
|
|
221
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
222
|
+
</div></span>
|
|
223
|
+
|
|
224
|
+
</li>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<li class="public ">
|
|
228
|
+
<span class="summary_signature">
|
|
229
|
+
|
|
230
|
+
<a href="#set_value-instance_method" title="#set_value (instance method)">- (Object) <strong>set_value</strong> </a>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
</span>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<span class="summary_desc"><div class='inline'>
|
|
245
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
246
|
+
</div></span>
|
|
247
|
+
|
|
248
|
+
</li>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<li class="public ">
|
|
252
|
+
<span class="summary_signature">
|
|
253
|
+
|
|
254
|
+
<a href="#tag_end-instance_method" title="#tag_end (instance method)">- (Object) <strong>tag_end</strong>(name) </a>
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
</span>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<span class="summary_desc"><div class='inline'>
|
|
269
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
270
|
+
</div></span>
|
|
271
|
+
|
|
272
|
+
</li>
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<li class="public ">
|
|
276
|
+
<span class="summary_signature">
|
|
277
|
+
|
|
278
|
+
<a href="#tag_start-instance_method" title="#tag_start (instance method)">- (Object) <strong>tag_start</strong>(name, value) </a>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
</span>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
<span class="summary_desc"><div class='inline'>
|
|
293
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
294
|
+
</div></span>
|
|
295
|
+
|
|
296
|
+
</li>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
<li class="public ">
|
|
300
|
+
<span class="summary_signature">
|
|
301
|
+
|
|
302
|
+
<a href="#update-instance_method" title="#update (instance method)">- (Object) <strong>update</strong>(type, name, attrs) </a>
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
</span>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
<span class="summary_desc"><div class='inline'>
|
|
317
|
+
<p>----------------------------------------------------------------------------------------.</p>
|
|
318
|
+
</div></span>
|
|
319
|
+
|
|
320
|
+
</li>
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
</ul>
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
<div id="constructor_details" class="method_details_list">
|
|
327
|
+
<h2>Constructor Details</h2>
|
|
328
|
+
|
|
329
|
+
<div class="method_details first">
|
|
330
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
331
|
+
|
|
332
|
+
- (<tt><span class='object_link'><a href="" title="PackageManager (class)">PackageManager</a></span></tt>) <strong>initialize</strong>
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
</h3><div class="docstring">
|
|
339
|
+
<div class="discussion">
|
|
340
|
+
<hr>
|
|
341
|
+
<hr>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
<div class="tags">
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
</div><table class="source_code">
|
|
350
|
+
<tr>
|
|
351
|
+
<td>
|
|
352
|
+
<pre class="lines">
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
135
|
|
356
|
+
136
|
|
357
|
+
137
|
|
358
|
+
138</pre>
|
|
359
|
+
</td>
|
|
360
|
+
<td>
|
|
361
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 135</span>
|
|
362
|
+
|
|
363
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
|
364
|
+
<span class='ivar'>@properties</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
|
365
|
+
<span class='kw'>super</span>
|
|
366
|
+
<span class='kw'>end</span></pre>
|
|
367
|
+
</td>
|
|
368
|
+
</tr>
|
|
369
|
+
</table>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
</div>
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
<div id="instance_method_details" class="method_details_list">
|
|
376
|
+
<h2>Instance Method Details</h2>
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
<div class="method_details first">
|
|
380
|
+
<h3 class="signature first" id="http_download_uri-instance_method">
|
|
381
|
+
|
|
382
|
+
- (<tt>Object</tt>) <strong>http_download_uri</strong>(uri, filename)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
</h3><div class="docstring">
|
|
389
|
+
<div class="discussion">
|
|
390
|
+
<hr>
|
|
391
|
+
<hr>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
<div class="tags">
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
</div><table class="source_code">
|
|
400
|
+
<tr>
|
|
401
|
+
<td>
|
|
402
|
+
<pre class="lines">
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
214
|
|
406
|
+
215
|
|
407
|
+
216
|
|
408
|
+
217
|
|
409
|
+
218
|
|
410
|
+
219
|
|
411
|
+
220
|
|
412
|
+
221
|
|
413
|
+
222
|
|
414
|
+
223
|
|
415
|
+
224
|
|
416
|
+
225
|
|
417
|
+
226
|
|
418
|
+
227
|
|
419
|
+
228
|
|
420
|
+
229
|
|
421
|
+
230
|
|
422
|
+
231
|
|
423
|
+
232
|
|
424
|
+
233
|
|
425
|
+
234
|
|
426
|
+
235</pre>
|
|
427
|
+
</td>
|
|
428
|
+
<td>
|
|
429
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 214</span>
|
|
430
|
+
|
|
431
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_http_download_uri'>http_download_uri</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='comma'>,</span> <span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
|
|
432
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Starting HTTP download for: </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
|
433
|
+
<span class='id identifier rubyid_http_object'>http_object</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span>
|
|
434
|
+
<span class='id identifier rubyid_http_object'>http_object</span><span class='period'>.</span><span class='id identifier rubyid_use_ssl'>use_ssl</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_scheme'>scheme</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>https</span><span class='tstring_end'>'</span></span>
|
|
435
|
+
<span class='kw'>begin</span>
|
|
436
|
+
<span class='id identifier rubyid_http_object'>http_object</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_http'>http</span><span class='op'>|</span>
|
|
437
|
+
<span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Get</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_request_uri'>request_uri</span>
|
|
438
|
+
<span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_read_timeout'>read_timeout</span> <span class='op'>=</span> <span class='int'>500</span>
|
|
439
|
+
<span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span> <span class='id identifier rubyid_request'>request</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_response'>response</span><span class='op'>|</span>
|
|
440
|
+
<span class='id identifier rubyid_open'>open</span> <span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>wb</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_io'>io</span><span class='op'>|</span>
|
|
441
|
+
<span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_read_body'>read_body</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_chunk'>chunk</span><span class='op'>|</span>
|
|
442
|
+
<span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_chunk'>chunk</span>
|
|
443
|
+
<span class='kw'>end</span>
|
|
444
|
+
<span class='kw'>end</span>
|
|
445
|
+
<span class='kw'>end</span>
|
|
446
|
+
<span class='kw'>end</span>
|
|
447
|
+
<span class='kw'>rescue</span> <span class='const'>Exception</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
|
448
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>=> Exception: '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='rbrace'>}</span><span class='tstring_content'>'. Skipping download.</span><span class='tstring_end'>"</span></span>
|
|
449
|
+
<span class='kw'>return</span>
|
|
450
|
+
<span class='kw'>end</span>
|
|
451
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Stored download as </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_filename'>filename</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
|
452
|
+
<span class='kw'>end</span></pre>
|
|
453
|
+
</td>
|
|
454
|
+
</tr>
|
|
455
|
+
</table>
|
|
456
|
+
</div>
|
|
457
|
+
|
|
458
|
+
<div class="method_details ">
|
|
459
|
+
<h3 class="signature " id="load_package-instance_method">
|
|
460
|
+
|
|
461
|
+
- (<tt>Object</tt>) <strong>load_package</strong>(name)
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
</h3><div class="docstring">
|
|
468
|
+
<div class="discussion">
|
|
469
|
+
<hr>
|
|
470
|
+
|
|
471
|
+
<p>Installs a new package</p>
|
|
472
|
+
<hr>
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
<div class="tags">
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
</div><table class="source_code">
|
|
481
|
+
<tr>
|
|
482
|
+
<td>
|
|
483
|
+
<pre class="lines">
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
241
|
|
487
|
+
242
|
|
488
|
+
243
|
|
489
|
+
244
|
|
490
|
+
245
|
|
491
|
+
246
|
|
492
|
+
247
|
|
493
|
+
248
|
|
494
|
+
249
|
|
495
|
+
250
|
|
496
|
+
251
|
|
497
|
+
252
|
|
498
|
+
253
|
|
499
|
+
254
|
|
500
|
+
255
|
|
501
|
+
256
|
|
502
|
+
257
|
|
503
|
+
258
|
|
504
|
+
259
|
|
505
|
+
260
|
|
506
|
+
261
|
|
507
|
+
262
|
|
508
|
+
263
|
|
509
|
+
264
|
|
510
|
+
265
|
|
511
|
+
266
|
|
512
|
+
267
|
|
513
|
+
268
|
|
514
|
+
269
|
|
515
|
+
270
|
|
516
|
+
271
|
|
517
|
+
272
|
|
518
|
+
273
|
|
519
|
+
274
|
|
520
|
+
275
|
|
521
|
+
276
|
|
522
|
+
277
|
|
523
|
+
278
|
|
524
|
+
279
|
|
525
|
+
280
|
|
526
|
+
281
|
|
527
|
+
282
|
|
528
|
+
283
|
|
529
|
+
284</pre>
|
|
530
|
+
</td>
|
|
531
|
+
<td>
|
|
532
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 241</span>
|
|
533
|
+
|
|
534
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_package'>load_package</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
535
|
+
|
|
536
|
+
<span class='comment'># create the cran_dir if it does not already exists
|
|
537
|
+
</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_mkdir'>mkdir</span><span class='lparen'>(</span><span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span><span class='rparen'>)</span>
|
|
538
|
+
|
|
539
|
+
<span class='comment'># download address for Renjin packages
|
|
540
|
+
</span> <span class='id identifier rubyid_renjin_cran'>renjin_cran</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://nexus.bedatadriven.com/content/groups/public/org/renjin/cran/</span><span class='tstring_end'>'</span></span>
|
|
541
|
+
|
|
542
|
+
<span class='id identifier rubyid_package'>package</span> <span class='op'>=</span> <span class='id identifier rubyid_renjin_cran'>renjin_cran</span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span>
|
|
543
|
+
<span class='id identifier rubyid_spec'>spec</span> <span class='op'>=</span> <span class='id identifier rubyid_package'>package</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>maven-metadata.xml</span><span class='tstring_end'>"</span></span>
|
|
544
|
+
<span class='comment'># read the maven-metadata specification
|
|
545
|
+
</span> <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='id identifier rubyid_spec'>spec</span><span class='rparen'>)</span>
|
|
546
|
+
|
|
547
|
+
<span class='comment'># parse the maven-metadata file
|
|
548
|
+
</span> <span class='id identifier rubyid_parse'>parse</span> <span class='op'>=</span> <span class='const'>ParseXML</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
549
|
+
<span class='id identifier rubyid_parse'>parse</span><span class='period'>.</span><span class='id identifier rubyid_add_observer'>add_observer</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
|
550
|
+
<span class='id identifier rubyid_parse'>parse</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span>
|
|
551
|
+
|
|
552
|
+
<span class='id identifier rubyid_download_dir'>download_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_package'>package</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='ivar'>@properties</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>latest</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
553
|
+
<span class='id identifier rubyid_spec2'>spec2</span> <span class='op'>=</span> <span class='id identifier rubyid_download_dir'>download_dir</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>maven-metadata.xml</span><span class='tstring_end'>"</span></span>
|
|
554
|
+
|
|
555
|
+
<span class='comment'># parse the second maven-metadata file
|
|
556
|
+
</span> <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='id identifier rubyid_spec2'>spec2</span><span class='rparen'>)</span>
|
|
557
|
+
<span class='comment'># download the spec file, so we know what version is actually installed
|
|
558
|
+
</span> <span class='id identifier rubyid_http_download_uri'>http_download_uri</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='comma'>,</span> <span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>.xml</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
559
|
+
|
|
560
|
+
<span class='comment'># need to clear the properties. If the file has multiple properties with the same
|
|
561
|
+
</span> <span class='comment'># name, then only the last one will be kept. This might be a problem, but for
|
|
562
|
+
</span> <span class='comment'># now this does not seem to matter... We are only interested in the 'value'
|
|
563
|
+
</span> <span class='comment'># property that seems to always be the same for the 'pom' and 'jar' files.
|
|
564
|
+
</span> <span class='ivar'>@properties</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
|
565
|
+
<span class='id identifier rubyid_parse'>parse</span> <span class='op'>=</span> <span class='const'>ParseXML</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
566
|
+
<span class='id identifier rubyid_parse'>parse</span><span class='period'>.</span><span class='id identifier rubyid_add_observer'>add_observer</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
|
567
|
+
<span class='id identifier rubyid_parse'>parse</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span>
|
|
568
|
+
|
|
569
|
+
<span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='ivar'>@properties</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>value</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.jar</span><span class='tstring_end'>"</span></span>
|
|
570
|
+
|
|
571
|
+
<span class='id identifier rubyid_download_file'>download_file</span> <span class='op'>=</span> <span class='id identifier rubyid_download_dir'>download_dir</span> <span class='op'>+</span> <span class='id identifier rubyid_filename'>filename</span>
|
|
572
|
+
<span class='id identifier rubyid_target_file'>target_file</span> <span class='op'>=</span> <span class='const'>SciCom</span><span class='period'>.</span><span class='id identifier rubyid_cran_dir'>cran_dir</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.jar</span><span class='tstring_end'>"</span></span>
|
|
573
|
+
|
|
574
|
+
<span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_download_file'>download_file</span><span class='rparen'>)</span>
|
|
575
|
+
<span class='id identifier rubyid_http_download_uri'>http_download_uri</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='comma'>,</span> <span class='id identifier rubyid_target_file'>target_file</span><span class='rparen'>)</span>
|
|
576
|
+
|
|
577
|
+
<span class='kw'>end</span></pre>
|
|
578
|
+
</td>
|
|
579
|
+
</tr>
|
|
580
|
+
</table>
|
|
581
|
+
</div>
|
|
582
|
+
|
|
583
|
+
<div class="method_details ">
|
|
584
|
+
<h3 class="signature " id="new_text-instance_method">
|
|
585
|
+
|
|
586
|
+
- (<tt>Object</tt>) <strong>new_text</strong>(text)
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
</h3><div class="docstring">
|
|
593
|
+
<div class="discussion">
|
|
594
|
+
<hr>
|
|
595
|
+
<hr>
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
</div>
|
|
599
|
+
</div>
|
|
600
|
+
<div class="tags">
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
</div><table class="source_code">
|
|
604
|
+
<tr>
|
|
605
|
+
<td>
|
|
606
|
+
<pre class="lines">
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
187
|
|
610
|
+
188
|
|
611
|
+
189</pre>
|
|
612
|
+
</td>
|
|
613
|
+
<td>
|
|
614
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 187</span>
|
|
615
|
+
|
|
616
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_new_text'>new_text</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='rparen'>)</span>
|
|
617
|
+
<span class='ivar'>@text</span> <span class='op'>=</span> <span class='id identifier rubyid_text'>text</span>
|
|
618
|
+
<span class='kw'>end</span></pre>
|
|
619
|
+
</td>
|
|
620
|
+
</tr>
|
|
621
|
+
</table>
|
|
622
|
+
</div>
|
|
623
|
+
|
|
624
|
+
<div class="method_details ">
|
|
625
|
+
<h3 class="signature " id="set_value-instance_method">
|
|
626
|
+
|
|
627
|
+
- (<tt>Object</tt>) <strong>set_value</strong>
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
</h3><div class="docstring">
|
|
634
|
+
<div class="discussion">
|
|
635
|
+
<hr>
|
|
636
|
+
<hr>
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
</div>
|
|
640
|
+
</div>
|
|
641
|
+
<div class="tags">
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
</div><table class="source_code">
|
|
645
|
+
<tr>
|
|
646
|
+
<td>
|
|
647
|
+
<pre class="lines">
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
162
|
|
651
|
+
163
|
|
652
|
+
164</pre>
|
|
653
|
+
</td>
|
|
654
|
+
<td>
|
|
655
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 162</span>
|
|
656
|
+
|
|
657
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_set_value'>set_value</span>
|
|
658
|
+
<span class='ivar'>@properties</span><span class='lbracket'>[</span><span class='ivar'>@name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@text</span>
|
|
659
|
+
<span class='kw'>end</span></pre>
|
|
660
|
+
</td>
|
|
661
|
+
</tr>
|
|
662
|
+
</table>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
<div class="method_details ">
|
|
666
|
+
<h3 class="signature " id="tag_end-instance_method">
|
|
667
|
+
|
|
668
|
+
- (<tt>Object</tt>) <strong>tag_end</strong>(name)
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
</h3><div class="docstring">
|
|
675
|
+
<div class="discussion">
|
|
676
|
+
<hr>
|
|
677
|
+
<hr>
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
<div class="tags">
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
</div><table class="source_code">
|
|
686
|
+
<tr>
|
|
687
|
+
<td>
|
|
688
|
+
<pre class="lines">
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
179
|
|
692
|
+
180
|
|
693
|
+
181</pre>
|
|
694
|
+
</td>
|
|
695
|
+
<td>
|
|
696
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 179</span>
|
|
697
|
+
|
|
698
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
699
|
+
<span class='id identifier rubyid_value_read'>value_read</span>
|
|
700
|
+
<span class='kw'>end</span></pre>
|
|
701
|
+
</td>
|
|
702
|
+
</tr>
|
|
703
|
+
</table>
|
|
704
|
+
</div>
|
|
705
|
+
|
|
706
|
+
<div class="method_details ">
|
|
707
|
+
<h3 class="signature " id="tag_start-instance_method">
|
|
708
|
+
|
|
709
|
+
- (<tt>Object</tt>) <strong>tag_start</strong>(name, value)
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
</h3><div class="docstring">
|
|
716
|
+
<div class="discussion">
|
|
717
|
+
<hr>
|
|
718
|
+
<hr>
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
</div>
|
|
722
|
+
</div>
|
|
723
|
+
<div class="tags">
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
</div><table class="source_code">
|
|
727
|
+
<tr>
|
|
728
|
+
<td>
|
|
729
|
+
<pre class="lines">
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
170
|
|
733
|
+
171
|
|
734
|
+
172
|
|
735
|
+
173</pre>
|
|
736
|
+
</td>
|
|
737
|
+
<td>
|
|
738
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 170</span>
|
|
739
|
+
|
|
740
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tag_start'>tag_start</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
|
741
|
+
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
|
742
|
+
<span class='id identifier rubyid_read_value'>read_value</span>
|
|
743
|
+
<span class='kw'>end</span></pre>
|
|
744
|
+
</td>
|
|
745
|
+
</tr>
|
|
746
|
+
</table>
|
|
747
|
+
</div>
|
|
748
|
+
|
|
749
|
+
<div class="method_details ">
|
|
750
|
+
<h3 class="signature " id="update-instance_method">
|
|
751
|
+
|
|
752
|
+
- (<tt>Object</tt>) <strong>update</strong>(type, name, attrs)
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
</h3><div class="docstring">
|
|
759
|
+
<div class="discussion">
|
|
760
|
+
<hr>
|
|
761
|
+
<hr>
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
</div>
|
|
765
|
+
</div>
|
|
766
|
+
<div class="tags">
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
</div><table class="source_code">
|
|
770
|
+
<tr>
|
|
771
|
+
<td>
|
|
772
|
+
<pre class="lines">
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
195
|
|
776
|
+
196
|
|
777
|
+
197
|
|
778
|
+
198
|
|
779
|
+
199
|
|
780
|
+
200
|
|
781
|
+
201
|
|
782
|
+
202
|
|
783
|
+
203
|
|
784
|
+
204
|
|
785
|
+
205
|
|
786
|
+
206
|
|
787
|
+
207
|
|
788
|
+
208</pre>
|
|
789
|
+
</td>
|
|
790
|
+
<td>
|
|
791
|
+
<pre class="code"><span class="info file"># File 'lib/JRubyR/package.rb', line 195</span>
|
|
792
|
+
|
|
793
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span>
|
|
794
|
+
|
|
795
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_type'>type</span>
|
|
796
|
+
<span class='kw'>when</span> <span class='symbol'>:tag_start</span>
|
|
797
|
+
<span class='id identifier rubyid_tag_start'>tag_start</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span>
|
|
798
|
+
<span class='kw'>when</span> <span class='symbol'>:tag_end</span>
|
|
799
|
+
<span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
800
|
+
<span class='kw'>when</span> <span class='symbol'>:new_text</span>
|
|
801
|
+
<span class='id identifier rubyid_new_text'>new_text</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
802
|
+
<span class='kw'>else</span>
|
|
803
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unknown type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
|
804
|
+
<span class='kw'>end</span>
|
|
805
|
+
|
|
806
|
+
<span class='kw'>end</span></pre>
|
|
807
|
+
</td>
|
|
808
|
+
</tr>
|
|
809
|
+
</table>
|
|
810
|
+
</div>
|
|
811
|
+
|
|
812
|
+
</div>
|
|
813
|
+
|
|
814
|
+
</div>
|
|
815
|
+
|
|
816
|
+
<div id="footer">
|
|
817
|
+
Generated on Tue Jul 14 18:12:23 2015 by
|
|
818
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
819
|
+
0.8.7.6 (ruby-1.9.3).
|
|
820
|
+
</div>
|
|
821
|
+
|
|
822
|
+
</body>
|
|
823
|
+
</html>
|