The library that lets you do stuff with DOIs.
And stuff.
VERSION
= "1.0.0"
DOI::parse(str) → doi
Parses the given string as a DOI.
Raises an ArgumentError if parsing fails.
DOI::find(doi) → uri
Looks for a DOI at doi.org.
Returns a URI if it finds a match, otherwise returns nil.
require 'doi/network'
url = DOI.find('10.17487/RFC8089')
DOI::data(doi) → hash
Gets data about a DOI from CrossRef.
require 'doi/network'
data = DOI.data('10.17487/RFC8089')
doi + other → new_doi
Concatenation--Returns a new DOI containing other concatenated to this DOI's suffix string.
doi << other → doi
Append--Concatenates the given object to this DOI's suffix string.
doi.to_s(prefix: true) → str
Returns a String that represents this DOI.
'doi:'
to the returned string.doi.to_uri(info: false) → uri
Returns a URI.
For example: "https://doi.org/10.1000/foo%23bar"
doi.find → uri
Looks for a DOI at doi.org.
Returns a URI if it finds a match, otherwise returns nil.
require 'doi/network'
url = DOI.parse('10.17487/RFC8089').find
doi.data → hash
Gets data about this DOI from CrossRef.
require 'doi/network'
data = DOI.parse('10.17487/RFC8089').data
Copyright (c) 2017, Matthew KerwinPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, gender identity
and expression, level of experience, nationality, personal appearance,
race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive
environment include:
Examples of unacceptable behavior by participants include:
Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.
This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Examples of representing a project or community include using an
official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or
offline event. Representation of a project may be further defined and
clarified by project maintainers.
Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at matthew@kerwin.net.au.
All complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project's leadership.
This Code of Conduct is adapted from the Contributor Covenant,
version 1.4, available at http://contributor-covenant.org/version/1/4