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

game_dig

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

game_dig

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

GameDig for Ruby

Gem Gem License: MIT

Ruby wrapper gem for node-gamedig.

Providing support to use the node cli or running a tiny webservice for faster responses.

Contents

Installation

Prerequisites

NodeJS or a compatible alternative is installed.

Then install the gamedig package with your favourite package manager globally, e.g. here with npm or yarn:

yarn
    yarn global add gamedig
npm
    npm install -g gamedig

Gem

Add this line to your application's Gemfile:

gem 'game_dig'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install game_dig

Usage examples

You can use the basic cli wrapper or the tiny webservice instance.

CLI wrapper

This will just run the gamedig cli and return its result.

    require 'game_dig'
    data = GameDig.query(type: 'minecraft', host: 'my-server.example.com')
    p data

Service wrapper (experimental, only did some testing on linux)

Only the following parameters are implemented for the service wrapper: type, host, protocol (version 0.1.0)

Behaves the same to the user, but runs a tiny node webservice in the background to avoid startup times when called more than one time.

your-ruby-app 
    --------> ruby-game_dig 
        --------> tiny node instance in a separate thread using gamedig node module
<----------------    

It needs only about half of the query time, but might be not as stable as it involves much more complexity. (about 10ms vs 20ms)

    require 'game_dig/service'
    data = GameDig.query(type: 'minecraft', host: 'my-server.example.com')
    p data

Documentation

Check out the doc at RubyDoc:
https://www.rubydoc.info/gems/game_dig

As this library is only a wrapper, checkout the original node-gamedig documentation:
https://github.com/gamedig/node-gamedig

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/magynhard/ruby-game_dig.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

FAQs

Package last updated on 08 Dec 2022

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