acts_as_reactable 0.2.8 → 0.3.0

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: cc0d2ddf2e316f3491c4fbf11f4bdc6d02186135f1377cfcb13e0f704ebbcd26
4
- data.tar.gz: f251f43db52dc488e4c0ed8270e8b16c5c32e2f613633bf625e67cb2f76945c3
3
+ metadata.gz: ef084116ccbe7e59160dfda29dd6fd2679a2f1d425c689b4ac4fbb764e309ff4
4
+ data.tar.gz: 4612e402698fee627577269f661ba646c33c5624d92a8a228c4d9c1f453b7483
5
5
  SHA512:
6
- metadata.gz: 4589911e039c80372bdc9ea82fc4be81a2505814781aa2a7da7030579d0a573463b91e70c996ea509bd53e183a60bf2c085088a67a7d738177e2c8a96ee58a9d
7
- data.tar.gz: 8c7a482a922045884b89ff174d3f7012486cb815f86638dfed001270565f7edd1496dbd3cec7e9f79c5ded88b50fbc1e31155df5a0fa69ce7716f47b303d6183
6
+ metadata.gz: e85624536581e31d3844f2b4ebc3a6d30443a998924bf3abf6999035e4f7cc1439de643e066ba161c34beb7e8c2bb62d156542a7f84686cfad1e54c906b57ba2
7
+ data.tar.gz: a1c03a4130d202328df9d83132c917dff7a467d71b07822efd4f62b88f690932b546b86022b5d6c433e0ee8bce3d48e3d30d036a8501498f57b375e6688a5a44
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.0](https://github.com/public-reactions/acts_as_reactable/compare/v0.2.8...v0.3.0) (2022-04-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * enable multiple reactions to single subject for each user ([ec32854](https://github.com/public-reactions/acts_as_reactable/commit/ec32854897249a53d2a17b41509d7c7ab69bb680))
9
+
3
10
  ### [0.2.8](https://github.com/public-reactions/acts_as_reactable/compare/v0.2.7...v0.2.8) (2022-04-18)
4
11
 
5
12
 
data/README.md CHANGED
@@ -86,7 +86,7 @@ ActsAsReactable::Reaction.where(reactable: reactor).group(:emoji).order('count_i
86
86
 
87
87
  ## FAQ
88
88
 
89
- ### Why saving the emoji character instead of "smily_face"
89
+ ### Why saving "😂" instead of "face_with_tears_of_joy"
90
90
 
91
91
  - Technically, there's no concrete name/key/id for emoji (and modifiers like skin tone). The [CLDR short names](https://unicode.org/emoji/format.html#col-name) "vary by language" and "may change", besides, are those names case sensitive? Should we use `-`, `_` or ` ` as divider? How to append tone variant? There are several error prone decisions to make.
92
92
  - It's easier to store since all modern database supports encodings (e.g. UTF-8) for unicode characters.
@@ -101,7 +101,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
101
101
 
102
102
  ## Contributing
103
103
 
104
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/acts_as_reactable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/acts_as_reactable/blob/main/CODE_OF_CONDUCT.md).
104
+ Bug reports and pull requests are welcome on GitHub at https://github.com/public-reactions/acts_as_reactable. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/acts_as_reactable/blob/main/CODE_OF_CONDUCT.md).
105
105
 
106
106
  ## License
107
107
 
@@ -25,10 +25,7 @@ module ActsAsReactable
25
25
  return destroy_reaction_from(reactor)
26
26
  end
27
27
 
28
- reaction = reactions.find_or_initialize_by(reactor: reactor)
29
- reaction.emoji = emoji
30
- reaction.save
31
-
28
+ reaction = reactions.where({reactor: reactor, emoji: emoji}).first_or_create
32
29
  reaction
33
30
  end
34
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsReactable
4
- VERSION = "0.2.8"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_reactable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - contact@public-reactions.com
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord