pincers 0.7.9 → 0.7.10

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: 7800842ba137af69fd78dd8480ed2a179e15230c
4
- data.tar.gz: bbc37cecae8ce359fb2c3624a2c740323c108328
3
+ metadata.gz: 3614304cfaeb3648c40ddc68f10a83d655a5579b
4
+ data.tar.gz: 912879b117cb00d1198c1a809398809930acbb61
5
5
  SHA512:
6
- metadata.gz: 9de52857c3280978860ab39012a2d4b5f2dae5a106451f5c1f36de7cfeb1870fffad7b95e2e3d0b52c9b5fa983e09e06f1d9a0641365301cc2047f9dd429e089
7
- data.tar.gz: f3ff2d63ede9741e105fe1aefbd63e20a01108a3dcd31034e2916d5bbc08517e6b65a9e8351d2d07ed546cda6316a6be7a366dbb5263b07c3146beb4152a712a
6
+ metadata.gz: 808bd93e415cca14da9fb0613cb333316f4951d056393479909d6b408e8e170bf241e34dc0ffc8b620a58082f392a2532b8aa51589bfe62966112ce93d8d39ed
7
+ data.tar.gz: f27dd729231d1411e7827f01d7ac14ea520b92282bd256d19344f98be76586e4df6920bdf71f8b955f80d0eba442c4c9e3a51b2eaf875112d3949b9c5e3de156
@@ -6,22 +6,21 @@ module Pincers::Chenso
6
6
  class Factory < Pincers::Core::BaseFactory
7
7
 
8
8
  def load_backend(_options)
9
- _options[:headers] = default_headers.merge! _options.fetch(:headers, {})
9
+ _options[:headers] = default_headers(_options).merge! _options.fetch(:headers, {})
10
10
  client = Pincers::Http::Client.build_from_options _options
11
11
  Pincers::Chenso::Backend.new client
12
12
  end
13
13
 
14
14
  private
15
15
 
16
- def default_headers
16
+ def default_headers(_options)
17
17
  {
18
- 'User-Agent' => user_agent
18
+ 'User-Agent' => _options.fetch(:user_agent, default_user_agent)
19
19
  }
20
20
  end
21
21
 
22
- def user_agent
22
+ def default_user_agent
23
23
  "Pincers/#{Pincers::VERSION}"
24
24
  end
25
-
26
25
  end
27
26
  end
@@ -1,3 +1,3 @@
1
1
  module Pincers
2
- VERSION = "0.7.9"
2
+ VERSION = "0.7.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pincers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas