Driver Development: Apiotics Factory Gem

The Apiotics Factory Gem allows developers to quickly generate the structure of an Apiotics driver, and to concentrate their development efforts on interacting with the hardware.

To use the Gem, run gem install apiotics_factory.

The gem exposes three commands:

  • apiotics_factory generate

  • apiotics_factory publish

  • apiotics_factory clear_credentials


The apiotics_factory generate command takes a driver id as an argument. You would invoke it as follows:

$ apiotics_factory generate 1

You get the id after defining your driver and its interfaces on the Apiotics Portal.

The factory gem will ask you when you run it for the first time to enter your vendor keys. These can be found on your vendor page. If you are not associated with a vendor, please create a vendor by clicking on the Vendor tab on the left side of the Apiotics portal.

The gem will also ask you to confirm the web address of the portal.

After that, the gem will create a new driver in your current directory. It will stub out functions for the interfaces of the driver. These functions may be found in drivername/rootfs/driver_name.rb


The apiotics_factory publish command publishes your driver software on the Apiotics portal. You invoke it as follows:

$ apiotics_factory publish 1

Clear Credentials

If you need to change your vendor keys, you can run the following which will clear your credentials from the gem.

$ apiotics_factory clear_credentials

The next time your run generate or publish, the gem will ask you for your vendor credentials again.

Mac Dougherty