neon_email 0.0.4 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8134e5a9d22ff2e2b29f4fd808c4fffb1f8b8a28b53e375643610a529d341bb1
4
- data.tar.gz: '0194c7a86036aa5905e035e522a36f6c8c8533a8298344411eec2bd0003b0d8a'
3
+ metadata.gz: c40d88f4c28b729a5e855912be0741a0ad0eb2526981cfe989ccb2bb17c294a5
4
+ data.tar.gz: 2ae8b9ecab535718a411771c3b1c155d76cb9dff3a4bc970d8d2a55e16299855
5
5
  SHA512:
6
- metadata.gz: 8b042d77e3e999607ba728cbb5141686da2fcff7ade4b9a830ed0e0bfea2b3c5c2b25bdf9ebb33535fa3116adb46fe554e6c6802630868e1d81960bf62c1d797
7
- data.tar.gz: 246810ffe4418c1a9e85192e9e6a4051d6c8f09b87201a8cf84a498c5451251ef70cb8cc668b3266a8d3403fc0edab6dcff000d33b3d9795a514497eb470681e
6
+ metadata.gz: 54dbf8e7b80e6b20b9956060d20a5efbc032f03ccd0fab57f1dd71d2c54c31ab41b004393c0b62a237e9a8b6814d8954ffd4556ac107b30a6e2ac144f16852a7
7
+ data.tar.gz: f8e346a358dc12f7975bd8dbba457fc6bd05c3d57050912ac521ed0e7dff32a56765cf84cc17240b1039fa9616030ef34d96620f274a20d3f5b1b8f8325bdf9d
data/.gcloudignore ADDED
@@ -0,0 +1,17 @@
1
+ # This file specifies files that are *not* uploaded to Google Cloud Platform
2
+ # using gcloud. It follows the same syntax as .gitignore, with the addition of
3
+ # "#!include" directives (which insert the entries of the given .gitignore-style
4
+ # file at that point).
5
+ #
6
+ # For more information, run:
7
+ # $ gcloud topic gcloudignore
8
+ #
9
+ .gcloudignore
10
+ # If you would like to upload your .git directory, .gitignore file or files
11
+ # from your .gitignore file, remove the corresponding line
12
+ # below:
13
+ .git
14
+ .gitignore
15
+
16
+ node_modules
17
+ #!include:.gitignore
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neon_email (0.0.1)
4
+ neon_email (0.1.1)
5
5
  functions_framework (= 0.9.0)
6
6
  neon_schemas (= 0.1.1)
7
7
 
data/app.rb CHANGED
@@ -1,7 +1,15 @@
1
1
  require "functions_framework"
2
2
  require "neon_email"
3
+ require "logger"
4
+ require "base64"
5
+ require "json"
3
6
 
4
- FunctionsFramework.cloud_event "neon_law.welcome_email" do |event|
5
- logger.info event
6
- logger.info "I received an event of type #{event.type}!"
7
+ logger = Logger.new($stdout)
8
+
9
+ WELCOME_EMAIL_TOPIC = "com.neon_law.outbound_email.welcome_email".freeze
10
+
11
+ FunctionsFramework.cloud_event WELCOME_EMAIL_TOPIC do |event|
12
+ data = JSON.parse(Base64.strict_decode64(event.data.fetch(:data)))
13
+
14
+ logger.info(data)
7
15
  end
data/lib/neon_email.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "neon_email/version"
2
- require "neon_email/handler"
3
2
 
4
3
  module NeonEmail
5
4
  class Error < StandardError; end
@@ -1,3 +1,3 @@
1
1
  module NeonEmail
2
- VERSION = "0.0.4"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neon_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neon Law
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-12 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: neon_schemas
@@ -45,6 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".gcloudignore"
48
49
  - ".gitignore"
49
50
  - ".rspec"
50
51
  - ".ruby-version"