Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grid-number

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grid-number

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

GRid

Build Status

Class for managing Global Release Identifiers (GRid numbers). GRid numbers are used to identify electronic music releases.

Installation

Add this line to your application's Gemfile:

gem "grid-number"

And then execute:

$ bundle

Or install it yourself as:

$ gem install grid-number

Usage

require "grid"

grid = GRid.parse("A12425GABC1234011K")
grid = GRid.parse("A1-2425G-ABC1234011-K")
grid = GRid.parse("  grid:A1-2425G-ABC1234011-K  ")
grid.valid?          # true
grid.id_scheme       # A1
grid.issuer_code     # 2425G
grid.release_number  # ABC1234011
grid.check_character # K

grid = GRid.new(:issuer_code => "2425G", :release_number => "ABC1234002")
grid.check_character # M
grid.release_number = "X999150000"
grid.check_character # 3

grid = GRid.parse("A12425GABC1234011X") # Wrong check character
grid.valid?                   # false
grid.errors[:check_character] # ["verification failed"]

GRid.default_issuer_code = "2425G"
grid = GRid.new(:release_number => "ABC1234002")
grid.to_s           # A12425GABC1234002M
grid.formatted      # A1-2425G-ABC1234002-M

See Also

  • DDEX - DDEX metadata serialization
  • istwox - Classes for ISBN, ISSN, ISRC, ISMN and ISAN numbers
  • iTunes Store Transporter: GUI - GUI and workflow automation for the iTunes Store’s Transporter (iTMSTransporter)

License

The gem is available as open source under the terms of the MIT License.


Made by ScreenStaring

FAQs

Package last updated on 08 Apr 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc