Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
= Relaton-ISBN: retrieves bibliographic items using OpenLibrary API
image:https://img.shields.io/gem/v/relaton-isbn.svg["Gem Version", link="https://rubygems.org/gems/relaton-isbn"] image:https://github.com/relaton/relaton-isbn/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/relaton/relaton-isbn/actions?workflow=macos"] image:https://github.com/relaton/relaton-isbn/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/relaton/relaton-isbn/actions?workflow=windows"] image:https://github.com/relaton/relaton-isbn/workflows/ubuntu/badge.svg["Build Status (Ubuntu)", link="https://github.com/relaton/relaton-isbn/actions?workflow=ubuntu"] image:https://codeclimate.com/github/relaton/relaton-isbn/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/relaton/relaton-isbn"] image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-isbn.svg["Pull Requests", link="https://github.com/relaton/relaton-isbn/pulls"] image:https://img.shields.io/github/commits-since/relaton/relaton-isbn/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-isbn/releases"]
RelatonIsbn is a Ruby gem that implements the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model].
You can use it to retrieve metadata of Standards from https://openlibrary.org, and
access such metadata through the BibliographicItem
object.
== Installation
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
== Usage
=== Retrieving bibliographic items using OpenLibrary API
To retrieve bibliographic items, use RelatonIsbn::OpenLibrary.get
method with ISBN-10 or ISBN-13 as an argument. Allowed prefixes are ISBN
, isbn:
. Prefix and hyphens are optional. The method returns RelatonBib::BibliographicItem
object.
require 'relaton_isbn' => true
ibitem = RelatonIsbn::OpenLibrary.get "ISBN 978-0-12-064481-0" [relaton-isbn] (ISBN 9780120644810) Fetching from OpenLibrary ... [relaton-isbn] (ISBN 9780120644810) Found:
9780120644810
=> #<RelatonBib::BibliographicItem:0x0000000113889258 ...
RelatonIsbn::OpenLibrary.get "isbn:0120644819" [relaton-isbn] (isbn:0120644819) Fetching from OpenLibrary ... [relaton-isbn] (isbn:0120644819) Found:
9780120644810
=> #<RelatonBib::BibliographicItem:0x00000001098ac960 ...
Graphics gems II http://openlibrary.org/books/OL21119585M/Graphics_gems_II 9780120644810 1991 James Arvo AP Professional Boston Londonputs bibitem.to_xml
Graphics gems II ...puts bibitem.to_xml bibdata: true
bibitem.to_hash => {"schema-version"=>"v1.2.7", "id"=>"9780120644810", "title"=>[{"content"=>"Graphics gems II", "format"=>"text/plain", "type"=>"main"}], "link"=>[{"content"=>"http://openlibrary.org/books/OL21119585M/Graphics_gems_II", "type"=>"src"}], "docid"=>[{"id"=>"9780120644810", "type"=>"ISBN", "primary"=>true}], "date"=>[{"type"=>"published", "value"=>"1991"}], "contributor"=> [{"person"=>{"name"=>{"completename"=>{"content"=>"James Arvo"}}, "url"=>"http://openlibrary.org/authors/OL2646519A/James_Arvo"}, "role"=>[{"type"=>"author"}]}, {"organization"=>{"name"=>[{"content"=>"AP Professional"}]}, "role"=>[{"type"=>"publisher"}]}], "revdate"=>"1991", "place"=>[{"city"=>"Boston"}, {"city"=>"London"}]}
=== Logging
RelatonIsbn uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
== Development
After checking out the repo, run bin/setup
to install dependencies. Then, run
rake spec
to run the tests. You can also run bin/console
for an interactive
prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To
release a new version, update the version number in version.rb
, and then run
bundle exec rake release
, which will create a git tag for the version, push
git commits and the created tag, and push the .gem
file to
https://rubygems.org[rubygems.org].
== Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/relaton/relaton-isbn.
== License
The gem is available as open source under the terms of the https://opensource.org/licenses/MIT[MIT License].
FAQs
Unknown package
We found that relaton-isbn demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.