* Improve Utils.normalize_uri
Globally replacing generally unsafe characters in a URL would not fix
invalid authorities and paths, so use Addressable::URI to normalize them
when necessary.
This should fix#1701.
* Remove an unused function
* Fix the test case to make sure an IPv6 address is supported
JSONEditor double escapes escape characters to properly display them in the UI, however when dry running Agents we
actually need to send the Event's characters as they were.
Before an event containing new lines like this `Line A\nLineB` would be send as `Line A\\nLineB` to the backend. By
replacing the double escaped slashes we ensure the event is handled as it would be when not dry running.
#1677
* Clarify path for a simple body_text event.
It's not really clear with regard to a normal agent that this is simply the name of the field.
* updated text
Especially when using Agent gems it happens that an Agent was deleted from the gem or the user removed a gem from the
configuration. Instead of failing with an Internal Server Error the user now is offered to delete all undefined agents.
`type.constantize` is needed to invoke the Rails auto_loader in development since not all Agent classes are loaded when
the application boots.
The old serializeObject function serialized checked checkboxes as an array which was not correct and with
strong_parameters enabled it triggered a `UnpermittedParameters` error.
In the AgentEditPage javascript we only need to initialize `select2` when then `#agent_type` field is a select
box (trying to call `select2` on normal text fields caused a javascript error in the feature specs)
```
ruby-2.3.1@huginn/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
ruby-2.3.1@huginn/gems/net-ssh-2.9.2/lib/net/ssh/transport/session.rb:84:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
```
* Ensure admin attribute can not be set at sign up and the agents user_id is not changeable
* Remove ACCESSIBLE_ATTRIBUTES from the User model
* Remove side effect on agent_params from AgentsController#build_agent
When `cache_response` is set to `false` for completable fields the returned options will not be
cached on the client side. The default is `true`.
Clearing the cache is needed when the completable response depends on a different option of the Agent.
Usage Example:
```
form_configurable :models, roles: :completable, cache_response: false
```
* Disable the completion callback when `select2` is opened programmatically to avoid an infinite loop
* Moved the completion ajax call from `select2-open` to `select2-opening` to clear the cached results before
`completableDefaultOptions` is called (shows the "Loading ..." message instead of the previous results)
* Extract option prviders for non-standard Omniauth payloads
- should enable huginn_agent gem developers to add their own providers
- devs would reopen OmniauthCallbacksController and define their specific action, supplying their own option provider
* Creates a registry for option providers on the Service class
- enables huginn_agent gem developers to register their own omniauth option interpreters
* Cleans up changes to the global Service class after the spec
* 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.
Add new `emit_error_events` option which is set to `false` for all new `TwitterActionAgent`s. This will ensure the Agent
is retried when the action failed by raising an exception.
For all existing `TwitterUserAgent`s the option is set to `true` to keep the previous behavior.
* 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
* Update dependencies to fix deprecation warnings
* Fix BoxcarAgent specs (found by rspec warning about expecting `raise_error` without specifying the exception)