From 42e493ea52298a72651878d2328fa0497dd50598 Mon Sep 17 00:00:00 2001 From: Steven Zeck Date: Fri, 9 Mar 2018 22:49:51 -0600 Subject: [PATCH 1/4] Enable SQL for CI tests --- .../simple-jsbeautifyrc/sql/expected/test.sql | 10 +++++----- .../simple-jsbeautifyrc/sql/expected/test2.sql | 16 ++++++++++++---- .../sql/original/{_test.sql => test.sql} | 0 .../sql/original/{_test2.sql => test2.sql} | 0 4 files changed, 17 insertions(+), 9 deletions(-) rename examples/simple-jsbeautifyrc/sql/original/{_test.sql => test.sql} (100%) rename examples/simple-jsbeautifyrc/sql/original/{_test2.sql => test2.sql} (100%) diff --git a/examples/simple-jsbeautifyrc/sql/expected/test.sql b/examples/simple-jsbeautifyrc/sql/expected/test.sql index 2925130..d65e73d 100644 --- a/examples/simple-jsbeautifyrc/sql/expected/test.sql +++ b/examples/simple-jsbeautifyrc/sql/expected/test.sql @@ -3,7 +3,7 @@ SELECT ca.proj_id AS proj_id, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end, - (SELECT count(*) + (SELECT COUNT(*) FROM rotations r WHERE r.proj_id = proj_id AND r.r_status = 'R' @@ -12,7 +12,7 @@ SELECT ca.proj_id AS proj_id, (SELECT count(*) FROM rotations r WHERE r.proj_id = proj_id - AND r.channel_id = 24) r_rtb_count + AND r.channel_id = 24 ) r_rtb_count FROM projs ca, clients c, proj_auth caa @@ -20,6 +20,6 @@ WHERE ca.client_id = 12345 AND ca.client_id = c.client_id AND ca_type = 'zzz' AND c.agency_id = 0 - AND ca.client_id = nvl(caa.client_id, ca.client_id) - AND proj_id = nvl(caa.proj_id, proj_id) - AND caa.contact_id = 7890 \ No newline at end of file + AND ca.client_id = NVL(caa.client_id, ca.client_id) + AND proj_id = NVL(caa.proj_id, proj_id) + AND caa.contact_id = 7890 diff --git a/examples/simple-jsbeautifyrc/sql/expected/test2.sql b/examples/simple-jsbeautifyrc/sql/expected/test2.sql index 871f4f1..78d3a82 100644 --- a/examples/simple-jsbeautifyrc/sql/expected/test2.sql +++ b/examples/simple-jsbeautifyrc/sql/expected/test2.sql @@ -4,21 +4,30 @@ VALUES('hallpclnx', CURRENT_TIMESTAMP); -INSERT INTO thread (thread, description, created_at, client_id) +INSERT INTO THREAD (THREAD, + description, + created_at, + client_id) VALUES(1, 'Living room camera', CURRENT_TIMESTAMP, 1); -INSERT INTO thread (thread, description, created_at, client_id) +INSERT INTO THREAD (THREAD, + description, + created_at, + client_id) VALUES(2, 'Porch camera', CURRENT_TIMESTAMP, 1); -INSERT INTO thread (thread, description, created_at, client_id) +INSERT INTO THREAD (THREAD, + description, + created_at, + client_id) VALUES(2, 'Garden camera', CURRENT_TIMESTAMP, @@ -29,4 +38,3 @@ INSERT INTO client (HOST, description, created_at) VALUES('shedpclnx', 'My shed linux machine', CURRENT_TIMESTAMP); - diff --git a/examples/simple-jsbeautifyrc/sql/original/_test.sql b/examples/simple-jsbeautifyrc/sql/original/test.sql similarity index 100% rename from examples/simple-jsbeautifyrc/sql/original/_test.sql rename to examples/simple-jsbeautifyrc/sql/original/test.sql diff --git a/examples/simple-jsbeautifyrc/sql/original/_test2.sql b/examples/simple-jsbeautifyrc/sql/original/test2.sql similarity index 100% rename from examples/simple-jsbeautifyrc/sql/original/_test2.sql rename to examples/simple-jsbeautifyrc/sql/original/test2.sql From c3b5e063d1dae47f1585ac6c19e62f4f072eed0c Mon Sep 17 00:00:00 2001 From: Steven Zeck Date: Fri, 9 Mar 2018 23:10:59 -0600 Subject: [PATCH 2/4] Remove newlines from SQL test files --- examples/simple-jsbeautifyrc/sql/expected/test.sql | 2 +- examples/simple-jsbeautifyrc/sql/expected/test2.sql | 2 +- examples/simple-jsbeautifyrc/sql/original/test.sql | 2 +- examples/simple-jsbeautifyrc/sql/original/test2.sql | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/simple-jsbeautifyrc/sql/expected/test.sql b/examples/simple-jsbeautifyrc/sql/expected/test.sql index d65e73d..23d2b43 100644 --- a/examples/simple-jsbeautifyrc/sql/expected/test.sql +++ b/examples/simple-jsbeautifyrc/sql/expected/test.sql @@ -22,4 +22,4 @@ WHERE ca.client_id = 12345 AND c.agency_id = 0 AND ca.client_id = NVL(caa.client_id, ca.client_id) AND proj_id = NVL(caa.proj_id, proj_id) - AND caa.contact_id = 7890 + AND caa.contact_id = 7890 \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/sql/expected/test2.sql b/examples/simple-jsbeautifyrc/sql/expected/test2.sql index 78d3a82..5154ec3 100644 --- a/examples/simple-jsbeautifyrc/sql/expected/test2.sql +++ b/examples/simple-jsbeautifyrc/sql/expected/test2.sql @@ -37,4 +37,4 @@ VALUES(2, INSERT INTO client (HOST, description, created_at) VALUES('shedpclnx', 'My shed linux machine', - CURRENT_TIMESTAMP); + CURRENT_TIMESTAMP); \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/sql/original/test.sql b/examples/simple-jsbeautifyrc/sql/original/test.sql index 617439f..1b41da0 100644 --- a/examples/simple-jsbeautifyrc/sql/original/test.sql +++ b/examples/simple-jsbeautifyrc/sql/original/test.sql @@ -1 +1 @@ -SELECT ca.proj_id AS proj_id, ca.ca_name AS proj_name, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end,(SELECT COUNT(*) FROM rotations r WHERE r.proj_id = proj_id AND r.r_status = 'R' GROUP BY r.proj_id) r_count, (SELECT count(*) FROM rotations r WHERE r.proj_id = proj_id AND r.channel_id = 24 ) r_rtb_count FROM projs ca, clients c, proj_auth caa WHERE ca.client_id = 12345 AND ca.client_id = c.client_id AND ca_type = 'zzz' AND c.agency_id = 0 AND ca.client_id = NVL( caa.client_id, ca.client_id ) AND proj_id = NVL( caa.proj_id, proj_id ) AND caa.contact_id = 7890 +SELECT ca.proj_id AS proj_id, ca.ca_name AS proj_name, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end,(SELECT COUNT(*) FROM rotations r WHERE r.proj_id = proj_id AND r.r_status = 'R' GROUP BY r.proj_id) r_count, (SELECT count(*) FROM rotations r WHERE r.proj_id = proj_id AND r.channel_id = 24 ) r_rtb_count FROM projs ca, clients c, proj_auth caa WHERE ca.client_id = 12345 AND ca.client_id = c.client_id AND ca_type = 'zzz' AND c.agency_id = 0 AND ca.client_id = NVL( caa.client_id, ca.client_id ) AND proj_id = NVL( caa.proj_id, proj_id ) AND caa.contact_id = 7890 \ No newline at end of file diff --git a/examples/simple-jsbeautifyrc/sql/original/test2.sql b/examples/simple-jsbeautifyrc/sql/original/test2.sql index 40f1942..b8c47bb 100644 --- a/examples/simple-jsbeautifyrc/sql/original/test2.sql +++ b/examples/simple-jsbeautifyrc/sql/original/test2.sql @@ -2,4 +2,4 @@ INSERT INTO client (host, description, created_at) VALUES('hallpclnx', 'My linux INSERT INTO thread (thread, description, created_at, client_id) VALUES(1, 'Living room camera', CURRENT_TIMESTAMP, 1); INSERT INTO thread (thread, description, created_at, client_id) VALUES(2, 'Porch camera', CURRENT_TIMESTAMP, 1); INSERT INTO thread (thread, description, created_at, client_id) VALUES(2, 'Garden camera', CURRENT_TIMESTAMP, 1); -INSERT INTO client (host, description, created_at) VALUES('shedpclnx', 'My shed linux machine', CURRENT_TIMESTAMP); +INSERT INTO client (host, description, created_at) VALUES('shedpclnx', 'My shed linux machine', CURRENT_TIMESTAMP); \ No newline at end of file From db9c0aeb6b9541c692b059c94a10e12848da51d1 Mon Sep 17 00:00:00 2001 From: Steven Zeck Date: Fri, 9 Mar 2018 23:16:05 -0600 Subject: [PATCH 3/4] Clear TRAVIS_COMMIT_MESSAGE variable --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e6dd739..2d93fab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,9 @@ before_install: # linux: Install Nix, Nix packages, upgrade pip, and install python packages # osx: Update Homebrew, remove conflicting cask, brew bundle, symlink elm-format, # upgrade pip, and install python packages + - echo $TRAVIS_COMMIT_MESSAGE + - export "TRAVIS_COMMIT_MESSAGE" = "" + - echo $TRAVIS_COMMIT_MESSAGE - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl https://nixos.org/nix/install | sh && . ~/.nix-profile/etc/profile.d/nix.sh && From c04a322769190ebe7a6896aaf09a76f2fe903c37 Mon Sep 17 00:00:00 2001 From: Steven Zeck Date: Fri, 9 Mar 2018 23:19:06 -0600 Subject: [PATCH 4/4] Fix export message --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d93fab..7e5d273 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ before_install: # osx: Update Homebrew, remove conflicting cask, brew bundle, symlink elm-format, # upgrade pip, and install python packages - echo $TRAVIS_COMMIT_MESSAGE - - export "TRAVIS_COMMIT_MESSAGE" = "" + - export TRAVIS_COMMIT_MESSAGE="" - echo $TRAVIS_COMMIT_MESSAGE - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl https://nixos.org/nix/install | sh &&