Giter Site home page Giter Site logo

huginn_agent's Introduction

HuginnAgent Build Status Dependency Status

This is a dependency for new external Huginn Agent Gems.

Installation

It is recommended to have a local development setup of Huginn running before starting to develop a Huginn Agent Gem.

gem install huginn_agent

Creating a new Agent Gem

Use the provided generator to create a skeleton of the new Agent Gem.

huginn_agent new huginn_awesome_agent

You can now start developing the new Agent in ./huginn_awesome_agent. An example Agent class skeleton is located in ./huginn_awesome_agent/lib/huginn_awesome_agent/awesome_agent.rb.

Every Agent and ruby source file needs to be "registered", so that the huginn_agent can load them during the startup of Huginn. After creating new files add them in lib/huginn_<your agent name>_agent.rb:

# use register to add more agents to Huginn
HuginnAgent.register 'path_to/<agent name>_agent'
# use load to require concern or other library classes
HuginnAgent.load 'path_to/concerns/<file name>'

You can add your Agent Gem to your Huginn instance for testing by adding it the to list of ADDITIONAL_GEMS in the Huginn .env file:

ADDITIONAL_GEMS=huginn_awesome_agent(path: /local/path/to/huginn_awesome_agent)

Running the specs for the Agent Gem

Running rake will clone and set up Huginn in spec/huginn to run the specs of the Gem in Huginn as if it were a builtin Agent. 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 Huginn again. To get code coverage reports set the COVERAGE environment variable: COVERAGE=true rake spec

Examples

You can see a list of gems using Huginn Agent on RubyGems.org.

We're also aware of these additional gems:

Contributing

  1. Fork it ( https://github.com/[my-github-username]/huginn_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

huginn_agent's People

Contributors

dsander avatar cantino avatar alessio-signorini avatar stesie avatar mandrews avatar sfischer13 avatar knu avatar albertsun avatar pacharanero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.