ragdoll-rails 0.0.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.
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/engine'
4
+
5
+ module Ragdoll
6
+ module Rails
7
+ class Engine < ::Rails::Engine
8
+ isolate_namespace Ragdoll
9
+
10
+ config.generators do |g|
11
+ g.test_framework :rspec
12
+ g.fixture_replacement :factory_bot
13
+ g.factory_bot dir: 'spec/factories'
14
+ end
15
+
16
+ # Initialize configuration after Rails has loaded
17
+ initializer "ragdoll.configure" do |app|
18
+ # Configure Rails-specific functionality
19
+ # Core functionality is provided by the ragdoll gem
20
+ end
21
+
22
+ # Ensure models are eager loaded in production
23
+ initializer "ragdoll.eager_load", after: "finisher_hook" do |app|
24
+ if ::Rails.env.production?
25
+ app.config.eager_load_paths += [
26
+ "#{root}/app/models/ragdoll"
27
+ ]
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,9 @@
1
+ # This file defines the version number for the Ragdoll Rails gem.
2
+
3
+ # frozen_string_literal: true
4
+
5
+ module Ragdoll
6
+ module Rails
7
+ VERSION = "0.0.1"
8
+ end
9
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'rails/version'
4
+ require_relative 'rails/configuration'
5
+ require_relative 'rails/engine'
6
+
7
+ module Ragdoll
8
+ module Rails
9
+ # Rails engine specific functionality
10
+ # Core business logic is provided by the ragdoll gem
11
+
12
+ def self.configuration
13
+ @configuration ||= Configuration.new
14
+ end
15
+
16
+ def self.configure
17
+ yield(configuration)
18
+ # Delegate core configuration to the ragdoll gem
19
+ configure_ragdoll_core if defined?(::Ragdoll.configure)
20
+ end
21
+
22
+ private
23
+
24
+ def self.configure_ragdoll_core
25
+ # This method would configure the core ragdoll gem
26
+ # based on Rails-specific settings
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ragdoll/rails"
4
+
5
+ # This Rails engine requires the ragdoll gem to be available
6
+ # The ragdoll gem provides the core business logic functionality
7
+ begin
8
+ require 'ragdoll'
9
+ rescue LoadError
10
+ raise LoadError, "The ragdoll gem is required for ragdoll-rails to function. Please add 'gem \"ragdoll\"' to your Gemfile."
11
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:rspec) do |task|
7
+ task.pattern = 'spec/**/*_spec.rb'
8
+ task.rspec_opts = '--format documentation'
9
+ end
10
+
11
+ desc 'Run RSpec tests'
12
+ task :spec => :rspec
13
+ rescue LoadError
14
+ # RSpec not available, skip task definition
15
+ desc 'Run RSpec tests (RSpec not available)'
16
+ task :spec do
17
+ puts "RSpec not available. Please add rspec to your Gemfile."
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ragdoll-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dewayne VanHoozer
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: Rails engine providing ActiveRecord integration, background jobs, and
13
+ UI components for the Ragdoll RAG (Retrieval-Augmented Generation) system
14
+ email:
15
+ - dvanhoozer@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - README.md
21
+ - Rakefile
22
+ - app/models/ragdoll/document.rb
23
+ - app/models/ragdoll/embedding.rb
24
+ - app/models/ragdoll/search.rb
25
+ - config/initializers/ragdoll.rb
26
+ - config/routes.rb
27
+ - db/migrate/20250218123456_create_documents.rb
28
+ - db/migrate/20250219123456_create_ragdoll_embeddings.rb
29
+ - db/migrate/20250220123456_update_embeddings_vector_column.rb
30
+ - db/migrate/20250223123457_add_metadata_and_foreign_key_to_ragdoll_tables.rb
31
+ - db/migrate/20250225123456_add_summary_to_ragdoll_documents.rb
32
+ - db/migrate/20250226123456_add_usage_tracking_to_ragdoll_embeddings.rb
33
+ - lib/generators/ragdoll/init/init_generator.rb
34
+ - lib/generators/ragdoll/init/templates/INSTALL
35
+ - lib/generators/ragdoll/init/templates/ragdoll_config.rb
36
+ - lib/ragdoll-rails.rb
37
+ - lib/ragdoll/rails.rb
38
+ - lib/ragdoll/rails/configuration.rb
39
+ - lib/ragdoll/rails/engine.rb
40
+ - lib/ragdoll/rails/version.rb
41
+ - lib/tasks/rspec.rake
42
+ homepage: https://github.com/MadBomber/ragdoll-rails
43
+ licenses:
44
+ - MIT
45
+ metadata:
46
+ allowed_push_host: https://rubygems.org
47
+ homepage_uri: https://github.com/MadBomber/ragdoll-rails
48
+ source_code_uri: https://github.com/MadBomber/ragdoll-rails/blob/main
49
+ changelog_uri: https://github.com/MadBomber/ragdoll-rails/blob/main/CHANGELOG.md
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 3.2.0
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubygems_version: 3.7.1
65
+ specification_version: 4
66
+ summary: Rails engine for Ragdoll RAG system
67
+ test_files: []