gruf 2.0.0 → 2.0.1

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: d589a46b3a36a065a4844e937c177cdf662a19db
4
- data.tar.gz: 412c889f35ded87f6a14990f79d25d2a6f5c9323
3
+ metadata.gz: 355dcc90e5af826c230fed08326ade8b56b57728
4
+ data.tar.gz: 6c0e2780048afff13c754c23aace69bfbd0c3463
5
5
  SHA512:
6
- metadata.gz: e80f4936341779ddda0c09c844a97f578c4c738be8c6db55156a4e35af931f4eae87d050906673d3fa141f05d2e0a869f12e2fbe156fc57ad996be31fc896c47
7
- data.tar.gz: 78e4ac11542cc8cbc647f68657f1571ee27aa7a7c125e80fb6d8b4d148226e47c9030d3dd2780b4735700bb5bb0744333909d72f75a26a8d7961049bdaa8df8e
6
+ metadata.gz: e69f8aa9f733f528be6adf971d21c38fbcacbaf18ee9f610bf970a44066f0e6d350858a90f4852006b39277ec2ba4ce63f428fa19d969c327e01850fb17037d7
7
+ data.tar.gz: 1be4c4efc4bc0af3af2f3bd9516409739a207780f0a6c26009fa5336fa4b46711e602f5565dac65d6929664aed735ab20e9494d7c3f3708b24ec8d6134b9096a
@@ -2,6 +2,10 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
2
2
 
3
3
  ### Pending release
4
4
 
5
+ ### 2.0.1
6
+
7
+ - Handle ActiveRecord connection management more gracefully (Fixes #30)
8
+
5
9
  ### 2.0.0
6
10
 
7
11
  Gruf 2.0 is a major shift from Gruf 1.0. See [UPGRADING.md](UPGRADING.md) for details.
data/README.md CHANGED
@@ -123,7 +123,7 @@ username and password pairs (or password-only credentials).
123
123
  ```ruby
124
124
  Gruf.configure do |c|
125
125
  c.interceptors.use(
126
- Gruf::Instrumentation::Authentication::Basic,
126
+ Gruf::Interceptors::Authentication::Basic,
127
127
  credentials: [{
128
128
  username: 'my-username-here',
129
129
  password: 'my-password-here',
@@ -26,8 +26,12 @@ module Gruf
26
26
  # connection pool, we need to ensure that this is done to properly
27
27
  #
28
28
  def call
29
- ::ActiveRecord::Base.clear_active_connections! if enabled?
29
+ if enabled? && !::ActiveRecord::Base.connection.active?
30
+ ::ActiveRecord::Base.establish_connection
31
+ end
30
32
  yield
33
+ ensure
34
+ ::ActiveRecord::Base.clear_active_connections! if enabled?
31
35
  end
32
36
 
33
37
  private
@@ -15,5 +15,5 @@
15
15
  # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
16
  #
17
17
  module Gruf
18
- VERSION = '2.0.0'.freeze
18
+ VERSION = '2.0.1'.freeze
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun McCormick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-03 00:00:00.000000000 Z
11
+ date: 2017-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.6.12
161
+ rubygems_version: 2.6.14
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: gRPC Ruby Framework