It now additionally allows to use `sticky`, `priority` and
`callback_url`. The Agent is now `FormConfigurable` and supports Liquid
in all options.
`register_growl` had to be moved inside of the `events` loop to allow
Liquid interpolation for the previously static `growl_*` options.
#2018
* Keep X events to make Digest from
Added a configuration option to save a fixed number of events for the Digest. Currently all received events are purged when an event is emitted by this agent. This option allows received events to be remembered and reused for future Digests.
* added validate_options for new config
Added a check to prevent negative numbers, which would cause breakage. Also gave an upper limit at 999, just to set a sane maximum.
* removed unnecessary while loop
As suggested by @dsander here: https://github.com/huginn/huginn/pull/2041#discussion_r123965060
* Updated name of feature and description
* ensure retained_events is an Integer
* typo in check if retained events is int
* specs for digest_agent
* removed validate as integer
* removed check for integer status
* Rspec mostly working
Got rspec mostly working. The #'working?' check for events received in last few days is failing for me, but it was failing for other agents too on my setup. Likely a local problem, so lets see if this passes the automated builds.
* removed comments
ack. forgot about those
This allows a CommanderAgent to control only some of the targets
depending on the agent attributes. For example, you can update the
threshold value of a target agent only if the current value is
lower (or higher) than the suggested new value.
Updates google-api-client to 0.13 along with GoogleCalendarPublishAgent
and GoogleTranslationAgent to newer API signatures. In preparation for
including a google-cloud-bigquery gem and Agent which would otherwise
have dependency version mismatches.
May break backwards compatibility for the GoogleCalendarPublishAgent due to Google's new preferred
authentication method. PKCS12 keys are no longer support by the gem,
in favor of RSA private keys / JSON key files.
The new API no longer uses a discovery method and implements methods in
Ruby, adopting snake case names for object keys. So `dateTime` becomes
`date_time`. `time_zone` also appears to now be required.
Detecting the database type by the name this time, because
ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter is defined only
if the mysql2 gem is loaded.
This works around #1940 for the most typical cases.
In Rails 5.1 transactional tests share the same connection id between
the webserver and test runner. This removes the need for special cleanup
strategies.
This speeds up the tests significantly, before:
```
Finished in 3 minutes 30.3 seconds (files took 5.46 seconds to load)
```
After:
```
Finished in 1 minute 41.61 seconds (files took 5.45 seconds to load)
```
https://github.com/rails/rails/pull/28083
* Option for custom response headers for receive_web_request
In DataOutputAgent, WebhookAgent, LiquidOutputAgent, this enables
setting options['response_headers'] as a JSON object with custom
response headers to set on the HTTP response through the
WebRequestsController.
* code copy edits from @cantino
* Added GoogleTranslationAgent
* Well, I forgot to add it..
* Wrong ruby version
* Removed duplicate GoogleTranslationAgent
* Fixed Gemfile upgrades by adding required version of jwt
* Added spec for GoogleTranslationAgent and fixed description
* PR fixes:
No more hash rockets
Added info to description
Indentation
* Deleted TranslationAgent because service is deprecated
* Reverted google-api-client version
* Downgraded rest of gems and fixed hash rockets
* More PR fixes
* Remove fixed limit of 500 IDs used to figure out which entries are new.
Instead each ID that is checked against the seen_ids gets moved to the top of the list.
IDs that are no longer used in the RSS Feed will end up at the bottom of the seen_ids list end will be removed.
* remove uncommented code line
* fix undefined method `count' for nil:NilClass, in case the first fetch of an rss feed failed or fetched empty rss feed.
changed spec to verify the deletion of old ids by keeping all current ones, not by fixed limit
* revert changes for dynamic cleanup.
Instead made the limit of stored ids configurable. (key: max_ids)
Default limit will remain 500.
* fixed error message.
replaced repeated function call with single call specifying amount.
using options['max_ids'] instead of interpolated['max_ids'] to retrieve setting.
* Rename to remembered_id_count and fix spec
* Update rss_agent.rb
fixed indentation
For backward compatibility, a new option `rss_content_type` is added
and existing agents will have its value set to `text/xml`, which was
the Content-Type value before this change.
This fixes#1968.
* Create Tumblr Likes Agent
* Don't interpolate options
* Clear ID memory after 50 entries
In order to prevent the ID array from getting to large, keep only the
last 50 entries. 50 is currently the maximum the API will return at a
time, so we should never exceed that limit.
* Request likes after the last recorded like
Instead of just returning blog likes, request only likes after the
timestamp of the last liked item we’ve processed.
Closes -- https://github.com/cantino/huginn/issues/801
Testing -- ran rspec
About --
Adds an option `min_events` to the peak detector agent. The
agent will start looking for peaks only after min number of
events are accumulated.