twingly-http 0.5.0 → 0.6.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: 504e1df993b190cf3039e5b45b9586f2babaab2fe5e1a881a10dfc407fd21663
4
- data.tar.gz: 6081a1578382fa683f5ae71f52749988b52346dfef87cbcc9295d3ac33453bb8
3
+ metadata.gz: 8fd022cb30b4e6aea665f8e8bc569a7fa7023c78f1a0cc88b18c4f00793b23ac
4
+ data.tar.gz: 498f19467946922913480c55637baea6871d6895ab2a51ed82d7e6cd6fd4b60c
5
5
  SHA512:
6
- metadata.gz: 493b7190c970e227735c7ffa8e7377f243cec8c8e24778662b3f9e9f187f713e16f68404c0c9c6322ad002fd05f75e2088027471747b2d022fb204e5ca719729
7
- data.tar.gz: 68baaace97462c88bbbd84a082848264ee5515fde8505cf3e0e3524912d0b4f3387aa9c3057b577a683dbcd6f39ffec9dbaeae65c2b4bd3a35c8e5892f2684b0
6
+ metadata.gz: 8658da71b5b0a3d327f81cf8f4c29014606ca3336b2ed3848b234498511fde9152953e841ca920818b2a1daae9024912ce5987b518b0be7204bdf61071a8b115
7
+ data.tar.gz: a397277ad9301bae0b25589e0aeea82beaa11e57a8c228a6d3d8bcc276010b181721b184c230d29fbb41a592c74905a411be68d717ee04e5049a8cd4e6534097
@@ -16,7 +16,7 @@ module Faraday
16
16
 
17
17
  if url_bytesize >= @max_size_bytes
18
18
  raise LimitExceededError,
19
- "Expected URL below #{@max_size_bytes} bytes, "\
19
+ "Expected URL below #{@max_size_bytes} bytes, " \
20
20
  "was #{url_bytesize} bytes"
21
21
  end
22
22
 
data/lib/twingly/http.rb CHANGED
@@ -46,9 +46,10 @@ module Twingly
46
46
  attr_accessor :logger
47
47
  attr_accessor :retryable_exceptions
48
48
 
49
- def initialize(base_user_agent:, logger: default_logger)
49
+ def initialize(base_user_agent:, logger: default_logger, user_agent: nil)
50
50
  @base_user_agent = base_user_agent
51
51
  @logger = logger
52
+ @user_agent = user_agent
52
53
 
53
54
  initialize_defaults
54
55
  end
@@ -232,7 +233,7 @@ module Twingly
232
233
  end
233
234
 
234
235
  def user_agent
235
- format(
236
+ @user_agent || format(
236
237
  "%<base>s (Release/%<release>s; Commit/%<commit>s)",
237
238
  base: @base_user_agent,
238
239
  release: Heroku.release_version,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Twingly
4
4
  module HTTP
5
- VERSION = "0.5.0"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twingly-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twingly AB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-24 00:00:00.000000000 Z
11
+ date: 2024-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -44,118 +44,6 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.0.0
47
- - !ruby/object:Gem::Dependency
48
- name: climate_control
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '0.1'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '0.1'
61
- - !ruby/object:Gem::Dependency
62
- name: rake
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '12'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '12'
75
- - !ruby/object:Gem::Dependency
76
- name: rspec
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '3'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: '3'
89
- - !ruby/object:Gem::Dependency
90
- name: rubocop
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: 1.14.0
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: 1.14.0
103
- - !ruby/object:Gem::Dependency
104
- name: rubocop-rspec
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: 2.4.0
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: 2.4.0
117
- - !ruby/object:Gem::Dependency
118
- name: toxiproxy
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '1.0'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '1.0'
131
- - !ruby/object:Gem::Dependency
132
- name: vcr
133
- requirement: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '5.0'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '5.0'
145
- - !ruby/object:Gem::Dependency
146
- name: webmock
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '3.7'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '3.7'
159
47
  description: Robust HTTP client tailored by Twingly
160
48
  email:
161
49
  - support@twingly.com
@@ -177,7 +65,8 @@ files:
177
65
  homepage: http://github.com/twingly/twingly-http
178
66
  licenses:
179
67
  - MIT
180
- metadata: {}
68
+ metadata:
69
+ rubygems_mfa_required: 'true'
181
70
  post_install_message:
182
71
  rdoc_options: []
183
72
  require_paths:
@@ -193,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
82
  - !ruby/object:Gem::Version
194
83
  version: '0'
195
84
  requirements: []
196
- rubygems_version: 3.3.7
85
+ rubygems_version: 3.4.10
197
86
  signing_key:
198
87
  specification_version: 4
199
88
  summary: Robust HTTP client