<commit_before>version: 2
references:
  repo_restore_cache: &repo_restore_cache
    restore_cache:
      keys:
        - repo-{{ .Environment.CIRCLE_SHA1 }}
  repo_save_cache: &repo_save_cache
    save_cache:
      key: repo-{{ .Environment.CIRCLE_SHA1 }}-{{ epoch }}
      paths:
        - ~/mailgun-tracking
  bundle_install: &bundle_install
    run:
      name: Install Bundler dependencies
      command: bundle install --path ~/mailgun-tracking/vendor/bundle --jobs 15
  appraisal_install: &appraisal_install
    run:
      name: Install Appraisal dependencies
      command: bundle exec appraisal install --jobs 15
  unit: &unit
    run:
      name: Run unit tests
      command: bundle exec rake spec:unit
  rails42: &rails42
    run:
      name: Test Rails 4.2
      command: bundle exec appraisal rails-4.2 rake spec:integration:rails
  rails41: &rails50
    run:
      name: Test Rails 5.0
      command: bundle exec appraisal rails-5.0 rake spec:integration:rails
  rails51: &rails51
    run:
      name: Test Rails 5.1
      command: bundle exec appraisal rails-5.1 rake spec:integration:rails
  rails51: &rails52
    run:
      name: Test Rails 5.2
      command: bundle exec appraisal rails-5.2 rake spec:integration:rails
  rails_head: &rails_head
    run:
      name: Test Rails Head
      command: bundle exec appraisal rails-head rake spec:integration:rails
  sinatra: &sinatra
    run:
      name: Test Sinatra
      command: bundle exec appraisal sinatra rake spec:integration:sinatra
  rack: &rack
    run:
      name: Test Rack
      command: bundle exec appraisal rack rake spec:integration:rack
jobs:
  lint:
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - checkout
      - <<: *repo_save_cache
      - <<: *bundle_install
      - run:
          name: Run RuboCop linting
          command: bundle exec rubocop --parallel
  "code-climate":
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - checkout
      - <<: *repo_save_cache
      - <<: *bundle_install
      - run:
          name: Setup Code Climate test-reporter
          command: |
            curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
            chmod +x ./cc-test-reporter
      - run:
          name: Run specs
          command: |
            ./cc-test-reporter before-build
            rake coverage
            ./cc-test-reporter after-build --exit-code $?
  "ruby-2.2":
    docker:
      - image: circleci/ruby:2.2.9
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *sinatra
      - <<: *rack
  "ruby-2.3":
    docker:
      - image: circleci/ruby:2.3
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *sinatra
      - <<: *rack
  "ruby-2.4":
    docker:
      - image: circleci/ruby:2.4
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *rails_head
      - <<: *sinatra
      - <<: *rack
  "ruby-2.5":
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *rails_head
      - <<: *sinatra
      - <<: *rack
workflows:
  version: 2
  build:
    jobs:
      - lint
      - "code-climate"
      - "ruby-2.2":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.3":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.4":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.5":
          requires:
            - lint
            - "code-climate"<commit_msg>Add 2.6 ruby version (#49)<commit_after>version: 2
references:
  repo_restore_cache: &repo_restore_cache
    restore_cache:
      keys:
        - repo-{{ .Environment.CIRCLE_SHA1 }}
  repo_save_cache: &repo_save_cache
    save_cache:
      key: repo-{{ .Environment.CIRCLE_SHA1 }}-{{ epoch }}
      paths:
        - ~/mailgun-tracking
  bundle_install: &bundle_install
    run:
      name: Install Bundler dependencies
      command: bundle install --path ~/mailgun-tracking/vendor/bundle --jobs 15
  appraisal_install: &appraisal_install
    run:
      name: Install Appraisal dependencies
      command: bundle exec appraisal install --jobs 15
  unit: &unit
    run:
      name: Run unit tests
      command: bundle exec rake spec:unit
  rails42: &rails42
    run:
      name: Test Rails 4.2
      command: bundle exec appraisal rails-4.2 rake spec:integration:rails
  rails41: &rails50
    run:
      name: Test Rails 5.0
      command: bundle exec appraisal rails-5.0 rake spec:integration:rails
  rails51: &rails51
    run:
      name: Test Rails 5.1
      command: bundle exec appraisal rails-5.1 rake spec:integration:rails
  rails51: &rails52
    run:
      name: Test Rails 5.2
      command: bundle exec appraisal rails-5.2 rake spec:integration:rails
  rails_head: &rails_head
    run:
      name: Test Rails Head
      command: bundle exec appraisal rails-head rake spec:integration:rails
  sinatra: &sinatra
    run:
      name: Test Sinatra
      command: bundle exec appraisal sinatra rake spec:integration:sinatra
  rack: &rack
    run:
      name: Test Rack
      command: bundle exec appraisal rack rake spec:integration:rack
jobs:
  lint:
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - checkout
      - <<: *repo_save_cache
      - <<: *bundle_install
      - run:
          name: Run RuboCop linting
          command: bundle exec rubocop --parallel
  "code-climate":
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - checkout
      - <<: *repo_save_cache
      - <<: *bundle_install
      - run:
          name: Setup Code Climate test-reporter
          command: |
            curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
            chmod +x ./cc-test-reporter
      - run:
          name: Run specs
          command: |
            ./cc-test-reporter before-build
            bundle exec rake coverage
            ./cc-test-reporter after-build --exit-code $?
  "ruby-2.2":
    docker:
      - image: circleci/ruby:2.2.9
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *sinatra
      - <<: *rack
  "ruby-2.3":
    docker:
      - image: circleci/ruby:2.3
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *sinatra
      - <<: *rack
  "ruby-2.4":
    docker:
      - image: circleci/ruby:2.4
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *rails_head
      - <<: *sinatra
      - <<: *rack
  "ruby-2.5":
    docker:
      - image: circleci/ruby:2.5
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *rails_head
      - <<: *sinatra
      - <<: *rack
  "ruby-2.6":
    docker:
      - image: circleci/ruby:2.6-rc
    working_directory: ~/mailgun-tracking
    steps:
      - <<: *repo_restore_cache
      - <<: *bundle_install
      - <<: *appraisal_install
      - <<: *unit
      - <<: *rails42
      - <<: *rails51
      - <<: *rails52
      - <<: *rails_head
      - <<: *sinatra
      - <<: *rack
workflows:
  version: 2
  build:
    jobs:
      - lint
      - "code-climate"
      - "ruby-2.2":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.3":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.4":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.5":
          requires:
            - lint
            - "code-climate"
      - "ruby-2.6":
          requires:
            - lint
            - "code-climate"
{'fraction_non_alphanumeric': 0.12889378095762247, 'fraction_numerical': 0.02267473858007705, 'mean_word_length': 1.7913978494623657, 'pattern_counts': {'":': 20, '<': 191, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4470419', 'n_tokens_mistral': 3266, 'n_tokens_neox': 2961, 'n_words': 626}