barbeque_client 0.10.0 → 0.10.1

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: d48cc489c84d703adcc61ce78a13d4bc965ca7cffe29ae75596f8e25147671f6
4
- data.tar.gz: 6e3d9e47c80f061eb14fde4c135a490da9e859b593a0016293f69aa97d0c6e91
3
+ metadata.gz: edb7a1b11268527d340938a095aa426076e89248e6712867ea325f3b1681aceb
4
+ data.tar.gz: 575564a8108a77b6b1b0a8c5e4ac7fd674ade37c5f9e941005ac11c8b4527e01
5
5
  SHA512:
6
- metadata.gz: 46d4e41a1148c6baa7348b2aa5c897d4ca3d91c0c8b45ce2efd5850f5946907feb705db8aed9a33c2d6ab5a4222af3eb9ab015eac45cd21cb07f95dfcbff7a32
7
- data.tar.gz: 1508a6d730ed77f8c4825a97b6f3619e824d410b911ad693033e83849a8d96aec90c6e9e0adbc9c381821c0e1c31e5a57a478f6ef9ebbf67383a93bebb9d853d
6
+ metadata.gz: 55bd4bffce22e517d19a8ec3b21dd0f111914747850c978285d96a2ec4c6714c57b8e15ce94146fce9bd36296b785b8fe743ed28e4f670ef6ca5e1fd21c69c52
7
+ data.tar.gz: f092c10be65a237383693746ac04621f6973e4bb67b508e6e8effa0811cf5bae5075a6ec0392b165c00f95a3c6be67cd5f84bb4be530f0e1dde8fcf45bc2c8b1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## v0.10.1 (2018-11-09)
2
+ - Add support for custom HTTP headers
3
+
1
4
  ## v0.10.0 (2018-08-24)
2
5
  - Add documentation for ActiveJob adapter
3
6
  - Drop support for Ruby 2.1
data/README.md CHANGED
@@ -17,6 +17,7 @@ BarbequeClient.configure do |config|
17
17
  config.application = 'cookpad'
18
18
  config.default_queue = 'default'
19
19
  config.endpoint = 'https://barbeque.example.com'
20
+ config.headers = { 'Host' => 'barbeque' } # optional
20
21
  end
21
22
  ```
22
23
 
@@ -48,6 +48,7 @@ module BarbequeClient
48
48
  default_queue: config.default_queue,
49
49
  endpoint: config.endpoint,
50
50
  tracing: config.tracing,
51
+ headers: config.headers,
51
52
  )
52
53
  end
53
54
  end
@@ -3,11 +3,12 @@ require 'json'
3
3
 
4
4
  module BarbequeClient
5
5
  class Client
6
- def initialize(application:, default_queue:, endpoint:, tracing: {})
6
+ def initialize(application:, default_queue:, endpoint:, tracing: {}, headers: nil)
7
7
  @application = application
8
8
  @default_queue = default_queue
9
9
  @endpoint = endpoint
10
10
  @tracing = tracing || {}
11
+ @headers = headers
11
12
  end
12
13
 
13
14
  # @param [String] job - Job name to enqueue.
@@ -59,6 +60,9 @@ module BarbequeClient
59
60
  def garage_client_option
60
61
  option = { endpoint: @endpoint, path_prefix: '/' }
61
62
  option[:tracing] = @tracing if @tracing[:tracer]
63
+ if @headers
64
+ option[:headers] = @headers
65
+ end
62
66
  option
63
67
  end
64
68
  end
@@ -9,6 +9,7 @@ module BarbequeClient
9
9
  default_queue
10
10
  endpoint
11
11
  tracing
12
+ headers
12
13
  ]
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module BarbequeClient
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barbeque_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: garage_client