From 788676845dc00b33fe72238e4e2746c6e104f407 Mon Sep 17 00:00:00 2001
From: Kevin Ansfield <kevin@lookingsideways.co.uk>
Date: Sat, 16 Jan 2021 18:22:04 +0000
Subject: [PATCH] Added empty email analytics packages

---
 .../.eslintrc.js                              |  6 +++
 .../email-analytics-provider-mailgun/LICENSE  | 21 ++++++++++
 .../README.md                                 | 39 +++++++++++++++++++
 .../email-analytics-provider-mailgun/index.js |  0
 .../package.json                              | 27 +++++++++++++
 .../test/.eslintrc.js                         |  6 +++
 .../test/hello.test.js                        | 10 +++++
 .../test/utils/assertions.js                  | 11 ++++++
 .../test/utils/index.js                       | 11 ++++++
 .../test/utils/overrides.js                   | 10 +++++
 ghost/email-analytics-service/.eslintrc.js    |  6 +++
 ghost/email-analytics-service/LICENSE         | 21 ++++++++++
 ghost/email-analytics-service/README.md       | 39 +++++++++++++++++++
 ghost/email-analytics-service/index.js        |  0
 ghost/email-analytics-service/package.json    | 27 +++++++++++++
 .../email-analytics-service/test/.eslintrc.js |  6 +++
 .../test/hello.test.js                        | 10 +++++
 .../test/utils/assertions.js                  | 11 ++++++
 .../test/utils/index.js                       | 11 ++++++
 .../test/utils/overrides.js                   | 10 +++++
 20 files changed, 282 insertions(+)
 create mode 100644 ghost/email-analytics-provider-mailgun/.eslintrc.js
 create mode 100644 ghost/email-analytics-provider-mailgun/LICENSE
 create mode 100644 ghost/email-analytics-provider-mailgun/README.md
 create mode 100644 ghost/email-analytics-provider-mailgun/index.js
 create mode 100644 ghost/email-analytics-provider-mailgun/package.json
 create mode 100644 ghost/email-analytics-provider-mailgun/test/.eslintrc.js
 create mode 100644 ghost/email-analytics-provider-mailgun/test/hello.test.js
 create mode 100644 ghost/email-analytics-provider-mailgun/test/utils/assertions.js
 create mode 100644 ghost/email-analytics-provider-mailgun/test/utils/index.js
 create mode 100644 ghost/email-analytics-provider-mailgun/test/utils/overrides.js
 create mode 100644 ghost/email-analytics-service/.eslintrc.js
 create mode 100644 ghost/email-analytics-service/LICENSE
 create mode 100644 ghost/email-analytics-service/README.md
 create mode 100644 ghost/email-analytics-service/index.js
 create mode 100644 ghost/email-analytics-service/package.json
 create mode 100644 ghost/email-analytics-service/test/.eslintrc.js
 create mode 100644 ghost/email-analytics-service/test/hello.test.js
 create mode 100644 ghost/email-analytics-service/test/utils/assertions.js
 create mode 100644 ghost/email-analytics-service/test/utils/index.js
 create mode 100644 ghost/email-analytics-service/test/utils/overrides.js

diff --git a/ghost/email-analytics-provider-mailgun/.eslintrc.js b/ghost/email-analytics-provider-mailgun/.eslintrc.js
new file mode 100644
index 0000000000..c9c1bcb522
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+    plugins: ['ghost'],
+    extends: [
+        'plugin:ghost/node'
+    ]
+};
diff --git a/ghost/email-analytics-provider-mailgun/LICENSE b/ghost/email-analytics-provider-mailgun/LICENSE
new file mode 100644
index 0000000000..366ae5f624
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013-2021 Ghost Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/ghost/email-analytics-provider-mailgun/README.md b/ghost/email-analytics-provider-mailgun/README.md
new file mode 100644
index 0000000000..f126b26f60
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/README.md
@@ -0,0 +1,39 @@
+# Email Analytics Provider Mailgun
+
+## Install
+
+`npm install @tryghost/email-analytics-provider-mailgun --save`
+
+or
+
+`yarn add @tryghost/email-analytics-provider-mailgun`
+
+
+## Usage
+
+
+## Develop
+
+This is a mono repository, managed with [lerna](https://lernajs.io/).
+
+Follow the instructions for the top-level repo.
+1. `git clone` this repo & `cd` into it as usual
+2. Run `yarn` to install top-level dependencies.
+
+
+## Run
+
+- `yarn dev`
+
+
+## Test
+
+- `yarn lint` run just eslint
+- `yarn test` run lint and tests
+
+
+
+
+# Copyright & License 
+
+Copyright (c) 2021 Ghost Foundation - Released under the [MIT license](LICENSE).
\ No newline at end of file
diff --git a/ghost/email-analytics-provider-mailgun/index.js b/ghost/email-analytics-provider-mailgun/index.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ghost/email-analytics-provider-mailgun/package.json b/ghost/email-analytics-provider-mailgun/package.json
new file mode 100644
index 0000000000..306a01fd52
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/package.json
@@ -0,0 +1,27 @@
+{
+  "name": "@tryghost/email-analytics-provider-mailgun",
+  "version": "0.0.0",
+  "repository": "https://github.com/TryGhost/Publishing/tree/master/packages/email-analytics-provider-mailgun",
+  "author": "Ghost Foundation",
+  "license": "MIT",
+  "main": "index.js",
+  "scripts": {
+    "dev": "echo \"Implement me!\"",
+    "test": "NODE_ENV=testing mocha './test/**/*.test.js'",
+    "lint": "eslint . --ext .js --cache",
+    "posttest": "yarn lint"
+  },
+  "files": [
+    "index.js",
+    "lib"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "devDependencies": {
+    "mocha": "8.2.1",
+    "should": "13.2.3",
+    "sinon": "9.2.3"
+  },
+  "dependencies": {}
+}
diff --git a/ghost/email-analytics-provider-mailgun/test/.eslintrc.js b/ghost/email-analytics-provider-mailgun/test/.eslintrc.js
new file mode 100644
index 0000000000..829b601eb0
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/test/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+    plugins: ['ghost'],
+    extends: [
+        'plugin:ghost/test'
+    ]
+};
diff --git a/ghost/email-analytics-provider-mailgun/test/hello.test.js b/ghost/email-analytics-provider-mailgun/test/hello.test.js
new file mode 100644
index 0000000000..85d69d1e08
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/test/hello.test.js
@@ -0,0 +1,10 @@
+// Switch these lines once there are useful utils
+// const testUtils = require('./utils');
+require('./utils');
+
+describe('Hello world', function () {
+    it('Runs a test', function () {
+        // TODO: Write me!
+        'hello'.should.eql('hello');
+    });
+});
diff --git a/ghost/email-analytics-provider-mailgun/test/utils/assertions.js b/ghost/email-analytics-provider-mailgun/test/utils/assertions.js
new file mode 100644
index 0000000000..7364ee8aa1
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/test/utils/assertions.js
@@ -0,0 +1,11 @@
+/**
+ * Custom Should Assertions
+ *
+ * Add any custom assertions to this file.
+ */
+
+// Example Assertion
+// should.Assertion.add('ExampleAssertion', function () {
+//     this.params = {operator: 'to be a valid Example Assertion'};
+//     this.obj.should.be.an.Object;
+// });
diff --git a/ghost/email-analytics-provider-mailgun/test/utils/index.js b/ghost/email-analytics-provider-mailgun/test/utils/index.js
new file mode 100644
index 0000000000..0d67d86ff8
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/test/utils/index.js
@@ -0,0 +1,11 @@
+/**
+ * Test Utilities
+ *
+ * Shared utils for writing tests
+ */
+
+// Require overrides - these add globals for tests
+require('./overrides');
+
+// Require assertions - adds custom should assertions
+require('./assertions');
diff --git a/ghost/email-analytics-provider-mailgun/test/utils/overrides.js b/ghost/email-analytics-provider-mailgun/test/utils/overrides.js
new file mode 100644
index 0000000000..90203424ee
--- /dev/null
+++ b/ghost/email-analytics-provider-mailgun/test/utils/overrides.js
@@ -0,0 +1,10 @@
+// This file is required before any test is run
+
+// Taken from the should wiki, this is how to make should global
+// Should is a global in our eslint test config
+global.should = require('should').noConflict();
+should.extend();
+
+// Sinon is a simple case
+// Sinon is a global in our eslint test config
+global.sinon = require('sinon');
diff --git a/ghost/email-analytics-service/.eslintrc.js b/ghost/email-analytics-service/.eslintrc.js
new file mode 100644
index 0000000000..c9c1bcb522
--- /dev/null
+++ b/ghost/email-analytics-service/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+    plugins: ['ghost'],
+    extends: [
+        'plugin:ghost/node'
+    ]
+};
diff --git a/ghost/email-analytics-service/LICENSE b/ghost/email-analytics-service/LICENSE
new file mode 100644
index 0000000000..366ae5f624
--- /dev/null
+++ b/ghost/email-analytics-service/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013-2021 Ghost Foundation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/ghost/email-analytics-service/README.md b/ghost/email-analytics-service/README.md
new file mode 100644
index 0000000000..f8d8e4f79c
--- /dev/null
+++ b/ghost/email-analytics-service/README.md
@@ -0,0 +1,39 @@
+# Email Analytics Service
+
+## Install
+
+`npm install @tryghost/email-analytics-service --save`
+
+or
+
+`yarn add @tryghost/email-analytics-service`
+
+
+## Usage
+
+
+## Develop
+
+This is a mono repository, managed with [lerna](https://lernajs.io/).
+
+Follow the instructions for the top-level repo.
+1. `git clone` this repo & `cd` into it as usual
+2. Run `yarn` to install top-level dependencies.
+
+
+## Run
+
+- `yarn dev`
+
+
+## Test
+
+- `yarn lint` run just eslint
+- `yarn test` run lint and tests
+
+
+
+
+# Copyright & License 
+
+Copyright (c) 2021 Ghost Foundation - Released under the [MIT license](LICENSE).
\ No newline at end of file
diff --git a/ghost/email-analytics-service/index.js b/ghost/email-analytics-service/index.js
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ghost/email-analytics-service/package.json b/ghost/email-analytics-service/package.json
new file mode 100644
index 0000000000..32b48b0800
--- /dev/null
+++ b/ghost/email-analytics-service/package.json
@@ -0,0 +1,27 @@
+{
+  "name": "@tryghost/email-analytics-service",
+  "version": "0.0.0",
+  "repository": "https://github.com/TryGhost/Publishing/tree/master/packages/email-analytics-service",
+  "author": "Ghost Foundation",
+  "license": "MIT",
+  "main": "index.js",
+  "scripts": {
+    "dev": "echo \"Implement me!\"",
+    "test": "NODE_ENV=testing mocha './test/**/*.test.js'",
+    "lint": "eslint . --ext .js --cache",
+    "posttest": "yarn lint"
+  },
+  "files": [
+    "index.js",
+    "lib"
+  ],
+  "publishConfig": {
+    "access": "public"
+  },
+  "devDependencies": {
+    "mocha": "8.2.1",
+    "should": "13.2.3",
+    "sinon": "9.2.3"
+  },
+  "dependencies": {}
+}
diff --git a/ghost/email-analytics-service/test/.eslintrc.js b/ghost/email-analytics-service/test/.eslintrc.js
new file mode 100644
index 0000000000..829b601eb0
--- /dev/null
+++ b/ghost/email-analytics-service/test/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+    plugins: ['ghost'],
+    extends: [
+        'plugin:ghost/test'
+    ]
+};
diff --git a/ghost/email-analytics-service/test/hello.test.js b/ghost/email-analytics-service/test/hello.test.js
new file mode 100644
index 0000000000..85d69d1e08
--- /dev/null
+++ b/ghost/email-analytics-service/test/hello.test.js
@@ -0,0 +1,10 @@
+// Switch these lines once there are useful utils
+// const testUtils = require('./utils');
+require('./utils');
+
+describe('Hello world', function () {
+    it('Runs a test', function () {
+        // TODO: Write me!
+        'hello'.should.eql('hello');
+    });
+});
diff --git a/ghost/email-analytics-service/test/utils/assertions.js b/ghost/email-analytics-service/test/utils/assertions.js
new file mode 100644
index 0000000000..7364ee8aa1
--- /dev/null
+++ b/ghost/email-analytics-service/test/utils/assertions.js
@@ -0,0 +1,11 @@
+/**
+ * Custom Should Assertions
+ *
+ * Add any custom assertions to this file.
+ */
+
+// Example Assertion
+// should.Assertion.add('ExampleAssertion', function () {
+//     this.params = {operator: 'to be a valid Example Assertion'};
+//     this.obj.should.be.an.Object;
+// });
diff --git a/ghost/email-analytics-service/test/utils/index.js b/ghost/email-analytics-service/test/utils/index.js
new file mode 100644
index 0000000000..0d67d86ff8
--- /dev/null
+++ b/ghost/email-analytics-service/test/utils/index.js
@@ -0,0 +1,11 @@
+/**
+ * Test Utilities
+ *
+ * Shared utils for writing tests
+ */
+
+// Require overrides - these add globals for tests
+require('./overrides');
+
+// Require assertions - adds custom should assertions
+require('./assertions');
diff --git a/ghost/email-analytics-service/test/utils/overrides.js b/ghost/email-analytics-service/test/utils/overrides.js
new file mode 100644
index 0000000000..90203424ee
--- /dev/null
+++ b/ghost/email-analytics-service/test/utils/overrides.js
@@ -0,0 +1,10 @@
+// This file is required before any test is run
+
+// Taken from the should wiki, this is how to make should global
+// Should is a global in our eslint test config
+global.should = require('should').noConflict();
+should.extend();
+
+// Sinon is a simple case
+// Sinon is a global in our eslint test config
+global.sinon = require('sinon');