blurb 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/blurb.gemspec +1 -1
  3. data/lib/blurb/request.rb +14 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8c1e6e5df9e2b5f7878db65270a0b8b973c9e6d65697bad8a0f9f411daa9ada
4
- data.tar.gz: e43f0cf156463c8686dde6ab72180f1b375e060686e6b637bb37841de17c8564
3
+ metadata.gz: 4618b7c8855b5f057941a3c3ef45907a6313cb9e8c12b975409fd4ff9b09cb14
4
+ data.tar.gz: 9a77aecf9a59176cb552136384c3c40c8fe5566cacc605b389b40bf2136ba81f
5
5
  SHA512:
6
- metadata.gz: e4ed702e079d45d45adeb3d39cca5d082dca710b364b3671c81714ab61af4f55869dab4ead9a67bbc1a2aaa78b2ba34efdc307a6c7d0a9325bdaad574fc1414b
7
- data.tar.gz: 7954d319885066c0a21ae990e4ff3af68596783683609d4016fbb15018b54549d6cd95d0d6bac1aa9300a33df590aa50c19856cc7d87d27ed3ccb67aa58f2676
6
+ metadata.gz: c587760d7fceecb127dcf78d38e7a79a995cae27e54de8eec5d94df4a580b65dbb1fbfe1b76b4004ba31e8e9757e7bf14086caddb6b373423bddb3414b933a03
7
+ data.tar.gz: 23450706c810ca6a79493c7da1e8d08ba8b503475c6af81cb15cf48154505add0cb88327cf0d596e62f4b3f0e7d7c2c7a0aadc43dea86981183e6c1d8cacc395
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "blurb"
7
- spec.version = "0.5.5"
7
+ spec.version = "0.5.6"
8
8
  spec.authors = ["dlbunker", "eamigo13", "smithworx"]
9
9
  spec.email = ["evan@pattern.com"]
10
10
 
@@ -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.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: 2020-10-24 00:00:00.000000000 Z
13
+ date: 2021-01-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler