This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@Bean | |
public RouteBuilder fotocasaRoute() { | |
return new SoapRouteBuilder("mock:kafka", new FotocasaService("http//foto")); | |
} | |
@Bean | |
public RouteBuilder milAnunciosRoute() { | |
return new SoapRouteBuilder("mock:kafka", new FotocasaService("http//ma")); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SoapRouteBuilder extends RouteBuilder { | |
private final String uriFrom; | |
private final AlertingService alertingService; | |
public SoapRouteBuilder(String uriFrom, AlertingService alertingService) { | |
this.uriFrom = uriFrom; | |
this.alertingService = alertingService; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f(g(h(x))) | |
compose(f,g,h)(x) | |
pipe(h,g,f)(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@FeignClient(value = "roger", configuration = FeignDictionaryConfiguration.class) | |
@FeignClient(value = "ms-common--app-dictionaries", url = "https://ms-common--app-dictionaries.global-pre.spain.schibsted.io", configuration = FeignDictionaryConfiguration.class) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
annotationProcessor "org.projectlombok:lombok:$lombokVersion" | |
compileOnly "org.projectlombok:lombok:$lombokVersion" | |
// unlike testCompile, these configurations do not inherit from their compile counterparts | |
// so if your tests depend on lombok, make sure you have specified these: | |
testAnnotationProcessor "org.projectlombok:lombok:$lombokVersion" | |
testCompileOnly "org.projectlombok:lombok:$lombokVersion" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# given | |
environment = "pro" | |
token = '' | |
headers = { | |
'Authorization': token, | |
'Content-type': 'application/json; charset=utf-8' | |
} | |
url_asgard = "http://asgard.classified-ads-" + environment + ".spain.schibsted.io:8080/eu-west-1/cluster/show/ms_pta__adinsertion.json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Single<FormResource> getDraft(GetDraftRequestDto getDraftRequestDto) { | |
return cochesnetRepository.getDraft(getDraftRequestDto) | |
.flatMapObservable(draftResponses -> Observable.from(draftResponses) | |
.map(DraftResponse::mapFromCochesFieldsToPtaFields) | |
.flatMap(values -> createFormResource(values, getDraftRequestDto.getToken()).toObservable()) | |
.switchIfEmpty(createDraft(getDraftRequestDto.getToken()).toObservable())) | |
.toSingle() | |
.onErrorResumeNext(this::handleError); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SpringRunner.class) | |
@ContextConfiguration(loader = AnnotationConfigContextLoader.class, classes = {ClientConfiguration.class, | |
CochesnetPropertiesConfiguration.class}) | |
@TestPropertySource(properties = {"cochesnet.ConnectTimeout=1000", "cochesnet.ReadTimeout=1000", | |
"cochesnet.url=http://localhost:8080"}) | |
public class CochesPactTest { | |
@Autowired | |
private FeignCochesnetDraft feignCochesnetDraft; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void return_hours_for_all_postal_codes() { | |
CorreosAdaptor correosAdaptor = new CorreosAdaptor(); | |
IntStream.rangeClosed(35000, 35302). | |
boxed().peek(i-> System.out.println(i)). | |
map(i->correosAdaptor.getArrayOfOficina(String.valueOf(i))). | |
forEach(oficina->oficina.getItem().stream().filter(x->!x.getHorarioF().equals("SIN SERVICIO")).forEach( | |
o-> { | |
System.out.println(o.getHorarioF()); | |
System.out.println(o.getHorarioLV()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Dominable.com | |
Description: Ejemplo de plugin para animar a hacerlos | |
Author: Alex Moleiro | |
Version: 0.1 Beta | |
Author URI: http://twitter.com/MoleiroAlex | |
License: WTFPL | |
License URI: http://www.wtfpl.net/ | |
NewerOlder