test_track_rails_client 4.0.0.alpha11 → 4.0.0.alpha12

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: 8f67041dc87c99e93672e4d9b821bd8cd4cf7fd8
4
- data.tar.gz: 3a46c5e317ebd42896a05812a5bfc7f17cafe697
3
+ metadata.gz: 4c2b35880164766dbe0b25ecdcdd01209d4de04e
4
+ data.tar.gz: deff9940d846ef7fccec9f6e22c8d9daeb94c039
5
5
  SHA512:
6
- metadata.gz: 0cdac598e2643894f56eb96222b65139591454cc99417ed5bc96e9703fbef633f066b52cae275eeba369f32aa827c2da2317542b0daf72055177ce1bedd23237
7
- data.tar.gz: f9f5f31072b79aca2cc436ef60aa0d6d27f100b68540586a615df9201e150f401fbbc207d89e756488e187b87e85efd4d25831d030f6ecbea4e79b5256a91c89
6
+ metadata.gz: e6e2fc360779c08866d0d13248e73431ae2df31d9afc0914e973cb52b89bc0f472737cbe07bbd3044cc964859c09e9e3a65e9e1345812ef041dfe0cbdb6ed478
7
+ data.tar.gz: 569a29cb2a620bb6b28777887c1e9d7b00ed19d96a8850bf1ea1dc3129dfe60a07967102f3f394dffa9b4f3e08a536c464f315e160a896bc9a95530c95444781
@@ -34,7 +34,5 @@ class TestTrack::LazyVisitorByIdentity
34
34
  id: remote_visitor.id,
35
35
  assignments: remote_visitor.assignments
36
36
  )
37
- rescue *TestTrack::SERVER_ERRORS => e
38
- raise TestTrack::UnrecoverableConnectivityError, e
39
37
  end
40
38
  end
@@ -1,10 +1,12 @@
1
1
  require 'faraday_middleware'
2
+ require 'test_track/server_error_middleware'
2
3
 
3
4
  TestTrack::TestTrackApi = Her::API.new.setup url: ENV['TEST_TRACK_API_URL'] do |c|
4
5
  # request
5
6
  c.request :json
6
7
 
7
8
  # response
9
+ c.use TestTrack::ServerErrorMiddleware
8
10
  c.use Her::Middleware::DefaultParseJSON
9
11
 
10
12
  c.adapter Faraday.default_adapter
@@ -0,0 +1,11 @@
1
+ require 'faraday'
2
+
3
+ module TestTrack
4
+ class ServerErrorMiddleware < Faraday::Response::Middleware
5
+ def call(request_env)
6
+ @app.call request_env
7
+ rescue *SERVER_ERRORS => e
8
+ raise UnrecoverableConnectivityError, e
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module TestTrackRailsClient
2
- VERSION = "4.0.0.alpha11" # rubocop:disable Style/MutableConstant
2
+ VERSION = "4.0.0.alpha12" # rubocop:disable Style/MutableConstant
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_track_rails_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha11
4
+ version: 4.0.0.alpha12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan O'Neill
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-10-23 00:00:00.000000000 Z
16
+ date: 2018-10-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: airbrake
@@ -303,6 +303,7 @@ files:
303
303
  - lib/generators/test_track/migration_generator.rb
304
304
  - lib/tasks/test_track_rails_client_tasks.rake
305
305
  - lib/test_track.rb
306
+ - lib/test_track/server_error_middleware.rb
306
307
  - lib/test_track/unrecoverable_connectivity_error.rb
307
308
  - lib/test_track_rails_client.rb
308
309
  - lib/test_track_rails_client/assignment_helper.rb