Minecraft Version Info

Travis CI Code Climate Test Coverage Issue Count

Retrieves and processes information about versions of Minecraft. Small library for getting version information from Mojang about Minecraft. Includes a command-line utility as well.

Installation

Add this line to your application's Gemfile:

gem 'lapis-minecraft-versioning'

Or to your gemspec:

spec.add_dependency 'lapis-minecraft-versioning'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lapis-minecraft-versioning

Usage

Include the gem by adding this to your scripts:

require 'lapis/minecraft/versioning'

Accessing Minecraft version data

Retrieve the official Minecraft version list:

list = Lapis::Minecraft::Versioning::VersionList.official

Display a list of all versions:

list.each do |version|
  puts version.id
end

Get the client URL for the latest release:

list.latest_release.client_download.url

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rake test to run the tests. It's recommended that you run bundle exec rake inspect to run inspections. You can also run bin/console for an interactive prompt that will allow you to experiment. bundle exec rake doc will generate documentation.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in versioning/version.rb, and then run bundle exec rake release. This will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub.