<commit_before>package com.base2.ciinabox.ext

import javaposse.jobdsl.dsl.Job

/**
 * Created by nikolatosic on 8/05/2017.
 */
class RemoteTriggerExtension implements ICiinaboxExtension {

//  @Override
//  String getConfigurationKey() {
//    'remoteTrigger'
//  }
//
//  @Override
//  Map getDefaultConfiguration() {
//    return [:]
//  }
//
//  @Override
//  void extendDsl(Job job, Object extensionConfiguration, Object jobConfiguration) {
//    job.configure {
//      project ->
//        (project / 'authToken').setValue(extensionConfiguration['token'])
//    }
//  }

  @Override
  void extend(Job job, Object jobConfiguration) {
    if(jobConfiguration.get('remoteTrigger')){
      def extensionConfiguration = jobConfiguration.get('remoteTrigger')
      job.configure {
        project ->
          (project / 'authToken').setValue(extensionConfiguration['token'])
      }
    }
  }
}<commit_msg>Remote trigger feature implemented using ExtensionBase<commit_after>package com.base2.ciinabox.ext

import javaposse.jobdsl.dsl.Job

/**
 * Created by nikolatosic on 8/05/2017.
 */
class RemoteTriggerExtension extends ExtensionBase {

  @Override
  String getConfigurationKey() {
    'remoteTrigger'
  }

  @Override
  Map getDefaultConfiguration() {
    return [:]
  }

  @Override
  void extendDsl(Job job, Object extensionConfiguration, Object jobConfiguration) {
    job.configure {
      project ->
        (project / 'authToken').setValue(extensionConfiguration['token'])
    }
  }
}
{'fraction_non_alphanumeric': 0.12692050768203073, 'fraction_numerical': 0.01068804275217101, 'mean_word_length': 3.219718309859155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '6721250', 'n_tokens_mistral': 454, 'n_tokens_neox': 439, 'n_words': 85}