yardie 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 429da70fb6d471ac829492fa89c5ac47be7d9b4d
4
- data.tar.gz: 37d6cab27a8b845ec305ba3d111e3dc11d99e2a9
3
+ metadata.gz: d767c9904a3d2975ef017c1f5c5b118083c09df3
4
+ data.tar.gz: 5bd7e18ede50682c905aa04bde9b26a375d4367c
5
5
  SHA512:
6
- metadata.gz: 4c727007f22c2a56003d9293499559a36c84ac757bbd0f5bd3db36c8262bf9151bfd96a571b6bfdd6b9b82f2960b00e6415fe313367d68ab589af5a35104e96d
7
- data.tar.gz: f289c1d93b648fde0b24c8a2ef393d2e5a81d27654bd88ce597c27efc3910baf2065d783ed44b6638020d2ec42ab7e2b7992d234887df3d7e8e7ec4f934f4d77
6
+ metadata.gz: 443c8b93b22f4515eeec365c876823396b3a861c2004582b15ec6cb4f02f05cb3213c5d1a883095a26ac306512c59cbaae0c288712ebf56cd2896f111319ac74
7
+ data.tar.gz: 3ec3413a732db4bcfc7feaa586820ce9c5bd25579a5f8ba5bfb9c5f961f1e95935bb2eac06f78e1df93c72776b792a8cae8e18414c7ace74ed6b8d5e1e51e9eb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yardie (0.1.0)
4
+ yardie (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,13 +6,13 @@ module Yardie
6
6
  DEV_DELIVERY_URI = URI('http://localhost:3000/runtime/mailbox')
7
7
  PROD_DELIVERY_PATH = URI('https://rocky-sierra-12787.herokuapp.com/runtime/mailbox')
8
8
 
9
- def initialize app
9
+ def initialize(app)
10
10
  @app = app
11
11
  end
12
12
 
13
- def call env
13
+ def call(env)
14
14
  return @app.call(env) if ENV['YARDIE_DISABLE'] && ENV['YARDIE_DISABLE'].casecmp('TRUE').zero?
15
- return @app.call(env) if Rails.env.development? && env['REQUEST_PATH'].eql?('/runtime/mailbox')
15
+ return @app.call(env) if Rails.env.development? && env['REQUEST_PATH'].eql?('/runtime/mailbox') # ignore calls to yourself to prevent infinite loops
16
16
  return @app.call(env) unless env['CONTENT_TYPE'].eql?('application/json')
17
17
  return @app.call(env) if ENV['YARDIE_AUTH_KEY'].blank?
18
18
 
@@ -21,22 +21,23 @@ module Yardie
21
21
 
22
22
  error = false
23
23
  payload = {
24
- auth_key: ENV['YARDIE_AUTH_KEY'],
25
- request: {
26
- id: env['action_dispatch.request_id'],
27
- path: env['REQUEST_PATH'],
28
- method: env['REQUEST_METHOD'],
29
- body: nil,
30
- trace: [ ]
31
- },
32
- controller: {
33
- name: nil,
34
- method: nil
35
- },
36
- response: {
37
- status: nil,
38
- body: nil
39
- }
24
+ auth_key: ENV['YARDIE_AUTH_KEY'],
25
+ request: {
26
+ id: env['action_dispatch.request_id'],
27
+ path: env['REQUEST_PATH'],
28
+ query: env['QUERY_STRING'],
29
+ method: env['REQUEST_METHOD'],
30
+ body: nil,
31
+ trace: []
32
+ },
33
+ controller: {
34
+ name: nil,
35
+ method: nil
36
+ },
37
+ response: {
38
+ status: nil,
39
+ body: nil
40
+ }
40
41
  }
41
42
 
42
43
  req = Rack::Request.new(env)
@@ -1,3 +1,3 @@
1
1
  module Yardie
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yardie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Deany
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-08 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler