blurb 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/blurb.gemspec +1 -1
- data/lib/blurb/request.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4618b7c8855b5f057941a3c3ef45907a6313cb9e8c12b975409fd4ff9b09cb14
|
4
|
+
data.tar.gz: 9a77aecf9a59176cb552136384c3c40c8fe5566cacc605b389b40bf2136ba81f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c587760d7fceecb127dcf78d38e7a79a995cae27e54de8eec5d94df4a580b65dbb1fbfe1b76b4004ba31e8e9757e7bf14086caddb6b373423bddb3414b933a03
|
7
|
+
data.tar.gz: 23450706c810ca6a79493c7da1e8d08ba8b503475c6af81cb15cf48154505add0cb88327cf0d596e62f4b3f0e7d7c2c7a0aadc43dea86981183e6c1d8cacc395
|
data/blurb.gemspec
CHANGED
data/lib/blurb/request.rb
CHANGED
@@ -28,13 +28,17 @@ class Blurb
|
|
28
28
|
when :post, :put
|
29
29
|
request_config[:payload] = @payload if @payload
|
30
30
|
end
|
31
|
-
|
31
|
+
log("request type", @request_type)
|
32
|
+
log("request url", @url)
|
33
|
+
log("headers", @headers)
|
34
|
+
log("payload", @payload) if @payload
|
32
35
|
return request_config
|
33
36
|
end
|
34
37
|
|
35
38
|
def make_request
|
36
39
|
begin
|
37
40
|
resp = RestClient::Request.execute(request_config())
|
41
|
+
log("response", resp)
|
38
42
|
rescue RestClient::TooManyRequests => err
|
39
43
|
raise RequestThrottled.new(JSON.parse(err.response.body))
|
40
44
|
rescue RestClient::TemporaryRedirect => err
|
@@ -102,5 +106,14 @@ class Blurb
|
|
102
106
|
k.to_s.underscore.to_sym
|
103
107
|
end
|
104
108
|
|
109
|
+
def log(header, message)
|
110
|
+
if ENV["BLURB_LOGGING"]
|
111
|
+
puts "\n"
|
112
|
+
puts header.upcase
|
113
|
+
puts message
|
114
|
+
puts "\n"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
105
118
|
end
|
106
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blurb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dlbunker
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|