0.0
No commit activity in last 3 years
No release in over 3 years
Plugin to create a service
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 3.0.0
~> 0.44.1
>= 0.9.2

Runtime

>= 4.7
 Project Readme

lita-service

Build Status Coverage Status

Plugin to create a service with value or custom value per client and to manage how many times a customer use or consume this service.

Installation

Add lita-service to your Lita instance's Gemfile:

gem "lita-service"

Usage

 lita service list
 lita service create        <NAME> <*VALUE>                 # Value will be set to 0 if empty.
 lita service show          <NAME>
 lita service delete|remove <NAME>

 lita service <NAME> inscribe      <CUSTOMER> <*VALUE>      # Value will be set to service's value if empty.
 lita service <NAME> delete|remove <CUSTOMER>
 lita service <NAME> add|sum       <CUSTOMER> <*QUANTITY>   # Quantity will be set to 1 if empty.
 lita service <NAME> add|sum all   <*QUANTITY>              # Quantity will be set to 1 if empty.
 lita service <NAME> value         <CUSTOMER> <VALUE>
 lita service <NAME> reset         <CUSTOMER>

To show the available commands

 lito help service

Example

 lita service list
 lita service create awesome-service 200
 lita service show awesome-service
 lita service delete awesome-service
 lita service remove awesome-service

 lita service awesome-service inscribe erlinis
 lita service awesome-service add erlinis 2
 lita service awesome-service sum erlinis 2
 lita service awesome-service add all 3
 lita service awesome-service sum all 3
 lita service awesome-service delete erlinis
 lita service awesome-service remove erlinis
 lita service awesome-service value erlinis 300
 lita service awesome-service reset erlinis

Test

To run the tests use

 rake spec