gravaty 10.0.0 → 11.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -0
- data/Gemfile +5 -1
- data/README.md +219 -212
- data/Rakefile +9 -3
- data/copyright.md +33 -136
- data/examples/avatar.rb +70 -43
- data/examples/basics.rb +30 -20
- data/examples/profile.rb +77 -50
- data/examples/xmlrpc.rb +24 -10
- data/gravaty.gemspec +46 -25
- data/html/CHANGELOG.html +13 -20
- data/html/COPYING_md.html +8 -24
- data/html/Gemfile.html +7 -21
- data/html/Gravaty.html +49 -113
- data/html/Gravaty/Gravaty.html +138 -343
- data/html/Gravaty/ParsableDuckType.html +14 -33
- data/html/Gravaty/Parser.html +27 -66
- data/html/Gravaty/Parsers.html +3 -11
- data/html/Gravaty/Parsers/Avatar.html +19 -36
- data/html/Gravaty/Parsers/Callback.html +21 -37
- data/html/Gravaty/Parsers/Default.html +28 -45
- data/html/Gravaty/Parsers/Force.html +21 -37
- data/html/Gravaty/Parsers/Format.html +22 -42
- data/html/Gravaty/Parsers/Pixelsize.html +22 -42
- data/html/Gravaty/Parsers/Rating.html +22 -42
- data/html/Gravaty/Parsers/Secure.html +19 -36
- data/html/Gravaty/Parsers/Type.html +22 -42
- data/html/Gravaty/Utils.html +11 -13
- data/html/Gravaty/Utils/Downloader.html +3 -11
- data/html/Gravaty/Utils/Downloader/Downloader.html +25 -59
- data/html/Gravaty/Utils/Raisers.html +24 -55
- data/html/Gravaty/Utils/Rfc5322.html +12 -19
- data/html/Gravaty/Utils/RpcConnector.html +11 -13
- data/html/Gravaty/Utils/RpcConnector/RpcConnector.html +33 -73
- data/html/Object.html +728 -57
- data/html/README_md.html +105 -100
- data/html/Rakefile.html +9 -23
- data/html/copyright_md.html +17 -119
- data/html/created.rid +48 -55
- data/html/css/rdoc.css +1 -1
- data/html/index.html +97 -114
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +219 -651
- data/lib/gravaty.rb +22 -15
- data/lib/gravaty/application.rb +40 -25
- data/lib/gravaty/constants.rb +20 -11
- data/lib/gravaty/locales/en.yml +9 -3
- data/lib/gravaty/locales/it.yml +9 -3
- data/lib/gravaty/locales/ja.yml +7 -4
- data/lib/gravaty/parser.rb +16 -10
- data/lib/gravaty/parsers/avatar.rb +11 -3
- data/lib/gravaty/parsers/callback.rb +13 -4
- data/lib/gravaty/parsers/default.rb +24 -16
- data/lib/gravaty/parsers/force.rb +12 -2
- data/lib/gravaty/parsers/format.rb +11 -2
- data/lib/gravaty/parsers/pixelsize.rb +12 -3
- data/lib/gravaty/parsers/rating.rb +12 -3
- data/lib/gravaty/parsers/secure.rb +11 -2
- data/lib/gravaty/parsers/type.rb +11 -2
- data/lib/gravaty/utils/downloader.rb +98 -96
- data/lib/gravaty/utils/raisers.rb +19 -12
- data/lib/gravaty/utils/rfc5322.rb +54 -41
- data/lib/gravaty/utils/rpc_connector.rb +19 -11
- data/lib/gravaty/version.rb +10 -2
- data/test/gravaty/locales/en.yml +29 -0
- data/test/gravaty/locales/it.yml +29 -0
- data/test/gravaty/locales/ja.yml +27 -0
- data/test/gravaty/locales/test_locales.rb +17 -13
- data/test/gravaty/parsers/test_avatar.rb +9 -1
- data/test/gravaty/parsers/test_callback.rb +12 -4
- data/test/gravaty/parsers/test_default.rb +25 -21
- data/test/gravaty/parsers/test_force.rb +9 -1
- data/test/gravaty/parsers/test_format.rb +18 -11
- data/test/gravaty/parsers/test_pixelsize.rb +19 -12
- data/test/gravaty/parsers/test_rating.rb +18 -11
- data/test/gravaty/parsers/test_secure.rb +9 -1
- data/test/gravaty/parsers/test_type.rb +14 -5
- data/test/gravaty/test_application.rb +14 -6
- data/test/gravaty/test_avatar.rb +94 -59
- data/test/gravaty/test_parser.rb +11 -5
- data/test/gravaty/test_profile.rb +47 -25
- data/test/gravaty/utils/test_downloader.rb +43 -28
- data/test/gravaty/utils/test_raisers.rb +42 -26
- data/test/gravaty/utils/test_rfc5322.rb +35 -13
- data/test/gravaty/utils/test_rpc_connector.rb +83 -39
- data/test/test_gravaty.rb +12 -4
- data/test/test_helper.rb +15 -9
- metadata +54 -40
- data/ISSUES.md +0 -62
- data/acknowledgements.md +0 -66
- data/authors.md +0 -63
- data/examples/cacert.pem +0 -3466
- data/html/ISSUES_md.html +0 -166
- data/html/acknowledgements_md.html +0 -161
- data/html/authors_md.html +0 -174
- data/html/examples/cacert_pem.html +0 -1078
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 111d38c6c497df36075173967d860bc2f0d018ef9ff5cbfb9d5a092f0944752a
|
4
|
+
data.tar.gz: 8187e11270999a685de79a16f69445ce64ab2b8a83a8878fe4a8fee4a285122f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89d69e70b38ba40d53cb5e200142f57c710da0c8a89a43d8bbd36c8555cc51ffbfde1f9244ece0a0de1c208c1f35580bb1e35128bed228360770f865a9a66e61
|
7
|
+
data.tar.gz: 5f56e20fa333f1a8d895dc29ecdc6cf1e28b1fe7b743c39b1ed2e913d8220927a37f383ce49b46d9ea3dd3cafeec0f1bd57c64d5d30455f8495a84661d58f125
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
= Version 11.0.0
|
2
|
+
* MAJOR update from Ruby '~> 2.7' to Ruby '~> 3.0'.
|
3
|
+
* PATCH update IntelliJ IDEA (RubyGem) project configuration.
|
4
|
+
* PATCH updating gem dependencies.
|
5
|
+
* PATCH introduce REUSE compliance
|
6
|
+
* KNOWN BUG: https://savannah.nongnu.org/bugs/?39928
|
7
|
+
|
1
8
|
= Version 10.0.0
|
2
9
|
* MAJOR update from Ruby '~> 2.6' to Ruby '~> 2.7'.
|
3
10
|
* MINOR update IntelliJ IDEA (RubyGem) project configuration.
|
data/Gemfile
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#--
|
1
4
|
# gravaty
|
2
|
-
#
|
5
|
+
# (C) 2013 Marco Bresciani
|
3
6
|
#
|
4
7
|
# This file is part of gravaty.
|
5
8
|
#
|
@@ -15,6 +18,7 @@
|
|
15
18
|
#
|
16
19
|
# You should have received a copy of the GNU General Public License
|
17
20
|
# along with gravaty. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
#++
|
18
22
|
|
19
23
|
source 'https://rubygems.org'
|
20
24
|
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!--
|
2
2
|
gravaty
|
3
3
|
|
4
|
-
Copyright © 2013
|
4
|
+
Copyright © 2013-2021 Marco Bresciani
|
5
5
|
|
6
6
|
This file is part of gravaty.
|
7
7
|
|
@@ -17,87 +17,243 @@ more details.
|
|
17
17
|
|
18
18
|
You should have received a copy of the GNU General Public License along
|
19
19
|
with gravaty. If not, see <http://www.gnu.org/licenses/>.
|
20
|
-
-->
|
21
20
|
|
21
|
+
SPDX-FileCopyrightText: 2013 Marco Bresciani
|
22
|
+
|
23
|
+
SPDX-License-Identifier: GFDL-1.3-or-later
|
24
|
+
-->
|
22
25
|
# Gravaty
|
23
|
-
![
|
24
|
-
![
|
25
|
-
![
|
26
|
+
![name](https://badgen.net/rubygems/n/gravaty)
|
27
|
+
![platform](https://badgen.net/rubygems/p/gravaty)
|
28
|
+
![version (stable)](https://badgen.net/rubygems/v/gravaty)
|
29
|
+
![version (latest)](https://badgen.net/rubygems/v/gravaty/latest)
|
30
|
+
![total downloads](https://badgen.net/rubygems/dt/gravaty)
|
31
|
+
![latest version downloads](https://badgen.net/rubygems/dv/gravaty)
|
32
|
+
|
26
33
|
![Gem download rank](https://img.shields.io/gem/rt/gravaty.svg?style=plastic)
|
27
34
|
![Gem download rank (daily)](https://img.shields.io/gem/rd/gravaty.svg?style=plastic)
|
28
35
|
![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/rubygems/gravaty.svg?style=plastic)
|
36
|
+
![Gems](https://img.shields.io/gem/u/MarcoBresciani?style=plastic)
|
37
|
+
![Security Headers](https://img.shields.io/security-headers?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
|
38
|
+
![Chromium HSTS preload](https://img.shields.io/hsts/preload/savannah.nongnu.org?style=plastic)
|
39
|
+
![Mozilla HTTP Observatory Grade](https://img.shields.io/mozilla-observatory/grade/savannah.nongnu.org?publish&style=plastic)
|
40
|
+
![Website](https://img.shields.io/website?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
|
41
|
+
|
42
|
+
![Security Headers](https://img.shields.io/security-headers?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
|
43
|
+
![Chromium HSTS preload](https://img.shields.io/hsts/preload/savannah.nongnu.org?style=plastic)
|
44
|
+
![Mozilla HTTP Observatory Grade](https://img.shields.io/mozilla-observatory/grade/savannah.nongnu.org?publish&style=plastic)
|
45
|
+
![Website](https://img.shields.io/website?style=plastic&url=https%3A%2F%2Fsavannah.nongnu.org%2Fprojects%2Faamfp)
|
46
|
+
|
47
|
+
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=plastic)](https://github.com/RichardLitt/standard-readme)
|
48
|
+
[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)
|
49
|
+
[![Ruby Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://rubystyle.guide)
|
50
|
+
[![REUSE status](https://api.reuse.software/badge/git.fsfe.org/reuse/api)](https://api.reuse.software/info/git.fsfe.org/reuse/api)
|
29
51
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
gravaty is free software: you can redistribute it and/or modify it under
|
35
|
-
the terms of the GNU General Public License as published by the Free
|
36
|
-
Software Foundation, either version 3 of the License, or (at your
|
37
|
-
option) any later version.
|
38
|
-
|
39
|
-
gravaty is distributed in the hope that it will be useful, but WITHOUT
|
40
|
-
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
41
|
-
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
42
|
-
more details.
|
43
|
-
|
44
|
-
You should have received a copy of the GNU General Public License along
|
45
|
-
with gravaty. If not, see <http://www.gnu.org/licenses/>.
|
52
|
+
This gem automagically prepares complete URIs for Gravatar, for both
|
53
|
+
avatars and profiles, with all currently supported options, included the
|
54
|
+
XML-RPC API, as of 2019-04-23, starting from a single email address!
|
46
55
|
|
47
|
-
|
56
|
+
It's my first Ruby gem, hoping it will be useful for someone (let me
|
57
|
+
know if you use it, please!).
|
58
|
+
GNU GPLv3 license; source code available through anonymous checkout:
|
59
|
+
`hg clone http://hg.savannah.nongnu.org/hgweb/gravaty/` or write me, and
|
60
|
+
I'll send it.
|
61
|
+
You can even decide to contribute to this little free software project
|
62
|
+
by registering to Savannah and ask to be part of the `gravaty` project!
|
63
|
+
|
64
|
+
## Table of Contents
|
65
|
+
* [Background](#background)
|
66
|
+
* [Install](#install)
|
67
|
+
* [Savannah](#savannah)
|
68
|
+
* [RubyGems](#rubygems)
|
69
|
+
* [Usage](#usage)
|
70
|
+
* [Maintainers](#maintainers)
|
71
|
+
* [Thanks](#thanks)
|
72
|
+
* [Contributing](#contributing)
|
73
|
+
* [License](#license)
|
74
|
+
|
75
|
+
## Background
|
48
76
|
This gem automagically prepares complete URIs for Gravatar, for both
|
49
77
|
avatars and profiles, with all currently supported options, included the
|
50
78
|
XML-RPC API, as of 2019-04-23, starting from a single email address!
|
51
79
|
|
52
|
-
It's my first
|
53
|
-
|
80
|
+
It's my first Ruby gem, hoping it will be useful for someone (let me
|
81
|
+
know if you use it, please!).
|
54
82
|
|
55
83
|
GNU GPLv3 license; source code available through anonymous checkout:
|
56
|
-
`hg clone http://hg.savannah.nongnu.org/hgweb/gravaty/` or write me and
|
84
|
+
`hg clone http://hg.savannah.nongnu.org/hgweb/gravaty/` or write me, and
|
57
85
|
I'll send it.
|
58
86
|
|
59
87
|
You can even decide to contribute to this little free software project
|
60
|
-
by registering to Savannah and ask to be part of the
|
61
|
-
|
62
|
-
With great contributions from: 新部裕, Peter R. Marreck, Jon Maken,
|
63
|
-
Łukasz Niemier.
|
64
|
-
|
65
|
-
## Documentation
|
66
|
-
Gravaty tries to follow semantic versioning (see <http://semver.org/>).
|
67
|
-
There may be backward incompatible changes each time minor version
|
68
|
-
number changes, but that any tiny version number change should be bug
|
69
|
-
fixes and internal changes only.
|
70
|
-
Be sure to read the CHANGELOG each time we cut a new release and lock
|
71
|
-
your gems accordingly.
|
88
|
+
by registering to Savannah and ask to be part of the `gravaty` project!
|
72
89
|
|
73
|
-
|
90
|
+
With great contributions from: 新部裕, Peter R. Marreck, Jon Maken, Łukasz
|
91
|
+
Niemier.
|
74
92
|
|
75
|
-
|
93
|
+
## Install
|
76
94
|
RubyGems is the preferred easy install method for Gravaty.
|
77
|
-
Gravaty
|
95
|
+
Gravaty should be installed via the
|
78
96
|
[RubyGems](http://rubyforge.org/projects/rubygems/) system.
|
79
97
|
To get the latest version, simply enter the following into your command
|
80
98
|
prompt: `gem install gravaty`.
|
81
99
|
|
82
|
-
|
100
|
+
Because Gravaty is pure Ruby, it should run pretty much anywhere,
|
101
|
+
including Rubinius, JRuby, MacRuby, etc.
|
102
|
+
Officially the support is for \>= 2.7 YARV/KRI.
|
103
|
+
|
104
|
+
#### Savannah
|
105
|
+
* Project page: <https://savannah.nongnu.org/projects/gravaty/>
|
106
|
+
* Source code (Mercurial) repository: <http://hg.savannah.gnu.org/hgweb/gravaty/>
|
107
|
+
* Known Bugs: <https://savannah.nongnu.org/bugs/?group=gravaty>
|
108
|
+
* Users Mailing List: <https://savannah.nongnu.org/mail/?group=gravaty>
|
109
|
+
* News: <https://savannah.nongnu.org/news/?group=gravaty>
|
110
|
+
|
111
|
+
#### RubyGems
|
112
|
+
* Gem page: <https://rubygems.org/gems/gravaty>
|
113
|
+
* Online RDoc: <http://rubydoc.info/gems/gravaty/>
|
114
|
+
* Gem updates Atom Feed:
|
115
|
+
<https://rubygems.org/gems/gravaty/versions.atom>
|
116
|
+
|
117
|
+
## Usage
|
118
|
+
See `examples` folder.
|
119
|
+
To run the examples just run `ruby `{EXAMPLE_NAME}`.rb`.
|
120
|
+
> **NOTE**: for both examples and tests, you need to set a SSL
|
83
121
|
certificate file.
|
84
|
-
In Microsoft Windows environment, the easiest way is
|
85
|
-
downloader gist
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
both examples should download two files each!
|
122
|
+
In Microsoft Windows environment, the easiest way is the one described
|
123
|
+
by the downloader gist I'm using: you can download valid certificates
|
124
|
+
from <http://curl.haxx.se/ca/cacert.pem> and put the downloaded file in
|
125
|
+
the gravaty home directory.
|
126
|
+
Then `set SSL_CERT_FILE=`{FULL FILE PATH HERE}`cacert.pem` and finally
|
127
|
+
run `ruby avatar.rb` or `ruby profiles.rb` from the `examples`
|
128
|
+
directory; both examples should download two files each!
|
92
129
|
The same environment variable would be needed to run the tests against
|
93
130
|
the XML-RPC API.
|
131
|
+
Running the examples you'll see both the example description and correct
|
132
|
+
code usage to perform such action.
|
94
133
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
134
|
+
Using this API is pretty simple. First, remember that this API maintains
|
135
|
+
a context, so you can save your preferred configuration of server,
|
136
|
+
dictionary, output formats, ... by assigning those value to your object.
|
137
|
+
Get a reference to the Gravaty object, through its factory method, with
|
138
|
+
`my_gravaty = Gravaty::gravatize your_em@il.address` using your email
|
139
|
+
address as parameter. This will save a Gravaty instance in
|
140
|
+
your `my_gravaty` object. At this point the object does contain a
|
141
|
+
default configuration in terms of avatar, profile, ...
|
142
|
+
|
143
|
+
You can take a look at the current status/configuration of your
|
144
|
+
`my_gravaty` object using the `email` method `my_gravaty.email` that
|
145
|
+
shows the email currently in use, or using the `digest` method
|
146
|
+
`my_gravaty.digest` that shows the MD5 digest of the downcased email
|
147
|
+
address in use. Also, `to_s` method is also available to print the
|
148
|
+
current status of the
|
149
|
+
`my_gravaty` object and each `Gravaty` is a Comparable object, based on
|
150
|
+
`my_gravaty.email` data, your email address in small capital letters.
|
151
|
+
|
152
|
+
The `avatar` method provides the configuration-specific URI for your
|
153
|
+
avatar: `my_gravaty.avatar` returns
|
154
|
+
`https://secure.avatar.com/avatar/HASH` (where `HASH` is your
|
155
|
+
`my_gravaty.digest` email address MD5 digest)
|
156
|
+
● The method allows an Hash, with avatar configuration parameters:
|
157
|
+
type, pixel_size, force, secure, rating, default.
|
158
|
+
(see https://en.gravatar.com/site/implement/images/ for details)
|
159
|
+
● The avatar! method saves the provided configuration for your Gravaty
|
160
|
+
object's to_s output.
|
161
|
+
|
162
|
+
The profile content feature ● With your Gravaty object available, the
|
163
|
+
profile method provides the configuration-specific URI for your (
|
164
|
+
registered) user:
|
165
|
+
– a_gravaty.profile returns
|
166
|
+
https://secure.avatar.com/HASH
|
167
|
+
(where HASH is your a_gravaty.digest email address MD5 digest)
|
168
|
+
● The method allows an Hash, with profile configuration parameters:
|
169
|
+
format, secure.
|
170
|
+
(see https://en.gravatar.com/site/implement/profiles/ for details)
|
171
|
+
● The profile! method saves the provided configuration for your Gravaty
|
172
|
+
object's to_s output.
|
173
|
+
|
174
|
+
The XML-RPC API content feature ● With your Gravaty object available,
|
175
|
+
the xmlrpc method provides a reference to the remote Gravatar XML-RPC
|
176
|
+
AP, for your
|
177
|
+
(registered) user:
|
178
|
+
– a_gravaty.xmlrpc requires the method name (grav.test, by default),
|
179
|
+
your password and possible method parameters
|
180
|
+
(whether needed) via a Hash. ● In order to increase security, the
|
181
|
+
password is not saved inside the Gravaty object but has to be provided
|
182
|
+
for each call;
|
183
|
+
(see https://en.gravatar.com/site/implement/xmlrpc/ for details)
|
184
|
+
● Communication happens through SSL: certificate might be required (see
|
185
|
+
gravaty README.md file).
|
186
|
+
|
187
|
+
Additional features (1/2)
|
188
|
+
● Since QRCode and JSON are becoming popular formats, qr and json
|
189
|
+
methods (together with qr! and json!) allows to directly retrieve the
|
190
|
+
user's profile data URI, in QRCode or JSON format, with format-specific
|
191
|
+
parameters. Examples:
|
192
|
+
– a_gravaty.qr pixel_size: 42 – a_gravaty.json! callback: 'my_method' ●
|
193
|
+
The qr! and json! methods save the provided configuration for your
|
194
|
+
Gravaty object's to_s output. ● a_gravaty.qr corresponds to
|
195
|
+
a_gravaty.profile format:
|
196
|
+
'qr' while a_gravaty.json corresponds to a_gravaty.profile format: '
|
197
|
+
json' and they both filtered the allowed parameters according to the
|
198
|
+
output type.
|
199
|
+
|
200
|
+
Additional features (2/2)
|
201
|
+
● When using the 'banged' (!) methods (avatar! or profile!, same for qr!
|
202
|
+
and json!), the built URI is saved inside the Gravaty object and is
|
203
|
+
read-only available through to_s. ● The download method, simply
|
204
|
+
specifying a filename as parameter, retrieves whatever resource is
|
205
|
+
indicate by such internal status and saves its content in the specified
|
206
|
+
file. Example:
|
207
|
+
– a_gravaty.qr!
|
208
|
+
– a_gravaty.download 'myQr.png' ● The reset method clears the internal
|
209
|
+
status restoring the email address output of to_s.
|
210
|
+
|
211
|
+
## Maintainers
|
212
|
+
|
213
|
+
* [Marco Bresciani](https://savannah.nongnu.org/users/marcobresciani)
|
214
|
+
|
215
|
+
## Thanks
|
216
|
+
|
217
|
+
* *
|
218
|
+
Contributor*: [Jim Breen](http://www.csse.monash.edu.au/~jwb/index.html)
|
219
|
+
|
220
|
+
* *Author*: [Peter R. Marreck](lumbergh@gmail.com), [RFC 5322 Email
|
221
|
+
Validation Regex in Ruby Regular
|
222
|
+
Expressions](https://gist.github.com/pmarreck/4626713).
|
223
|
+
About *RFC 5322 Email Validation Regex in Ruby Regular Expressions*,
|
224
|
+
please note that "This work is released under the BSD 3-Clause
|
225
|
+
License".
|
226
|
+
This license is GNU GPLv3 compatible according to
|
227
|
+
<http://www.gnu.org/licenses/license-list.en.html#ModifiedBSD>.
|
228
|
+
* *Author*: [Jon Maken](mailto:jon.forums@gmail.com), [An HTTP/HTTPS/FTP
|
229
|
+
file downloader library/CLI based upon MiniPortile's HTTP
|
230
|
+
implementation.](https://gist.github.com/jonforums/2202048).
|
231
|
+
About *An HTTP/HTTPS/FTP file downloader library/CLI based upon
|
232
|
+
MiniPortile's HTTP implementation*, please note that "License:
|
233
|
+
3-clause BSD".
|
234
|
+
This license is GNU GPLv3 compatible according to
|
235
|
+
<http://www.gnu.org/licenses/license-list.en.html#ModifiedBSD>.
|
236
|
+
|
237
|
+
FSIJ理事会の理事長、[新部裕](mailto:gniibe@fsij.org)さんの日本語の翻訳。
|
238
|
+
Japanese translation by [Yutaka Niibe](mailto:gniibe@fsij.org),
|
239
|
+
President of Free Software Initiative of Japan.
|
240
|
+
|
241
|
+
Thanks to [Marc Heiligers](https://za.linkedin.com/in/marcheiligers/)
|
242
|
+
for the note about Peter R. Marreck's gist.
|
243
|
+
|
244
|
+
Thanks to [Łukasz Niemier](http://lukasz.niemier.pl/) for his
|
245
|
+
suggestions on possible improvements.
|
246
|
+
|
247
|
+
## Contributing
|
248
|
+
Gravaty tries to follow semantic versioning (see <http://semver.org/>).
|
249
|
+
There may be backward incompatible changes each time minor version
|
250
|
+
number changes, but that any tiny version number change should be bug
|
251
|
+
fixes and internal changes only.
|
252
|
+
Be sure to read the `CHANGELOG` each time we cut a new release and lock
|
253
|
+
your gems accordingly.
|
254
|
+
|
255
|
+
RDoc documentation available in the `html` folder.
|
99
256
|
|
100
|
-
### Support
|
101
257
|
The easiest way to get help with Gravaty is to post a message to the
|
102
258
|
mailing list: `http://lists.nongnu.org/mailman/listinfo/gravaty-users`.
|
103
259
|
|
@@ -112,178 +268,29 @@ sure to reduce your example code as much as possible so that those who
|
|
112
268
|
are responding to your question can more easily see what the issue might
|
113
269
|
be.
|
114
270
|
|
115
|
-
### Contributing
|
116
271
|
If you've found a bug, want to submit a patch, or have a feature
|
117
272
|
request, please enter a ticket into our bug tracker:
|
118
273
|
`https://savannah.nongnu.org/bugs/?func=additem&group=gravaty`.
|
119
274
|
|
120
|
-
We strongly encourage bug reports
|
275
|
+
We strongly encourage adding bug reports with failing tests or at least
|
121
276
|
a reduced example that demonstrates the problem.
|
122
277
|
|
123
278
|
Similarly, patches should include tests, API documentation, and an
|
124
279
|
update to the manual where relevant.
|
125
280
|
Feel free to clone early though and participate in the project, if you
|
126
|
-
just want some feedback or a code review before preparing your code to
|
281
|
+
just want some feedback, or a code review before preparing your code to
|
127
282
|
be merged.
|
128
283
|
|
129
|
-
If you are unsure about whether
|
130
|
-
|
131
|
-
|
284
|
+
If you are unsure about whether you've found a bug, or want to check to
|
285
|
+
see whether we'd be interested in the feature you want to add before you
|
286
|
+
start working on it, feel free to post to our mailing list.
|
132
287
|
|
133
|
-
|
134
|
-
|
135
|
-
to Gravaty, you will retain your own copyright but must agree to license
|
136
|
-
your code under the same terms as the project itself (or any compatible
|
137
|
-
license according to
|
138
|
-
[GPL-Compatible Free Software
|
139
|
-
Licenses](http://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses)).
|
288
|
+
## License
|
289
|
+
SPDX-FileCopyrightText: 2013 Marco Bresciani
|
140
290
|
|
141
|
-
|
142
|
-
|
143
|
-
#### Savannah
|
144
|
-
* Project page: <https://savannah.nongnu.org/projects/gravaty/>
|
145
|
-
* Source code (Mercurial) repository:
|
146
|
-
<http://hg.savannah.gnu.org/hgweb/gravaty/>
|
147
|
-
* Known Bugs: <https://savannah.nongnu.org/bugs/?group=gravaty>
|
148
|
-
* Users Mailing List: <https://savannah.nongnu.org/mail/?group=gravaty>
|
149
|
-
* News: <https://savannah.nongnu.org/news/?group=gravaty>
|
150
|
-
|
151
|
-
#### RubyGems
|
152
|
-
* Gem page: <https://rubygems.org/gems/gravaty>
|
153
|
-
* Online RDoc: <http://rubydoc.info/gems/gravaty/>
|
154
|
-
* Gem updates Atom Feed:
|
155
|
-
<https://rubygems.org/gems/gravaty/versions.atom>
|
156
|
-
|
157
|
-
#### Other links
|
158
|
-
* Gravatar: <https://www.gravatar.com>.
|
159
|
-
* FSIJ (フリーソフトウェアイニシアティブ, Free Software Initiative of
|
160
|
-
Japan): <http://www.fsij.org>.
|
161
|
-
* "RFC 5322 Email Validation Regex in Ruby Regular Expressions" gist by
|
162
|
-
Peter R. Marreck: <https://gist.github.com/pmarreck/4626713>.
|
163
|
-
* "An HTTP/HTTPS/FTP file downloader library/CLI based upon
|
164
|
-
MiniPortile's HTTP implementation." gist by Jon Maken:
|
165
|
-
<https://gist.github.com/jonforums/2202048>.
|
166
|
-
|
167
|
-
### Usage Examples
|
168
|
-
See `examples` folder.
|
169
|
-
To run the examples just type go into the `examples` directory and run
|
170
|
-
`ruby `{EXAMPLE_NAME}`.rb`.
|
171
|
-
Running the examples you'll see both the example description and correct
|
172
|
-
code usage to perform such action.
|
173
|
-
Here below are listed the currently available examples:
|
174
|
-
* The `basics.rb` example (run `ruby basics.rb`) shows how to initialize
|
175
|
-
and use a Gravaty object through the `gravatize` factory method;
|
176
|
-
* The `avatar.rb` example (run `ruby avatar.rb`) shows how to ask for an
|
177
|
-
avatar image through Gravatar (free) service, with all available
|
178
|
-
options and configurations.
|
179
|
-
It will also show how to download such images;
|
180
|
-
* The `profile.rb` example (run `ruby profile.rb`) shows how to ask for
|
181
|
-
profile data through Gravatar (free) service, with all available
|
182
|
-
options and configurations.
|
183
|
-
It will also show how to download such data.
|
184
|
-
* The `xmlrpc.rb` example (run `ruby xmlrpc.rb`) shows how to use the
|
185
|
-
XML-RPC API through Gravatar (free) service, with all available
|
186
|
-
options and configurations.
|
187
|
-
This need a valid username and password to work properly.
|
188
|
-
|
189
|
-
## Gravatar Terms of Service
|
190
|
-
*Here follows the unmodified 2020-03-12 09:22 CEST version of Gravatar
|
191
|
-
site terms of service, titled "Gravatar Terms of Use".
|
192
|
-
For the most updated version, please refer to
|
193
|
-
https://secure.gravatar.com/site/terms-of-service in order to know how
|
194
|
-
to properly use computer gravatars.*
|
195
|
-
|
196
|
-
Gravatar Terms of Use
|
197
|
-
|
198
|
-
PLEASE READ THESE GRAVATAR TERMS OF USE ("GRAVATAR TERMS") CAREFULLY
|
199
|
-
BEFORE ACCESSING OR USING ANY PART OF THE SERVICES OR WEBSITE.
|
200
|
-
BY USING THE SERVICES OR WEBSITE IN ANY MANNER, YOU AGREE THAT YOU HAVE
|
201
|
-
READ AND AGREE TO BECOME BOUND BY THE GRAVATAR TERMS.
|
202
|
-
IF THE GRAVATAR TERMS ARE CONSIDERED AN OFFER, ACCEPTANCE IS EXPRESSLY
|
203
|
-
LIMITED TO SUCH TERMS.
|
204
|
-
IF YOU DO NOT UNCONDITIONALLY AGREE TO ALL THE TERMS AND CONDITIONS OF
|
205
|
-
THE GRAVATAR TERMS, YOU HAVE NO RIGHT TO USE ANY PORTION OF THE SERVICES
|
206
|
-
OR WEBSITE.
|
207
|
-
|
208
|
-
The Gravatar Terms govern the terms and conditions under which you may
|
209
|
-
use the website located at www.gravatar.com and related services by
|
210
|
-
Automattic, including without limitation, the user accounts, profiles,
|
211
|
-
avatars, technology, and other content and materials offered on or
|
212
|
-
through that website (collectively, "Services", and each of which shall
|
213
|
-
be deemed a "Website" for purposes of the Terms of Service (defined
|
214
|
-
below)).
|
215
|
-
The Gravatar Terms supplement the Terms of Service located at
|
216
|
-
http://wordpress.com/tos/ (the "Terms of Service"), including without
|
217
|
-
limitation, the Responsibilities of Website Visitors, all warranty
|
218
|
-
disclaimers, limitations of liability, and dispute resolution provisions
|
219
|
-
therein, which shall apply to the subject matter of these Gravatar
|
220
|
-
Terms, and which are incorporated herein by this reference.
|
221
|
-
If there is any conflict between the Gravatar Terms and the Terms of
|
222
|
-
Service, the Gravatar Terms will govern.
|
223
|
-
All capitalized terms that are not defined herein have the meaning
|
224
|
-
specified in the Terms of Service.');
|
225
|
-
|
226
|
-
Automattic may update the Gravatar Terms from time to time.
|
227
|
-
Your continued use of the Services following notification of such
|
228
|
-
updates constitutes your acceptance of those changes.
|
229
|
-
|
230
|
-
1. User Submissions.
|
231
|
-
The Services may provide you with the ability to create, upload,
|
232
|
-
distribute or post ("Submit(ting)") data, photographs, avatars,
|
233
|
-
software, graphics, profile and other information to the Services
|
234
|
-
(collectively, the "User Submissions").
|
235
|
-
By Submitting User Submissions, you acknowledge that you are
|
236
|
-
publishing that User Submission, and that you may be identified
|
237
|
-
publicly by your avatar and other User Submissions (e.g., in
|
238
|
-
connection with your blogs, comments and/or email address) by
|
239
|
-
Automattic, third party Gravatar-enabled websites (as that term in
|
240
|
-
defined below), and others.
|
241
|
-
More specifically, you hereby do and shall grant to Automattic a
|
242
|
-
worldwide, perpetual, irrevocable, royalty-free and fully-paid,
|
243
|
-
transferable (including rights to sublicense) right to perform the
|
244
|
-
Services (e.g., to use, modify, reproduce, distribute, prepare
|
245
|
-
derivative works of, display, perform, and otherwise fully exercise
|
246
|
-
and exploit all intellectual property, publicity, and moral rights
|
247
|
-
with respect to any User Submissions, and to allow others to do so).
|
248
|
-
|
249
|
-
By Submitting, you agree to be solely responsible for the User
|
250
|
-
Submissions and release Automattic from any liability related to
|
251
|
-
your use of the Services.
|
252
|
-
You warrant, represent and agree that you will not Submit any User
|
253
|
-
Submissions or otherwise use the Services in a manner that (i)
|
254
|
-
infringes the intellectual property or proprietary rights, or rights
|
255
|
-
of publicity or privacy, of any third party; (ii) violates any law,
|
256
|
-
statute, ordinance or regulation; or (iii) is harmful, threatening,
|
257
|
-
abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous,
|
258
|
-
or otherwise objectionable.
|
259
|
-
You understand that Automattic shall not be responsible or liable for
|
260
|
-
controlling or editing any User Submission, for any errors or
|
261
|
-
omissions in any User Submission, for any damage or loss caused or
|
262
|
-
alleged to be caused by or in connection with the use of or reliance
|
263
|
-
on any User Submission; nor can Automattic ensure prompt removal of
|
264
|
-
inappropriate or unlawful content or guarantee the identity of any
|
265
|
-
other users or websites with whom you may interact in the course of
|
266
|
-
using the Services.
|
267
|
-
2. Use of the Services by Third Party Websites.
|
268
|
-
Third party websites may enable the use of the Services on their
|
269
|
-
respective websites as expressly authorized by Automattic (e.g., API
|
270
|
-
calls into Gravatar: http://en.gravatar.com/site/implement); provided
|
271
|
-
that they (i) do not copy, store or modify User Submissions; (ii) do
|
272
|
-
not distribute, display, perform, use or otherwise exercise or
|
273
|
-
exploit any User Submission or other user information for any purpose
|
274
|
-
other than as necessary to perform the Services for the applicable
|
275
|
-
user; (iii) have a privacy policy in effect and posted on such
|
276
|
-
website that complies with all applicable laws and regulations and
|
277
|
-
that notifies such user that it will only use personally identifiable
|
278
|
-
information as set forth in (ii) above; and (iv) agree to be bound by
|
279
|
-
and comply with all the terms, conditions, and limitations set forth
|
280
|
-
in the Terms of Service ("Gravatar-enabled website").
|
281
|
-
|
282
|
-
------------------------------------------
|
283
|
-
|
284
|
-
gravaty
|
291
|
+
SPDX-License-Identifier: GFDL-1.3-or-later
|
285
292
|
|
286
|
-
Copyright © 2013
|
293
|
+
Copyright © 2013-2021 Marco Bresciani
|
287
294
|
|
288
295
|
This file is part of gravaty.
|
289
296
|
|