injest-client 0.1.4 → 0.1.5

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: 5b3054fcd879d5b947d3babca7db973a464f569b32b6de529f41dcdba731e4e3
4
- data.tar.gz: 72abf9a2575b870373be452eb8f52bfb05d57979badafed40b726843a806489c
3
+ metadata.gz: 993d376f31a687775d97c75154c909570579864c600a4d304ceb23a1bbaf6549
4
+ data.tar.gz: e65f194830ea42e1b43a1c939a421c8a663f3256328741cfb6612a0ae59aadf0
5
5
  SHA512:
6
- metadata.gz: 329b5be30aa1f679e790e1406a46ef3c0337278e5b2e3e5ff6bb428154350e77ee067d4825283e45ed24df226ba4f90935d6e7e2f3630b79ba75563be4c1a54f
7
- data.tar.gz: f01211a252f24a637df6641f693830410864253655d51395b601b850249168190e4550e22bdff976705f1d2738e061aa52b839eedc01add61276ba8e90acbce7
6
+ metadata.gz: 232df2b57f81d5b6c6d931a07fce60226ec45448a1e7b3a2584116994a02af0bfa323a00321886b853b788d0a25dd7466ceb9a1677f3df3fe36a5c67e9e1faa5
7
+ data.tar.gz: 6de732e492c9a68a2568d76b1f018fc3973ae9f0efefc520da0e0f6272b5cb0cb09aaaf32c735fe2b93b5bd30ac33221170755a6c6017847a1737f149d7dd79a
data/lib/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Changelog
4
4
 
5
+ ### 0.1.5
6
+
7
+ - remove consumer
8
+
5
9
  ### 0.1.4
6
10
 
7
11
  - add raw_search to Injest::HttpClient
@@ -2,7 +2,7 @@ class Injest::Middleware
2
2
  HEADERS_BLACKLIST = %w[HTTP_COOKIE].freeze
3
3
 
4
4
  attr_reader :configuration
5
- attr_reader :request_type, :env, :consumer, :subject
5
+ attr_reader :request_type, :env, :subject
6
6
 
7
7
  def initialize(app, processor: nil)
8
8
  @app = app
@@ -10,7 +10,6 @@ class Injest::Middleware
10
10
 
11
11
  @processor = processor
12
12
 
13
- @consumer = nil
14
13
  @subject = nil
15
14
  end
16
15
 
@@ -28,7 +27,6 @@ class Injest::Middleware
28
27
  @request_ended_on = Time.now
29
28
 
30
29
  set_subject
31
- set_consumer
32
30
 
33
31
  data = build_data
34
32
  data = @processor.call(env, data) unless @processor.nil?
@@ -96,7 +94,6 @@ class Injest::Middleware
96
94
  action: data['action'],
97
95
  params: params,
98
96
  version: Gem.loaded_specs["injest-client"].version.to_s,
99
- consumer: consumer
100
97
  }
101
98
  end
102
99
 
@@ -135,14 +132,6 @@ class Injest::Middleware
135
132
  end
136
133
  end
137
134
 
138
- def set_consumer
139
- if !subject.nil?
140
- @consumer = [subject[:type].downcase, subject[:id]].join(':')
141
- elsif env.key?("action_dispatch.request.parameters")
142
- @consumer = env["action_dispatch.request.parameters"].fetch('_consumer', 'unknown')
143
- end
144
- end
145
-
146
135
  def set_request_type
147
136
  # TODO: maybe we should check some header instead
148
137
  if env['PATH_INFO'].match?(/.*\.(?:png|css|jpeg|ico|gif)/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: injest-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Lampis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-23 00:00:00.000000000 Z
11
+ date: 2023-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq