brutalismbot 1.6.2 → 1.6.3

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: c823de7d2cb19bf4f6d8742111bf4a995b565a40fde6eb89ab66e0fa49f32dcf
4
- data.tar.gz: 2f7053d644bf1c64e9221aec56d6b4bc28ab3ea393972d97fd7e70304b39ed64
3
+ metadata.gz: a2fa68368063de401a6ad151c6278f8ba34ac4b9ff49937a8187189fca0ed757
4
+ data.tar.gz: 8ebe559e9a5ac298af9c3bbc042ca4b1401e424dc5fc5b920d235cd586454c88
5
5
  SHA512:
6
- metadata.gz: 967b8a00fedb99a4bc186f14c2c5122366ccd3c5ba012e6e5851a2868d88f0fa5ac944c00e05b174e9a2bf99dcbf51594790c24240cb4468a4999ae7f2f77f47
7
- data.tar.gz: aee379c78663682c29bdccfe56215e9694d997807e3629768b31c208954cba643c681579dfd48ac1788daa6987feef41ecd06a238b5d939c772c65dfb646e4bd
6
+ metadata.gz: 55ea34aac3e62191232d820044babe950382295042a517df2d3fa1c94e52bf74117d3184d0764e6e0f9a45c82f6c09686c9b6badde4ac97daecc378ab9fee9d2
7
+ data.tar.gz: aa88d4656f2693a70ab893aa803adba8dea688325d40df406b56928138650a05531696c546d9bd3119241cd68fb88153aaea09147bc89c6f6c29b6b298578fe8
@@ -5,7 +5,7 @@ module Brutalismbot
5
5
  module Parser
6
6
  def parse(source, opts = {})
7
7
  item = JSON.parse(source, opts)
8
- new(**item)
8
+ new(**item.transform_keys(&:to_sym))
9
9
  end
10
10
  end
11
11
 
@@ -24,7 +24,8 @@ module Brutalismbot
24
24
  response = JSON.parse(http.request(request).body)
25
25
  children = response.dig("data", "children") || []
26
26
  children.each do |child|
27
- post = Post.new(**child)
27
+ item = child.transform_keys(&:to_sym)
28
+ post = Post.new(**item)
28
29
  Brutalismbot.logger.warn("NO PHOTO URL for #{post.permalink}") if post.url.nil?
29
30
  yield post
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module Brutalismbot
2
- VERSION = "1.6.2"
2
+ VERSION = "1.6.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brutalismbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Mancevice