Commit Graph

27 Commits (e9f62738fb0c46e6b54edd841ccf83fd3429e659)

Author SHA1 Message Date
Mitchell Perilstein 4a612c2f7c One-liner fix for issue #773 and new unit tests to exercise that area. 2014-11-29 18:48:23 -05:00
jagtalon 773410e8e5 CalendarToday.pm: Made the links relative. 2014-11-20 18:21:49 +00:00
Usman Raza dc472c8def updated test 2014-11-19 13:33:22 +05:00
Rob Emery 4977f969c1 CalendarToday: Adding support for possesives 2014-11-02 22:53:05 +00:00
Rob Emery 56f0c7529a Merge branch 'mintsoft/relative_dates' of github.com:duckduckgo/zeroclickinfo-goodies into mintsoft/relative_dates
Conflicts:
	lib/DDG/GoodieRole/Dates.pm
	t/00-roles.t
	t/CalendarToday.t
2014-10-31 21:48:19 +00:00
Rob Emery 14eb22c46f CalendarToday: Adding failing test for possessives 2014-10-31 21:39:11 +00:00
Matt Miller 5753edc8fd tests: revive trailing whitespace for tests which depend thereon.
The output has trailing whitespace, so we can't just remove it.

This still passes the EOL tests.
2014-10-29 12:27:47 +02:00
Matt Miller da70710f7d EOL: remove trailing whitespace. 2014-10-28 20:36:15 +02:00
Matt Miller 8f858b387e CalendarToday: tighten up query triggers a bit.
- Add filler_words list which can be stripped from the query before
  trying to parse date strings.
- Anchor datestring_regex so as to allow for only date left in query
  after clean-up.
- Improve guard against empty strings and `undef` in Dates role parsers.

Fixes #661.
2014-10-03 17:16:33 +02:00
Matt Miller 68fc7c8dec Set explicit caching everywhere.
This explicity sets the caching behavior for all goodies. Goodies which
did not have caching behavior set in their package have had it added.
Similarly for the tests.

This resulted in a number of changes for caching behavior, mostly
moving towards more frequent caching.

I identified three cases where goodies should not be cached. They are when
the result depends upon:

- some random element,
- the time of day or year (as with relative dates), or
- the location of the requesting user

In all other cases, I presumed that the goodies were sufficiently
deterministic in their output to warrant caching.
2014-09-27 10:35:17 -04:00
Matt Miller 02c114607d CalendarToday: Simplify with dates role changes. 2014-08-31 16:36:40 -04:00
Matt Miller a36ecaa29a CalendarToday.t: test 'last <month>' triggering.
No definitive answer on whether or not it's the correct one,but it
triggers and renders. Jus tin case next and last get separated.
2014-08-19 14:42:26 -04:00
Rob Emery eecb9c315f CalendarToday: Fixing timebomb with tests 2014-08-19 19:35:12 +01:00
Matt Miller c9937790b3 CalendarToday: deeper refactoring of output.
- Clean up/remove some globals which confused things.
- Simplify logic-flow.
- Remove extraneous </div> from HTML output.
- Expand triggers to short months.

DatesRole:
- Create month_regex() to handle combo of short and full.
2014-08-19 14:27:31 -04:00
Rob Emery dca95bc20f CalendarToday: Adding test for "calendar" as it should have a day highlighted 2014-08-18 22:43:59 +01:00
Rob Emery 0218f603dc CalendarToday: Fixing the tests 2014-08-15 20:47:32 +01:00
Rob Emery 52a82f7a2c CalendarToday: Adding tests 2014-08-15 19:10:34 +01:00
Caine Tighe 374300b131 t/needtofix: tests that are failing unit test, but passing integration tests. 2014-05-07 11:29:51 -04:00
Doug Brown bddc3c2b97 flatten CalendarToday css and update tests 2014-05-07 09:34:11 -04:00
Doug Brown 82ad8b50ce update calendar tests. I forgot like a total noob. 2014-05-07 09:17:33 -04:00
Caine Tighe 664cd3b47c t/CalendarToday.t: fix CSS updates. 2014-04-11 15:24:52 -04:00
Harald Ulver 0eec0cfc6b day as 3rd parameter, more comments, new testcases, fix layout-error 2014-02-27 20:50:40 +01:00
Harald Ulver 150b29e7af add last/next/nearest month, adjust phone-layout 2014-02-25 22:29:45 +01:00
Harald Ulver ca1bf8728f separate css file 2014-02-22 21:00:24 +01:00
Harald Ulver 9ca2f8c2e1 use Time::Piece and split 2014-02-22 15:37:38 +01:00
Harald Ulver 8de2c4565f changed trigger to startend, add negative tests 2014-02-19 20:20:23 +01:00
Harald Ulver 6ca885525e add testfile 2014-02-18 18:48:06 +01:00