<commit_before>require "colors"
MochaCloud = require "mocha-cloud"

module.exports = (grunt) ->
  # Configuration
  grunt.initConfig
    # Package information
    pkg: grunt.file.readJSON "package.json"

    # JSHint (see http://www.jshint.com/docs/)
    jshint:
      options:
        # Predefined globals
        browser: true

        # The Good Parts
        eqeqeq: true
        eqnull: true
        curly: true
        latedef: true
        undef: true
        forin: true

        # Style preferences
        indent: 2
        camelcase: true
        trailing: true
        quotmark: "double"
        newcap: true

      dist:
        files:
          src: ["src/**/*.js"]

    # File concatenation, copying and templating
    concat:
      options:
        process: true
      dist:
        src: ["src/bugsnag.js"]
        dest: "dist/bugsnag.js"

    # Minification
    uglify:
      dist:
        files:
          "dist/bugsnag.min.js": ["dist/bugsnag.js"]

    # Upload to s3
    s3:
      bucket: "bugsnagcdn"
      access: "public-read"
      gzip: true

      upload: [
        src: "dist/bugsnag.js",
        dest: "bugsnag-<%= pkg.version %>.js"
      ,
        src: "dist/bugsnag.min.js",
        dest: "bugsnag-<%= pkg.version %>.min.js"
      ]

    # Version bumping
    bump:
      options: part: "patch"
      files: ["package.json", "component.json"]

    # Web server
    connect:
      server:
        options:
          hostname: null
          port: 8888

    # Tests
    mochaCloud:
      username: process.env.SAUCE_USERNAME
      accessKey: process.env.SAUCE_ACCESS_KEY
      url: "http://localhost:8888/test/"
      browsers: [
        ["chrome", "", "Mac 10.8"]
        ["chrome", "", "Windows 2003"]
        ["firefox", "11", "Mac 10.6"]
        ["firefox", "11", "Windows 2003"]
        ["safari", "5", "Mac 10.6"]
        ["safari", "6", "Mac 10.8"]
        ["iexplore", "6", "Windows 2003"]
        ["iexplore", "7", "Windows 2003"]
        ["iexplore", "8", "Windows 2003"]
        ["iexplore", "9", "Windows 2008"]
      ]
<commit_msg>Fix s3 upload<commit_after>require "colors"
MochaCloud = require "mocha-cloud"

module.exports = (grunt) ->
  # Configuration
  grunt.initConfig
    # Package information
    pkg: grunt.file.readJSON "package.json"

    # JSHint (see http://www.jshint.com/docs/)
    jshint:
      options:
        # Predefined globals
        browser: true

        # The Good Parts
        eqeqeq: true
        eqnull: true
        curly: true
        latedef: true
        undef: true
        forin: true

        # Style preferences
        indent: 2
        camelcase: true
        trailing: true
        quotmark: "double"
        newcap: true

      dist:
        files:
          src: ["src/**/*.js"]

    # File concatenation, copying and templating
    concat:
      options:
        process: true
      dist:
        src: ["src/bugsnag.js"]
        dest: "dist/bugsnag.js"

    # Minification
    uglify:
      dist:
        files:
          "dist/bugsnag.min.js": ["dist/bugsnag.js"]

    # Upload to s3
    s3:
      options:
        bucket: "bugsnagcdn"
        access: "public-read"
        gzip: true

      release:
        upload: [
          src: "dist/bugsnag.js",
          dest: "bugsnag-<%= pkg.version %>.js"
        ,
          src: "dist/bugsnag.min.js",
          dest: "bugsnag-<%= pkg.version %>.min.js"
        ]

    # Version bumping
    bump:
      options: part: "patch"
      files: ["package.json", "component.json"]

    # Web server
    connect:
      server:
        options:
          hostname: null
          port: 8888

    # Tests
    mochaCloud:
      username: process.env.SAUCE_USERNAME
      accessKey: process.env.SAUCE_ACCESS_KEY
      url: "http://localhost:8888/test/"
      browsers: [
        ["chrome", "", "Mac 10.8"]
        ["chrome", "", "Windows 2003"]
        ["firefox", "11", "Mac 10.6"]
        ["firefox", "11", "Windows 2003"]
        ["safari", "5", "Mac 10.6"]
        ["safari", "6", "Mac 10.8"]
        ["iexplore", "6", "Windows 2003"]
        ["iexplore", "7", "Windows 2003"]
        ["iexplore", "8", "Windows 2003"]
        ["iexplore", "9", "Windows 2008"]
      ]

{'fraction_non_alphanumeric': 0.1415633937082936, 'fraction_numerical': 0.02740705433746425, 'mean_word_length': 1.730644111906311, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2174009', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1387, 'n_words': 328}