neon_email 0.0.5 → 0.1.2

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: 2c58b3ad6b74a427edfe872411ed19424b8211fa7412329a9a16719e20516a4f
4
- data.tar.gz: 1a2d8b8a4fbc62a6ccec1cddbf0e6eddafceb20886616ce38859f56f90da94a5
3
+ metadata.gz: 89a438887ec723f38ce45670094bd5a6b0f82c91cff68a5c32225974d1d8939d
4
+ data.tar.gz: 9ed2bf07e591f1d995cc39ae0a42238519ae28997b89b6d71c435701d6d6ff65
5
5
  SHA512:
6
- metadata.gz: d8839d15872526bea6e571f61fda7af2630932a7dccc9236269c115fd69a37acd30464896491533eb5dfd7491c446c05a192ea7d73c0dd9672d51b9dcb15ff0b
7
- data.tar.gz: b5d521160669ff84d01f4a823bc2bc172321cbc0df2414be9008070a2737dcaaad5e0c276619fd028699f75d12dc77999aed62bfe91630f84ae6d1dfe84e3e6b
6
+ metadata.gz: 547bec39ca5c44eb842bda76fac2a9e3d06a90ef9e1a7ba6b7d6adc2451e36fcf709338a6b50ea982f8d23ca65d89113858f481b9dc217468339fa0e2b47e1ca
7
+ data.tar.gz: 83639e6778b6cf49cf40adf8d7f4283ed19029589ec2287f5084ec038d18ee176aa1c112ad14770747e88c7203ac899f0ae351c6b830a19f96b176067cf51f88
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,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.5"
2
+ VERSION = "0.1.2"
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.5
4
+ version: 0.1.2
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"