A simple unofficial ruby wrapper for Reprise License Manager (RLM).
Add this line to your application's Gemfile:
gem 'rlm_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rlm_ruby
Use RlmRuby::License.generate_keys
to genenerate activation keys for one or more products. In the example below we generate three keys for the contact "Stan Still" for three seperate products:
RlmRuby::License.generate_keys(contact: { name: "Stan Still",
email: "stans@example.com",
phone: "012-345-6789" },
products: [{ id: 1, count: 100 },
{ id: 2, count: 30 },
{ id: 3, count: 1 }])
#=> [<#= RlmRuby::ActivationKey #>, <#= RlmRuby::ActivationKey #>, <#= RlmRuby::ActivationKey #>]
Working with ActivationKeys:
my_key = RlmRuby::License.generate_keys(contact: { name: "Stan Still",
email: "stans@example.com",
phone: "012-345-6789" },
products: [{ id: 1, count: 1 }]).first
puts my_key # => {"activation_key":"123-1334-234232-123","count":100,"product_id":"1"}
- Fork it ( http://github.com//rlm_ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request