grape_cache 0.2.1 → 0.2.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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDVmYWZjYTBkZmZiNDRiMTk0M2M2NDkyZGU4MTc5NjIzM2RjZTNkYg==
4
+ YmY4NDZlZDk0ZWI4ZTcxMjNlMmQ5MjRkZDY5N2ExMjczODBkNTUzNA==
5
5
  data.tar.gz: !binary |-
6
- NTlmOTY1YThlY2NkNzc4MzExOTI1ZWJlY2IxMjgzMjk1YjhkYzNjOQ==
6
+ ZjI4YWY4MDIzN2E2MjdlZTg4Y2JiOWFhNGM2MDFkMzdjMTc5ZGM5MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yzg4YzY3MjFjZDRmMmM0NWY3OWNkM2VlY2MxYWM5YjE3N2ZlODg4ZmE0YmU3
10
- MzViNjkwZWI3M2Q1YmMwOTZlNmJiMzk0NDM0YzIwYzAxM2YwNGNlNDAwNWVk
11
- NjQzMWQ2ZDIyNGMzN2NlMzRjMDM2NzZhNWM0OWNkMWNmZGVlZWY=
9
+ ZTliODkxMzE3MGU4M2ZmZWI0MWZiOWVhOWE5YmQ1OTQ1YmViMzRlYmVlOGFj
10
+ ZThlYWE0NzY5ZGM4ZTVhNTgwYTY4OTFlM2MyZDMyN2M1NmM4NDMwMGVjYjky
11
+ NzU2NmU5MGU4ZTU5MGFlYjcwNzg1ZjcxZjRhNGFiYjJhZDNlMzY=
12
12
  data.tar.gz: !binary |-
13
- N2RmYWI2MzhmNzQ1YmY3MTQ2ZjM1NDRhNTM4NDQ2YjI1NzFhNWRiNzA1Njhj
14
- NWIwM2I5NDM5YmU1ZDA0MGQ0MzI5NzUxMTI4YWRjOWM5ZTU4M2U0MzQwZGVl
15
- N2Q2MzcxNmFkYmI2YTYyNmE2NmI1ODY2OTcyYjg5YmRmMWIwZjg=
13
+ NGE3NzlkZDU2NjNlODg3ZTM1OGE0NTU0YjI4YzQ1OWQ3MzQ3MDAyYmZlOWRm
14
+ YzdkMGRlNTI0MWUyZDgyMjk5NDliY2ZmNmI5MWU2ODQ4ZTQ0OTk4M2FkNmEy
15
+ MDcyM2E0ZThhNTFiYWE0YTU3YzhmNjQzM2E0ZTQ3ZDg1ZjBhNzI=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape_cache (0.2.1)
4
+ grape_cache (0.2.2)
5
5
  grape (~> 0.16)
6
6
  multi_json
7
7
  oj
@@ -4,27 +4,25 @@ module GrapeCache
4
4
  class Middleware < Grape::Middleware::Base
5
5
  # Overwriting the method call! from Grape::Middleware::Base
6
6
  # Reason: Make the :before call to return the whole stack
7
- def call!(env)
8
- @env = env
7
+ def call!(env)
8
+ @env = env
9
9
  # Just here is moving!
10
10
  before_res = before
11
11
  return before_res unless before_res.nil?
12
12
  # end the overwrite
13
- begin
14
- @app_response = @app.call(@env)
15
- ensure
16
- begin
17
- after_response = after
18
- rescue StandardError => e
19
- warn "caught error of type #{e.class} in after callback inside #{self.class.name} : #{e.message}"
20
- raise e
21
- end
22
- end
23
-
24
- response = after_response || @app_response
25
- merge_headers response
26
- response
27
- end
13
+ @app_response = @app.call(@env)
14
+
15
+ begin
16
+ after_response = after
17
+ rescue StandardError => e
18
+ warn "caught error of type #{e.class} in after callback inside #{self.class.name} : #{e.message}"
19
+ raise e
20
+ end
21
+
22
+ response = after_response || @app_response
23
+ merge_headers response
24
+ response
25
+ end
28
26
 
29
27
  #
30
28
  def after
@@ -2,6 +2,6 @@
2
2
  module GrapeCache
3
3
  # Gem version
4
4
  def self.version
5
- '0.2.1'.freeze
5
+ '0.2.2'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Corado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
11
+ date: 2016-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json