splitclient-rb 3.1.0.pre.rc12 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,15 @@
1
- require 'logger'
2
1
  module SplitIoClient
3
2
  class SplitFactoryBuilder
4
3
  def self.build(api_key, config = {})
5
- @factory ||= SplitFactory.new(api_key, config)
4
+ case api_key
5
+ when 'localhost'
6
+ splits_file = config[:path]? config[:path] : File.join(Dir.home, '.split')
7
+ puts("Filename #{splits_file}")
8
+
9
+ LocalhostSplitFactory.new(splits_file)
10
+ else
11
+ SplitFactory.new(api_key, config)
12
+ end
6
13
  end
7
14
  end
8
15
  end
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '3.1.0-rc12'
2
+ VERSION = '3.1.0'
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.1.0.pre.rc12
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -244,6 +244,7 @@ extra_rdoc_files: []
244
244
  files:
245
245
  - ".gitignore"
246
246
  - CHANGES.txt
247
+ - Detailed-README.md
247
248
  - Gemfile
248
249
  - LICENSE
249
250
  - NEWS
@@ -264,10 +265,13 @@ files:
264
265
  - lib/cache/repositories/repository.rb
265
266
  - lib/cache/repositories/segments_repository.rb
266
267
  - lib/cache/repositories/splits_repository.rb
268
+ - lib/cache/senders/impressions_formatter.rb
269
+ - lib/cache/senders/impressions_sender.rb
267
270
  - lib/cache/stores/sdk_blocker.rb
268
271
  - lib/cache/stores/segment_store.rb
269
272
  - lib/cache/stores/split_store.rb
270
273
  - lib/engine/api/client.rb
274
+ - lib/engine/api/impressions.rb
271
275
  - lib/engine/api/segments.rb
272
276
  - lib/engine/api/splits.rb
273
277
  - lib/engine/evaluator/splitter.rb
@@ -292,7 +296,6 @@ files:
292
296
  - lib/exceptions/sdk_blocker_timeout_expired_exception.rb
293
297
  - lib/splitclient-rb.rb
294
298
  - lib/splitclient-rb/localhost_split_factory.rb
295
- - lib/splitclient-rb/localhost_split_factory_builder.rb
296
299
  - lib/splitclient-rb/split_config.rb
297
300
  - lib/splitclient-rb/split_factory.rb
298
301
  - lib/splitclient-rb/split_factory_builder.rb
@@ -318,9 +321,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
318
321
  version: '0'
319
322
  required_rubygems_version: !ruby/object:Gem::Requirement
320
323
  requirements:
321
- - - ">"
324
+ - - ">="
322
325
  - !ruby/object:Gem::Version
323
- version: 1.3.1
326
+ version: '0'
324
327
  requirements: []
325
328
  rubyforge_project:
326
329
  rubygems_version: 2.5.2
@@ -1,13 +0,0 @@
1
- module SplitIoClient
2
- class LocalhostSplitFactoryBuilder < NoMethodError
3
- def self.build(directory)
4
- splits_file = File.join(directory, ".split")
5
- LocalhostSplitFactory.new(splits_file)
6
- end
7
-
8
- def self.build_from_path(path)
9
- splits_file = File.join(path)
10
- LocalhostSplitFactory.new(splits_file)
11
- end
12
- end
13
- end