selective-ruby-core 0.2.0-x86_64-linux → 0.2.1-x86_64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/bin/build_env.sh +31 -30
 - data/lib/selective/ruby/core/file_correlator.rb +4 -1
 - data/lib/selective/ruby/core/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3969f6b0bc7930dd6f6f5e9230bd24029b9270c50ab50147f6f8fdfb87404dca
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2c7cfb0a0f02382e3e04cdac8192260693b69b969c9c35091b3981c2ec1c6c47
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c60f23fededf736c3dca05cdff52e006d9b62657c4eb8fad0241ae3cc4e68af3c34e4f1c700a7acd1427db4c3f10f21e500f3c5fdfe49e85b658ea4d72c02d62
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 32a4e74a9563d4d4fa48dafc65b35a97d09c2b6ccfe33475a6476ce8904c4cfd5ce893555b453ee4fc0ddba3c71030cfbbb83515580464b6c4f7063a38d6f3ab
         
     | 
    
        data/lib/bin/build_env.sh
    CHANGED
    
    | 
         @@ -3,31 +3,32 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            # Detect the platform (only GitHub Actions in this case)
         
     | 
| 
       4 
4 
     | 
    
         
             
            if [ -n "$GITHUB_ACTIONS" ]; then
         
     | 
| 
       5 
5 
     | 
    
         
             
              platform=github_actions
         
     | 
| 
       6 
     | 
    
         
            -
              branch=${ 
     | 
| 
       7 
     | 
    
         
            -
              target_branch=$ 
     | 
| 
      
 6 
     | 
    
         
            +
              branch=${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}
         
     | 
| 
      
 7 
     | 
    
         
            +
              target_branch=$GITHUB_BASE_REF
         
     | 
| 
       8 
8 
     | 
    
         
             
              actor=$GITHUB_ACTOR
         
     | 
| 
       9 
     | 
    
         
            -
              sha=$ 
     | 
| 
       10 
     | 
    
         
            -
              run_id=$ 
     | 
| 
       11 
     | 
    
         
            -
              run_attempt=$ 
     | 
| 
      
 9 
     | 
    
         
            +
              sha=$GITHUB_SHA
         
     | 
| 
      
 10 
     | 
    
         
            +
              run_id=$GITHUB_RUN_ID
         
     | 
| 
      
 11 
     | 
    
         
            +
              run_attempt=$GITHUB_RUN_ATTEMPT
         
     | 
| 
       12 
12 
     | 
    
         
             
              runner_id=$SELECTIVE_RUNNER_ID
         
     | 
| 
       13 
13 
     | 
    
         
             
            elif [ -n "$CIRCLECI" ]; then
         
     | 
| 
       14 
14 
     | 
    
         
             
              platform=circleci
         
     | 
| 
       15 
     | 
    
         
            -
              branch=$ 
     | 
| 
       16 
     | 
    
         
            -
               
     | 
| 
       17 
     | 
    
         
            -
               
     | 
| 
       18 
     | 
    
         
            -
               
     | 
| 
       19 
     | 
    
         
            -
               
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
               
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
               
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
               
     | 
| 
       26 
     | 
    
         
            -
              actor=$ 
     | 
| 
       27 
     | 
    
         
            -
              sha=$ 
     | 
| 
       28 
     | 
    
         
            -
              run_id=$ 
     | 
| 
       29 
     | 
    
         
            -
              run_attempt 
     | 
| 
       30 
     | 
    
         
            -
              runner_id=$ 
     | 
| 
      
 15 
     | 
    
         
            +
              branch=$CIRCLE_BRANCH
         
     | 
| 
      
 16 
     | 
    
         
            +
              actor=${CIRCLE_USERNAME:-$CIRCLE_PR_USERNAME}
         
     | 
| 
      
 17 
     | 
    
         
            +
              sha=$CIRCLE_SHA1
         
     | 
| 
      
 18 
     | 
    
         
            +
              run_attempt=$CIRCLE_BUILD_NUM
         
     | 
| 
      
 19 
     | 
    
         
            +
              runner_id=$CIRCLE_NODE_INDEX
         
     | 
| 
      
 20 
     | 
    
         
            +
            elif [ -n "$SEMAPHORE" ]; then
         
     | 
| 
      
 21 
     | 
    
         
            +
              platform=semaphore
         
     | 
| 
      
 22 
     | 
    
         
            +
              branch=${SEMAPHORE_GIT_PR_BRANCH:-$SEMAPHORE_GIT_BRANCH}
         
     | 
| 
      
 23 
     | 
    
         
            +
              if [ -n "$SEMAPHORE_GIT_PR_BRANCH" ]; then
         
     | 
| 
      
 24 
     | 
    
         
            +
                target_branch=$SEMAPHORE_GIT_BRANCH
         
     | 
| 
      
 25 
     | 
    
         
            +
              fi
         
     | 
| 
      
 26 
     | 
    
         
            +
              actor=$SEMAPHORE_GIT_COMMITTER
         
     | 
| 
      
 27 
     | 
    
         
            +
              sha=$SEMAPHORE_GIT_SHA
         
     | 
| 
      
 28 
     | 
    
         
            +
              run_id=$SEMAPHORE_WORKFLOW_ID
         
     | 
| 
      
 29 
     | 
    
         
            +
              run_attempt=1
         
     | 
| 
      
 30 
     | 
    
         
            +
              runner_id=$SEMAPHORE_JOB_ID
         
     | 
| 
      
 31 
     | 
    
         
            +
              pr_title=$SEMAPHORE_GIT_PR_NAME
         
     | 
| 
       31 
32 
     | 
    
         
             
            fi
         
     | 
| 
       32 
33 
     | 
    
         | 
| 
       33 
34 
     | 
    
         
             
            # Output the JSON
         
     | 
| 
         @@ -35,16 +36,16 @@ cat <<EOF 
     | 
|
| 
       35 
36 
     | 
    
         
             
              {
         
     | 
| 
       36 
37 
     | 
    
         
             
                "api_key": "$SELECTIVE_API_KEY",
         
     | 
| 
       37 
38 
     | 
    
         
             
                "host": "${SELECTIVE_HOST:-wss://app.selective.ci}",
         
     | 
| 
       38 
     | 
    
         
            -
                "platform": "$platform",
         
     | 
| 
       39 
     | 
    
         
            -
                "branch": "$branch",
         
     | 
| 
       40 
     | 
    
         
            -
                "pr_title": "$SELECTIVE_PR_TITLE",
         
     | 
| 
       41 
     | 
    
         
            -
                "target_branch": "$target_branch",
         
     | 
| 
       42 
     | 
    
         
            -
                "actor": "$actor",
         
     | 
| 
       43 
     | 
    
         
            -
                "sha": "$sha",
         
     | 
| 
       44 
     | 
    
         
            -
                "run_id": "$run_id",
         
     | 
| 
       45 
     | 
    
         
            -
                "run_attempt": "$run_attempt",
         
     | 
| 
      
 39 
     | 
    
         
            +
                "platform": "${SELECTIVE_PLATFORM:-$platform}",
         
     | 
| 
      
 40 
     | 
    
         
            +
                "branch": "${SELECTIVE_BRANCH:-$branch}",
         
     | 
| 
      
 41 
     | 
    
         
            +
                "pr_title": "${SELECTIVE_PR_TITLE:-$pr_title}",
         
     | 
| 
      
 42 
     | 
    
         
            +
                "target_branch": "${SELECTIVE_TARGET_BRANCH:-$target_branch}",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "actor": "${SELECTIVE_ACTOR:-$actor}",
         
     | 
| 
      
 44 
     | 
    
         
            +
                "sha": "${SELECTIVE_SHA:-$sha}",
         
     | 
| 
      
 45 
     | 
    
         
            +
                "run_id": "${SELECTIVE_RUN_ID:-$run_id}",
         
     | 
| 
      
 46 
     | 
    
         
            +
                "run_attempt": "${SELECTIVE_RUN_ATTEMPT:-$run_attempt}",
         
     | 
| 
      
 47 
     | 
    
         
            +
                "runner_id": "${SELECTIVE_RUNNER_ID:-$runner_id}",
         
     | 
| 
       46 
48 
     | 
    
         
             
                "commit_message": "$(git log --format=%s -n 1 $sha)",
         
     | 
| 
       47 
     | 
    
         
            -
                "runner_id": "$runner_id",
         
     | 
| 
       48 
49 
     | 
    
         
             
                "committer_name": "$(git show -s --format='%an' -n 1 $sha)",
         
     | 
| 
       49 
50 
     | 
    
         
             
                "committer_email": "$(git show -s --format='%ae' -n 1 $sha)"
         
     | 
| 
       50 
51 
     | 
    
         
             
              }
         
     | 
| 
         @@ -17,7 +17,10 @@ module Selective 
     | 
|
| 
       17 
17 
     | 
    
         
             
                    def correlate
         
     | 
| 
       18 
18 
     | 
    
         
             
                      JSON.parse(get_correlated_files, symbolize_names: true)
         
     | 
| 
       19 
19 
     | 
    
         
             
                    rescue FileCorrelatorError, JSON::ParserError
         
     | 
| 
       20 
     | 
    
         
            -
                      print_warning 
     | 
| 
      
 20 
     | 
    
         
            +
                      print_warning(<<~MSG)
         
     | 
| 
      
 21 
     | 
    
         
            +
                        Selective was unable to correlate the diff to test files. This may result in a sub-optimal test order.
         
     | 
| 
      
 22 
     | 
    
         
            +
                        If the issue persists, please contact support.
         
     | 
| 
      
 23 
     | 
    
         
            +
                      MSG
         
     | 
| 
       21 
24 
     | 
    
         
             
                    end
         
     | 
| 
       22 
25 
     | 
    
         | 
| 
       23 
26 
     | 
    
         
             
                    private
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: selective-ruby-core
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.2.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x86_64-linux
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Benjamin Wood
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2024-01- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2024-01-19 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: zeitwerk
         
     |