Add an interface to Jadu's API

Use it like this (note that for Jadu's near-live system you'll need to
disable SSL verification because the certificate is incorrect):

    BASE_URL = 'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'

    api = Jadu::API.new(
      BASE_URL,
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # for near-live
      ssl_version: :TLSv1
    )

    puts api.new_claim(xml, 'example.pdf' => File.read('example.pdf')).body

    puts api.fgr_et_office('B5 4UU').body

The API returns a Net::HTTPResponse and does not perform any checking
as yet.
Parse response from Jadu API

Initialise the API:

    api = Jadu::API.new(
      'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # skip verification in near-live
      ssl_version: :TLSv1
    )

Make a new claim request:

    response = api.new_claim(xml, 'example.pdf' => File.read('example.pdf'))

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'feeGroupReference' => '991000185700',
      #   'status' => 'ok'
      # }
    response['status'] # => 'ok'
    response['feeGroupReference'] # => '991000185700'

Make an ET office request:

    response = api.fgr_et_office('B5 4UU')

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'status' => 'ok',
      #   'fgr' => '131000203700',
      #   'ETOfficeCode' => 13,
      #   'ETOfficeName' => 'Birmingham',
      #   'ETOfficeAddress' => '...',
      #   'ETOfficeTelephone' => '0121 000 0000'
      # }
    response['fgr'] # => '131000203700'
Split out Jadu API into 1 file per class/spec
Sanitise filenames to suit the Jadu API
Don't generate multiple underlines together
Just for testing

- on a page where the session expiry is implemented type: expire123
- this will reset the timer down to 15sec to appear and 1:30m to count down
- refresh the page to clear
remove cheet.js form package.json

- this is easier to remove once we need to
removed cheetjs

- going to trigger this using a bookmark
- have to expose the module on the window
Adds a multi claimants CSV validator
Merge pull request #310 from ministryofjustice/csv-validate-claimants

Adds a multi claimants CSV validator
Merge pull request #386 from ministryofjustice/feature/konami-code-expire

Just for testing/ Konami code for session expiry reset
updated footer linkis
Improve style a little
Rename do to perform in Jadu API

To avoid potential confusion with do … end in Ruby. I'd probably have
chosen send, but, well, that has a special meaning, too.
Merge pull request #392 from ministryofjustice/ui/footer-links

updated footer links
Merge pull request #384 from ministryofjustice/jadu-integration

Add an interface to Jadu's API

Initialise the API:

    api = Jadu::API.new(
      'https://etapi.nearlive.moj.fcos.jadu.net/api/1/'
      verify_mode: OpenSSL::SSL::VERIFY_NONE, # skip verification in near-live
      ssl_version: :TLSv1
    )

Make a new claim request:

    response = api.new_claim(xml, 'example.pdf' => File.read('example.pdf'))

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'feeGroupReference' => '991000185700',
      #   'status' => 'ok'
      # }
    response['status'] # => 'ok'
    response['feeGroupReference'] # => '991000185700'

Make an ET office request:

    response = api.fgr_et_office('B5 4UU')

    response.ok? # => true
    response.to_hash # =>
      # {
      #   'status' => 'ok',
      #   'fgr' => '131000203700',
      #   'ETOfficeCode' => 13,
      #   'ETOfficeName' => 'Birmingham',
      #   'ETOfficeAddress' => '...',
      #   'ETOfficeTelephone' => '0121 000 0000'
      # }
    response['fgr'] # => '131000203700'

Also includes a utility class for sanitising filenames according to the API requirements:

    Jadu::API::FilenameSanitizer.sanitize('Wow! A filename!.pdf') # => 'Wow_A_filename.pdf'
Use shorter application references

Length is currently set to 8 (hyphenated 4-4), which gives about a
trillion unique identifiers.

Instead of obfuscating the ID, the token is now randomly generated and
stored in the database.
Check for collisions when generating app refs

The expected number of applications in the system at any time is about
20,000. With an eight-digit base-32 reference, the probability of a
collision is about 0.000018. That's low, but it's high enuogh to worry.

Thus, we check against existing applications references and simply
generate another random reference if there is a collision. This does
still leave a race condition, in that two simultaneous applications
could generate the same reference. The probability of two simultaneous
generations colliding is one in a trillion, however.
Simplify app ref generation

This works because 256^5 = 32^8. The downside is that we can't easily
generate different length references any more.
Merge pull request #394 from ministryofjustice/random-app-refs

Random application references