Skip to content

Commit

Permalink
inertia - add ssl certs for github + address some sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcordz committed Aug 26, 2024
1 parent 97e018d commit 80bccb8
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
bundle exec rails db:schema:load
bundle exec rails db:seed
- name: Set up certs
run: | # multi-line run command: https://stackoverflow.com/a/66809682/6410635
mv config/ssl/github-cert.pem config/ssl/cert.pem
mv config/ssl/github-key.pem config/ssl/key.pem
- name: Run tests
run: | # multi-line run command: https://stackoverflow.com/a/66809682/6410635
bundle exec rspec
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@

# Ignore master key for decrypting credentials and more.
/config/master.key
/config/ssl/
/config/keys/
/config/ssl/
!/config/ssl/github-cert.pem
!/config/ssl/github-key.pem

# Vite Ruby
/public/vite*
Expand Down
10 changes: 7 additions & 3 deletions app/frontend/components/LoginBubbles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const LoginBubbles: React.FC<IProps> = ({ title, isBubbles, children }) => {
return img;
}),
);
} catch (_error) {}
} catch (error) {}

Check warning on line 38 in app/frontend/components/LoginBubbles.tsx

View workflow job for this annotation

GitHub Actions / eslint

'error' is defined but never used. Allowed unused caught errors must match /^_/u
}, []);

return (
Expand All @@ -48,9 +48,13 @@ const LoginBubbles: React.FC<IProps> = ({ title, isBubbles, children }) => {
<ul className="container-login-bubbles">
{images.map((image: string, index: number) => {
return (
<li key={index} className="pointer" onClick={() => handleClick(index)}>
<li // NOSONAR
key={index}
className="pointer"
onClick={() => handleClick(index)}
onKeyDown={() => handleClick(index)}
>
{" "}
{/* NOSONAR */}
<img src={image} alt="sway bubble" className="sway-bubble" />
</li>
);
Expand Down
7 changes: 4 additions & 3 deletions app/frontend/hooks/useCancellable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const useCancellable = () => {
const isMounted = useMountedState();

return useCallback(
async <T>(promise: Promise<T>, onCancel?: () => void) =>
new Promise<T>(async (resolve, reject) => {
async <T>(promise: Promise<T>, onCancel?: () => void) => {
return new Promise<T>(async (resolve, reject) => {
try {
const result = await promise;
if (isMounted()) {
Expand All @@ -36,7 +36,8 @@ export const useCancellable = () => {
onCancel();
}
}
}),
});
},
[isMounted],
);
};
26 changes: 26 additions & 0 deletions config/ssl/github-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----BEGIN CERTIFICATE-----
MIIETTCCArWgAwIBAgIRAMMV4EtwznnY4ZLkzENkSnswDQYJKoZIhvcNAQELBQAw
gYkxHjAcBgNVBAoTFW1rY2VydCBkZXZlbG9wbWVudCBDQTEvMC0GA1UECwwmZGF2
ZWNARGF2ZXMtTWFjQm9vay1Qcm8ubG9jYWwgKERhdmUgQykxNjA0BgNVBAMMLW1r
Y2VydCBkYXZlY0BEYXZlcy1NYWNCb29rLVByby5sb2NhbCAoRGF2ZSBDKTAeFw0y
NDA4MjYxNDI2NThaFw0yNjExMjYxNTI2NThaMFoxJzAlBgNVBAoTHm1rY2VydCBk
ZXZlbG9wbWVudCBjZXJ0aWZpY2F0ZTEvMC0GA1UECwwmZGF2ZWNARGF2ZXMtTWFj
Qm9vay1Qcm8ubG9jYWwgKERhdmUgQykwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCm6NvsQ3VpJOkJlQBRNMfAviX5F9X5h1AEnIDqNwmKuPjAqlXBf2sE
zVvGplFfOV9Zc5G2+50jTylqeWOt9e1/Pgcg+em1Im1A36UIiJa41+GquTDYS7/I
OXgvhjPXFGlaR0x+jRFU+jmTQcFl+P5iC77Rg9nlIYKUjVUBBlUVTgq1m49/WDO5
s0lSsb8/VJBUqTO+J+bRY8Xp1i6xL/xH2FQgW/P/6KTTQwsPZWylaRURfYxC/lO4
EYsunakLFckVdpIlrI/NyF/+lAy00Qv9OCJDCBh0CvFjnMjalqEtqAGO7wdmoYuN
muVhNROhzstUPtbc7ItVZsZ9tzkXrXuzAgMBAAGjXjBcMA4GA1UdDwEB/wQEAwIF
oDATBgNVHSUEDDAKBggrBgEFBQcDATAfBgNVHSMEGDAWgBTFpMMwuRfZk19IaxG3
DV9g33qqTjAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcNAQELBQADggGB
ACsreU6mmkIGhbHInQZuR8I5WovEGwXWapwitPInpIB8YAOn5M1GmX9Y/3Uxi0OF
xCGhwEw8EEHMP3wlEJ3+Je4RISA0xwUq/882bOd/HNzJ2MNOC9wOBPjS2Yr8FZXY
lMG3OnW6TZ1e7aQjwM7JrP9RA5BVVlJvAMWgof+q7F/h/PQRYyWwaV/1HAmDMygn
mh0R4YFvgDskmJPBLQ7EhuzRppxDS0YyHIJZoaH7OfZGs9ehra90x2cKbA0rrbon
YjlYDoRnXxcRG7l4fPo2ehrcoSMp7zIysnjRczXAUgv45IAXB8qppbVM2/fV3MVQ
818a7LueYqA5nlbSeRUHr4bTbdkzukgFJpVzRX2sqyEzy8OKFgWH1WDhJU9Ajn0C
Bhwt4MVhfv3ALUGH6GXSl1kCtrbXE5T7To0cNNLNM7LErs4S3/NBds+++CQBzSgS
vqOWH7UW6iyt1/JtrUxOnxWj5SjFVyAfwHL58QYvcQ5Uzi7hUh8+rSJwEPTcLU69
FQ==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions config/ssl/github-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoIBAQCm6NvsQ3VpJOkJ
lQBRNMfAviX5F9X5h1AEnIDqNwmKuPjAqlXBf2sEzVvGplFfOV9Zc5G2+50jTylq
eWOt9e1/Pgcg+em1Im1A36UIiJa41+GquTDYS7/IOXgvhjPXFGlaR0x+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TU3rTD+29ZMiouDpsN/jxmg781wwSP0CgYA7yXgF
V6BxXoo1S6ZN0/27Ijo+giG5bZSNGrcIIt/NTvs6CD4UXtD+4xacSqnZ+EujBo+/
GmR372DDn+309o4LfSEH2IVJTKF0ZsVj3jA+YZzJ0/VleapbVtZVIeRhIMcDhZCT
DC0D6usPvrGNN4uZROszR6y2477o1Qi2jeEtHQKBgA2+XMPBpuTUrrjm9xcVg6d7
7Rrg5mCTXMJen9Du7z0bfs4nICS8qTG1YbDzx5+iyXEh71Yk+s/jHDeu+9Ho5/JN
1bdGmpJ7etoPTCMDnVYtEWCakpK0fEsK+0E2R7I5OXtIT5QMOJhfxUcKLxdJUZFx
myXVolhZIveKFPj/Wrr3
-----END PRIVATE KEY-----
2 changes: 0 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
// import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import reactRefresh from "eslint-plugin-react-refresh";
import rulesOfHooks from "eslint-plugin-react-hooks";
import eslintImport from "eslint-plugin-import";
Expand Down

0 comments on commit 80bccb8

Please sign in to comment.