jonahkh
2020-05-29 a1024aca9acdc080a98deb85d3e437c5c3433651
update notification service for maildev server
3 files added
3 files modified
149 ■■■■ changed files
adopt-a-pup/.idea/workspace.xml 121 ●●●● patch | view | raw | blame | history
adopt-a-pup/Readme.MD 26 ●●●●● patch | view | raw | blame | history
adopt-a-pup/mongo-data/dog-photos/Harvey.jpg patch | view | raw | blame | history
adopt-a-pup/mongo-data/dog-photos/Theo.jpg patch | view | raw | blame | history
adopt-a-pup/mongo-data/dog-photos/Winston.jpg patch | view | raw | blame | history
adopt-a-pup/notification-service/src/main/resources/application.properties 2 ●●● patch | view | raw | blame | history
adopt-a-pup/.idea/workspace.xml
@@ -2,103 +2,12 @@
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="f788b161-9af5-4988-b67e-058c2cc6689b" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/mongo-data/dog-photos/Harvey.jpg" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/mongo-data/dog-photos/Theo.jpg" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/mongo-data/dog-photos/Winston.jpg" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/adoption-service/Readme.MD" beforeDir="false" afterPath="$PROJECT_DIR$/Readme.MD" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.codeclimate.yml" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.dockerignore" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.editorconfig" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.gitignore" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.npmignore" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/.travis.yml" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/Dockerfile" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/LICENSE" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/README.md" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-cookies/angular-cookies.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-cookies/angular-cookies.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-cookies/angular-cookies.min.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-resource/angular-resource.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-resource/angular-resource.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-resource/angular-resource.min.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-route/angular-route.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-route/angular-route.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-route/angular-route.min.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-sanitize/angular-sanitize.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-sanitize/angular-sanitize.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular-sanitize/angular-sanitize.min.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular/angular.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular/angular.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/angular/angular.min.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/socket.io/socket.io.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/socket.io/socket.io.js.map" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/components/socket.io/socket.io.min.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/favicon.ico" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/fonts/FontAwesome.otf" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/fonts/fontawesome-webfont.eot" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/fonts/fontawesome-webfont.svg" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/fonts/fontawesome-webfont.ttf" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/fonts/fontawesome-webfont.woff" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/index.html" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/scripts/app.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/scripts/controllers/item.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/scripts/controllers/main.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/scripts/services.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/styles/icons/iconmonstr-control-panel-21.svg" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/styles/icons/iconmonstr-control-panel-23.svg" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/styles/style.css" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/views/item.html" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/app/views/main.html" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/appveyor.yml" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/_mixins.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/_normalize.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_bordered-pulled.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_core.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_fixed-width.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_icons.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_larger.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_list.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_mixins.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_path.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_rotated-flipped.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_spinning.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_stacked.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/_variables.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/font-awesome/font-awesome.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/assets/styles/style.scss" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/bin/maildev" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/codecov.yml" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/docs/api.md" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/docs/docker.md" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/docs/https.md" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/docs/rest.md" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/index.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/auth.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/helpers/smtp.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/logger.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/mailserver.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/options.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/outgoing.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/routes.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/utils.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/lib/web.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/package-lock.json" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/package.json" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/scripts/dev.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/scripts/send.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/scripts/updateUsageREADME.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/api.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/auth.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/cli.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/email.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/mailserver.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/middleware.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/options.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/outgoing.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/smtpHelpers.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/tyler.jpg" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/utils.test.js" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/maildev/test/wave.jpg" beforeDir="false" />
      <change beforePath="$PROJECT_DIR$/shelter-service/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/shelter-service/pom.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/shelter-service/src/main/java/com/redhat/do328/adoptApup/shelterservice/ShelterServiceApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/shelter-service/src/main/java/com/redhat/do328/adoptApup/shelterservice/ShelterServiceApplication.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/Readme.MD" beforeDir="false" afterPath="$PROJECT_DIR$/Readme.MD" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/notification-service/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/notification-service/src/main/resources/application.properties" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -139,7 +48,7 @@
    <property name="aspect.path.notification.shown" value="true" />
    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1590076839070" />
    <property name="com.intellij.ide.scratch.LRUPopupBuilder$1/New Scratch File" value="yaml&#10;JSON&#10;TEXT" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/mongo-data/dog-photos" />
    <property name="node.js.detected.package.eslint" value="true" />
    <property name="node.js.detected.package.tslint" value="true" />
    <property name="node.js.path.for.package.eslint" value="project" />
@@ -152,13 +61,14 @@
    <property name="project.structure.last.edited" value="Project" />
    <property name="project.structure.proportion" value="0.0" />
    <property name="project.structure.side.proportion" value="0.0" />
    <property name="settings.editor.selected.configurable" value="editor.preferences.appearance" />
    <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="$PROJECT_DIR$" />
    </key>
    <key name="CopyFile.RECENT_KEYS">
      <recent name="$PROJECT_DIR$/mongo-data/dog-photos" />
      <recent name="$PROJECT_DIR$/animal-service/src/main/java/com/redhat/do328/adoptApup/animalservice/model" />
      <recent name="$PROJECT_DIR$/adoption-service/src/main/java/com/redhat/do328/adoptApup/adoptionservice/model" />
    </key>
@@ -286,7 +196,7 @@
      <workItem from="1588956360362" duration="19495000" />
      <workItem from="1589905246888" duration="1329000" />
      <workItem from="1590077824497" duration="3732000" />
      <workItem from="1590698930822" duration="4893000" />
      <workItem from="1590698930822" duration="9128000" />
    </task>
    <servers />
  </component>
@@ -294,6 +204,10 @@
    <option name="version" value="2" />
  </component>
  <component name="WindowStateProjectService">
    <state x="418" y="198" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1590708643787">
      <screen x="0" y="27" width="1920" height="1053" />
    </state>
    <state x="418" y="198" key="#com.intellij.execution.impl.EditConfigurationsDialog/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590708643787" />
    <state x="2663" y="311" width="424" height="491" key="FileChooserDialogImpl" timestamp="1590699777617">
      <screen x="1920" y="0" width="1920" height="1080" />
    </state>
@@ -350,10 +264,10 @@
      <screen x="0" y="27" width="1920" height="1053" />
    </state>
    <state width="1874" height="241" key="GridCell.Tab.2.right/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590700928962" />
    <state x="397" y="225" width="1022" height="737" key="SettingsEditor" timestamp="1590703840158">
    <state x="397" y="225" width="1022" height="737" key="SettingsEditor" timestamp="1590703889140">
      <screen x="0" y="27" width="1920" height="1053" />
    </state>
    <state x="397" y="225" width="1022" height="737" key="SettingsEditor/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590703840158" />
    <state x="397" y="225" width="1022" height="737" key="SettingsEditor/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590703889140" />
    <state x="2369" y="188" width="1022" height="737" key="SettingsEditor/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@1920.0.1920.1080" timestamp="1590698962228" />
    <state x="742" y="211" width="426" height="665" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1590701688692">
      <screen x="0" y="27" width="1920" height="1053" />
@@ -363,10 +277,11 @@
      <screen x="0" y="27" width="1920" height="1053" />
    </state>
    <state x="652" y="117" width="615" height="846" key="find.popup/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590702537638" />
    <state x="624" y="182" width="672" height="676" key="search.everywhere.popup" timestamp="1590703201924">
    <state x="624" y="182" width="672" height="676" key="search.everywhere.popup" timestamp="1590708773084">
      <screen x="0" y="27" width="1920" height="1053" />
    </state>
    <state x="624" y="182" width="672" height="676" key="search.everywhere.popup/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590703201924" />
    <state x="624" y="182" width="672" height="676" key="search.everywhere.popup/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@0.27.1920.1053" timestamp="1590708773084" />
    <state x="2544" y="159" width="672" height="694" key="search.everywhere.popup/3840.0.1920.1080/1920.0.1920.1080/0.27.1920.1053@1920.0.1920.1080" timestamp="1590706435391" />
  </component>
  <component name="debuggerHistoryManager">
    <expressions id="evaluateCodeFragment">
adopt-a-pup/Readme.MD
@@ -20,4 +20,28 @@
oc adm policy add-scc-to-user anyuid -z maildev
# This is a custom-built image from https://github.com/maildev/maildev. Currently public in quay.io/redhattraining
oc new-app --name=email-service quay.io/redhattraining/maildev:latest
oc new-app --name=email-service quay.io/redhattraining/maildev:latest
## Load data into Mongo
# There is dummy data in the adopt-a-pup/mongo-data directory that can be imported into the newly created mongo instance
# You must have mongodb-org installed (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/)
oc port-forward <mongo-pod-name> 27017:27017
mongoimport --db=adopt-a-pup --collection=animals --username=developer --password=developer adopt-a-pup/mongo-data/animals.mongo
mongoimport --db=adopt-a-pup --collection=shelters --username=developer --password=developer adopt-a-pup/mongo-data/shelters.mongo
# Swagger
<ocp-host>/swagger-ui.html for all of them
# There are now two shelters each with 2 animals created.
Denver Doggos: e038ae3c-592f-403e-9233-4b6eeab30e3c
    - Harvey: e22d494c-c2be-4d32-bceb-ec675fd5540a
    - Gus: d52a8d58-9024-49dd-92b6-d443c6049ffe
Minneapolis Mutts: 6a432062-96a4-4a66-b888-1ab7225e6b2c
    - Theo: b62977ad-fe79-4480-a550-06f717923017
    - Winston: aac7ea0a-2374-4d4b-8d3a-71e4f896e751
Once all the data has been loaded and the application is running, you can test by applying for adoption with the following request:
curl -X POST "http://{{adoption-service-host}}/adoption/applyForAdoption" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"animalId\": \"e22d494c-c2be-4d32-bceb-ec675fd5540a\", \"email\": \"harvey@gmail.com\", \"kidsUnder16\": false, \"occupation\": \"Engineer\", \"ownOtherAnimals\": true, \"residency\": \"HOUSE\", \"squareFootageOfHome\": 2000, \"username\": \"Dog-Dad\"}"
adopt-a-pup/mongo-data/dog-photos/Harvey.jpg
adopt-a-pup/mongo-data/dog-photos/Theo.jpg
adopt-a-pup/mongo-data/dog-photos/Winston.jpg
adopt-a-pup/notification-service/src/main/resources/application.properties
@@ -1,4 +1,4 @@
spring.mail.host=172.17.0.2
spring.mail.host=email-service
spring.mail.port=25
spring.mail.properties.mail.transport.protocol=smtp
spring.data.mongodb.host=mongodb