monkeyspaw 0.0.2 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1db0335d3959caf2685ba8091103b01117690dc6ef220d3e97179978e9e4378
4
- data.tar.gz: 9cea5693ddfbce5a195b7eb40f870533850226e44b75132b190640ca0cc54506
3
+ metadata.gz: b67b97f684213086c17471f075dde93921f0d4a1eee84a45ced514c3898e8560
4
+ data.tar.gz: 4cfab7ee1409f7c26b022ce5309c732b9926eb10b4e2ac0352463b011bb7d676
5
5
  SHA512:
6
- metadata.gz: f5b484f83ac1a0582ff8eef6039246c6135476236e09fc4a34d3bb089f6487a414a7a7cd8fd74cbfe5c79c9ef02c111e2ddf567755c5ee0f1fb873b4b5725321
7
- data.tar.gz: 11e986e1d6b3c9f48310a8dab9f8c36b8fef051fb8b51c640bcff0b0d29f72b7bc677adbb5eab07073da04e25b878cfb84a635c609317386215ee22a6e126d6f
6
+ metadata.gz: a0c21ece19b4917de4efb25647f957e973eb9206c40bd5f5b46d1dc6f88f31cbc51dadcdeb9becedaddd4b13ce2568ce0e0ab362d87f3527992c5256df6f64be
7
+ data.tar.gz: bf75e89ca31dc48dea52e2570d65cd97109239af28b4eb91d04fea4f07acd1a0b5d244221e126377126ba67d8c35a9d990679fc1d01d85688feaf467e306606c
data/README.md CHANGED
@@ -30,6 +30,24 @@ Or bind it directly:
30
30
  $ gem install monkeyspaw
31
31
  ```
32
32
 
33
+ ## AI Provider
34
+
35
+ MonkeysPaw is currently set up to only commune with Gemini by default. Other AI
36
+ entities will be supported shortly.
37
+
38
+ To use Gemini set up your environment variable:
39
+
40
+ OSX/Linux:
41
+ ```bash
42
+ export GEMINI_API_KEY=your_gemini_api_key
43
+ ```
44
+
45
+ Windows:
46
+
47
+ ```bash
48
+ Set-Item -Path env:GEMINI_API_KEY -Value "YourKeyHere"
49
+ ```
50
+
33
51
  ## Making Your First Wish
34
52
 
35
53
  Create a simple manifestation with just a few incantations:
@@ -13,11 +13,11 @@ module MonkeysPaw
13
13
  @prompt_manager = nil
14
14
  @cache_manager = nil
15
15
  end
16
-
16
+
17
17
  def prompt_manager
18
18
  @prompt_manager ||= PromptManager.new(self)
19
19
  end
20
-
20
+
21
21
  def cache_manager
22
22
  @cache_manager ||= CacheManager.new(self)
23
23
  end
@@ -35,7 +35,7 @@ module MonkeysPaw
35
35
  setup_directories
36
36
 
37
37
  @router ||= Router.new(self)
38
-
38
+
39
39
  # Initialize prompt manager
40
40
  prompt_manager
41
41
 
@@ -41,8 +41,6 @@ module MonkeysPaw
41
41
  load_style_prompt
42
42
  end
43
43
 
44
- private
45
-
46
44
  def default_layout_prompt
47
45
  <<~LAYOUT
48
46
  # Layout Component
@@ -71,4 +69,4 @@ module MonkeysPaw
71
69
  STYLE
72
70
  end
73
71
  end
74
- end
72
+ end
@@ -33,7 +33,7 @@ module MonkeysPaw
33
33
  cached_content = app.cache_manager.get_cached_page(path, prompt_file)
34
34
  return cached_content if cached_content
35
35
  end
36
-
36
+
37
37
  # Cache miss or caching disabled, generate the page
38
38
  # Reload layout and style prompts to pick up changes
39
39
  app.prompt_manager.load_default_components
@@ -45,15 +45,19 @@ module MonkeysPaw
45
45
  layout_prompt: layout_prompt,
46
46
  style_prompt: style_prompt
47
47
  ).generate
48
-
48
+
49
49
  # Store in cache if enabled
50
50
  if app.config.caching_enabled
51
51
  app.cache_manager.cache_page(path, prompt_file, html_content)
52
52
  end
53
-
53
+
54
54
  html_content
55
55
  end
56
56
 
57
+ def generate_error_page(message)
58
+ "<html><body><h1>Error</h1><p>#{message}</p></body></html>"
59
+ end
60
+
57
61
  private
58
62
 
59
63
  def setup_signal_handlers
@@ -102,8 +106,5 @@ module MonkeysPaw
102
106
  end
103
107
  end
104
108
 
105
- def generate_error_page(message)
106
- "<html><body><h1>Error</h1><p>#{message}</p></body></html>"
107
- end
108
109
  end
109
110
  end
@@ -1,3 +1,3 @@
1
1
  module MonkeysPaw
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monkeyspaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Werner
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rack
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
- rubygems_version: 3.6.6
151
+ rubygems_version: 3.6.7
152
152
  specification_version: 4
153
153
  summary: A prompt-driven web framework for Ruby - be careful what you wish for
154
154
  test_files: []