postman_mta 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc04ac2c8ab40ed842b78143e7cac798f1876defb5e9aa8bbe7f67cc9ab32144
4
- data.tar.gz: 8f5f477cc5b86bdf800702f2d13545a9d250cac8e3fdcb23257bb33123a17cbf
3
+ metadata.gz: 63d6c39090e609521da139680163a8ea087177b08058fa9c891200ed74b2db24
4
+ data.tar.gz: aad564e61a4c45ff2bbcfae4f1415acee51a0c5e064431974977a10fd2af4741
5
5
  SHA512:
6
- metadata.gz: af548b6ed0b23aa31817c3dddd8b6c5eea15c863e75c8c45bdb2a8ff005b6966f794466754e691db2ed43eef5f6a0455c5954664f2e18879cc1c39ff927e86ef
7
- data.tar.gz: 975fe8c004c5e843f2a38b4ddf10e64ee39af9fa61fbfc6ed0d618a8b277dbacd68535f9fc8037aec0e59939c447a2427ec3cbd643a499bca6a57c094e34c5f3
6
+ metadata.gz: f4c30c98c0a6baa305f4676965941e404b60421decf6ea2c71f5f934bf0c4bc597296955da11aa05caf67abc2315bdd4c95b8f9e7c2308be443d470ee3e7c6ec
7
+ data.tar.gz: c03703cc5f1d59d2b0bde4aa848fdb7ea95366a9cdb9bc3049ff00c704bd2115d9893ae15641ea2e4d29178dfece718dcce1045ba6050b6820941470dce02caf
@@ -5,6 +5,7 @@ module PostmanMta
5
5
  def show
6
6
  response = attachment.find(params[:uuid]).deep_symbolize_keys
7
7
  file = response.dig(:json, :attachment)
8
+ raise(PostmanMta::RecordNotFound, "Attachment via id #{params[:uuid]} not found") unless file
8
9
 
9
10
  if file[:body].present?
10
11
  send_attachment(file)
@@ -10,6 +10,7 @@ module PostmanMta
10
10
 
11
11
  autoload :ApiClient, 'postman_mta/api_client'
12
12
  autoload :ApiRequest, 'postman_mta/api_request'
13
+ autoload :RecordNotFound, 'postman_mta/record_not_found'
13
14
 
14
15
  mattr_accessor :api_key
15
16
  mattr_accessor :api_secret
@@ -0,0 +1,3 @@
1
+ module PostmanMta
2
+ class RecordNotFound < StandardError; end
3
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostmanMta
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postman_mta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Malinovskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-04 00:00:00.000000000 Z
11
+ date: 2020-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -176,6 +176,7 @@ files:
176
176
  - lib/postman_mta/api_client.rb
177
177
  - lib/postman_mta/api_request.rb
178
178
  - lib/postman_mta/engine.rb
179
+ - lib/postman_mta/record_not_found.rb
179
180
  - lib/postman_mta/utils/sendfile_url.rb
180
181
  - lib/postman_mta/utils/signature.rb
181
182
  - lib/postman_mta/utils/signed_request.rb