plasma-mcp 0.0.2.pre.5 → 0.0.2.pre.6

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: 1d510ec669900b8ef06104fa771522b3085c073fb8d93ab5e2c332c55a715fed
4
- data.tar.gz: 3458491c2f91ef548e4c0b53d0434fd08c9473b48e5d9bb6780cb44ef45d44d2
3
+ metadata.gz: 4c291dd8182de457c09ca1974f6adee2d6a5bf2da1427cbc48cde0be440cf937
4
+ data.tar.gz: 1d6aef19077d014215f7d679c50a4b57a6f694c0fba6a745ba2609a37b99aadc
5
5
  SHA512:
6
- metadata.gz: 9cc0e2e70ca82a53e5c0b0711eab0221e1d2e391fa828e80abea0a8223e233370a88ff3ecfc53833eba1ed157e5760877410b4d59ad8c5a6b7f603be288151b3
7
- data.tar.gz: fda3e9bb53034d788381940e0bb0d090724376dff49e510b2c5862fe8cf7254040e1dd6975d4cd795c7b55a4528f7c6b513e00a76c914baa915be1a421b89720
6
+ metadata.gz: 2ea92cef1cbe360173248504cd75e7c1223751278fd8eae05dd9c9c70d0c275f7895888fabc0eadfda6fb0f617d32eba8861af58ba29704e94b8ba073534bad4
7
+ data.tar.gz: 6e7872ac1661eee6fdddd9a7b2bda22a3b0772e2c9ccdedab24f351a27bfac3b4bc20d1ec5e41034264523e97c8118ba27d2809cb74fc009a81cc26f1bd619dc
@@ -5,7 +5,7 @@ module Plasma
5
5
  class ClassLoader
6
6
  class << self
7
7
  def find_loader(module_name, class_name)
8
- Zeitwerk::Registry.loaders.find do |l|
8
+ Array(Zeitwerk::Registry.loaders).find do |l|
9
9
  inceptions = l.instance_variable_get(:@inceptions)
10
10
  next unless inceptions
11
11
 
@@ -107,5 +107,42 @@ module Plasma
107
107
  "#{name}: { type: \"#{type}\" }"
108
108
  end.join(",\n ")
109
109
  end
110
+
111
+ # For variable templates
112
+ def default_value
113
+ # Use the 'default' parameter if provided, otherwise use a sensible default based on variable type
114
+ if params.key?("default")
115
+ # If it's a string, wrap in quotes
116
+ if params["default"].is_a?(String) || !%w[true false null].include?(params["default"].downcase)
117
+ "\"#{params["default"]}\""
118
+ else
119
+ params["default"]
120
+ end
121
+ else
122
+ # Default to empty string if no default provided
123
+ "\"\""
124
+ end
125
+ end
126
+
127
+ # For variable templates - operations like increment, decrement, etc.
128
+ def operations
129
+ return [] unless @component_type == "variable"
130
+
131
+ # Define standard operations based on params
132
+ ops = []
133
+
134
+ # Add increment/decrement for numeric variables
135
+ if params.values.any? { |type| %w[number integer].include?(type) }
136
+ ops << { name: "increment", params: ["value"], operator: "+" }
137
+ ops << { name: "decrement", params: ["value"], operator: "-" }
138
+ end
139
+
140
+ # Add append for string variables
141
+ if params.values.any? { |type| type == "string" } || params.empty?
142
+ ops << { name: "append", params: ["value"], operator: "+" }
143
+ end
144
+
145
+ ops
146
+ end
110
147
  end
111
148
  end
@@ -13,6 +13,7 @@ RUN bundle install
13
13
 
14
14
  # Copy application code
15
15
  COPY . .
16
+ VOLUME /<%= name %>/.env
16
17
 
17
18
  # Command to run the application
18
19
  CMD ["bundle", "exec", "plasma", "server"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plasma
4
- VERSION = "0.0.2.pre.5"
4
+ VERSION = "0.0.2.pre.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plasma-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.pre.5
4
+ version: 0.0.2.pre.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Foster Heimark