redshift-rails 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 4f605674b0cf955d656884b736aab912821c54a6
4
- data.tar.gz: 0398295b8ba3b00e8abb1a980ca3d52971b4ba59
3
+ metadata.gz: 00552a2ead04ef87495bfdfe8a5cbd1962b72eec
4
+ data.tar.gz: 8498545c92c1250b54c68419fc4dd96872a82e0e
5
5
  SHA512:
6
- metadata.gz: 223b29baa3675850303c8f33595b600ede517986d9cfc0f96ef7ca92e2cadc33afb9db56d90fdf3f6b24d391226bd03b1ff2fba471e92c2ce2ac111261002f0a
7
- data.tar.gz: 3e8a04f951bc957eb751a6ccdcbd1c8a75c993147e9f00d0df00670348472e88ba2d71ae89bb38e124ab18781abd9c968eceb826b441d687a06375ca62b21dd9
6
+ metadata.gz: 467f9a69d8e8e99d88a81efea2188a4708cd2dde1d7558d325fb733e97be5659e76c054438201cc8f25ed633bbf5404acabf840f6c91f25c8283918a98f28a45
7
+ data.tar.gz: 759cb392f98a3a23d3eff13ae3020d17eda7a8a7f91edd74ae1293a815ae2189948b165199f39a20e59a6f32159d3a2496fae457fae8cf3b207656de9878e14e
@@ -6,9 +6,17 @@ module Redshift
6
6
  end
7
7
 
8
8
  def call(env)
9
- @app.call(env)
10
- ensure
11
- Redshift::Client.disconnect
9
+ testing = env['rack.test']
10
+
11
+ response = @app.call(env)
12
+ response[2] = ::Rack::BodyProxy.new(response[2]) do
13
+ Redshift::Client.disconnect unless testing
14
+ end
15
+
16
+ response
17
+ rescue Exception
18
+ Redshift::Client.disconnect unless testing
19
+ raise
12
20
  end
13
21
  end
14
22
  end
@@ -1,5 +1,5 @@
1
1
  module Redshift
2
2
  module Rails
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redshift-rails
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
  - Dai Akatsuka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redshift-client