active_prompt_rails 0.1.9 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0592ef761bbd2c24ff22a747df8999160455443df912fe727d179863709bc012'
|
4
|
+
data.tar.gz: 750a4000c0935acbe601a5ac7bf4f45a93d6b3937c0a5fb911cad634f82f3e95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a13b69cf3d6a5ab9bb86dfea63d2f88f685eb419b2b223d0dfbdfe18a4ab25c6a8ad5e1d7b383dd84d41a7cc54413c22a56fd3a2d5663a317434d233cae8019
|
7
|
+
data.tar.gz: f572a1502197a47f95d9d091b14dfd0b03ef5cf1b5249614a50bac033f8c916a80c21896ff9b0b6126414c7aae03345d0e2e0b1b881378646b252b21be47f82b
|
@@ -10,14 +10,16 @@ module ActivePrompt
|
|
10
10
|
source_root File.expand_path("templates", __dir__)
|
11
11
|
|
12
12
|
def create_prompt_files
|
13
|
-
|
14
|
-
|
15
|
-
template "
|
16
|
-
|
17
|
-
create_file "app/prompts/#{file_name}/prompt.rb", <<~RUBY
|
13
|
+
empty_directory "app/prompts/#{name.underscore}"
|
14
|
+
template "system.liquid", "app/prompts/#{name.underscore}/system.liquid"
|
15
|
+
template "user.liquid", "app/prompts/#{name.underscore}/user.liquid"
|
16
|
+
create_file "app/prompts/#{name.underscore}/prompt.rb", <<~RUBY
|
18
17
|
# This is a generated prompt class for #{file_name}
|
19
|
-
class #{
|
20
|
-
# Define your
|
18
|
+
class #{name.camelize}Prompt < ActivePrompt::Base
|
19
|
+
# Define your required template variables here, e.g.
|
20
|
+
# variable :name
|
21
|
+
# variable :age
|
22
|
+
# variable :gender
|
21
23
|
end
|
22
24
|
RUBY
|
23
25
|
end
|