splitclient-rb 3.2.4.pre.rc1 → 3.2.4.pre.rc2

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: 9f0c2bd79b5a4b89a67fbf60f5df88573ea52e82
4
- data.tar.gz: 5a5921c802fe03065300445e4e1c6c57ff554c03
3
+ metadata.gz: 4f11642bc9c67b056c263522562fc62fcbbe4afb
4
+ data.tar.gz: 42b81c78e59f1003b0ebf9d5bee841369b5a97f5
5
5
  SHA512:
6
- metadata.gz: 8e9e5f105dc9435aaefc6784fb4d1fe561af0b9fa143f294d573da0255bfb4e76e6fb49d25549bb6fc0457ee92811ec3f2e4e5038f70aee75501cccf7cfbfc68
7
- data.tar.gz: 207a06c7c9cc25f78625f43d48be2533c28f1c0c5c49090a3f1b0084c8a4179dc038ff7e7656577f004076208b8eef21f9dac9b2b60f75ddfed6d6537b564131
6
+ metadata.gz: b6264ad8c6f755169f01e763baa81451ebece87a0610460561ef18026d29ddafe768f1166577f16d8c5def5cf7ca3db6a93d2cabda5b053bfc76964260b351a7
7
+ data.tar.gz: 717d297e6483ab4c59e512787b7ad5f959c36ad66b7574114072918825b91bc43d87a9ae6126421181e343940923599552d08ca63f9e085679f5fea3b89338e9
data/CHANGES.txt CHANGED
@@ -1,5 +1,7 @@
1
+
1
2
  3.2.4
2
3
  - Fix Faraday compability issue (now compatible with Faraday 0.8.9)
4
+ - Provide an interface to run SplitAdapter(start and resume), can be used to resurrect threads in Unicorn and Passenger servers
3
5
 
4
6
  3.2.3
5
7
  - Fix Redis namespace issue to align with the spec
data/Detailed-README.md CHANGED
@@ -372,6 +372,38 @@ Note: options passed through cli have higher priority than those specified in th
372
372
  ```
373
373
  bundle exec bin/splitio -h
374
374
  ```
375
+ ## Server support
376
+
377
+ Currently SDK supports:
378
+ - Thin
379
+ - Puma
380
+ - Passenger
381
+ - Unicorn
382
+
383
+ Other servers should work fine as well, but haven't been tested.
384
+
385
+ ### Unicorn
386
+
387
+ If you're using Unicorn in the `memory` mode you'll need to include this line in your unicorn config (probably `config/unicorn.rb`):
388
+
389
+ ```ruby
390
+ after_fork do |server, worker|
391
+ Rails.configuration.split_factory.resume! if worker.nr > 0
392
+ end
393
+ ```
394
+
395
+ Also, you will need to have the following line in your `config/initializers/splitclient.rb`:
396
+
397
+ ```ruby
398
+ Rails.configuration.split_factory = factory
399
+ ```
400
+
401
+ ## Framework support
402
+
403
+ Currently SDK supports:
404
+ - Rails
405
+
406
+ SDK should work with other frameworks too, but for now it has been tested only with Rails
375
407
 
376
408
  ## Development
377
409
 
@@ -17,12 +17,18 @@ module SplitIoClient
17
17
  @metrics_repository = MetricsRepository.new(@config.metrics_adapter, @config)
18
18
 
19
19
  @sdk_blocker = SDKBlocker.new(@config, @splits_repository, @segments_repository)
20
- @adapter = SplitAdapter.new(@api_key, @config, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository, @sdk_blocker)
20
+ @adapter = start!
21
21
 
22
22
  @client = SplitClient.new(@api_key, @config, @adapter, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository)
23
23
  @manager = SplitManager.new(@api_key, @config, @adapter, @splits_repository)
24
24
 
25
25
  @sdk_blocker.block if @config.block_until_ready > 0
26
26
  end
27
+
28
+ def start!
29
+ SplitAdapter.new(@api_key, @config, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository, @sdk_blocker)
30
+ end
31
+
32
+ alias resume! start!
27
33
  end
28
34
  end
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '3.2.4-rc1'
2
+ VERSION = '3.2.4-rc2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splitclient-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.4.pre.rc1
4
+ version: 3.2.4.pre.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-28 00:00:00.000000000 Z
11
+ date: 2017-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler