From 8f90957d14d65544d935a7fcc6acc0373a40f60c Mon Sep 17 00:00:00 2001 From: evansiroky Date: Fri, 26 Apr 2019 21:21:22 -0700 Subject: [PATCH 1/3] ci(semantic-release): pin semantic-release to v15 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cb233877e..6c517751d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_install: | # Install semantic-release before_script: - - yarn global add @conveyal/maven-semantic-release semantic-release + - yarn global add @conveyal/maven-semantic-release semantic-release@15 # Replace Travis's default build step. # Run all Maven phases at once up through verify, install, and deploy. From 04bee6d4b3818637622c6724b16b3d8a8cc2bcf5 Mon Sep 17 00:00:00 2001 From: evansiroky Date: Sun, 28 Apr 2019 15:40:18 -0700 Subject: [PATCH 2/3] refactor(test): update to latest version of java-snapshotter --- pom.xml | 6 ++++-- .../{canFetchAgencies.json => canFetchAgencies-0.json} | 0 .../{canFetchCalendars.json => canFetchCalendars-0.json} | 0 .../{canFetchErrors.json => canFetchErrors-0.json} | 0 .../{canFetchFares.json => canFetchFares-0.json} | 0 .../{canFetchFeed.json => canFetchFeed-0.json} | 0 .../{canFetchFeedInfo.json => canFetchFeedInfo-0.json} | 0 ...FetchFeedRowCounts.json => canFetchFeedRowCounts-0.json} | 0 ...stedEntities.json => canFetchMultiNestedEntities-0.json} | 0 ...json => canFetchMultiNestedEntitiesWithoutLimits-0.json} | 0 ...yWithLimit.json => canFetchNestedEntityWithLimit-0.json} | 0 .../{canFetchPatterns.json => canFetchPatterns-0.json} | 0 .../{canFetchRoutes.json => canFetchRoutes-0.json} | 0 ...son => canFetchRoutesAndFilterTripsByDateAndTime-0.json} | 0 .../{canFetchServices.json => canFetchServices-0.json} | 0 .../{canFetchStopTimes.json => canFetchStopTimes-0.json} | 0 ...topWithChildren.json => canFetchStopWithChildren-0.json} | 0 .../{canFetchStops.json => canFetchStops-0.json} | 0 ....json => canFetchStopsWithoutParentStationColumn-0.json} | 0 .../{canFetchTrips.json => canFetchTrips-0.json} | 0 ...Input.json => canSanitizeSQLInjectionSentAsInput-0.json} | 0 ...ue.json => canSanitizeSQLInjectionSentAsKeyValue-0.json} | 0 22 files changed, 4 insertions(+), 2 deletions(-) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchAgencies.json => canFetchAgencies-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchCalendars.json => canFetchCalendars-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchErrors.json => canFetchErrors-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchFares.json => canFetchFares-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchFeed.json => canFetchFeed-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchFeedInfo.json => canFetchFeedInfo-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchFeedRowCounts.json => canFetchFeedRowCounts-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchMultiNestedEntities.json => canFetchMultiNestedEntities-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchMultiNestedEntitiesWithoutLimits.json => canFetchMultiNestedEntitiesWithoutLimits-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchNestedEntityWithLimit.json => canFetchNestedEntityWithLimit-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchPatterns.json => canFetchPatterns-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchRoutes.json => canFetchRoutes-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchRoutesAndFilterTripsByDateAndTime.json => canFetchRoutesAndFilterTripsByDateAndTime-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchServices.json => canFetchServices-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchStopTimes.json => canFetchStopTimes-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchStopWithChildren.json => canFetchStopWithChildren-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchStops.json => canFetchStops-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchStopsWithoutParentStationColumn.json => canFetchStopsWithoutParentStationColumn-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canFetchTrips.json => canFetchTrips-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canSanitizeSQLInjectionSentAsInput.json => canSanitizeSQLInjectionSentAsInput-0.json} (100%) rename src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/{canSanitizeSQLInjectionSentAsKeyValue.json => canSanitizeSQLInjectionSentAsKeyValue-0.json} (100%) diff --git a/pom.xml b/pom.xml index ebc9f3c57..bcaeb8b5c 100644 --- a/pom.xml +++ b/pom.xml @@ -261,12 +261,14 @@ org.hamcrest java-hamcrest 2.0.0.0 + test - com.github.Zenika + com.github.conveyal java-snapshot-matcher - 7e6ed4049eb637334e56f84bdd23ea74da05f141 + 3495b32f7b4d3f82590e0a2284029214070b6984 + test diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchAgencies.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchAgencies-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchAgencies.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchAgencies-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchCalendars.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchCalendars-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchCalendars.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchCalendars-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchErrors.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchErrors-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchErrors.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchErrors-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFares.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFares-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFares.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFares-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeed.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeed-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeed.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeed-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedInfo.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedInfo-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedInfo.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedInfo-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedRowCounts.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedRowCounts-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedRowCounts.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchFeedRowCounts-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntities.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntities-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntities.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntities-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntitiesWithoutLimits.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntitiesWithoutLimits-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntitiesWithoutLimits.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchMultiNestedEntitiesWithoutLimits-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchNestedEntityWithLimit.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchNestedEntityWithLimit-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchNestedEntityWithLimit.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchNestedEntityWithLimit-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchPatterns.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchPatterns-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchPatterns.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchPatterns-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutes.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutes-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutes.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutes-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutesAndFilterTripsByDateAndTime.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutesAndFilterTripsByDateAndTime-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutesAndFilterTripsByDateAndTime.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchRoutesAndFilterTripsByDateAndTime-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchServices.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchServices-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchServices.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchServices-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopTimes.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopTimes-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopTimes.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopTimes-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopWithChildren.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopWithChildren-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopWithChildren.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopWithChildren-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStops.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStops-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStops.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStops-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopsWithoutParentStationColumn.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopsWithoutParentStationColumn-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopsWithoutParentStationColumn.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchStopsWithoutParentStationColumn-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchTrips.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchTrips-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchTrips.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canFetchTrips-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsInput.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsInput-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsInput.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsInput-0.json diff --git a/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsKeyValue.json b/src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsKeyValue-0.json similarity index 100% rename from src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsKeyValue.json rename to src/test/resources/snapshots/com/conveyal/gtfs/graphql/GTFSGraphQLTest/canSanitizeSQLInjectionSentAsKeyValue-0.json From d53b6a30b520c22eb1322d2c5a47a47937b43098 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Thu, 2 May 2019 15:25:04 -0400 Subject: [PATCH 3/3] fix(illegal-char): do not log error for unescaped backslashes fixes #228 --- src/main/java/com/conveyal/gtfs/loader/Field.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/conveyal/gtfs/loader/Field.java b/src/main/java/com/conveyal/gtfs/loader/Field.java index 49d312be2..2440c4624 100644 --- a/src/main/java/com/conveyal/gtfs/loader/Field.java +++ b/src/main/java/com/conveyal/gtfs/loader/Field.java @@ -91,7 +91,6 @@ public String getSqlDeclaration() { return String.join(" ", name, getSqlTypeName()); } - // TODO test for input with tabs, newlines, carriage returns, and slashes in it. protected static ValidateFieldResult cleanString (String string) { return cleanString(new ValidateFieldResult<>(string)); } @@ -106,7 +105,12 @@ protected static ValidateFieldResult cleanString (ValidateFieldResult