brutalismbot 1.6.1 → 1.6.2

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: c8083bff6e181d2ce309970c131600644d99fa239887aeb9fd1cba8dbc296171
4
- data.tar.gz: 837c725df3d2fc0b6565eb1d386d581350c0881ef911e9c026178c2f5ae072b5
3
+ metadata.gz: c823de7d2cb19bf4f6d8742111bf4a995b565a40fde6eb89ab66e0fa49f32dcf
4
+ data.tar.gz: 2f7053d644bf1c64e9221aec56d6b4bc28ab3ea393972d97fd7e70304b39ed64
5
5
  SHA512:
6
- metadata.gz: 886e816a00e86b60f31109dc8130388546f71acf2dc549815cc143040a7c828a159f38e5105ff62670115602cf1defda4cfc26ddfffd728afa3328b558792892
7
- data.tar.gz: 5809c0a14b366fdf389da65d74579993ca6cf9ecace98c4cfff80562d643c26701a047ae709f2903d73477553850ba3bfb70ef2ef751ed62a3bb2e80f31f81b3
6
+ metadata.gz: 967b8a00fedb99a4bc186f14c2c5122366ccd3c5ba012e6e5851a2868d88f0fa5ac944c00e05b174e9a2bf99dcbf51594790c24240cb4468a4999ae7f2f77f47
7
+ data.tar.gz: aee379c78663682c29bdccfe56215e9694d997807e3629768b31c208954cba643c681579dfd48ac1788daa6987feef41ecd06a238b5d939c772c65dfb646e4bd
@@ -7,11 +7,6 @@ require "brutalismbot/base"
7
7
  module Brutalismbot
8
8
  module Reddit
9
9
  class Post < Base
10
- def initialize(**item)
11
- @mime_type = item.delete(:mime_type)
12
- super
13
- end
14
-
15
10
  def created_after?(time = nil)
16
11
  time.nil? || created_utc.to_i > time.to_i
17
12
  end
@@ -83,6 +78,10 @@ module Brutalismbot
83
78
  end
84
79
  end
85
80
 
81
+ def mime_type=(value)
82
+ @mime_type = value
83
+ end
84
+
86
85
  def path
87
86
  created_utc.strftime("year=%Y/month=%Y-%m/day=%Y-%m-%d/%s.json")
88
87
  end
@@ -4,13 +4,12 @@ module Brutalismbot
4
4
  module Reddit
5
5
  class Post
6
6
  class << self
7
- def stub(created_utc:nil, post_id:nil, permalink_id:nil, image_id:nil, mime_type:nil)
7
+ def stub(created_utc:nil, post_id:nil, permalink_id:nil, image_id:nil)
8
8
  created_utc ||= Time.now.utc - rand(86400) - 86400
9
9
  post_id ||= SecureRandom.alphanumeric(6).downcase
10
10
  permalink_id ||= SecureRandom.alphanumeric.downcase
11
11
  image_id ||= SecureRandom.alphanumeric
12
12
  new(
13
- mime_type: mime_type,
14
13
  kind: "t3",
15
14
  data: {
16
15
  id: post_id,
@@ -1,3 +1,3 @@
1
1
  module Brutalismbot
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
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.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Mancevice