ragdoll-rails 0.1.8 → 0.1.11
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 +4 -4
- data/README.md +18 -21
- data/app/assets/javascripts/ragdoll/application.js +129 -0
- data/app/assets/javascripts/ragdoll/bulk_upload_status.js +454 -0
- data/app/assets/stylesheets/ragdoll/application.css +84 -0
- data/app/assets/stylesheets/ragdoll/bulk_upload_status.css +379 -0
- data/app/channels/application_cable/channel.rb +6 -0
- data/app/channels/application_cable/connection.rb +6 -0
- data/app/channels/ragdoll/bulk_upload_status_channel.rb +27 -0
- data/app/channels/ragdoll/file_processing_channel.rb +26 -0
- data/app/components/ragdoll/alert_component.html.erb +4 -0
- data/app/components/ragdoll/alert_component.rb +32 -0
- data/app/components/ragdoll/application_component.rb +6 -0
- data/app/components/ragdoll/card_component.html.erb +15 -0
- data/app/components/ragdoll/card_component.rb +21 -0
- data/app/components/ragdoll/document_list_component.html.erb +41 -0
- data/app/components/ragdoll/document_list_component.rb +13 -0
- data/app/components/ragdoll/document_table_component.html.erb +76 -0
- data/app/components/ragdoll/document_table_component.rb +13 -0
- data/app/components/ragdoll/empty_state_component.html.erb +12 -0
- data/app/components/ragdoll/empty_state_component.rb +17 -0
- data/app/components/ragdoll/flash_messages_component.html.erb +3 -0
- data/app/components/ragdoll/flash_messages_component.rb +37 -0
- data/app/components/ragdoll/navbar_component.html.erb +24 -0
- data/app/components/ragdoll/navbar_component.rb +31 -0
- data/app/components/ragdoll/page_header_component.html.erb +13 -0
- data/app/components/ragdoll/page_header_component.rb +15 -0
- data/app/components/ragdoll/stats_card_component.html.erb +11 -0
- data/app/components/ragdoll/stats_card_component.rb +17 -0
- data/app/components/ragdoll/status_badge_component.html.erb +3 -0
- data/app/components/ragdoll/status_badge_component.rb +30 -0
- data/app/controllers/ragdoll/api/v1/analytics_controller.rb +72 -0
- data/app/controllers/ragdoll/api/v1/base_controller.rb +29 -0
- data/app/controllers/ragdoll/api/v1/documents_controller.rb +148 -0
- data/app/controllers/ragdoll/api/v1/search_controller.rb +87 -0
- data/app/controllers/ragdoll/api/v1/system_controller.rb +97 -0
- data/app/controllers/ragdoll/application_controller.rb +17 -0
- data/app/controllers/ragdoll/configuration_controller.rb +82 -0
- data/app/controllers/ragdoll/dashboard_controller.rb +98 -0
- data/app/controllers/ragdoll/documents_controller.rb +460 -0
- data/app/controllers/ragdoll/documents_controller_backup.rb +68 -0
- data/app/controllers/ragdoll/jobs_controller.rb +116 -0
- data/app/controllers/ragdoll/search_controller.rb +368 -0
- data/app/jobs/application_job.rb +9 -0
- data/app/jobs/ragdoll/bulk_document_processing_job.rb +280 -0
- data/app/jobs/ragdoll/process_file_job.rb +166 -0
- data/app/services/ragdoll/worker_health_service.rb +111 -0
- data/app/views/layouts/ragdoll/application.html.erb +162 -0
- data/app/views/ragdoll/dashboard/analytics.html.erb +333 -0
- data/app/views/ragdoll/dashboard/index.html.erb +208 -0
- data/app/views/ragdoll/documents/edit.html.erb +91 -0
- data/app/views/ragdoll/documents/index.html.erb +302 -0
- data/app/views/ragdoll/documents/new.html.erb +1518 -0
- data/app/views/ragdoll/documents/show.html.erb +188 -0
- data/app/views/ragdoll/documents/upload_results.html.erb +248 -0
- data/app/views/ragdoll/jobs/index.html.erb +669 -0
- data/app/views/ragdoll/jobs/show.html.erb +129 -0
- data/app/views/ragdoll/search/index.html.erb +324 -0
- data/config/cable.yml +12 -0
- data/config/routes.rb +57 -2
- data/lib/generators/ragdoll/init/templates/INSTALL +3 -2
- data/lib/generators/ragdoll/init_generator.rb +68 -0
- data/lib/ragdoll/rails/engine.rb +48 -0
- data/lib/ragdoll/rails/version.rb +1 -1
- metadata +231 -6
- data/lib/generators/ragdoll/init/init_generator.rb +0 -26
data/lib/ragdoll/rails/engine.rb
CHANGED
@@ -6,6 +6,23 @@ module Ragdoll
|
|
6
6
|
module Rails
|
7
7
|
class Engine < ::Rails::Engine
|
8
8
|
isolate_namespace Ragdoll
|
9
|
+
engine_name 'ragdoll'
|
10
|
+
|
11
|
+
# Configure the engine to use migrations from the ragdoll gem
|
12
|
+
# Find the ragdoll gem path
|
13
|
+
begin
|
14
|
+
ragdoll_path = Gem::Specification.find_by_name('ragdoll').gem_dir
|
15
|
+
rescue Gem::MissingSpecError
|
16
|
+
# If not found as a gem (e.g., using path in Gemfile), try to find it relative to this engine
|
17
|
+
ragdoll_path = File.expand_path("../../../../ragdoll", __dir__)
|
18
|
+
end
|
19
|
+
|
20
|
+
migration_path = File.join(ragdoll_path, 'db/migrate')
|
21
|
+
|
22
|
+
# Set the migration paths for this engine to point to ragdoll gem
|
23
|
+
if File.exist?(migration_path)
|
24
|
+
config.paths["db/migrate"] = [migration_path]
|
25
|
+
end
|
9
26
|
|
10
27
|
config.generators do |g|
|
11
28
|
g.test_framework :rspec
|
@@ -17,8 +34,39 @@ module Ragdoll
|
|
17
34
|
initializer "ragdoll.configure" do |app|
|
18
35
|
# Configure Rails-specific functionality
|
19
36
|
# Core functionality is provided by the ragdoll gem
|
37
|
+
|
38
|
+
# Ensure ViewComponent autoloading for engine components
|
39
|
+
app.config.autoload_paths += ["#{root}/app/components"]
|
40
|
+
|
41
|
+
# Ensure Services autoloading for engine services
|
42
|
+
app.config.autoload_paths += ["#{root}/app/services"]
|
43
|
+
|
44
|
+
# Configure ViewComponent
|
45
|
+
if ::Rails.env.development? && app.config.respond_to?(:view_component)
|
46
|
+
app.config.view_component.preview_paths ||= []
|
47
|
+
app.config.view_component.preview_paths << "#{root}/spec/components/previews"
|
48
|
+
end
|
49
|
+
|
50
|
+
# Configure ActionCable for the engine
|
51
|
+
# Provide default ActionCable configuration if not already set
|
52
|
+
app.config.action_cable.mount_path ||= '/cable'
|
53
|
+
|
54
|
+
# Set default adapter if not already configured
|
55
|
+
unless app.config.action_cable.adapter
|
56
|
+
if ::Rails.env.development?
|
57
|
+
app.config.action_cable.adapter = 'redis'
|
58
|
+
app.config.action_cable.url = 'redis://localhost:6379/0'
|
59
|
+
elsif ::Rails.env.test?
|
60
|
+
app.config.action_cable.adapter = 'test'
|
61
|
+
elsif ::Rails.env.production?
|
62
|
+
app.config.action_cable.adapter = 'redis'
|
63
|
+
app.config.action_cable.url = ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" }
|
64
|
+
app.config.action_cable.channel_prefix = 'ragdoll_rails_production'
|
65
|
+
end
|
66
|
+
end
|
20
67
|
end
|
21
68
|
|
69
|
+
|
22
70
|
# Ensure models are eager loaded in production
|
23
71
|
initializer "ragdoll.eager_load", after: "finisher_hook" do |app|
|
24
72
|
if ::Rails.env.production?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ragdoll-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
@@ -15,28 +15,196 @@ dependencies:
|
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 0
|
18
|
+
version: '0'
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 0
|
25
|
+
version: '0'
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rails
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 8.0.2
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 8.0.2
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: actioncable
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 8.0.2
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 8.0.2
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: sidekiq
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: view_component
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.0'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '2.0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: amazing_print
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: debug_me
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: claude-on-rails
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rspec
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
type: :development
|
132
|
+
prerelease: false
|
133
|
+
version_requirements: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: rspec-core
|
140
|
+
requirement: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
- !ruby/object:Gem::Dependency
|
153
|
+
name: rspec-expectations
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
type: :development
|
160
|
+
prerelease: false
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: rspec-mocks
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
type: :development
|
174
|
+
prerelease: false
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
- !ruby/object:Gem::Dependency
|
181
|
+
name: factory_bot_rails
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
- !ruby/object:Gem::Dependency
|
195
|
+
name: database_cleaner-active_record
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
type: :development
|
202
|
+
prerelease: false
|
203
|
+
version_requirements: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
40
208
|
description: Rails engine providing ActiveRecord integration, background jobs, and
|
41
209
|
UI components for the Ragdoll RAG (Retrieval-Augmented Generation) system
|
42
210
|
email:
|
@@ -47,11 +215,68 @@ extra_rdoc_files: []
|
|
47
215
|
files:
|
48
216
|
- README.md
|
49
217
|
- Rakefile
|
218
|
+
- app/assets/javascripts/ragdoll/application.js
|
219
|
+
- app/assets/javascripts/ragdoll/bulk_upload_status.js
|
220
|
+
- app/assets/stylesheets/ragdoll/application.css
|
221
|
+
- app/assets/stylesheets/ragdoll/bulk_upload_status.css
|
222
|
+
- app/channels/application_cable/channel.rb
|
223
|
+
- app/channels/application_cable/connection.rb
|
224
|
+
- app/channels/ragdoll/bulk_upload_status_channel.rb
|
225
|
+
- app/channels/ragdoll/file_processing_channel.rb
|
226
|
+
- app/components/ragdoll/alert_component.html.erb
|
227
|
+
- app/components/ragdoll/alert_component.rb
|
228
|
+
- app/components/ragdoll/application_component.rb
|
229
|
+
- app/components/ragdoll/card_component.html.erb
|
230
|
+
- app/components/ragdoll/card_component.rb
|
231
|
+
- app/components/ragdoll/document_list_component.html.erb
|
232
|
+
- app/components/ragdoll/document_list_component.rb
|
233
|
+
- app/components/ragdoll/document_table_component.html.erb
|
234
|
+
- app/components/ragdoll/document_table_component.rb
|
235
|
+
- app/components/ragdoll/empty_state_component.html.erb
|
236
|
+
- app/components/ragdoll/empty_state_component.rb
|
237
|
+
- app/components/ragdoll/flash_messages_component.html.erb
|
238
|
+
- app/components/ragdoll/flash_messages_component.rb
|
239
|
+
- app/components/ragdoll/navbar_component.html.erb
|
240
|
+
- app/components/ragdoll/navbar_component.rb
|
241
|
+
- app/components/ragdoll/page_header_component.html.erb
|
242
|
+
- app/components/ragdoll/page_header_component.rb
|
243
|
+
- app/components/ragdoll/stats_card_component.html.erb
|
244
|
+
- app/components/ragdoll/stats_card_component.rb
|
245
|
+
- app/components/ragdoll/status_badge_component.html.erb
|
246
|
+
- app/components/ragdoll/status_badge_component.rb
|
247
|
+
- app/controllers/ragdoll/api/v1/analytics_controller.rb
|
248
|
+
- app/controllers/ragdoll/api/v1/base_controller.rb
|
249
|
+
- app/controllers/ragdoll/api/v1/documents_controller.rb
|
250
|
+
- app/controllers/ragdoll/api/v1/search_controller.rb
|
251
|
+
- app/controllers/ragdoll/api/v1/system_controller.rb
|
252
|
+
- app/controllers/ragdoll/application_controller.rb
|
253
|
+
- app/controllers/ragdoll/configuration_controller.rb
|
254
|
+
- app/controllers/ragdoll/dashboard_controller.rb
|
255
|
+
- app/controllers/ragdoll/documents_controller.rb
|
256
|
+
- app/controllers/ragdoll/documents_controller_backup.rb
|
257
|
+
- app/controllers/ragdoll/jobs_controller.rb
|
258
|
+
- app/controllers/ragdoll/search_controller.rb
|
259
|
+
- app/jobs/application_job.rb
|
260
|
+
- app/jobs/ragdoll/bulk_document_processing_job.rb
|
261
|
+
- app/jobs/ragdoll/process_file_job.rb
|
262
|
+
- app/services/ragdoll/worker_health_service.rb
|
263
|
+
- app/views/layouts/ragdoll/application.html.erb
|
264
|
+
- app/views/ragdoll/dashboard/analytics.html.erb
|
265
|
+
- app/views/ragdoll/dashboard/index.html.erb
|
266
|
+
- app/views/ragdoll/documents/edit.html.erb
|
267
|
+
- app/views/ragdoll/documents/index.html.erb
|
268
|
+
- app/views/ragdoll/documents/new.html.erb
|
269
|
+
- app/views/ragdoll/documents/show.html.erb
|
270
|
+
- app/views/ragdoll/documents/upload_results.html.erb
|
271
|
+
- app/views/ragdoll/jobs/index.html.erb
|
272
|
+
- app/views/ragdoll/jobs/show.html.erb
|
273
|
+
- app/views/ragdoll/search/index.html.erb
|
274
|
+
- config/cable.yml
|
50
275
|
- config/initializers/ragdoll.rb
|
51
276
|
- config/routes.rb
|
52
|
-
- lib/generators/ragdoll/init/init_generator.rb
|
53
277
|
- lib/generators/ragdoll/init/templates/INSTALL
|
54
278
|
- lib/generators/ragdoll/init/templates/ragdoll_config.rb
|
279
|
+
- lib/generators/ragdoll/init_generator.rb
|
55
280
|
- lib/ragdoll-rails.rb
|
56
281
|
- lib/ragdoll/rails.rb
|
57
282
|
- lib/ragdoll/rails/configuration.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rails/generators'
|
4
|
-
|
5
|
-
module Ragdoll
|
6
|
-
module Generators
|
7
|
-
class InitGenerator < Rails::Generators::Base
|
8
|
-
desc "Create Ragdoll configuration initializer"
|
9
|
-
source_root File.expand_path("templates", __dir__)
|
10
|
-
|
11
|
-
def create_initializer_file
|
12
|
-
template "ragdoll_config.rb", "config/initializers/ragdoll_config.rb"
|
13
|
-
end
|
14
|
-
|
15
|
-
def show_readme
|
16
|
-
readme "INSTALL" if behavior == :invoke
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def application_name
|
22
|
-
Rails.application.class.name.split("::").first.underscore
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|