repltalk 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87b86adfe3aef99370ce5a11bfe9648b52bb987c3f9fd35b929ac811720e48c4
4
- data.tar.gz: acf36ed1601688e319397fed44c32287a00a869daac2258b58f17d92d165abbf
3
+ metadata.gz: b84d171f11260c6228c57a98ecafa820de55beee7e3b2b6a6a073c8d1f098e2d
4
+ data.tar.gz: 5308bbf0fe4421b85445e3d30166073508fe6a51298e862844d33bc876323c03
5
5
  SHA512:
6
- metadata.gz: b2ed218280a34de49368f3761a56a37506dafa50c83f0942e6a1b5ea2907b73d367f5a67e1f1d6034c4869b3fd0bcab5e5a5dd78ea1d90e43a1adae4ca902099
7
- data.tar.gz: 6d62a0d0989c0456235f61b6cf7ed2f5abe0bb23036de7526e325b82eaf8f99cc337fe45523e1cb9a5dcc78a6ed9804f63e6eaa4fe56d84c9b68930e8ff05d57
6
+ metadata.gz: e6233c13df87432bd1465da62193bc46d1b3ba7305ada0974693d88548ccd681af160f3ea82ea1384264434f185ca2364f2bf3de186dbcf9b44dd29d39c5324e
7
+ data.tar.gz: cc1d0293a530e7baaae7a3c1bbbe89296b2193fdad2c4097889dd25b96b641e218428db86672de0552cd17acb02420832d40285d0076080b45fbe97c3e4ffef3
@@ -136,6 +136,9 @@ module ReplTalk
136
136
  repl {
137
137
  #{REPL}
138
138
  }
139
+ replComment {
140
+ #{REPL_COMMENT}
141
+ }
139
142
  board {
140
143
  #{BOARD}
141
144
  }
@@ -380,15 +380,21 @@ module ReplTalk
380
380
  class Post
381
381
  attr_reader :id, :url, :repl, :board, :title, :author, :answer, :content, :preview, :timestamp, :vote_count, :comment_count, :can_vote, :has_voted, :is_answered, :is_answerable, :is_hidden, :is_pinned, :is_locked, :is_announcement
382
382
 
383
- def initialize(client, post)
383
+ def initialize(client, post)
384
384
  @client = client
385
385
 
386
386
  @id = post["id"]
387
387
  @url = $BASE_URL + post["url"]
388
388
  @title = post["title"]
389
+ @timestamp = post["timeCreated"]
390
+
389
391
  @content = post["body"]
390
392
  @preview = post["preview"]
391
- @timestamp = post["timeCreated"]
393
+
394
+ if @content == ""
395
+ @content = post["replComment"]["body"]
396
+ @preview = @content.length > 150 ? @content[0..150] : @content
397
+ end
392
398
 
393
399
  @board = Board.new(post["board"])
394
400
  @repl = post["repl"] == nil ? nil : Repl.new(@client, post["repl"])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repltalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodingCactus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-22 00:00:00.000000000 Z
11
+ date: 2022-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http