redd 0.8.7 → 0.8.8

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
  SHA1:
3
- metadata.gz: d4fbf6feb86c64f8456437def7264e516773734c
4
- data.tar.gz: cd942825bb17e6d1d4c2f2d28085b988e431b19e
3
+ metadata.gz: 1d009c1ad3efb5faf6e46155a0c8dbd643762c2d
4
+ data.tar.gz: 0f3d80e834eb5294de32c59838a1f896ff0ab354
5
5
  SHA512:
6
- metadata.gz: 80156b77d8cda4722f400638911efb77f181d88d936e0ff1bb4dc759fb3ab1523364b8d2be243cb3ea62405178d0136be244755efdaa1150ee0f7629cc05fb98
7
- data.tar.gz: 5d40f20d64969486c457457c15d2110e87c4e4adc58da2c05215d55b9a4a73c5901ed23443f9b544b1a684febdd5ce7bffc3a28ba5d7fb51ae0cbadbe02e4e45
6
+ metadata.gz: b7d188f6d4cedb9f286bea9f9b9d1a38f5cd5f5c2151f2600737abf5f8c5e49634e59f14965f96312cafcda8ae697f130cb4f942183085360bda23bc2597636f
7
+ data.tar.gz: 0e764013df9c65079f807200721649474f4eb2e51d87c2aee62180f0d285c22d9b5d69e5345b1cead59a2fe979aeaf6befb0a2d8e082253dfcb509c5877b6099
@@ -16,11 +16,14 @@ module Redd
16
16
  end
17
17
 
18
18
  # Distinguish a link or comment with a sigil to show that it has been created by a moderator.
19
- # @param how [:yes, :no, :admin, :special] how to distinguish the thing
20
- # @param sticky [Boolean] (for comments) whether to sticky the comment to the top
21
- def distinguish(how = :yes, sticky: nil)
19
+ # @param how [:yes, :no, :admin, :special, :sticky] how to distinguish the thing
20
+ # @note :sticky is for comments. see {Submission#make_sticky} for posts.
21
+ def distinguish(how = :yes)
22
22
  params = { id: get_attribute(:name), how: how }
23
- params[:sticky] = sticky unless sticky.nil?
23
+ if how == :sticky
24
+ params[:how] = :yes
25
+ params[:sticky] = true
26
+ end
24
27
  @client.post('/api/distinguish', params)
25
28
  end
26
29
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Redd
4
- VERSION = '0.8.7'
4
+ VERSION = '0.8.8'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avinash Dwarapu