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: 9bf871847504f5d09f6b495faf583e573a45997891de572ba60f035a7110658b
4
- data.tar.gz: 87a52521203d4df780d7a72735a69a97b1e4691cc62ccda7dcb339f5d12badd4
3
+ metadata.gz: '0592ef761bbd2c24ff22a747df8999160455443df912fe727d179863709bc012'
4
+ data.tar.gz: 750a4000c0935acbe601a5ac7bf4f45a93d6b3937c0a5fb911cad634f82f3e95
5
5
  SHA512:
6
- metadata.gz: 3435bf1caa44e4b9f67f7b27f74d96e30e05196c7a9c81277784e66078e92b9383f606e1bbaba5ab92bce890760de24fb3370411f68ae64654263fc0c7dbd2ef
7
- data.tar.gz: 4e482bed7ac5fba42d9430b8eb06fed1e6083790fec241c3a981189fae6ec910f85fd6c6ff8247e04845ac9452aaefc20ed3de92920422be808c59290daaec40
6
+ metadata.gz: 6a13b69cf3d6a5ab9bb86dfea63d2f88f685eb419b2b223d0dfbdfe18a4ab25c6a8ad5e1d7b383dd84d41a7cc54413c22a56fd3a2d5663a317434d233cae8019
7
+ data.tar.gz: f572a1502197a47f95d9d091b14dfd0b03ef5cf1b5249614a50bac033f8c916a80c21896ff9b0b6126414c7aae03345d0e2e0b1b881378646b252b21be47f82b
@@ -7,5 +7,7 @@ module ActivePrompt
7
7
  generators do
8
8
  require_relative "generators/active_prompt/prompt/prompt_generator"
9
9
  end
10
+
11
+ config.autoload_paths += Dir["#{config.root}/app/prompts/**/"]
10
12
  end
11
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActivePrompt
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.11"
5
5
  end
@@ -10,14 +10,16 @@ module ActivePrompt
10
10
  source_root File.expand_path("templates", __dir__)
11
11
 
12
12
  def create_prompt_files
13
- file_name = file_name.underscore
14
- empty_directory "app/prompts/#{file_name}"
15
- template "system.liquid", "app/prompts/#{file_name}/system.liquid"
16
- template "user.liquid", "app/prompts/#{file_name}/user.liquid"
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 #{file_name.camelize}Prompt < ActivePrompt::Base
20
- # Define your prompt methods here
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_prompt_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Perreault