query_lens 0.1.2 → 0.1.3
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 +4 -2
- data/lib/generators/query_lens/install/install_generator.rb +8 -1
- data/{db/migrate/20260207000001_create_query_lens_tables.rb → lib/generators/query_lens/install/templates/create_query_lens_tables.rb.tt} +1 -1
- data/lib/query_lens/engine.rb +0 -8
- data/lib/query_lens/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 302bd0c222f001ae9997180641b03390b244395de3f4b5070b21be1812590fd8
|
|
4
|
+
data.tar.gz: df5c31d6ab1ca79837cb0e433130b0666f45831666b96a704f4ed27ac5b22465
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c70804e76cbb049fc5733868e6c0c53976a99960425c1894bd544faeff95e82d93fb6827da4ac3a3355694b478d4b92cb2586e4086f394e402087a6470e5afb1
|
|
7
|
+
data.tar.gz: 60ba99c1ff1753974762f25f2a30def02d1fee229c334d1fcaac773e1dea3978f26a9faf9d0f2d8e2d1e2d4148caa94ae1773eda1f8a34f43b7a7f5b59521f42
|
data/README.md
CHANGED
|
@@ -43,8 +43,10 @@ rails db:migrate
|
|
|
43
43
|
|
|
44
44
|
This will:
|
|
45
45
|
1. Create `config/initializers/query_lens.rb` with RubyLLM and QueryLens configuration
|
|
46
|
-
2.
|
|
47
|
-
3.
|
|
46
|
+
2. Copy the migration to create the `query_lens_projects`, `query_lens_saved_queries`, and `query_lens_conversations` tables
|
|
47
|
+
3. Add the engine route to your `config/routes.rb`
|
|
48
|
+
|
|
49
|
+
> **Upgrading from a previous version?** If you already ran migrations from an earlier release (before the install generator included them), your tables are already in place. Just run `rails generate query_lens:install` and skip or discard the generated migration file — no need to migrate again.
|
|
48
50
|
|
|
49
51
|
## Configuration
|
|
50
52
|
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
require "rails/generators/active_record/migration"
|
|
2
|
+
|
|
1
3
|
module QueryLens
|
|
2
4
|
module Generators
|
|
3
5
|
class InstallGenerator < Rails::Generators::Base
|
|
6
|
+
include ActiveRecord::Generators::Migration
|
|
4
7
|
source_root File.expand_path("templates", __dir__)
|
|
5
8
|
|
|
6
|
-
desc "Creates a QueryLens initializer and adds the engine route."
|
|
9
|
+
desc "Creates a QueryLens initializer, copies migrations, and adds the engine route."
|
|
7
10
|
|
|
8
11
|
def copy_initializer
|
|
9
12
|
template "initializer.rb", "config/initializers/query_lens.rb"
|
|
10
13
|
end
|
|
11
14
|
|
|
15
|
+
def copy_migrations
|
|
16
|
+
migration_template "create_query_lens_tables.rb.tt", "db/migrate/create_query_lens_tables.rb"
|
|
17
|
+
end
|
|
18
|
+
|
|
12
19
|
def add_route
|
|
13
20
|
route 'mount QueryLens::Engine => "/query_lens"'
|
|
14
21
|
end
|
data/lib/query_lens/engine.rb
CHANGED
|
@@ -5,13 +5,5 @@ module QueryLens
|
|
|
5
5
|
initializer "query_lens.assets" do |app|
|
|
6
6
|
app.config.assets.precompile += %w[query_lens/application.js] if app.config.respond_to?(:assets)
|
|
7
7
|
end
|
|
8
|
-
|
|
9
|
-
initializer "query_lens.migrations" do |app|
|
|
10
|
-
unless app.root.to_s == root.to_s
|
|
11
|
-
config.paths["db/migrate"].expanded.each do |expanded_path|
|
|
12
|
-
app.config.paths["db/migrate"] << expanded_path
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
8
|
end
|
|
17
9
|
end
|
data/lib/query_lens/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: query_lens
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bryan Beshore
|
|
@@ -107,8 +107,8 @@ files:
|
|
|
107
107
|
- app/views/query_lens/layouts/application.html.erb
|
|
108
108
|
- app/views/query_lens/queries/show.html.erb
|
|
109
109
|
- config/routes.rb
|
|
110
|
-
- db/migrate/20260207000001_create_query_lens_tables.rb
|
|
111
110
|
- lib/generators/query_lens/install/install_generator.rb
|
|
111
|
+
- lib/generators/query_lens/install/templates/create_query_lens_tables.rb.tt
|
|
112
112
|
- lib/generators/query_lens/install/templates/initializer.rb
|
|
113
113
|
- lib/query_lens.rb
|
|
114
114
|
- lib/query_lens/configuration.rb
|