Permalink
Commits on Jan 21, 2018
  1. Skip java version check on Travis CI

    javajawa committed Jan 21, 2018
    The Travis CI version of javac is giving back a version number that
    is not recognised by the version checker we are running.
  2. Move build-time Java version check to dedicated script

    javajawa committed Jan 21, 2018
    The build time test that the current Java version is installed
    is not a specific makefile target, that leaves behind a blank
    file as an artefact (additionally allowing a new method for people
    to override the check).
    The check is now performed by a shell script, which has a slightly
    higher level of complexity in the what version strings it will accept.
Commits on Oct 24, 2016
  1. LinkResolver.java: Updates to the title tag parsing logic

    javajawa committed Oct 24, 2016
    Addresses #27, extends #28
     - The abort case of </head> or <body> has been changed to </head> or "<body".
     - Merge the logic for searching for an opening tag to do both <title> and
       <TITLE> in one piece of logic (but skipping if both exist on the same line.
     - Add in a simple attributing parsing system when looking at the opening tag:
      - Scan the available available data for the next ", ', and >. A > must exist
        for this process to continue (additional lines are read into the buffer if
        needed.
      - If the first of these is the >, that is the end of the tag
      - If the first is a quote, check if it's escaped. If not, find the matching
        closing quote.
  2. GiphySearchTest: Accept any giphy image ID

    javajawa committed Oct 24, 2016
    In order to future proof the Giphy search test, we now accept any 13
    alphanumeric ID sequence as a valid result for the result of 'funny cat'.
  3. Fix GiphySearchTest.java

    IgnoredAmbience committed Oct 24, 2016
    It appears that "funny cat" now resolves to a different URI...
  4. * LinkResolver.java: Account for <title> with attributes

    Darael committed Oct 24, 2016
    This is the hacky version, which will break if any of those attributes
    happen to contain ">".  There is almost certainly a better one.
Commits on May 10, 2016
  1. DistroService: Allow Distributions to be added

    javajawa committed May 10, 2016
    During the refactor of the DistroService, the Collection of distributions
    was made final, but the initialiser was not changed from
    Collections.emptyList().
    
    Collections.emptyList() is an immutable Collection, meaning that nothing
    could be added. It has been replaced with an ArrayList.
Commits on May 7, 2016
  1. Merge docitten-rc branch

    javajawa committed May 7, 2016
  2. Switch out HashTable for HashMap

    javajawa committed May 7, 2016
    From http://docs.oracle.com/javase/7/docs/api/java/util/Hashtable.html:
    
    "As of the Java 2 platform v1.2, this class was retrofitted to implement
    the Map interface, making it a member of the Java Collections Framework.
    Unlike the new collection implementations, Hashtable is synchronized. If a
    thread-safe implementation is not needed, it is recommended to use HashMap
    in place of Hashtable. If a thread-safe highly-concurrent implementation
    is desired, then it is recommended to use ConcurrentHashMap in place of
    Hashtable."
    
    In this case, I have replaced 'tracking' with with a ConcurrentHashMap.
  3. GiphyLinkResolver cleanup

    javajawa committed May 7, 2016
     - Remove deprecated call to URLEncoder.encode without a character
       encoding.
     - Change constant 'parser' to 'PARSER'
     - Fix some javadoc entries
  4. Catch and handle some SSL Handshake issues in LinkResolver

    javajawa committed May 7, 2016
    As a partial change addressing #24, two subclasses of SSLHandshakeException
    are logged at a fine level, rather than thrown as a RuntimeException.
    
    java.security.cert.CertificateException -- Invalid/Missing certificate
    java.io.EOFException -- Remote handshake or later remote hang-up
  5. Add 'Wait' to Conversation testing class

    javajawa committed May 7, 2016
    This operation causes the test thread to wait for a number of milliseconds,
    allowing an external process to complete
  6. Address CatPicOfTheDay Issues in #25

    javajawa committed May 7, 2016
    The main fix is correcting 'u' to 'p' in second matching section, around
    line 260 of CatPicOfTheDayService.java.
    
    In addition, a new stateful testing system for testing, with a sample
    implementation for the CatPicOfTheService.
    This contains some basic examples, and two of the examples listed in #25.
  7. Reminder Service - Code Cleanup

    javajawa committed May 7, 2016
     - Add braces around all blocks, even one-lines
     - Convert object initialisation to diamond interfaces
Commits on Mar 31, 2016
  1. Add String based constructor to MOTD Service

    javajawa committed Mar 31, 2016
    This allows it to be loaded via the new command syntax
  2. Fix for mismatched timezones in CatPicOfDayService

    javajawa committed Mar 31, 2016
    The lastUpdated and Now calendar objects were created with
    different timezones, causing the date to be considered as
    'changed' for the entire period the two calendars were out
    of sync.
    
    For each of use, a second constructor is added which allows
    the user to explictly specify the TimeZone to use.
Commits on Mar 30, 2016
  1. Add run-time configuration and configuration files

    javajawa committed Mar 30, 2016
    In order to make DoCitten more configurable and re-usable, a number
    of options and settings are now being made configurable at run-time.
    These changes also partially address #1, as loading a Service is now
    a self-contained operation.
    
    We add a very simple scripting language to DoCitten, currently
    containing the following verbs:
    
     - "#"    -- Used to denote a comment line in a script
     - "log"  -- Write a string to the log
     - "loglevel" -- Change the logging level
     - "nick" -- Set or change the Bot's nickname
     - "connect" -- Connect to an IRC server
     - "join" -- Join one or more channels
     - "part" -- Leave one or more channels
     - "load" -- Load a Service
     - "quit" -- Performs a clean shutdown and exits
    
    The verb "unload" is also reserved, but is not yet implemented.
    The verb "nick" is not fully implemented, as Mewler does not
    support changing nick after connection.
    
    The old content of Main.java has been rewritten as docittenrc.sample.
    
    DoCitten will search for config files in:
    
     - The first argument to main()
     - "docittenrc" in the current directory
     - "/etc/docittenrc"
    
    If no configuration files are available, the system exits.
    
    Once the configuration file has been parsed without a break
    (currently caused only be a "quit" command or an IOException),
    command input is parsed from the standard input stream.
  2. Change rootLogger to LOG in Main.java

    javajawa committed Mar 30, 2016
    This conforms with standard naming conventions for final static members