<commit_before>#!/usr/bin/env ruby

$: << 'lib'
require 'travis/build'

data = {
  urls: {
    log:   'http://localhost:3000/jobs/1/log',
    state: 'http://localhost:3000/jobs/1/state', # not sure about this ...
  },
  repository: {
    source_url: 'http://github.com/travis-ci/travis-support.git',
    github_id: 42
  },
  source: {
    id: 1,
    number: 1
  },
  job: {
    id: 1,
    number: '1.1',
    branch: 'staging',
    commit: 'a214c21',
    commit_range: 'abcdefg..a214c21',
    pull_request: false
  },
  cache_options: {
    type: "s3",
    fetch_timeout: 10*60,
    push_timeout: 80*60,
    s3: { bucket: 's3_bucket', secret_access_key: 's3_secret_access_key', access_key_id: 's3_access_key_id' }
  },
  config: {
    rvm: '1.9.3',
    before_deploy: "foo bar",
    cache: "bundler",
    addons: {
      deploy: {
        provider: 'heroku',
        on: { rvm: '1.9.3' },
        app: {
          production: 'travis-api-production',
          staging: 'travis-api-staging'
        }
      }
    }
  },
  timeouts: {
    # git_clone: 300
  }
}

# require 'yaml'
# data[:config] = YAML.load_file('play/config.yml')

# script = Travis::Build.script(data, logs: { build: false, state: true })
script = Travis::Build.script(data, logs: { build: false, state: true })
script = script.compile
puts script

<commit_msg>change branch to master in example, so it pushes cache<commit_after>#!/usr/bin/env ruby

$: << 'lib'
require 'travis/build'

data = {
  urls: {
    log:   'http://localhost:3000/jobs/1/log',
    state: 'http://localhost:3000/jobs/1/state', # not sure about this ...
  },
  repository: {
    source_url: 'http://github.com/travis-ci/travis-support.git',
    github_id: 42
  },
  source: {
    id: 1,
    number: 1
  },
  job: {
    id: 1,
    number: '1.1',
    branch: 'master',
    commit: 'a214c21',
    commit_range: 'abcdefg..a214c21',
    pull_request: false
  },
  cache_options: {
    type: "s3",
    fetch_timeout: 10*60,
    push_timeout: 80*60,
    s3: { bucket: 's3_bucket', secret_access_key: 's3_secret_access_key', access_key_id: 's3_access_key_id' }
  },
  config: {
    rvm: '1.9.3',
    before_deploy: "foo bar",
    cache: "bundler",
    addons: {
      deploy: {
        provider: 'heroku',
        on: { rvm: '1.9.3' },
        app: {
          production: 'travis-api-production',
          staging: 'travis-api-staging'
        }
      }
    }
  },
  timeouts: {
    # git_clone: 300
  }
}

# require 'yaml'
# data[:config] = YAML.load_file('play/config.yml')

# script = Travis::Build.script(data, logs: { build: false, state: true })
script = Travis::Build.script(data, logs: { build: false, state: true })
script = script.compile
puts script


{'fraction_non_alphanumeric': 0.17025222551928784, 'fraction_numerical': 0.03635014836795252, 'mean_word_length': 2.605614973262032, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5178124', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1040, 'n_words': 203}