Akinori MUSHA
2b493f548b
Add specs for interpolation_context#[]=
and interpolate_with
.
2014-09-03 14:46:53 +09:00
Akinori MUSHA
c21bada226
WebsiteAgent: Provide a variable _response_ for interpolation.
...
* `_response_.headers.Header-Name` is expanded to the value of header
named _Header-Name_.
* `_response_.status` is expanded to the HTTP status as integer, which
is almost always 200, since currently the WebsiteAgent will only
create an event when a request succeeds, and the request method is
limited to GET.
2014-09-01 23:17:19 +09:00
Akinori MUSHA
e2f2ff5da8
Remove "locals" from Drop classes and introduce a real context class.
...
The Context class is capable of switching a self object and adding local
variables, and also hashable for the convenience of being used as a
cache key.
As for the thread safety, we give it up for now as we don't support it
or have concurrency tests yet anyway.
2014-09-01 21:53:44 +09:00
Andrew Cantino
5a8206401a
Merge pull request #473 from cantino/nullify_agent_log_event_refs
...
Cleanup event references on AgentLogs when Events are deleted
2014-08-31 21:19:44 -07:00
Andrew Cantino
1d3fbfbe52
Merge pull request #475 from cantino/human_task_agent_separate_events
...
allow separate events for each answer in the HumanTaskAgent
2014-08-31 21:19:08 -07:00
Andrew Cantino
2c820e8af2
allow separate events for each answer in the HumanTaskAgent
2014-08-31 20:25:11 -07:00
Andrew Cantino
32a2a77143
Cleanup event references on AgentLogs when Events are deleted
2014-08-31 20:03:06 -07:00
Akinori MUSHA
3afd215457
Merge pull request #464 from knu/heroku_button
...
Add a "Deploy to Heroku" button.
2014-08-30 16:25:01 +09:00
Akinori MUSHA
ac7cd8ce5e
Merge pull request #414 from knu/set_charset_for_mysql
...
Set charset/collation properly for each text column if using MySQL.
2014-08-30 16:03:31 +09:00
Akinori MUSHA
3c9dd9a8a4
Update the Heroku instructions.
2014-08-30 15:55:54 +09:00
Akinori MUSHA
f84a9c24eb
Fix app_name.
2014-08-30 15:55:17 +09:00
Akinori MUSHA
4c938f14e5
Make to_xpath
stringize a non-string operand as the standard filters do.
2014-08-28 20:34:59 +09:00
Akinori MUSHA
d378795176
Merge pull request #462 from knu/liquid-to_xpath
...
Add a Liquid filter `to_xpath`, which quotes a string for use in XPath expression.
2014-08-28 18:49:58 +09:00
Akinori MUSHA
df907c0290
Extend the spec to give a better idea on how to use to_xpath
.
2014-08-28 18:47:37 +09:00
Akinori MUSHA
3cb29326fa
Merge pull request #465 from knu/move_save_button_up
...
Move the Save button right under the options.
2014-08-28 17:36:38 +09:00
Dominik Sander
fcc9defccd
Merge pull request #467 from dsander/hipchat-username
...
HipChatAgent: username length limit is 15 chars
2014-08-28 00:04:25 +02:00
Dominik Sander
daca2fd7b6
HipChatAgent: username length limit is 15 chars
...
Also try to use travis-cis bundle caching
2014-08-27 23:47:41 +02:00
Akinori MUSHA
64802bd457
uri_escape
: Do not fail when nil is given.
...
Do just the same as the standard filter `url_encode`.
2014-08-27 23:52:03 +09:00
Akinori MUSHA
c706bebcc1
Add a dedicated validator for interpolation.
...
We need this because not all agents perform interpolation in their
validate_options methods. Now that we have validate_interpolation,
interpolation failure in other validators are simply ignored.
2014-08-27 22:23:48 +09:00
Akinori MUSHA
3e0741d100
Agent#valid?: Rescue Liquid::Error and save it in errors.
...
Calling valid? should not raise any exception in general, and in our
case it is undesirable for a syntactically wrong Liquid template in
options to cause Internal Server Error in validation.
2014-08-27 22:08:32 +09:00
Akinori MUSHA
381a338c6c
Move the Save button right under the options.
...
It's nice for each Agent to have a good, detailed description, but
currently the Save button will be gone too far below when the
description is very long in height.
2014-08-27 21:13:30 +09:00
Akinori MUSHA
f722d646b7
Do not lose payload data when locals is given.
2014-08-27 20:52:14 +09:00
Akinori MUSHA
171a8ba90d
Place a "Deploy to Heroku" button.
2014-08-27 19:32:02 +09:00
Akinori MUSHA
6691e6db98
Support installation via Heroku button.
2014-08-27 19:32:01 +09:00
Akinori MUSHA
5675ecf79b
Add app.json.
2014-08-27 19:32:01 +09:00
Akinori MUSHA
857b8ea969
Merge remote-tracking branch 'origin/master' into set_charset_for_mysql
...
Conflicts:
db/schema.rb
2014-08-27 13:06:21 +09:00
Akinori MUSHA
0227496669
Clean up code with mode
.
2014-08-27 11:56:55 +09:00
Akinori MUSHA
212344ac3a
Merge pull request #463 from knu/website_agent-refactor-check_url
...
Refactor WebsiteAgent#check_url.
2014-08-27 10:21:22 +09:00
Dominik Sander
74ced66beb
Merge pull request #324 from dsander/omniauth
...
OAuth consumer
2014-08-26 23:17:22 +02:00
Dominik Sander
a144c2dae7
Also show the upgrade warning in the services page
2014-08-26 22:28:25 +02:00
Akinori MUSHA
2a9483bf06
Merge branch 'refactor-drop'
2014-08-26 21:40:23 +09:00
Akinori MUSHA
a93bb2674e
Refactor Drop classes.
...
Not alone EventDrop but all subclasses now take a hash of "locals" which
could be referenced in interpolation. This will make it easier for
Agent classes to add custom "locals" for use in interpolation.
2014-08-26 21:31:38 +09:00
Akinori MUSHA
432f952b0a
Refactor WebsiteAgent#check_url.
...
Its function body is currently too large and deep, so divide it into
several methods.
2014-08-26 20:15:39 +09:00
Akinori MUSHA
0c490aa82d
Add a Liquid filter to_xpath
, which quotes a string for use in XPath expression.
2014-08-26 16:57:09 +09:00
Akinori MUSHA
863e2b8c70
WebsiteAgent should interpolate values from incoming event payload.
2014-08-26 16:20:48 +09:00
Akinori MUSHA
aa94c119d6
Merge pull request #461 from knu/user-defined-event_description
...
Improve event_description of EventFormattingAgent and WebsiteAgent.
2014-08-26 10:02:29 +09:00
Akinori MUSHA
ba7dbceb7a
Omit option details from event_description of WebsiteAgent.
2014-08-25 22:30:47 +09:00
Akinori MUSHA
fd0d9ed930
Implement event_description of EventFormattingAgent.
2014-08-25 22:29:52 +09:00
Akinori MUSHA
e483061bed
Add a spec for LiquidInterpolatable::Filters.
2014-08-25 21:24:07 +09:00
Akinori MUSHA
cb71c84842
Remove trailing commas from JSON examples.
2014-08-25 20:07:16 +09:00
Akinori MUSHA
393e3c4ddc
Follow the default collation of Rails rather than MySQL.
...
`utf8*_unicode_ci` is known to be problematic in some languages like
Japanese, but hopefully it wouldn't do harm in practice in our case.
2014-08-25 15:18:24 +09:00
Akinori MUSHA
66d1ac07c8
Fall back utf8mb4 to utf8 if the server does not support it.
2014-08-25 15:18:24 +09:00
Akinori MUSHA
59482ee937
Add support for Ruby 1.9.x.
2014-08-25 15:18:24 +09:00
Akinori MUSHA
db792cdd82
Set charset/collation properly for each text column if using MySQL.
...
With this change, Huginn is able to store up to 4-byte UTF-8 characters
in its database. This should fix #286 .
2014-08-25 15:18:24 +09:00
Dominik Sander
6b4ca6365d
Select the current service if an agent already exists when importing a
...
scenario
2014-08-22 21:34:37 +02:00
Dominik Sander
858dcdca8f
Merge branch 'master' into omniauth
...
Conflicts:
db/schema.rb
2014-08-22 20:35:24 +02:00
Andrew Cantino
28707507c7
Merge pull request #453 from PetroFeed/scenario-tag-color
...
Add ability to set color for the scenario tags.
2014-08-21 20:42:03 -07:00
Guilherme J. Tramontina
a8c863ff86
Add spec for positive hex color value
2014-08-22 00:13:16 -03:00
Andrew Cantino
e0c98f2465
Merge pull request #457 from dsander/allow-html-in-emails
...
Allow html in email agents, proected by sanitize
2014-08-21 17:49:23 -07:00
Dominik Sander
66c63b4e2b
Allow html in email agents, proected by sanitize
2014-08-22 00:50:12 +02:00