<commit_before>/*
 * Copyright 2014 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.spinnaker.orca.front50.config

import static retrofit.Endpoints.newFixedEndpoint

import com.google.gson.Gson
import com.netflix.spinnaker.orca.front50.DependentPipelineStarter
import com.netflix.spinnaker.orca.front50.Front50Service
import com.netflix.spinnaker.orca.front50.spring.DependentPipelineExecutionListener
import com.netflix.spinnaker.orca.pipeline.persistence.ExecutionRepository
import com.netflix.spinnaker.orca.retrofit.RetrofitConfiguration
import com.netflix.spinnaker.orca.retrofit.logging.RetrofitSlf4jLog
import groovy.transform.CompileStatic
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import retrofit.Endpoint
import retrofit.RestAdapter
import retrofit.client.Client
import retrofit.converter.GsonConverter

@Configuration
@Import(RetrofitConfiguration)
@ComponentScan([
  "com.netflix.spinnaker.orca.front50.pipeline",
  "com.netflix.spinnaker.orca.front50.tasks"
])
@CompileStatic
class Front50Configuration {

  @Autowired
  Client retrofitClient
  @Autowired
  RestAdapter.LogLevel retrofitLogLevel

  @Bean
  Endpoint front50Endpoint(
    @Value('${front50.baseUrl}') String front50BaseUrl) {
    newFixedEndpoint(front50BaseUrl)
  }

  @Bean
  Front50Service front50Service(Endpoint front50Endpoint, Gson gson) {
    new RestAdapter.Builder()
      .setEndpoint(front50Endpoint)
      .setClient(retrofitClient)
      .setLogLevel(retrofitLogLevel)
      .setLog(new RetrofitSlf4jLog(Front50Service))
      .setConverter(new GsonConverter(gson))
      .build()
      .create(Front50Service)
  }

  @Bean
  DependentPipelineExecutionListener dependentPipelineExecutionListener(
    ExecutionRepository executionRepository,
    Front50Service front50Service,
    DependentPipelineStarter dependentPipelineStarter
  ) {
    new DependentPipelineExecutionListener(executionRepository, front50Service, dependentPipelineStarter)
  }
}
<commit_msg>add front50 package to component scanning as part of mayo removal<commit_after>/*
 * Copyright 2014 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.netflix.spinnaker.orca.front50.config

import static retrofit.Endpoints.newFixedEndpoint

import com.google.gson.Gson
import com.netflix.spinnaker.orca.front50.DependentPipelineStarter
import com.netflix.spinnaker.orca.front50.Front50Service
import com.netflix.spinnaker.orca.front50.spring.DependentPipelineExecutionListener
import com.netflix.spinnaker.orca.pipeline.persistence.ExecutionRepository
import com.netflix.spinnaker.orca.retrofit.RetrofitConfiguration
import com.netflix.spinnaker.orca.retrofit.logging.RetrofitSlf4jLog
import groovy.transform.CompileStatic
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Import
import retrofit.Endpoint
import retrofit.RestAdapter
import retrofit.client.Client
import retrofit.converter.GsonConverter

@Configuration
@Import(RetrofitConfiguration)
@ComponentScan([
  "com.netflix.spinnaker.orca.front50.pipeline",
  "com.netflix.spinnaker.orca.front50.tasks",
  "com.netflix.spinnaker.orca.front50"
])
@CompileStatic
class Front50Configuration {

  @Autowired
  Client retrofitClient
  @Autowired
  RestAdapter.LogLevel retrofitLogLevel

  @Bean
  Endpoint front50Endpoint(
    @Value('${front50.baseUrl}') String front50BaseUrl) {
    newFixedEndpoint(front50BaseUrl)
  }

  @Bean
  Front50Service front50Service(Endpoint front50Endpoint, Gson gson) {
    new RestAdapter.Builder()
      .setEndpoint(front50Endpoint)
      .setClient(retrofitClient)
      .setLogLevel(retrofitLogLevel)
      .setLog(new RetrofitSlf4jLog(Front50Service))
      .setConverter(new GsonConverter(gson))
      .build()
      .create(Front50Service)
  }

  @Bean
  DependentPipelineExecutionListener dependentPipelineExecutionListener(
    ExecutionRepository executionRepository,
    Front50Service front50Service,
    DependentPipelineStarter dependentPipelineStarter
  ) {
    new DependentPipelineExecutionListener(executionRepository, front50Service, dependentPipelineStarter)
  }
}

{'fraction_non_alphanumeric': 0.07634257634257634, 'fraction_numerical': 0.018954018954018954, 'mean_word_length': 5.374720357941834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4675148', 'n_tokens_mistral': 1651, 'n_tokens_neox': 1594, 'n_words': 361}