chats 0.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 +7 -0
- data/.rubocop.yml +43 -0
- data/.simplecov +52 -0
- data/AGENTS.md +5 -0
- data/Appraisals +17 -0
- data/CHANGELOG.md +74 -0
- data/CLAUDE.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +384 -0
- data/Rakefile +32 -0
- data/app/assets/stylesheets/chats.css +818 -0
- data/app/controllers/chats/application_controller.rb +65 -0
- data/app/controllers/chats/conversations_controller.rb +198 -0
- data/app/controllers/chats/messages_controller.rb +118 -0
- data/app/controllers/chats/reactions_controller.rb +33 -0
- data/app/helpers/chats/engine_helper.rb +212 -0
- data/app/javascript/chats/composer_controller.js +258 -0
- data/app/javascript/chats/debounced_submit_controller.js +40 -0
- data/app/javascript/chats/thread_controller.js +855 -0
- data/app/views/chats/conversations/_conversation_row.html.erb +28 -0
- data/app/views/chats/conversations/_messages_page.html.erb +16 -0
- data/app/views/chats/conversations/_read_state.html.erb +11 -0
- data/app/views/chats/conversations/index.html.erb +54 -0
- data/app/views/chats/conversations/refresh.turbo_stream.erb +13 -0
- data/app/views/chats/conversations/show.html.erb +137 -0
- data/app/views/chats/messages/_composer.html.erb +67 -0
- data/app/views/chats/messages/_message.html.erb +158 -0
- data/app/views/chats/messages/create.turbo_stream.erb +6 -0
- data/app/views/chats/messages/errors.turbo_stream.erb +3 -0
- data/app/views/chats/shared/_unread_badge.html.erb +6 -0
- data/config/importmap.rb +16 -0
- data/config/locales/en.yml +87 -0
- data/config/locales/es.yml +87 -0
- data/config/routes.rb +24 -0
- data/docs/PRD.md +254 -0
- data/docs/campfire_review.md +46 -0
- data/gemfiles/rails_7.1.gemfile +36 -0
- data/gemfiles/rails_7.2.gemfile +36 -0
- data/gemfiles/rails_8.1.gemfile +36 -0
- data/lib/chats/broadcasts.rb +147 -0
- data/lib/chats/configuration.rb +286 -0
- data/lib/chats/engine.rb +146 -0
- data/lib/chats/errors.rb +20 -0
- data/lib/chats/macros.rb +28 -0
- data/lib/chats/models/application_record.rb +11 -0
- data/lib/chats/models/concerns/chat_subject.rb +35 -0
- data/lib/chats/models/concerns/messager.rb +102 -0
- data/lib/chats/models/conversation.rb +347 -0
- data/lib/chats/models/message.rb +323 -0
- data/lib/chats/models/participant.rb +151 -0
- data/lib/chats/models/reaction.rb +70 -0
- data/lib/chats/version.rb +5 -0
- data/lib/chats.rb +188 -0
- data/lib/generators/chats/install_generator.rb +62 -0
- data/lib/generators/chats/templates/create_chats_tables.rb.erb +159 -0
- data/lib/generators/chats/templates/initializer.rb +138 -0
- data/lib/generators/chats/views_generator.rb +49 -0
- metadata +204 -0
metadata
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: chats
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- rameerez
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2026-06-10 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: activerecord
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 7.1.0
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '9.0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: 7.1.0
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '9.0'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: activesupport
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: 7.1.0
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '9.0'
|
|
42
|
+
type: :runtime
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: 7.1.0
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '9.0'
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: globalid
|
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - "~>"
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: '1.0'
|
|
59
|
+
type: :runtime
|
|
60
|
+
prerelease: false
|
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
- - "~>"
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: '1.0'
|
|
66
|
+
- !ruby/object:Gem::Dependency
|
|
67
|
+
name: railties
|
|
68
|
+
requirement: !ruby/object:Gem::Requirement
|
|
69
|
+
requirements:
|
|
70
|
+
- - ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: 7.1.0
|
|
73
|
+
- - "<"
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '9.0'
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: 7.1.0
|
|
83
|
+
- - "<"
|
|
84
|
+
- !ruby/object:Gem::Version
|
|
85
|
+
version: '9.0'
|
|
86
|
+
- !ruby/object:Gem::Dependency
|
|
87
|
+
name: turbo-rails
|
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
|
89
|
+
requirements:
|
|
90
|
+
- - ">="
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '2.0'
|
|
93
|
+
type: :runtime
|
|
94
|
+
prerelease: false
|
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
96
|
+
requirements:
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: '2.0'
|
|
100
|
+
description: 'chats is a drop-in gem to add chat messaging to your Rails app. It implements
|
|
101
|
+
a real-time messaging engine for Ruby on Rails 8+ apps: direct messages (DMs), group
|
|
102
|
+
chats, image attachments, emoji reactions, read receipts, unread badges, and typing
|
|
103
|
+
indicators. All rendered server-side and updated live with Hotwire (Turbo Streams
|
|
104
|
+
over Action Cable), so it ships with zero custom JavaScript build steps and works
|
|
105
|
+
with importmaps out of the box. Any model can converse via a single `acts_as_messager`
|
|
106
|
+
macro (users, organizations, support agents — participants are polymorphic), conversations
|
|
107
|
+
can be optionally attached to any domain record via `acts_as_chat_subject` (so users
|
|
108
|
+
can chat about a specific order, a listing, a booking), and the whole inbox UI is
|
|
109
|
+
overridable view-by-view like Devise. It exposes small adapter seams a blocked-users
|
|
110
|
+
lookup, a `can_message` policy, and a notifier hook; so it snaps onto the `moderate`
|
|
111
|
+
gem for Trust & Safety (report/block/filter, DSA + app-store compliance) and onto
|
|
112
|
+
any notification system (like the `noticed` gem) without any hard dependencies.
|
|
113
|
+
Messages support soft deletion, editing, system messages posted by your app, per-sender
|
|
114
|
+
rate limiting, and optional encryption at rest.'
|
|
115
|
+
email:
|
|
116
|
+
- rubygems@rameerez.com
|
|
117
|
+
executables: []
|
|
118
|
+
extensions: []
|
|
119
|
+
extra_rdoc_files: []
|
|
120
|
+
files:
|
|
121
|
+
- ".rubocop.yml"
|
|
122
|
+
- ".simplecov"
|
|
123
|
+
- AGENTS.md
|
|
124
|
+
- Appraisals
|
|
125
|
+
- CHANGELOG.md
|
|
126
|
+
- CLAUDE.md
|
|
127
|
+
- LICENSE.txt
|
|
128
|
+
- README.md
|
|
129
|
+
- Rakefile
|
|
130
|
+
- app/assets/stylesheets/chats.css
|
|
131
|
+
- app/controllers/chats/application_controller.rb
|
|
132
|
+
- app/controllers/chats/conversations_controller.rb
|
|
133
|
+
- app/controllers/chats/messages_controller.rb
|
|
134
|
+
- app/controllers/chats/reactions_controller.rb
|
|
135
|
+
- app/helpers/chats/engine_helper.rb
|
|
136
|
+
- app/javascript/chats/composer_controller.js
|
|
137
|
+
- app/javascript/chats/debounced_submit_controller.js
|
|
138
|
+
- app/javascript/chats/thread_controller.js
|
|
139
|
+
- app/views/chats/conversations/_conversation_row.html.erb
|
|
140
|
+
- app/views/chats/conversations/_messages_page.html.erb
|
|
141
|
+
- app/views/chats/conversations/_read_state.html.erb
|
|
142
|
+
- app/views/chats/conversations/index.html.erb
|
|
143
|
+
- app/views/chats/conversations/refresh.turbo_stream.erb
|
|
144
|
+
- app/views/chats/conversations/show.html.erb
|
|
145
|
+
- app/views/chats/messages/_composer.html.erb
|
|
146
|
+
- app/views/chats/messages/_message.html.erb
|
|
147
|
+
- app/views/chats/messages/create.turbo_stream.erb
|
|
148
|
+
- app/views/chats/messages/errors.turbo_stream.erb
|
|
149
|
+
- app/views/chats/shared/_unread_badge.html.erb
|
|
150
|
+
- config/importmap.rb
|
|
151
|
+
- config/locales/en.yml
|
|
152
|
+
- config/locales/es.yml
|
|
153
|
+
- config/routes.rb
|
|
154
|
+
- docs/PRD.md
|
|
155
|
+
- docs/campfire_review.md
|
|
156
|
+
- gemfiles/rails_7.1.gemfile
|
|
157
|
+
- gemfiles/rails_7.2.gemfile
|
|
158
|
+
- gemfiles/rails_8.1.gemfile
|
|
159
|
+
- lib/chats.rb
|
|
160
|
+
- lib/chats/broadcasts.rb
|
|
161
|
+
- lib/chats/configuration.rb
|
|
162
|
+
- lib/chats/engine.rb
|
|
163
|
+
- lib/chats/errors.rb
|
|
164
|
+
- lib/chats/macros.rb
|
|
165
|
+
- lib/chats/models/application_record.rb
|
|
166
|
+
- lib/chats/models/concerns/chat_subject.rb
|
|
167
|
+
- lib/chats/models/concerns/messager.rb
|
|
168
|
+
- lib/chats/models/conversation.rb
|
|
169
|
+
- lib/chats/models/message.rb
|
|
170
|
+
- lib/chats/models/participant.rb
|
|
171
|
+
- lib/chats/models/reaction.rb
|
|
172
|
+
- lib/chats/version.rb
|
|
173
|
+
- lib/generators/chats/install_generator.rb
|
|
174
|
+
- lib/generators/chats/templates/create_chats_tables.rb.erb
|
|
175
|
+
- lib/generators/chats/templates/initializer.rb
|
|
176
|
+
- lib/generators/chats/views_generator.rb
|
|
177
|
+
homepage: https://github.com/rameerez/chats
|
|
178
|
+
licenses:
|
|
179
|
+
- MIT
|
|
180
|
+
metadata:
|
|
181
|
+
allowed_push_host: https://rubygems.org
|
|
182
|
+
source_code_uri: https://github.com/rameerez/chats
|
|
183
|
+
changelog_uri: https://github.com/rameerez/chats/blob/main/CHANGELOG.md
|
|
184
|
+
bug_tracker_uri: https://github.com/rameerez/chats/issues
|
|
185
|
+
documentation_uri: https://github.com/rameerez/chats#readme
|
|
186
|
+
rubygems_mfa_required: 'true'
|
|
187
|
+
rdoc_options: []
|
|
188
|
+
require_paths:
|
|
189
|
+
- lib
|
|
190
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
|
+
requirements:
|
|
192
|
+
- - ">="
|
|
193
|
+
- !ruby/object:Gem::Version
|
|
194
|
+
version: 3.2.0
|
|
195
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
|
+
requirements:
|
|
197
|
+
- - ">="
|
|
198
|
+
- !ruby/object:Gem::Version
|
|
199
|
+
version: '0'
|
|
200
|
+
requirements: []
|
|
201
|
+
rubygems_version: 3.6.2
|
|
202
|
+
specification_version: 4
|
|
203
|
+
summary: Add chat messaging (user-to-user DMs & group chats) to your Rails app
|
|
204
|
+
test_files: []
|