Commit graph

2501 commits

Author SHA1 Message Date
Géza Búza
c3ab764efc Feature/add language option to weather agent (#1544)
* Add language parameter to the weather agent

* Add text forecast for Wunderground data provider

Wunderground API returns forecast for the next few days. Returned JSON response has two types of data under the "forecast" key:
- "txt_forecast": pre-formatted text representation
- "simpleforecast": raw data representation

The "period" key contains which day the node belongs to.

Currently only "simpleforecast" is available to users of the Weather agent.
This commit appends the "txt_forecast" representation to the current data set.
2016-08-31 08:37:51 -07:00
Will Read
a6fe9743f6 EmailDigestAgent relies on received events, rather in memory (#1624)
* EmailDigestAgent relies on received events, rather than storing them in memory

- Addressing a problem where 40,000+ events were stored in one agent's memory, and the agent never loaded from the database

* Cleans up references to memory["queue"]

- incorporates suggested style and safeguards

* Adds clarification on event inclusion in email

* Use `reorder` rather than stripping away all scoping
2016-08-16 23:05:16 -04:00
Dominik Sander
944fa56e35 Merge pull request #1630 from dsander/upgrade-rails
Update rails to 4.2.7.1
2016-08-15 22:08:16 +02:00
Andrew Cantino
577b441382 Handle removed events when rendering logs (#1634) 2016-08-15 11:50:54 -04:00
Dominik Sander
fade736381 Update rails to 4.2.7.1
* Update dependencies to fix deprecation warnings
* Fix BoxcarAgent specs (found by rspec warning about expecting `raise_error` without specifying the exception)
2016-08-11 20:56:32 +02:00
Dominik Sander
76c4622bf3 Merge pull request #1620 from dsander/fix-env-in-docker
Docker: fix usage of ENV variables that are not in .env.example
2016-08-10 00:00:30 +02:00
Akinori MUSHA
9b23c28049 Merge pull request #1444 from cantino/data_output_agent_limits_events_after_ordering
DataOutputAgent limits events after ordering
2016-08-08 14:12:25 +09:00
Dominik Sander
d6e185f0f3 Docker: fix usage of ENV variables that are not in .env.example
Variables that are usable but not present with default values in .env.example were located with this one-liner:

```
diff --changed-group-format='%<' --unchanged-group-format='' <(ack "ENV\[.(.+?).\]" --output='$1' -h app config lib db| sort | uniq) <(grep = .env.example | sed -e 's/^#\([^ ]\)/\1/' | grep -v -e '^#'| ack "(.+?)=" --output='$1'|sort)
```
2016-08-06 14:54:08 +02:00
Andrew Cantino
ddb35e8236 Fix dependency check for Tumblr gem (#1615) 2016-08-04 22:05:52 -04:00
Sascha Hagedorn
d627a18f6d Added api_key option to UserLocationAgent (#1613)
* Added `api_key` option to UserLocationAgent

The `api_key` is used on the summary page of the UserLocationAgent
as well as the event detail page to display a location on a Google
Map which requires an API key. Closes #1612

* added link to Google API key documentation
2016-08-04 21:22:59 -04:00
Andrew Cantino
b765c0c3fb DataOutputAgent cannot create events (#1608) 2016-07-26 20:19:52 -04:00
Dominik Sander
d7abf824ce Merge pull request #1607 from dsander/fix-faraday-encoding-issue
Monkey patch faraday to fix encoding issue in URLs
2016-07-26 22:02:09 +02:00
Akinori MUSHA
26a11afb24 Rephrase the description of events_list_order as suggested by @cantino 2016-07-26 21:15:06 +09:00
Darren Cauthon
9d584b6ba4 Liquid output agent (#1587)
* Start with a stripped copy of the data output agent.

* Run the data from the last event through a liquid template.

* Flatten the secret logic to allow for an easier switch to FormConfigurable.

* Switch to form configurable, and allow the content of the page to be configured.

* Allow the mime type to be changed.

* Cleanup.

* Write how this template works.

* Better default values.

* Cleanup.

* Refactor.

* Start testing.

* Test the validation.

* Test receive.

* Test the happy path through the receive web events.

* Test the authentication.

* This is actually a match.

* Refactor.

* Refactor.

* Refactor for better testing.

* Create a mode that lets the logic change. Start with a merge behavior.

* Refactor.

* Create a form configurable setting to change the mode.

* Document how the modes work.

* Wording change.

* Go with a singular secret.

* Fix typo.

* Fix the tests.

* Test cleanup.

* If not one of two types that receive events, ignore all received events.

* Set up these tests for the next set of changes.

* Isolate the method that gets the data for the liquid template.

* Look up past events to render through the liquid template.

* Implement a limit of 2 events.

* Extract a method.

* Hook the limit to options.

* Implement a limit of X events.

* Implement a date limit.

* Refactor the count limit.

* Limit by date with sql, not in-memory objects.

* This ordering is already built into the scope.

* Refactor the dates a bit.

* Put in a few checks around the date limits.

* Add the last X event options to the form and the documentation.

* Missed one bit of documentation.

* Add a view for a liquid output agent that makes it easy to retrieve the generated URL.

* This agent cannot accept events.

* Hardcode the possibilities instead of inspecting the integer.

* Do not be case sensitive on the date filter.

* Hardcode a limit of 5000, just in case no limit was provided.

* Better checks around the time period parsing.

* Test the hardcodes, and rename for consistency.

* Nevermind on that rename.

* Do not be case sensitive on this mode.

* Test that it works even when the casing on the mode is wrong.

* Here is more descriptive default content.

* Text change.

* The if is no longer necessary.

* Refactor.

* Move the limit down to 1000.

* Put a hard limit of 1000.

* Note the new event limit... limit.

* Validate for a valid event limit.

* Do not throw an error if someone types in a non-integer into this field.

* Text update.

* Typo.

* Add a link to the Liquid Templating engine.
2016-07-25 21:23:33 -04:00
Andrew Cantino
cc72f79e0b Allow PostAgent headers to interpolate event data (#1606) 2016-07-25 19:59:14 -04:00
Dominik Sander
6c9d1c0f55 Merge pull request #1602 from dsander/update-changelog
Update the changelog with the last 4 months of work
2016-07-25 23:03:52 +02:00
Dominik Sander
5c53e660a8 Monkey patch faraday to fix encoding issue in URLs
Using binary encoding allows the URL to contain characters that are not UTF-8 encoded.

 #1588
2016-07-25 23:00:10 +02:00
Akinori MUSHA
8aed682baa Allow dry-run of TriggerAgent 2016-07-25 19:42:16 +09:00
Akinori MUSHA
cc8e1bb9cc Remove an unnecessary call to save() 2016-07-25 17:46:00 +09:00
Dominik Sander
c1f2165383 Merge pull request #1595 from dsander/move-smtp-config
Move ActionMailer configuration to initializer
2016-07-25 00:42:19 +02:00
Dominik Sander
c4d3c5795d Move ActionMailer configuration to initializer
Prevents encoding issues in the generated YAML file when using especial characters like !

 #1584
2016-07-25 00:29:50 +02:00
Dominik Sander
234130c903 Update the changelog with the last 4 months of work 2016-07-25 00:29:00 +02:00
Gergely Brautigam
6b751fe98b Updated jsonpath to jsonpathv2 to support scripting and to switch to a more up to date version of the gem. Issue #1591. (#1596) 2016-07-24 11:39:15 -04:00
Alex Jordan
c1095330ea Make HttpStatusAgent provide redirect info (#1590)
* Make HttpStatusAgent provide redirect info

* Mock to_hash for HttpStatusAgent specs

* Refactor HttpStatusAgent spec mock responses
2016-07-20 08:29:09 -04:00
Darren Cauthon
29007c9019 Add an option to fire http status events only when a change occurs. (#1582) 2016-07-14 21:12:20 -04:00
Lloyd Pick
8c0a10fc4b attribute difference agent (#1572) 2016-07-09 19:51:08 -04:00
Dominik Sander
d741bfdc5c Merge pull request #1576 from Enfop/JavascriptAgentSetMemory
Add setMemory function to Javascript Agent
2016-07-05 00:12:05 +02:00
Paul Platenius
7f0ad0703b Rename setKey to setMemoryKey, changed setMemory description 2016-07-04 22:07:53 +02:00
Paul Platenius
da833b13bb Add setMemory function to Javascript Agent 2016-07-03 22:48:45 +02:00
Lloyd Pick
c3e263d3a4 allow decimal values to be shown on the peak graph (#1574) 2016-07-01 14:47:09 -04:00
Andrew Cantino
8aef73e253 Add clarifying text to fix #1558 2016-06-30 19:15:07 -04:00
Andrew Cantino
e1a2b5ae25 Heroku now makes an empty repo with the deployment button (#1570) 2016-06-30 00:45:53 -04:00
Dominik Sander
923d6d0854 Merge pull request #1560 from kreuzwerker/docker-images-agent-gems
Docker images: fix sudo swallowing env variables
2016-06-25 00:13:34 +02:00
Dominik Sander
dce47b6b3b Docker images: fix sudo swallowing env variables
Adds the -E argument to sudo calls which passes the environment to the called command. Ensures env variables which are
not defined with default in .env.example are available in Huginn.
Fixes encoding issue when loading agent gems which contain non ASCII characters.
2016-06-23 18:05:50 +02:00
Enfop
d26015c62b Return to Agent Events after Event show (#1555) 2016-06-22 20:43:04 -07:00
ancientz
9b579617f5 Added style tag to the allowed tags so that e-mails sent with EmailAgent can have CSS. Without this, style was stripped and the css was just placed inside the body tag. (#1557) 2016-06-22 20:39:54 -07:00
Dominik Sander
bba0e2e869 Merge pull request #1366 from kreuzwerker/feature/agents_in_gems
Next attempt to pull Agents into gems
2016-06-21 10:46:57 +02:00
Dominik Sander
222f3a4e13 Bump huginn_agent version 2016-06-21 10:22:57 +02:00
Dominik Sander
811f9c27d1 Allow specifing Agent gem in the Gemfile 2016-06-20 10:37:33 +02:00
Dominik Sander
603f3e7ca0 change huginn_agent git repository 2016-06-20 10:32:37 +02:00
Dominik Sander
f25b308be7 update huginn_agent 2016-06-20 10:32:37 +02:00
Dominik Sander
9c8ec30cc5 Move RSSAgent back to its original path 2016-06-20 10:32:37 +02:00
Andrew Cantino
0bd46b524f initial effort on pulling Agents into gems 2016-06-20 10:32:37 +02:00
Alex Jordan
3c8d6655a3 Expand HTTP status agent (#1521)
* Add WIP support for HTTP headers

* Actually pass the header to check_this_url

* Fix an unmerged hunk

* Fix some syntax errors

* Fix an outdated variable name

* Comment on which sections do what

* Get rid of (another) unmerged hunk

* Show a form element for the header field

* Fix event emitter conditional

* Adjust tests for header logic

* Test for not returning a header

* Refactor payload generation

* Rename 'header' to 'headers'

* Add multiple header support

* Update HttpStatusAgent docs

* Fix (some) failing tests

* Fix remaining tests

* Add specs for HttpStatusAgent's header code

* Super tiny cleanups
2016-06-20 00:37:15 -07:00
Akinori MUSHA
371bfa34b7 Merge pull request #1551 from cantino/jsagent_fix_memory
Fix `this.memory(key, falsy)` not working in JavaScriptAgent
2016-06-20 12:48:44 +09:00
Andrey Yantsen
3b4b4f3761 [fix #1512] add not in comparison into Trigger Agent (#1545) 2016-06-18 16:09:54 -07:00
Enfop
5cdc37f716 DryRunMemory (#1550) 2016-06-18 15:53:58 -07:00
Akinori MUSHA
806722b4f8 Fix this.memory(key, falsy) 2016-06-16 20:15:55 +09:00
Akinori MUSHA
4edb6e0866 Add specs that this.memory(key, falsy) should work
This spots a bug in `getMemory()`.
2016-06-16 20:11:58 +09:00
Andrew Cantino
e4e2782ebe Fix whitespace 2016-06-15 23:55:11 -07:00