neon_email 0.0.7 → 0.1.3

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: fdda6281ed539d2a94c4fccf8895aee3e263aef14e0286a994cc13b956c71903
4
- data.tar.gz: 3d500c94afcc1301f2be980535a3e81a2eb95d8eb9cf5a27abe348d5a3179466
3
+ metadata.gz: f189ad0e640c703fc1730d8c64887d356f2d251d5b49545f6fb7f95af60afd8c
4
+ data.tar.gz: 0be94a9402075e522e1c30340121c534cc949f432b8862989d723082bb35c69b
5
5
  SHA512:
6
- metadata.gz: 4058ef498a6cdf2581d7b19b0f565298007c0a9def9d9af8089e3c3342f89cc42d533e241268f3309584cdfb377048ec50d78d3489d217965ffc378772d1b337
7
- data.tar.gz: 823655dfa176884b21563e15ee50c6c35ed9722e6a7cdc5d6517cbbf87c676ae13ce52c5af0ff347ee45be12b6c9082ede9f7d158294ff2b13e26c42714d210e
6
+ metadata.gz: af1242495e76b5f4bf0f942406f341cdb5831e7fc0b44c2f16f44928e2404c389e58861d861bd195ef5723da9501c1f79599cf253a2f50440fc3fdf0b4f8d577
7
+ data.tar.gz: d286f6a4450603f95b7816e1519600705ab10cb6a63e7b07d9112d66e4810afea1d66c80eac0272a20f7390cb13545f9e81675da9f009f4bf2f3f50e8389d6fb
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.3)
5
5
  functions_framework (= 0.9.0)
6
6
  neon_schemas (= 0.1.1)
7
7
 
data/app.rb CHANGED
@@ -1,7 +1,17 @@
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(
13
+ Base64.strict_decode64(event.data.fetch("message").fetch("data"))
14
+ )
15
+
16
+ logger.info(data)
7
17
  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.7"
2
+ VERSION = "0.1.3"
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.7
4
+ version: 0.1.3
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-13 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"