Skip to main content Link Search Menu Expand Document (external link)

Ruby Gems

Bundler is integrated, enabling any Ruby gem compatible with JRuby to be used within rules. This permits easy access to the vast ecosystem libraries within the ruby community. It would also create easy reuse of automation libraries within the OpenHAB community, any library published as a gem can be easily pulled into rules.

Gems are available using the inline bundler syntax. The require statement can be omitted.

gemfile do
  source 'https://rubygems.org'
   gem 'json', require: false
   gem 'nap', '1.1.0', require: 'rest'
end

logger.info("The nap gem is at version #{REST::VERSION}")