No commit activity in last 3 years
No release in over 3 years
Huginn agent that filters events based on their time information
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

 Project Readme

TimeFilterAgent

Gem Version Build Status

The Time Filter Agent filters events based on whether a 24h or AM/PM time in them is within a provided range.

Installation

This gem is run as part of the Huginn project. If you haven't already, follow the Getting Started instructions there.

Add this string to your Huginn's .env ADDITIONAL_GEMS configuration:

huginn_time_filter_agent
# when only using this agent gem it should look like this:
ADDITIONAL_GEMS=huginn_time_filter_agent

And then execute:

$ bundle

Usage

A simple agent that'll receive events and emit them, if they pass the time check. Options:

  • time_path should be set to where in the event's payload the time information is, default is time
  • earliest should be set to earliest allowed time, default is 08:00
  • latest should be set to the latest allowed time, default is 20:00

Development

Running rake will clone and set up Huginn in spec/huginn to run the specs of the Gem in Huginn as if they would be build-in Agents. The desired Huginn repository and branch can be modified in the Rakefile:

HuginnAgent.load_tasks(branch: '<your branch>', remote: 'https://github.com/<github user>/huginn.git')

Make sure to delete the spec/huginn directory and re-run rake after changing the remote to update the Huginn source code.

After the setup is done rake spec will only run the tests, without cloning the Huginn source again.

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

Contributing

  1. Fork it ( https://github.com/nighthawk/huginn_time_filter_agent/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request