<commit_before>version: 2
meta:
  test_defaults: &test_defaults
    steps:
      - checkout
      - run:
          name: install dependencies
          command: |
            bundle install --jobs=4 --retry=3 --path vendor/bundle
      - run:
          name: run tests
          command: |
            ruby -v
            bundle exec rake
  tag_filters: &tag_filters
    tags:
      only: /v.*/
jobs:
  "ruby-2.4":
    <<: *test_defaults
    docker:
      - image: circleci/ruby:2.4
  "ruby-2.3":
    <<: *test_defaults
    docker:
      - image: circleci/ruby:2.3
  publish:
    docker:
      - image: circleci/ruby:2.5
    steps:
      - checkout
      - run:
          name: Setup Rubygems
          command: |
            set -u
            mkdir ~/.gem
            cat <<EOT > ~/.gem/credentials
            ---
            :rubygems_api_key: ${RUBYGEMS_API_KEY}
            EOT
            chmod 0600 ~/.gem/credentials
      - run:
          name: Publish to Rubygems
          command: |
            set -u
            gem build "${CIRCLE_PROJECT_REPONAME}.gemspec"
            gem push "${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}.gem"

workflows:
  version: 2
  build:
    jobs:
      - "ruby-2.4":
          filters:
            <<: *tag_filters
      - "ruby-2.3":
          filters:
            <<: *tag_filters
      - publish:
          requires:
            - "ruby-2.4"
            - "ruby-2.3"
          filters:
            <<: *tag_filters
            branches:
              ignore: /.*/<commit_msg>Also test against ruby 2.5<commit_after>version: 2
meta:
  test_defaults: &test_defaults
    steps:
      - checkout
      - run:
          name: install dependencies
          command: |
            bundle install --jobs=4 --retry=3 --path vendor/bundle
      - run:
          name: run tests
          command: |
            ruby -v
            bundle exec rake
  tag_filters: &tag_filters
    tags:
      only: /v.*/
jobs:
  "ruby-2.5":
    <<: *test_defaults
    docker:
      - image: circleci/ruby:2.5
  "ruby-2.4":
    <<: *test_defaults
    docker:
      - image: circleci/ruby:2.4
  "ruby-2.3":
    <<: *test_defaults
    docker:
      - image: circleci/ruby:2.3
  publish:
    docker:
      - image: circleci/ruby:2.5
    steps:
      - checkout
      - run:
          name: Setup Rubygems
          command: |
            set -u
            mkdir ~/.gem
            cat <<EOT > ~/.gem/credentials
            ---
            :rubygems_api_key: ${RUBYGEMS_API_KEY}
            EOT
            chmod 0600 ~/.gem/credentials
      - run:
          name: Publish to Rubygems
          command: |
            set -u
            gem build "${CIRCLE_PROJECT_REPONAME}.gemspec"
            gem push "${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG#v}.gem"

workflows:
  version: 2
  build:
    jobs:
      - "ruby-2.5":
          filters:
            <<: *tag_filters
      - "ruby-2.4":
          filters:
            <<: *tag_filters
      - "ruby-2.3":
          filters:
            <<: *tag_filters
      - publish:
          requires:
            - "ruby-2.5"
            - "ruby-2.4"
            - "ruby-2.3"
          filters:
            <<: *tag_filters
            branches:
              ignore: /.*/
{'fraction_non_alphanumeric': 0.12027278363298202, 'fraction_numerical': 0.019218846869187848, 'mean_word_length': 1.2332179930795848, 'pattern_counts': {'":': 10, '<': 31, '<?xml version=': 0, '>': 5, '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': '6159062', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1046, 'n_words': 215}