kumonos 0.20.2 → 0.21.0

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
  SHA256:
3
- metadata.gz: f71388cab3cb106a83b65c4dba9232f0b041163f8aaff470f593d5e99e3f6816
4
- data.tar.gz: 75a37ce3ff04d489c308f086b973389e7d2b89e764ddae7e993726e8f6497b6a
3
+ metadata.gz: 163e9dfcdba83165a65628e04ecad8e020f493b0deb6d26b14dc6c85d1e2a6e4
4
+ data.tar.gz: 64b49206fe0a1dd889c2da1cc04765bd2876cf0290ba30085b684e71273ae607
5
5
  SHA512:
6
- metadata.gz: dad8b04de463dab68397a1e5da12675f251206eedcf1616687db19b69bb02445a5e088b792d49dfba17e12e9b8e9ecca71f03bd836f36c086d15f8d555df3953
7
- data.tar.gz: e3816c85349f8bba9418b5a5541bd7219d1241c6c3e6c20dae0e89bb56db99b57767b99942cdf61be436640a866160d9b7d9d6f6c7a59945e0fa57c289e296a3
6
+ metadata.gz: 3837861679919253bfab280b0684c1b622a6c1d3defa0b3a8b322bc0e4e6019664f8516fd36dba903155493e26a964c41a33c939758411783f2298340cf24257
7
+ data.tar.gz: 3851392c16f44a9890001b7d309d6806c9ef504a6dee210cddea737ec79b875d41a78a9db263101faf659ccb30c1e9bec9b3d9504c429e24ab64c84ab912b6d9
data/.rubocop.yml CHANGED
@@ -4,6 +4,7 @@ AllCops:
4
4
  Exclude:
5
5
  - 'test/grpc/lib/health_pb.rb'
6
6
  - 'test/grpc/lib/health_services_pb.rb'
7
+ TargetRubyVersion: 2.3
7
8
 
8
9
  Metrics/BlockLength:
9
10
  Enabled: false
data/.travis.yml CHANGED
@@ -2,6 +2,8 @@ language: ruby
2
2
  sudo: false
3
3
  rvm:
4
4
  - 2.5
5
+ - 2.4
6
+ - 2.3
5
7
  before_install:
6
8
  - gem update --system # https://github.com/rubygems/rubygems/pull/1819
7
9
  - gem install bundler
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
  require 'rspec/core/rake_task'
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'kumonos'
data/bump CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  level = ARGV.first
3
5
  if level.nil?
4
6
  warn "Example: #{__FILE__} (tiny|minor|major)"
@@ -6,7 +8,7 @@ if level.nil?
6
8
  end
7
9
 
8
10
  path = 'lib/kumonos/version.rb'
9
- regexp = /VERSION = '(.+)'.freeze$/
11
+ regexp = /VERSION = '(.+)'$/
10
12
  version = File.read(path).scan(regexp)[0][0]
11
13
  version_strs = version.split('.')
12
14
 
@@ -31,6 +33,6 @@ else
31
33
  end
32
34
 
33
35
  next_version = version_strs.join('.')
34
- File.write(path, File.read(path).gsub(regexp, "VERSION = '#{next_version}'.freeze"))
36
+ File.write(path, File.read(path).gsub(regexp, "VERSION = '#{next_version}'"))
35
37
  system('git', 'add', path)
36
38
  system('git', 'commit', '-m', "v#{next_version}")
data/kumonos.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'kumonos/version'
data/lib/kumonos.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'yaml'
3
5
 
@@ -10,5 +12,5 @@ require 'kumonos/output'
10
12
 
11
13
  # Kumonos
12
14
  module Kumonos
13
- DEFAULT_ROUTE_NAME = 'default'.freeze
15
+ DEFAULT_ROUTE_NAME = 'default'
14
16
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kumonos
2
4
  # Generate clusters configuration.
3
5
  module Clusters
@@ -71,21 +73,20 @@ module Kumonos
71
73
 
72
74
  OutlierDetection = Struct.new(:consecutive_5xx, :consecutive_gateway_failure, :interval_ms, :base_ejection_time_ms, :max_ejection_percent,
73
75
  :enforcing_consecutive_5xx, :enforcing_consecutive_gateway_failure, :enforcing_success_rate,
74
- :success_rate_minimum_hosts, :success_rate_request_volume, :success_rate_stdev_factor,
75
- keyword_init: true) do
76
+ :success_rate_minimum_hosts, :success_rate_request_volume, :success_rate_stdev_factor) do
76
77
  class << self
77
78
  def build(h)
78
79
  return nil unless h
79
80
 
80
- args = {}
81
+ args = []
81
82
  %w[consecutive_5xx consecutive_gateway_failure interval_ms base_ejection_time_ms max_ejection_percent
82
83
  enforcing_consecutive_5xx enforcing_consecutive_gateway_failure enforcing_success_rate
83
84
  success_rate_minimum_hosts success_rate_request_volume success_rate_stdev_factor].each do |e|
84
- args[e.to_sym] = h.delete(e)
85
+ args << h.delete(e)
85
86
  end
86
87
  raise "Fields are not allowed: #{h.keys}" unless h.keys.empty?
87
88
 
88
- new(**args)
89
+ new(*args)
89
90
  end
90
91
  end
91
92
 
data/lib/kumonos/envoy.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kumonos
2
4
  # Generate envoy configuration.
3
5
  module Envoy
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  module Kumonos
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kumonos
2
4
  # Generate routes configuration
3
5
  module Routes
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
  require 'json-schema'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kumonos
2
- VERSION = '0.20.2'.freeze
4
+ VERSION = '0.21.0'
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumonos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.2
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taiki Ono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-28 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema