Skip to content

5-stones/huginn_http_request_agent

Repository files navigation

HttpRequestAgent

The Http Request Agent is intended to be an abstract agent that allows for the interaction of any http service.

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_http_request_agent
# when only using this agent gem it should look like this:
ADDITIONAL_GEMS=huginn_http_request_agent

And then execute:

$ bundle

Usage

Instructions can be found in the agent's description: lib/huginn_http_request_agent/http_request_agent.rb

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.

Release

The standard release command for this project is:

npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]

This command will:

  1. Generate/update the Changelog
  2. Bump the package version
  3. Tag & pushing the commit

e.g.

npm version 1.2.17
npm version patch // 1.2.17 -> 1.2.18

Contributing

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