Commit graph

3008 commits

Author SHA1 Message Date
Akinori MUSHA
38c7b5a518 Upgrade nokogiri to 1.8.2 to address vulnerabilities found in libxml2 2018-01-31 11:58:07 +09:00
Akinori MUSHA
1c1e3eebe1
Merge pull request #2171 from aserpi/telegram-split-message
Split long Telegram messages
2018-01-29 22:55:19 +09:00
Alessandro Serpi
bdb887bbe2 Explicit Telegram Agent default behaviour 2018-01-29 13:18:55 +01:00
Alessandro Serpi
71800db0fc Improve Telegram Agent tests 2018-01-26 20:48:27 +01:00
Alessandro Serpi
29471df4eb Fix split regex 2018-01-14 15:34:09 +01:00
Alessandro Serpi
4848716948 Improve Telegram Agent description 2018-01-14 15:33:40 +01:00
Alessandro Serpi
503bf7a9be Add tests for Telegram message splitting 2018-01-14 15:33:28 +01:00
Alessandro Serpi
00e3119994 Split long Telegram messages 2018-01-14 15:32:51 +01:00
Alessandro Serpi
1e0e1652b6 Refactor Telegram Agent spec 2018-01-14 15:32:33 +01:00
Akinori MUSHA
fc1daf8b91
Merge pull request #2189 from stesie/issue-2188
Rescue ZeroDivisionError on validation
2018-01-08 19:05:10 +09:00
Stefan Siegl
4aaeb16d24
Rescue ZeroDivisionError on validation, closes #2188 2018-01-05 12:38:46 +01:00
Akinori MUSHA
cefdd1c01d
Merge pull request #2187 from dsander/fix-twilio-interpolation
Fix Liquid interpolation in TwilioAgent helper methods
2018-01-05 14:56:20 +09:00
Dominik Sander
600b06c192 Fix docker hub login on CI
https://github.com/moby/moby/pull/20565 removed the email flag from the
docker login command.
2018-01-04 11:05:56 +01:00
Dominik Sander
7c1ec33d64 Fix Liquid interpolation in TwilioAgent helper methods
The Agent did not use `interpolate_with` in it's `receive` method,
which lead to `interpolated[...]` calls in `send_message` and
`make_call` always returning empty strings.

The new `interpolate_with_each` helper iterates over an array of
objects and yields each object in a `interpolated_with(object)`
context.

Fixes #2186
2018-01-04 10:45:03 +01:00
Dominik Sander
4e9da008ee
Merge pull request #2183 from axsuul/fix/docker-readme
Fix Docker testing README for better GitHub readability
2018-01-02 10:31:57 +01:00
James Hu
bc167ea085 Fix Docker testing README for better GitHub readability 2017-12-29 14:15:32 -08:00
Dominik Sander
1e286bce0f
Merge pull request #2170 from dsander/add-websiteagent-array-extract-option
Add `array` extraction option to WebsiteAgent in HTML/XML mode
2017-12-01 10:49:19 +01:00
Alessandro Serpi
d45edcde7b
Refactor Telegram Agent 2017-12-01 10:44:18 +01:00
Akinori MUSHA
934ee9e4a7
Merge pull request #2168 from aserpi/master
Add options to Telegram Agent
2017-11-30 10:36:13 +09:00
Dominik Sander
a04faa8245 Add array extraction option to WebsiteAgent in HTML/XML mode
Setting `array` to `true` for an extractor allows the extraction of list
elements into an array or when working with websites that have varying
amount of elements matching a specific selector:

Response A:
```html
<h1>header</h1>
<div id="content">
  <div></div>
  <div></div>
  <div class="bogus"></div>
<div>
```

Response B:
```html
<h1>header</h1>
<div id="content">
  <div></div>
  <div></div>
  <div class="bogus"></div>
  <div></div>
<div>
```

The goal is to extract the header and all `div`s inside `#content` that
are not `.bogus` into one Event. Having the `array` option makes this
possible with `css: '#content div:not(.bogus) ', array: true` which
would otherwise fail with an uneven amount of matches exception.

Currently the work around would be the extract the header and `#content`
in one WebsiteAgent and extract the `div`s in a second Agent. This does
not work in my use case because the HTML inside `#content` is
malformatted and leads to Nokogiri paring errors.
2017-11-29 14:56:59 +01:00
aserpi
05b1651af2 Simplify Telegram Agent tests 2017-11-24 12:28:41 +01:00
aserpi
f662ed1d2a Add new tests for Telegram Agent 2017-11-24 00:06:22 +01:00
aserpi
1c8ef93873 Add options to Telegram Agent 2017-11-23 23:03:40 +01:00
Dominik Sander
ecf5a97da9
Merge pull request #2146 from dsander/dropbox-agents
Upgrade Dropbox Agents to new v2 API
2017-11-11 10:05:18 +01:00
Akinori MUSHA
23299f5fb2
Merge pull request #2157 from douniwan5788/web_request_proxy
add proxy support for WebRequestConcern
2017-11-11 15:01:02 +09:00
Akinori MUSHA
390e10e30d
Merge pull request #2160 from dsander/liquid-tags-in-liquid-output-agent
Allow usage of custom Liquid tags in LiquidOutputAgent
2017-11-11 10:28:16 +09:00
Dominik Sander
0ef06a389c Allow usage of custom Liquid tags in LiquidOutputAgent
By using the `interpolated` helper method  our custom tags like
`credential` can be used in the LiquidOutputAgent.

Fixes #2042
2017-11-10 22:06:17 +01:00
douniwan5788
9afb62a605
add proxy support for WebRequestConcern 2017-11-06 21:39:08 +08:00
Akinori MUSHA
a2e239e8c4
Merge pull request #2155 from huginn/fix_already_retweeted
Add a workaround for broken AlreadyRetweeted error detection
2017-10-30 16:41:25 +09:00
Akinori MUSHA
d937934daf Add a workaround for broken AlreadyRetweeted error detection
https://github.com/sferik/twitter/pull/875
2017-10-29 23:09:00 +09:00
Dominik Sander
9e1c979004 Merge pull request #2153 from bobbysteel/patch-1
Clarify using SMTP without authentication
2017-10-27 15:16:55 +02:00
bobbysteel
c7350f2c3c Clarifying no authentication scenario
A bit of a counterintuitive solution as I'd logically expect SMTP_AUTHENTICATION to be set to 'none' vs SMTP_USER_NAME but regardless clarifying for local Postfix configs like mine that don't require auth from localhost.
2017-10-27 11:18:29 +01:00
Dominik Sander
8054945593 Merge pull request #2112 from baip/master
Make Docker image runnable as non-root user
2017-10-22 21:42:50 +02:00
Dominik Sander
6a1509d9d3 Merge pull request #2145 from dsander/fix-spring-guard
Fix running specs with guard and spring
2017-10-16 21:18:18 +02:00
Dominik Sander
eb79f8da1f Upgrade Dropbox Agents to new v2 API 2017-10-16 21:12:47 +02:00
Dominik Sander
36ece6cd3b Fix running specs with guard and spring
Updated spring to allow running the specs with guard and spring again.
2017-10-15 12:13:21 +02:00
Peng Bai
aebca456af chmod g=u .env.example for Docker 2017-10-11 11:29:29 -05:00
Dominik Sander
9bdf27b916 Fix warnings when running the specs using the test image
Setting $HOME to a writable directory fixes:

    `/` is not writable.
    Bundler will use `/tmp/bundler/home/unknown' as your home directory
    temporarily.

Unsetting `no_proxy` removes faraday warnings about `no_proxy` not
being supported.
2017-10-11 11:29:28 -05:00
Dominik Sander
77eda1e874 Remove pid configuration from unicorn config
Fixes restart issue of the single-process image because the pid file was
already written in the previous run. Since we only start one server we
don't need to track it's pid.
2017-10-11 11:29:28 -05:00
Dominik Sander
ed4f9a1f50 Give docker user write permissions to required files/directories 2017-10-11 11:29:28 -05:00
Peng Bai
c6efb548d7 Make Docker image runnable as non-root user
docker/single-process: add DOCKER_CMD environment variable to trigger
                     worker task (e.g., -e DOCKER_CMD='bin/threaded')
bin/docker_wrapper: a wrapper to chmod -R g=u
2017-10-11 11:29:28 -05:00
Akinori MUSHA
509528fd19 Merge pull request #2140 from huginn/ignore_twitter_action_duplicate_error
Do not treat already retweeted/favorited error as failure
2017-10-11 17:40:49 +09:00
Akinori MUSHA
7023058f20 Do not treat already retweeted/favorited error as failure
There's no use to retry when those errors occur, so just log an error
message and let it go.
2017-10-10 20:52:04 +09:00
Dominik Sander
1448f155d8 Merge pull request #2138 from dsander/improve-telegram-agent
Make TelegramAgent FormConfigurable, DryRunable and add logging
2017-10-03 11:26:37 +02:00
Dominik Sander
da72ecd3af Make TelegramAgent FormConfigurable, DryRunable and add logging
Makes the Agent easier to use and to debug. It now verifies the API
token and auto completes the `chat_id`.

Log entries are only created on failure to avoid cluttering the Agent
log.

 #2135
2017-10-03 10:54:45 +02:00
Andrew Cantino
ec16163ecd Fix Run Event Propagation search action (#2124) 2017-09-21 02:07:11 -07:00
Akinori MUSHA
4a96597c19 Merge pull request #2132 from huginn/update_nokogiri_181
Update to nokogiri 1.8.1
2017-09-21 09:14:37 +09:00
Andrew Cantino
116981fbfd Update to nokogiri 1.8.1 2017-09-20 13:58:59 -07:00
Akinori MUSHA
d9f9e582a6 Merge pull request #2129 from huginn/update_rubies
Update rubies: 2017-09
2017-09-20 17:36:58 +09:00
Akinori MUSHA
1f79e06ca3 Update rubies
2.4.2, 2.3.5 and 2.2.8 are out.

Specifying "2.4" and "2.3" still does not work on Travis. 😞
2017-09-20 14:23:13 +09:00