Commit graph

2855 commits

Author SHA1 Message Date
Alex Jordan
f813a73dd0 Update Gemfile.lock with HTTPS URLs for git gems 2016-12-27 11:20:06 -08:00
Dominik Sander
db4de696b4 Override git_source method in the Gemfile
When the bundler version is below 2 override `git_source` to ensure
`github` remotes always use HTTPS
2016-12-23 08:27:50 -08:00
Andrew Cantino
65cea03062 Fix spec failures 2016-12-20 13:32:48 -05:00
Irfan Charania
4e2d1775a6 PhantomJs Cloud Agent (#1503)
* Initial draft of PhantomJsCloudAgent

Generates event with url for fetching html/plainText content

* Add options

* Pass in event instead of url
Fix hash syntax
Remove whitespace
Add mode merge

* Add some tests

* Style changes

- Add link to wiki entry for manually creating agent with full set of
options
2016-12-20 12:44:54 -05:00
Akinori MUSHA
2a524abff5 Fix the regex pattern to reduce backtracking
This should fix #1832.
2016-12-20 10:27:51 +09:00
Akinori MUSHA
cb2b906067 Merge branch 'travis_mysql' 2016-12-19 15:17:02 +09:00
Akinori MUSHA
3159b547c7 Use the builtin mysql on Travis CI 2016-12-19 14:51:32 +09:00
Akinori MUSHA
fd18e14538 Fast-forward faraday_middleware
The version constraint on faraday is relaxed while at it, although
some gems still have the strict constraint.
2016-12-13 19:31:32 +09:00
Akinori MUSHA
15347c8a3c Feedjira 2.1.0 is out, yay! 2016-12-13 18:08:16 +09:00
Akinori MUSHA
e26c07e75b Fix a merge conflict 2016-11-30 01:24:36 +09:00
Akinori MUSHA
1151a3ab6f Merge branch 'rss_agent_podcast_tags' 2016-11-30 00:07:57 +09:00
Akinori MUSHA
3612ba7333 Add podcast tags to events emitted by RssAgent
The keys are only added when the feed is a podcast.
2016-11-29 23:59:32 +09:00
Andrew Cantino
8a14a57e00 Beeper.io is no more (#1808)
* Beeper.io is no more

* Avoid event propagation or scheduling of missing agents

* Update undefined_agents.html.erb with a link to the wiki
2016-11-27 15:30:50 -05:00
Akinori MUSHA
8e36fdd60c Revert "Use faraday_middleware 0.10.1, which was recently released"
This reverts commit f4308afdf7.

I realized 0.10.1 did not include my fix for raw deflate.
2016-11-27 23:22:42 +09:00
Akinori MUSHA
08b43cc8b9 Update the RUBY VERSION with 2.3.3p222 2016-11-27 22:14:02 +09:00
Akinori MUSHA
f4308afdf7 Use faraday_middleware 0.10.1, which was recently released 2016-11-27 22:12:40 +09:00
Akinori MUSHA
14ccea6a4f Merge pull request #1771 from cantino/website_agent_resolves_url_optionally
Disable automatic URL normalization and absolutization on `url`
2016-11-27 14:38:18 +09:00
Akinori MUSHA
5f5f3cd38f Do not err if headers is a valid headers hash 2016-11-27 13:38:23 +09:00
Akinori MUSHA
9074f3115e Make sure status is an integer when set 2016-11-27 13:38:23 +09:00
Akinori MUSHA
a94cd7fd6d Allow an empty or null base URI 2016-11-27 13:38:23 +09:00
Akinori MUSHA
3a0c9e6274 Disable automatic URL normalization and absolutization on url
This was discussed in #1766.

For backward compatibility, existing WebsiteAgents with a key named
`url` will be given a `template` to resolve `url`.
2016-11-27 13:38:23 +09:00
Akinori MUSHA
3d91469733 Make WebsiteAgent merge template with the results of extract (#1816)
A new extraction option `hidden` is added so that keys with it gets
excluded from the final payloads while they can be used in `template`.
2016-11-27 13:33:24 +09:00
bobbysteel
f530305edc Add class of service chooser for Google Flights Agent (#1778)
* Add class of service chooser

* Add cabin chooser test

* Fix preferredCabin

* Per @cantino feedback taking out check
2016-11-26 15:13:00 -05:00
Akinori MUSHA
7ac691652b Spec that force_encoding works with encoding declaration in RssAgent 2016-11-26 13:26:09 +09:00
Akinori MUSHA
8d2ebe8fad Add a spec to test case-insensitivity with headers_to_save 2016-11-23 19:14:59 +09:00
Akinori MUSHA
29fd8aca28 Move the spec file for HttpStatusAgent where it belongs 2016-11-23 10:06:37 +09:00
Akinori MUSHA
c9e567edb3 Fix the specs for HttpStatusAgent
- Raplace hand-made mocking for web requests with Webmock

- Stop overriding internal methods of Agent like `interpolated`, because
  that made the specs not reflect actual behavior
2016-11-23 10:06:37 +09:00
Akinori MUSHA
6d4fdd3196 Use url and headers_to_save in a received event if included
That seems to be what was actually intended, judging from the specs.

See [my comment](https://github.com/cantino/huginn/pull/1521#discussion_r86488243) in #1521.
2016-11-23 10:06:29 +09:00
Akinori MUSHA
cc28f780c5 Make headers_to_save case-insensitive
See [my comment](https://github.com/cantino/huginn/pull/1521#discussion_r86489253) in #1521.
2016-11-23 10:06:29 +09:00
Akinori MUSHA
833985d723 Fix a bug where redirected is always true
This key was introduced in #1590 but it is likely that it has never
worked as expected.
2016-11-23 10:06:29 +09:00
Akinori MUSHA
b8d88aa9a3 Merge pull request #1813 from cantino/fix_decoding_in_rss_agent
Fix a double-decoding problem in RssAgent
2016-11-23 09:05:46 +09:00
Dominik Sander
5d69bd2d93 Merge pull request #1804 from dsander/cache-agent-type-dropdown
Cache Agent type select options in Agent#new
2016-11-22 21:04:29 +01:00
Dominik Sander
6daa6cc75e Cache Agent type select options in Agent#new
Agent#new was by far the slowest action of all controllers. When using
many Agent gems the response time goes up to a point where the user
starts to wonder if something is going wrong. By caching the Agent
description the response time goes down from about 1 second to 100ms
in development.
2016-11-22 20:02:27 +01:00
Akinori MUSHA
aa6d8be697 Assume that an XML declaration is at the beginning of a document 2016-11-23 01:17:46 +09:00
Akinori MUSHA
0b3700999b Fix a double-decoding problem in RssAgent
The SAX parser Feedjira uses (Nokogiri::XML::SAX) tries to detect the
encoding of a document from the content even if it is already known
and given.  This results in a content being decoded twice by
WebRequestConcern and the SAX parser if its encoding is declared in
both the Content-Type header and the XML declaration.

This commit makes RssAgent remove the `encoding` attribute from the
XML declaration of a document if the encoding is already known by the
Content-Type header.

Fixes #1797.
2016-11-22 12:14:28 +09:00
Andrew Cantino
6fb8fe2292 Increase default database pool size to 20 (#1805) 2016-11-20 09:48:34 -05:00
Akinori MUSHA
c575af959b Merge pull request #1769 from cantino/website_agent_repeat_option
Add a `repeat` option for extractors to WebsiteAgent
2016-11-20 19:16:36 +09:00
The Doctor
5e1191534c Fixed the online documentation for the Weather Agent class. (#1803)
Signed-off-by: The Doctor <drwho@virtadpt.net>
2016-11-19 10:39:15 -05:00
Akinori MUSHA
bd9455d5d0 Add a repeat option to extractors
This allows user to include a value that only appears once in a content
in all events created from the content.
2016-11-18 18:47:32 +09:00
Akinori MUSHA
3a66c152ef Make extract_each prepare a storage for results 2016-11-18 16:34:45 +09:00
Dominik Sander
e26976be76 Merge pull request #1792 from bugdone/master
Fix typos in docker documentation
2016-11-14 23:04:50 +01:00
bugdone
a51d8169dc Fix typos in docker documentation 2016-11-14 22:24:35 +02:00
Andrew Cantino
770706463b Prevent submit from disabling on invalid json (#1790) 2016-11-13 15:21:43 -05:00
Andrew Cantino
085473263f Remove additional nitrous files (#1791) 2016-11-13 15:21:30 -05:00
Andrew Cantino
fca06d6ec2 Nitrous.io is shutting down (#1789) 2016-11-13 14:35:25 -05:00
Akinori MUSHA
b6c1e908c8 Update nokogiri to 1.6.8.1 2016-11-11 15:35:24 +09:00
Akinori MUSHA
74077b0ad4 Auto-focus on Agent Type when creating an agent 2016-11-09 23:25:55 +09:00
Akinori MUSHA
486246e63c Add "image" to Event Description 2016-11-07 12:47:13 +09:00
Akinori MUSHA
1e70b31e7f Merge pull request #1770 from cantino/revert-1071
Revert the special treatment for CDATA introduced in #1071
2016-11-03 12:14:42 +09:00
Akinori MUSHA
50123dca53 Fix event_description broken in full JSON mode or without a template 2016-11-02 21:47:01 +09:00