huginn/spec
nogre 79fc461bd9 Keep X events to make Digest from (#2041)
* 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
2017-07-28 14:29:25 +02:00
..
cassettes Google translate (#1978) 2017-04-26 17:49:05 +12:00
concerns Add a new option include_sort_info 2017-01-01 03:27:24 +09:00
controllers Option for custom response headers for receive_web_request (#1977) 2017-04-27 12:19:59 +12:00
data_fixtures Create Tumblr Likes Agent (#1923) 2017-04-07 19:27:24 -04:00
db/seeds Sets the new user up with an example set of agents 2016-04-10 16:03:21 -07:00
features Allow controllers to be selected 2017-07-19 11:24:22 +09:00
fixtures Fix scenario import when merges are required 2017-01-17 22:00:38 +01:00
helpers Fix spec expectation when USE_GRAPHVIZ_DOT is defined 2017-05-23 14:53:15 -07:00
importers Uploadicons (#1427) 2016-06-15 23:52:50 -07:00
jobs Do not run/enqueue event propagation when a AgentPropagateJob is already enqueued 2016-04-17 17:15:50 +02:00
lib Removing obsolete test and environment property. 2017-05-29 20:48:50 +02:00
migrations Disable automatic URL normalization and absolutization on url 2016-11-27 13:38:23 +09:00
models Keep X events to make Digest from (#2041) 2017-07-28 14:29:25 +02:00
presenters Update for rspec3 rails_helpers config, fix shoulda matchers 2015-10-20 18:50:52 -05:00
routing Update for rspec3 rails_helpers config, fix shoulda matchers 2015-10-20 18:50:52 -05:00
support Expose target to CommanderAgent in templating 2017-07-09 03:34:05 +09:00
capybara_helper.rb Introduce capybara-screenshot to make debugging easier 2017-07-19 10:30:52 +09:00
env.test Add LocalFileAgent and introduce concept to handle files 2016-03-18 20:43:28 +01:00
rails_helper.rb Remove database_cleaner gem 2017-05-19 09:24:48 +02:00