gravaty 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gravaty might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/CHANGELOG +587 -0
- data/COPYING.md +234 -0
- data/Gemfile +17 -0
- data/ISSUES.md +40 -0
- data/README.md +128 -0
- data/Rakefile +48 -0
- data/acknowledgements.md +40 -0
- data/authors.md +44 -0
- data/copyright.md +339 -0
- data/examples/avatar.rb +121 -0
- data/examples/basics.rb +60 -0
- data/examples/profile.rb +143 -0
- data/examples/xmlrpc.rb +33 -0
- data/gravaty.gemspec +59 -0
- data/gravaty.odp +0 -0
- data/gravaty.pdf +0 -0
- data/html/CHANGELOG.html +876 -0
- data/html/COPYING_md.html +803 -0
- data/html/Gemfile.html +114 -0
- data/html/Gravaty.html +322 -0
- data/html/Gravaty/Gravaty.html +997 -0
- data/html/Gravaty/ParsableDuckType.html +158 -0
- data/html/Gravaty/Parser.html +233 -0
- data/html/Gravaty/Parsers.html +94 -0
- data/html/Gravaty/Parsers/Avatar.html +166 -0
- data/html/Gravaty/Parsers/Callback.html +167 -0
- data/html/Gravaty/Parsers/Default.html +174 -0
- data/html/Gravaty/Parsers/Force.html +167 -0
- data/html/Gravaty/Parsers/Format.html +177 -0
- data/html/Gravaty/Parsers/Pixelsize.html +177 -0
- data/html/Gravaty/Parsers/Rating.html +177 -0
- data/html/Gravaty/Parsers/Secure.html +166 -0
- data/html/Gravaty/Parsers/Type.html +177 -0
- data/html/Gravaty/Utils.html +107 -0
- data/html/Gravaty/Utils/Downloader.html +106 -0
- data/html/Gravaty/Utils/Downloader/Downloader.html +224 -0
- data/html/Gravaty/Utils/Raisers.html +199 -0
- data/html/Gravaty/Utils/Rfc5322.html +149 -0
- data/html/Gravaty/Utils/RpcConnector.html +106 -0
- data/html/Gravaty/Utils/RpcConnector/RpcConnector.html +241 -0
- data/html/ISSUES_md.html +165 -0
- data/html/Object.html +183 -0
- data/html/README_md.html +436 -0
- data/html/Rakefile.html +152 -0
- data/html/acknowledgements_md.html +172 -0
- data/html/authors_md.html +178 -0
- data/html/copyright_md.html +553 -0
- data/html/created.rid +59 -0
- data/html/css/fonts.css +167 -0
- data/html/css/rdoc.css +590 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/gravaty_gemspec.html +162 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +467 -0
- data/html/js/darkfish.js +161 -0
- data/html/js/jquery.js +4 -0
- data/html/js/navigation.js +142 -0
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +109 -0
- data/html/js/search_index.js +1 -0
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +479 -0
- data/lib/gravaty.rb +59 -0
- data/lib/gravaty/application.rb +272 -0
- data/lib/gravaty/constants.rb +53 -0
- data/lib/gravaty/locales/en.yml +34 -0
- data/lib/gravaty/locales/it.yml +34 -0
- data/lib/gravaty/locales/ja.yml +35 -0
- data/lib/gravaty/parser.rb +41 -0
- data/lib/gravaty/parsers/avatar.rb +33 -0
- data/lib/gravaty/parsers/callback.rb +34 -0
- data/lib/gravaty/parsers/default.rb +79 -0
- data/lib/gravaty/parsers/force.rb +33 -0
- data/lib/gravaty/parsers/format.rb +38 -0
- data/lib/gravaty/parsers/pixelsize.rb +38 -0
- data/lib/gravaty/parsers/rating.rb +38 -0
- data/lib/gravaty/parsers/secure.rb +32 -0
- data/lib/gravaty/parsers/type.rb +38 -0
- data/lib/gravaty/utils/downloader.rb +150 -0
- data/lib/gravaty/utils/raisers.rb +50 -0
- data/lib/gravaty/utils/rfc5322.rb +102 -0
- data/lib/gravaty/utils/rpc_connector.rb +71 -0
- data/lib/gravaty/version.rb +20 -0
- data/test/gravaty/locales/test_locales.rb +61 -0
- data/test/gravaty/parsers/test_avatar.rb +35 -0
- data/test/gravaty/parsers/test_callback.rb +37 -0
- data/test/gravaty/parsers/test_default.rb +69 -0
- data/test/gravaty/parsers/test_force.rb +35 -0
- data/test/gravaty/parsers/test_format.rb +48 -0
- data/test/gravaty/parsers/test_pixelsize.rb +50 -0
- data/test/gravaty/parsers/test_rating.rb +48 -0
- data/test/gravaty/parsers/test_secure.rb +35 -0
- data/test/gravaty/parsers/test_type.rb +37 -0
- data/test/gravaty/test_application.rb +111 -0
- data/test/gravaty/test_avatar.rb +115 -0
- data/test/gravaty/test_parsable_duck_type.rb +31 -0
- data/test/gravaty/test_parser.rb +55 -0
- data/test/gravaty/test_profile.rb +63 -0
- data/test/gravaty/utils/test_downloader.rb +43 -0
- data/test/gravaty/utils/test_raisers.rb +55 -0
- data/test/gravaty/utils/test_rfc5322.rb +58 -0
- data/test/gravaty/utils/test_rpc_connector.rb +74 -0
- data/test/test_gravaty.rb +44 -0
- data/test/test_helper.rb +77 -0
- metadata +315 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module Gravaty::Utils::Rfc5322 - gravaty 8.0.0</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../";
|
11
|
+
var index_rel_prefix = "../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../js/jquery.js"></script>
|
15
|
+
<script src="../../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="module">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
</div>
|
63
|
+
</nav>
|
64
|
+
|
65
|
+
<main role="main" aria-labelledby="module-Gravaty::Utils::Rfc5322">
|
66
|
+
<h1 id="module-Gravaty::Utils::Rfc5322" class="module">
|
67
|
+
module Gravaty::Utils::Rfc5322
|
68
|
+
</h1>
|
69
|
+
|
70
|
+
<section class="description">
|
71
|
+
|
72
|
+
<p>This module is a simple wrapper container for Peter R. Marreck's gist.</p>
|
73
|
+
<dl class="rdoc-list note-list"><dt>Author
|
74
|
+
<dd>
|
75
|
+
<p><a href="mailto:lumbergh@gmail.com">Peter R. Marreck</a></p>
|
76
|
+
</dd><dt>Copyright
|
77
|
+
<dd>
|
78
|
+
<p>Copyleft (©) 2013, Peter R. Marreck</p>
|
79
|
+
</dd><dt>License
|
80
|
+
<dd>
|
81
|
+
<p>This work is released under the BSD 3-Clause License <a
|
82
|
+
href="http://choosealicense.com/licenses/bsd-3-clause">choosealicense.com/licenses/bsd-3-clause</a>/</p>
|
83
|
+
</dd></dl>
|
84
|
+
|
85
|
+
</section>
|
86
|
+
|
87
|
+
|
88
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<section class="constants-list">
|
95
|
+
<header>
|
96
|
+
<h3>Constants</h3>
|
97
|
+
</header>
|
98
|
+
<dl>
|
99
|
+
|
100
|
+
<dt id="EMAIL">EMAIL
|
101
|
+
|
102
|
+
<dd><p>This work is released under the BSD 3-Clause License <a
|
103
|
+
href="http://choosealicense.com/licenses/bsd-3-clause">choosealicense.com/licenses/bsd-3-clause</a>/
|
104
|
+
Copyleft (©) 2013, Peter R. Marreck All rights reserved.</p>
|
105
|
+
|
106
|
+
<p>Redistribution and use in source and binary forms, with or without
|
107
|
+
modification, are permitted provided that the following conditions are met:</p>
|
108
|
+
|
109
|
+
<pre>Redistributions of source code must retain the above copyright notice, this
|
110
|
+
list of conditions and the following disclaimer.
|
111
|
+
|
112
|
+
Redistributions in binary form must reproduce the above copyright notice, this
|
113
|
+
list of conditions and the following disclaimer in the documentation and/or
|
114
|
+
other materials provided with the distribution.
|
115
|
+
|
116
|
+
Neither the name of the {organization} nor the names of its
|
117
|
+
contributors may be used to endorse or promote products derived from
|
118
|
+
this software without specific prior written permission.</pre>
|
119
|
+
|
120
|
+
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
|
121
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
122
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
123
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
124
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
125
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
126
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
127
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
128
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
129
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
130
|
+
POSSIBILITY OF SUCH DAMAGE.</p>
|
131
|
+
|
132
|
+
|
133
|
+
</dl>
|
134
|
+
</section>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
</section>
|
141
|
+
</main>
|
142
|
+
|
143
|
+
|
144
|
+
<footer id="validator-badges" role="contentinfo">
|
145
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
146
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
|
147
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
148
|
+
</footer>
|
149
|
+
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module Gravaty::Utils::RpcConnector - gravaty 8.0.0</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../";
|
11
|
+
var index_rel_prefix = "../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../js/jquery.js"></script>
|
15
|
+
<script src="../../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="module">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
</div>
|
63
|
+
</nav>
|
64
|
+
|
65
|
+
<main role="main" aria-labelledby="module-Gravaty::Utils::RpcConnector">
|
66
|
+
<h1 id="module-Gravaty::Utils::RpcConnector" class="module">
|
67
|
+
module Gravaty::Utils::RpcConnector
|
68
|
+
</h1>
|
69
|
+
|
70
|
+
<section class="description">
|
71
|
+
|
72
|
+
<p>This module contains the XML-RPC connector class.</p>
|
73
|
+
<dl class="rdoc-list note-list"><dt>Author
|
74
|
+
<dd>
|
75
|
+
<p><a href="mailto:m.bresciani@email.it">Marco Bresciani</a></p>
|
76
|
+
</dd><dt>Copyright
|
77
|
+
<dd>
|
78
|
+
<p>Copyright © 2013, 2014, 2015, 2016 Marco Bresciani</p>
|
79
|
+
</dd><dt>License
|
80
|
+
<dd>
|
81
|
+
<p>GNU General Public License version 3</p>
|
82
|
+
</dd></dl>
|
83
|
+
|
84
|
+
</section>
|
85
|
+
|
86
|
+
|
87
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</section>
|
98
|
+
</main>
|
99
|
+
|
100
|
+
|
101
|
+
<footer id="validator-badges" role="contentinfo">
|
102
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
103
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
|
104
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
105
|
+
</footer>
|
106
|
+
|
@@ -0,0 +1,241 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Gravaty::Utils::RpcConnector::RpcConnector - gravaty 8.0.0</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../../../";
|
11
|
+
var index_rel_prefix = "../../../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../../../js/jquery.js"></script>
|
15
|
+
<script src="../../../js/darkfish.js"></script>
|
16
|
+
|
17
|
+
<link href="../../../css/fonts.css" rel="stylesheet">
|
18
|
+
<link href="../../../css/rdoc.css" rel="stylesheet">
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<body id="top" role="document" class="class">
|
23
|
+
<nav role="navigation">
|
24
|
+
<div id="project-navigation">
|
25
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
26
|
+
<h2>
|
27
|
+
<a href="../../../index.html" rel="home">Home</a>
|
28
|
+
</h2>
|
29
|
+
|
30
|
+
<div id="table-of-contents-navigation">
|
31
|
+
<a href="../../../table_of_contents.html#pages">Pages</a>
|
32
|
+
<a href="../../../table_of_contents.html#classes">Classes</a>
|
33
|
+
<a href="../../../table_of_contents.html#methods">Methods</a>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
<div id="class-metadata">
|
57
|
+
|
58
|
+
<div id="parent-class-section" class="nav-section">
|
59
|
+
<h3>Parent</h3>
|
60
|
+
|
61
|
+
|
62
|
+
<p class="link"><a href="../../../Object.html">Object</a>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div id="includes-section" class="nav-section">
|
67
|
+
<h3>Included Modules</h3>
|
68
|
+
|
69
|
+
<ul class="link-list">
|
70
|
+
|
71
|
+
|
72
|
+
<li><a class="include" href="../Raisers.html">Gravaty::Utils::Raisers</a>
|
73
|
+
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
|
79
|
+
<!-- Method Quickref -->
|
80
|
+
<div id="method-list-section" class="nav-section">
|
81
|
+
<h3>Methods</h3>
|
82
|
+
|
83
|
+
<ul class="link-list" role="directory">
|
84
|
+
|
85
|
+
<li ><a href="#method-c-new">::new</a>
|
86
|
+
|
87
|
+
<li ><a href="#method-i-call">#call</a>
|
88
|
+
|
89
|
+
</ul>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
</div>
|
93
|
+
</nav>
|
94
|
+
|
95
|
+
<main role="main" aria-labelledby="class-Gravaty::Utils::RpcConnector::RpcConnector">
|
96
|
+
<h1 id="class-Gravaty::Utils::RpcConnector::RpcConnector" class="class">
|
97
|
+
class Gravaty::Utils::RpcConnector::RpcConnector
|
98
|
+
</h1>
|
99
|
+
|
100
|
+
<section class="description">
|
101
|
+
|
102
|
+
<p>Creates a <code>RpcConnector</code> described by the user's email
|
103
|
+
<code>digest</code> and a <code>password</code>. Throws a
|
104
|
+
<code>ArgumentError</code> if the supplied <code>digest</code> or the
|
105
|
+
<code>password</code> are not valid.</p>
|
106
|
+
<dl class="rdoc-list note-list"><dt>Usage
|
107
|
+
<dd><ul><li>
|
108
|
+
<p><code>rpc_connector = RpcConnector.new digest, passowrd</code></p>
|
109
|
+
</li></ul>
|
110
|
+
</dd><dt>Params
|
111
|
+
<dd><ul><li>
|
112
|
+
<p><code>digest</code>, the user's email address MD5 digest.</p>
|
113
|
+
</li><li>
|
114
|
+
<p><code>password</code>, the user's Gravatar account password.</p>
|
115
|
+
</li></ul>
|
116
|
+
</dd><dt>Returns
|
117
|
+
<dd>
|
118
|
+
<p>a <code>RcpConnector</code> object for the specified email
|
119
|
+
<code>digest</code>.</p>
|
120
|
+
</dd><dt>Raises
|
121
|
+
<dd>
|
122
|
+
<p><code>ArgumentError</code>, if any of the supplied parameters are not
|
123
|
+
valid.</p>
|
124
|
+
</dd></dl>
|
125
|
+
|
126
|
+
</section>
|
127
|
+
|
128
|
+
|
129
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
140
|
+
<header>
|
141
|
+
<h3>Public Class Methods</h3>
|
142
|
+
</header>
|
143
|
+
|
144
|
+
|
145
|
+
<div id="method-c-new" class="method-detail ">
|
146
|
+
|
147
|
+
<div class="method-heading">
|
148
|
+
<span class="method-name">new</span><span
|
149
|
+
class="method-args">(digest, password = nil)</span>
|
150
|
+
|
151
|
+
<span class="method-click-advice">click to toggle source</span>
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
<div class="method-description">
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
<div class="method-source-code" id="new-source">
|
164
|
+
<pre><span class="ruby-comment"># File lib/gravaty/utils/rpc_connector.rb, line 43</span>
|
165
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">digest</span>, <span class="ruby-identifier">password</span> = <span class="ruby-keyword">nil</span>)
|
166
|
+
<span class="ruby-constant">I18n</span>.<span class="ruby-identifier">load_path</span> = <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword">__FILE__</span>), <span class="ruby-string">'/../locales/'</span>, <span class="ruby-string">'*.yml'</span>)]
|
167
|
+
|
168
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.nil'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">digest</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">digest</span>.<span class="ruby-identifier">empty?</span>
|
169
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">'error.nil'</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">password</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword">or</span> <span class="ruby-identifier">password</span>.<span class="ruby-identifier">empty?</span>
|
170
|
+
|
171
|
+
<span class="ruby-ivar">@digest</span> = <span class="ruby-identifier">digest</span>
|
172
|
+
<span class="ruby-ivar">@connector</span> = <span class="ruby-constant">XMLRPC</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">RPC_URI</span>, <span class="ruby-identifier">build_rpc_path</span>, <span class="ruby-value">443</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-keyword">true</span>)
|
173
|
+
|
174
|
+
<span class="ruby-ivar">@params</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
175
|
+
<span class="ruby-ivar">@params</span>[<span class="ruby-value">:password</span>] = <span class="ruby-identifier">password</span>
|
176
|
+
<span class="ruby-keyword">end</span></pre>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</div>
|
185
|
+
|
186
|
+
|
187
|
+
</section>
|
188
|
+
|
189
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
190
|
+
<header>
|
191
|
+
<h3>Public Instance Methods</h3>
|
192
|
+
</header>
|
193
|
+
|
194
|
+
|
195
|
+
<div id="method-i-call" class="method-detail ">
|
196
|
+
|
197
|
+
<div class="method-heading">
|
198
|
+
<span class="method-name">call</span><span
|
199
|
+
class="method-args">(a_method = RPC_TEST_METHOD, params = {})</span>
|
200
|
+
|
201
|
+
<span class="method-click-advice">click to toggle source</span>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
<div class="method-description">
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<div class="method-source-code" id="call-source">
|
214
|
+
<pre><span class="ruby-comment"># File lib/gravaty/utils/rpc_connector.rb, line 56</span>
|
215
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">call</span>(<span class="ruby-identifier">a_method</span> = <span class="ruby-constant">RPC_TEST_METHOD</span>, <span class="ruby-identifier">params</span> = {})
|
216
|
+
<span class="ruby-identifier">raiser_downcase</span> <span class="ruby-string">'error.value'</span>, <span class="ruby-identifier">a_method</span>, <span class="ruby-constant">RPC_METHODS</span>
|
217
|
+
|
218
|
+
<span class="ruby-ivar">@connector</span>.<span class="ruby-identifier">call</span> <span class="ruby-identifier">a_method</span>, <span class="ruby-ivar">@params</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">params</span>)
|
219
|
+
<span class="ruby-keyword">end</span></pre>
|
220
|
+
</div>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</div>
|
228
|
+
|
229
|
+
|
230
|
+
</section>
|
231
|
+
|
232
|
+
</section>
|
233
|
+
</main>
|
234
|
+
|
235
|
+
|
236
|
+
<footer id="validator-badges" role="contentinfo">
|
237
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
238
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.0.4.
|
239
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
240
|
+
</footer>
|
241
|
+
|