splitclient-rb 7.0.1.pre.rc4-java → 7.0.1.pre.rc5-java

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: 2d7fb0aac1322c96814f636b8b14ab290e360387
4
- data.tar.gz: bc03504719ee0679e6574cab51afd87ea595375e
3
+ metadata.gz: b8851d02a7b01b4cd2933cfe1fe7ed85400e4c48
4
+ data.tar.gz: c52ba01e2dff817ed45518a18abbf90fe2084f9d
5
5
  SHA512:
6
- metadata.gz: 20b148bdaf3420f5958d0056e6ffd5c07bdb32afdf7e47161f524b46b5cac4865bc960b752d31b05fbbb2ef05e7a17ca1e754b1b2ef38d49af1840ef91fbc673
7
- data.tar.gz: 41096dd760d13ec1be83418bd6e00ded008cfbf18dda533f182683544d8d2aae92eef3fbf558ebc4fb12e6d043b83ec5327654bc3d6aed2aef88042134dfdd26
6
+ metadata.gz: 9b6e7eed98aa235f9b0171cd0298f6402a8edc1efc404f150cdfb97b40756d19c0f94a3e3c72913e9a085a5de4ed160a31cb9a53c8080655457e7301e325b50c
7
+ data.tar.gz: 6da978ca6ff7f456c293cf3a7a960751cb8e808ca49b96a29f72cde4df5eb79171afe94f61932b2bfab0886fc3ddd0954768adc8ef9051427d62361d430912b0
data/.travis.yml CHANGED
@@ -6,6 +6,15 @@ rvm:
6
6
  services:
7
7
  - redis-server
8
8
 
9
+ addons:
10
+ sonarqube: true
11
+
12
+ git:
13
+ depth: false
14
+
9
15
  before_install:
10
16
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
11
17
  - gem install bundler -v '< 2'
18
+
19
+ after_success:
20
+ - bash sonar-scanner.sh
data/CHANGES.txt CHANGED
@@ -1,4 +1,4 @@
1
- 7.0.1 (Oct 25, 2019)
1
+ 7.0.1 (Oct 31, 2019)
2
2
  - Updated localhost mode so that parsing of test files results in JSON data for splits analogous to that returned by the Split backend.
3
3
  - Resulting localhost data is now used indifferently from actual backend data by the SDK code.
4
4
  - Removed specific spare code dealing with localhost operations.
@@ -30,9 +30,12 @@ module SplitIoClient
30
30
  req.headers = common_headers(api_key)
31
31
  .merge('Content-Type' => 'application/json')
32
32
  .merge(headers)
33
-
34
- req.headers = req.headers.merge('SplitSDKMachineIP' => @config.machine_ip) unless @config.machine_ip.empty?
35
- req.headers = req.headers.merge('SplitSDKMachineName' => @config.machine_name) unless @config.machine_name.empty?
33
+
34
+ machine_ip = @config.machine_ip
35
+ machine_name = @config.machine_name
36
+
37
+ req.headers = req.headers.merge('SplitSDKMachineIP' => machine_ip) unless machine_ip.empty? || machine_ip == 'unknown'
38
+ req.headers = req.headers.merge('SplitSDKMachineName' => machine_name) unless machine_name.empty? || machine_name == 'unknown'
36
39
 
37
40
  req.body = data.to_json
38
41
 
@@ -511,10 +511,10 @@ module SplitIoClient
511
511
  # gets the ip where the sdk gem is running
512
512
  #
513
513
  # @return [string]
514
- def self.machine_ip(ip_addresses_enabled, machine_ip, adapter)
514
+ def self.machine_ip(ip_addresses_enabled, ip, adapter)
515
515
  if ip_addresses_enabled
516
- begin
517
- return machine_ip unless machine_ip.blank?
516
+ begin
517
+ return ip unless ip.nil? || ip.to_s.empty?
518
518
 
519
519
  loopback_ip = Socket.ip_address_list.find { |ip| ip.ipv4_loopback? }
520
520
  private_ip = Socket.ip_address_list.find { |ip| ip.ipv4_private? }
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.0.1.pre.rc4'
2
+ VERSION = '7.0.1.pre.rc5'
3
3
  end
data/sonar-scanner.sh ADDED
@@ -0,0 +1,42 @@
1
+ #/bin/bash -e
2
+
3
+ sonar_scanner() {
4
+ local params=$@
5
+
6
+ sonar-scanner \
7
+ -Dsonar.host.url='https://sonarqube.split-internal.com' \
8
+ -Dsonar.login="$SONAR_TOKEN" \
9
+ -Dsonar.ws.timeout='300' \
10
+ -Dsonar.sources='lib' \
11
+ -Dsonar.projectName='ruby-client' \
12
+ -Dsonar.projectKey='ruby-client' \
13
+ -Dsonar.ruby.coverage.reportPaths='coverage/.resultset.json' \
14
+ -Dsonar.links.ci='https://travis-ci.com/splitio/ruby-client' \
15
+ -Dsonar.links.scm='https://github.com/splitio/ruby-client' \
16
+ ${params}
17
+
18
+ return $?
19
+ }
20
+
21
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
22
+ sonar_scanner \
23
+ -Dsonar.pullrequest.provider='GitHub' \
24
+ -Dsonar.pullrequest.github.repository='splitio/ruby-client' \
25
+ -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST \
26
+ -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
27
+ -Dsonar.pullrequest.base=$TRAVIS_BRANCH
28
+ else
29
+ if [ "$TRAVIS_BRANCH" == 'master' ]; then
30
+ sonar_scanner \
31
+ -Dsonar.branch.name=$TRAVIS_BRANCH
32
+ else
33
+ if [ "$TRAVIS_BRANCH" == 'development' ]; then
34
+ TARGET_BRANCH='master'
35
+ else
36
+ TARGET_BRANCH='development'
37
+ fi
38
+ sonar_scanner \
39
+ -Dsonar.branch.name=$TRAVIS_BRANCH \
40
+ -Dsonar.branch.target=$TARGET_BRANCH
41
+ fi
42
+ fi
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: 7.0.1.pre.rc4
4
+ version: 7.0.1.pre.rc5
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-29 00:00:00.000000000 Z
11
+ date: 2019-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -383,6 +383,7 @@ files:
383
383
  - lib/splitclient-rb/utilitites.rb
384
384
  - lib/splitclient-rb/validators.rb
385
385
  - lib/splitclient-rb/version.rb
386
+ - sonar-scanner.sh
386
387
  - splitclient-rb.gemspec
387
388
  - tasks/benchmark_get_treatment.rake
388
389
  - tasks/irb.rake