Commit Graph

2500 Commits (53317244bcb2bcf487fba4754ff92b2b89827423)

Author SHA1 Message Date
Matt Miller e1dcf6ddd2 Dates::Role: clarify date_output_string output 2014-08-18 15:30:52 -04:00
Rob Emery 3ef22a6016 CalendarToday: Tidying up 2014-08-18 20:28:05 +01:00
Matt Miller 4f74c4324f DatesRole: comment on in/out of the parse_string_to_date 2014-08-18 14:23:49 -04:00
Matt Miller 8095a15ab2 DateMath: remove extraneous import.
Don't need Data::Dumper now that we've got everything working.
2014-08-18 14:00:56 -04:00
Matt Miller b7c5bbd8bd CalendarToday: protect on missing timezone.
DateTime doesn't like to have timezones passed in which it can't parse.
So, just continue on with whatever we have by default if the call
doesn't work.

Remove parsePsuedoDate which is now basically just an alias for
parse_vague_string_todate.

Also, reuse the timezoned DateTime for our default, rather than create
a new object.
2014-08-15 19:42:59 -04:00
Jason 807c38a20d Fixing capitalization and overflow 2014-08-15 19:06:22 -04:00
Jason 8fc05b7600 Fixing capitalization and missing ')' 2014-08-15 18:52:08 -04:00
Jason 407002279b Fixing capitalization and missing ')' 2014-08-15 18:23:20 -04:00
exoWM 2f588a6a8a Fixing capitalization errors 2014-08-15 22:06:57 +00:00
exoWM 41372756a0 Merge branch 'master' of github.com:exowm/zeroclickinfo-goodies
Conflicts:
	t/Base.t
2014-08-15 22:05:10 +00:00
exoWM f1e79bb5b3 Fixed capitalization errors in Base.t 2014-08-15 22:03:29 +00:00
Rob Emery 1a0a66bb82 Merge branch 'master' into mintsoft/date_role 2014-08-15 20:50:14 +01:00
Rob Emery 0218f603dc CalendarToday: Fixing the tests 2014-08-15 20:47:32 +01:00
Rob Emery f547249020 CalendarToday: minor cleanup 2014-08-15 20:31:28 +01:00
Rob Emery d39944cec6 CalendarToday: Switching to DatesRole 2014-08-15 20:26:55 +01:00
Rob Emery eb3523b848 CalendarToday: Deleting and tidying up ( not working yet ! ) 2014-08-15 19:57:48 +01:00
Rob Emery 52a82f7a2c CalendarToday: Adding tests 2014-08-15 19:10:34 +01:00
Rob Emery e40769965e Merge pull request #587 from duckduckgo/jag/autodie
TravisCI: duckpan DDG fails with old version of autodie.
2014-08-15 18:54:57 +01:00
Rob Emery da02ea557c Merge pull request #590 from duckduckgo/jag/css-comment
Calculator: Actually remove the color declaration.
2014-08-15 18:48:46 +01:00
Jason 68743342dc Update Base.t 2014-08-15 12:40:25 -04:00
exoWM f10c62743d Added tests for overflows in case of a roll back. 2014-08-15 16:20:33 +00:00
Jag Talon f70f7b6d66 Calculator: Actually remove the color declaration. 2014-08-15 12:13:11 -04:00
Jag Talon 48ea5bc032 Merge pull request #580 from mwmiller/UPPERCASE
Uppercase: switch triggers to "start"-only.
2014-08-15 11:09:21 -04:00
Matt Miller 9b45531bfb 00-roles.t: use MockTime for relative time testing.
In order to maintain clean code for actual use, we're not doing time
injection here.
2014-08-15 08:37:05 -04:00
Rob Emery 16fde70158 Merge pull request #588 from gdrooid/patch-1
Anagram: Fix XSS
2014-08-15 12:54:05 +01:00
Dani 1c52504734 Update Anagram.pm 2014-08-15 01:59:44 +02:00
Jason c9b8e7ab79 Fixes overflow error by adding 'using bigint;' 2014-08-14 19:40:51 -04:00
exoWM cfe30ef252 Fixes the overflow issue by adding 'use bigint;' 2014-08-14 23:32:12 +00:00
Dani 85bdae6591 Anagram: Fix XSS
Sorry... I messed up this one too. Please, test it before merging -- I'm in the US (wooo!) and I have a very crappy laptop.
2014-08-15 00:36:11 +02:00
jagtalon 75e00ed0c8 TravisCI: duckpan DDG fails with old version of autodie.
utf8::all bails out when autodie is < 2.11. Adding cpanm autodie will pull in the latest version and duckpan DDG should work for Perls 5.1 and 5.16 then.
2014-08-14 19:54:13 +00:00
Matt Miller dcb3c69643 00-roles.t: show far out dates working.
Showing dates outside of the 32-bit UNIX epoch being properly parsed and
objectified.

Also, better test for year in the short month + year case.
2014-08-14 11:43:09 -04:00
Matt Miller eecc0dc963 00-roles.t: show leap-year handling.
Unlike previous iterations which used Time::Piece, we will only actually
return objects for valid dates.. even if the day/month combination was
valid for some other year.
2014-08-14 11:07:46 -04:00
Matt Miller f040e34f1e 00-roles.t: remove time-dependence in vague string tests.
Unfortunately, this also means that we don't currenyl know for sure that
it is picking the right direction.  Hopefully, a stop-gap measure.
2014-08-14 10:43:11 -04:00
Matt Miller 691f19aef9 dist.ini: use proper comment style.
Oops!
2014-08-14 10:11:39 -04:00
Matt Miller 13d9de46be parse_vague_string_to_date: simplify named captures slightly.
In each case, we have a month match, so name them all the same.
Then, figure out how each different part of the specific match effects
the resultant date calculation.
2014-08-14 09:52:18 -04:00
Matt Miller 1741b4cfb9 date_output_string: trust parse_string_to_date not to die.
We don't need to guard against an exception in date_output_string, since
parse_string_to_date already does the right thing when it can't figure
out what to do.
2014-08-14 09:31:17 -04:00
Matt Miller aa150cf685 Calculator: better display for very small floats.
With the addition of the number styling role, we've improved the output
for very small floats.  We don't need to round them any longer, since
they produce comprehensible display values and don't break anything.
2014-08-14 08:54:33 -04:00
Rob Emery 3eb97e456e Merge pull request #585 from mwmiller/bangalator
Calculator: fix bangful query result. Ping @jagtalon
2014-08-13 13:21:50 +01:00
Rob Emery 5e119d6869 DatesRole: Implementing and hacking in tests for Vague Strings (these *need* to be updated to more datadriven as they depend on the current clock) 2014-08-13 13:18:40 +01:00
elebow 87d4c2bca2 GimpCheatSheet: Remove margin between columns. 2014-08-12 21:09:55 -04:00
elebow 01b66092e9 GimpCheatSheet: Remove unused CSS rule. 2014-08-12 21:09:10 -04:00
Rob Emery 53705d1ad5 DatesRole: Fleshing out "next month" and "last month"; tests need actually writing and implementation needs checking 2014-08-13 00:12:58 +01:00
Rob Emery 7ae82d4db3 GoodieRole: Fixing 2014-08-13 00:01:50 +01:00
Rob Emery 702451fade DatesRole: Adding parse_vague_string_to_date; needs fleshing out 2014-08-12 23:59:57 +01:00
Rob Emery 28b6d07f3a DatesRole: Adding accessors for month regexes 2014-08-12 23:11:53 +01:00
jdorweiler 42982b1daf update tests and remove zci type => E 2014-08-12 16:38:50 -04:00
Matt Miller 4d28815513 Calculator: remove ! from trigger regex.
There appears to be no value in this beingincluded and it makes things
evaluate incorrectly, so we'll just remove it.
2014-08-12 15:00:05 -04:00
Matt Miller 2553c532f9 Calculator: guard against empty string as non-result.
Eval of '! + 1' returns an empty string, so we'll make it less likely
for that to happen (by not initializing tmp_result to an empty string)
and guard against it if it still does.

Of course, this shouldn't trigger on '! + 1', so that still needs to be
resolved.
2014-08-12 14:35:44 -04:00
Caine Tighe 8ee8e7957d Merge pull request #583 from duckduckgo/caine/md5-xss
DDG::Goodie::MD5: Prevent XSS by encoding HTML entities.
2014-08-12 10:41:51 -04:00
Caine Tighe bc920e33a0 DDG::Goodie::MD5: Prevent XSS by encoding HTML entities. 2014-08-12 10:35:27 -04:00