nonnative 1.90.1 → 1.91.0

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
  SHA256:
3
- metadata.gz: 1895350170f9982d1d4ddb938f7c4aa615e7cda46149bbdbe4be6e6a5eb7411b
4
- data.tar.gz: ff3b759c80d8977c660ad21244b62f8e7c430154adf3c4bf8c48467abb769bf9
3
+ metadata.gz: 3ec4503f26000c63b14e787c9cf334208ba43f9ae8c0b5645b9f849b0a57c4df
4
+ data.tar.gz: aa00e66c6a0092b86e69fbd4a269a0b5f0c02a9911d927cfcae3b03c90d4c6e7
5
5
  SHA512:
6
- metadata.gz: 67a88409b5cc657cb9fc00b088a9f8d8bc7f19d1e643e088308eaaf306c2acf555eb24e4f5ee874d6a3f075df32f86f75ccf85db5f41742ad2d5d0017aecb50e
7
- data.tar.gz: fa4b976d140d5c87ec81a582c66b748d6f7c101547d24ef128867bfa87671bb5e1b04eefc78bef95892c9b3543647713492f96a771bde7575e2afed9f3f7d26c
6
+ metadata.gz: 4ae8e395a327024d2babf9c1d352681421111f45e4c4ea53fff2776cac668437abb06bbdfe70d891e7b9b6d05ad27f768e7a57e2d3e1f04917a4026e2cf76ee3
7
+ data.tar.gz: 95c829ca6acf83b5934ac28c18013344f6f539c169fe045475140ade4ea870af95cf6643fb39b973dab1b3ea5bc48507a028f6484c0ccc0ebe9553a0009b38ab
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## [v1.91.0](https://github.com/alexfalkowski/nonnative/releases/tag/v1.91.0) - 2025-01-28
10
+
11
+ - [`f927b97`](https://github.com/alexfalkowski/nonnative/commit/f927b97e2b978ff08a937450c225aadbc1588230) feat(proxy): move to nonnative.rb (#500)
12
+ - [`c9edfdf`](https://github.com/alexfalkowski/nonnative/commit/c9edfdf50903b57691e9e8e1c4e004277fb15b5c) test(features): formatted (#499)
13
+
9
14
  ## [v1.90.1](https://github.com/alexfalkowski/nonnative/releases/tag/v1.90.1) - 2025-01-28
10
15
 
11
16
  - [`1125797`](https://github.com/alexfalkowski/nonnative/commit/11257970a3024bde56322891199a28a9214e3f6e) fix(proxy): handle errors for HTTPProxyApplication (#498)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nonnative (1.90.1)
4
+ nonnative (1.91.0)
5
5
  concurrent-ruby (>= 1, < 2)
6
6
  config (>= 5, < 6)
7
7
  cucumber (>= 7, < 10)
@@ -4,12 +4,7 @@ module Nonnative
4
4
  class ProxyFactory
5
5
  class << self
6
6
  def create(service)
7
- proxy = case service.proxy.kind
8
- when 'fault_injection'
9
- FaultInjectionProxy
10
- else
11
- NoProxy
12
- end
7
+ proxy = Nonnative.proxy(service.proxy.kind)
13
8
 
14
9
  proxy.new(service)
15
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nonnative
4
- VERSION = '1.90.1'
4
+ VERSION = '1.91.0'
5
5
  end
data/lib/nonnative.rb CHANGED
@@ -64,6 +64,14 @@ module Nonnative
64
64
  Config.load_files(files)
65
65
  end
66
66
 
67
+ def configuration
68
+ @configuration ||= Nonnative::Configuration.new
69
+ end
70
+
71
+ def configure
72
+ yield configuration
73
+ end
74
+
67
75
  def log_lines(path, predicate)
68
76
  File.readlines(path).select { |l| predicate.call(l) }
69
77
  end
@@ -76,12 +84,12 @@ module Nonnative
76
84
  @observability ||= Nonnative::Observability.new(configuration.url)
77
85
  end
78
86
 
79
- def configuration
80
- @configuration ||= Nonnative::Configuration.new
87
+ def proxies
88
+ @proxies ||= { 'fault_injection' => Nonnative::FaultInjectionProxy }.freeze
81
89
  end
82
90
 
83
- def configure
84
- yield configuration
91
+ def proxy(kind)
92
+ Nonnative.proxies[kind] || Nonnative::NoProxy
85
93
  end
86
94
 
87
95
  def start
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nonnative
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.90.1
4
+ version: 1.91.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Falkowski