hokipoki 0.8.0 → 0.8.1

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: bca23e3d5a8c3a9e35b610837faaaffe4fe0739eb849836c3117cb4f4bcc8b0e
4
- data.tar.gz: b73c15b344ff10824c2479b20850b175cfd7c62e5124404622ed3269eeba759a
3
+ metadata.gz: 442a9a68f04339c19320537ec38cf109012d2d9c779b4f9a4426ec5feb19d927
4
+ data.tar.gz: a7a7b96a3f842fd092409e4c6fd721c6a196c89a25f6db32b4173bb99362e600
5
5
  SHA512:
6
- metadata.gz: c19ea3c29430b1a2fe1e897d393a96e48fa168c8934c047bc03f1d732fefbaf2efcad1ab644c235c7d8a32455c8f2d52d13ddfd85f03deaa7dddda3c05f6f70e
7
- data.tar.gz: b3caaa7e35a44bac2947f0637935dabfa59726789bc1a815a5830aad1f28ddf1cba248a445fc3abdf8f73f38f537fbf733a0f7b6c238f6c47d24e9361de6e94e
6
+ metadata.gz: 38c2e9156e49bb5ab24f053e003b84fc22291032cda88a22d183bb60073e2f5c2943c9c51370c09b11c65e094d43c20a0bada082e69c55ef4c49bc867958e035
7
+ data.tar.gz: 369bd8d52c249f864104dae9f2d7657653fca40372d2778889b38503fb72ca70fbeb0a3e8711a44632a5aac98caecb03007ff90d864e17261f0f54280f897ba4
@@ -302,28 +302,44 @@ module Hokipoki
302
302
  main_config_file = "config/initializers/hokipoki.rb"
303
303
 
304
304
  if File.exist?(main_config_file)
305
- # Add parasite attachment flag to existing config
306
- config_addition = <<~RUBY
307
-
308
- # Parasite attachment enabled
309
- Rails.application.configure do |config|
310
- config.parasite_attachment = true
311
- config.parasite_type = '#{options[:parasite_type]}'
305
+ # Check if it's already a Hokipoki.configure block
306
+ file_content = File.read(main_config_file)
307
+
308
+ if file_content.include?('Hokipoki.configure')
309
+ # Add to existing Hokipoki.configure block
310
+ gsub_file main_config_file, /(Hokipoki\.configure do \|config\|.*?)(end)/m do |match|
311
+ existing_config = $1
312
+ existing_config + <<~RUBY
313
+ # Parasite attachment enabled
314
+ config.parasite_attachment = true
315
+ config.parasite_type = '#{options[:parasite_type]}'
316
+ RUBY
317
+ + $2
312
318
  end
313
- RUBY
319
+ else
320
+ # Add new Hokipoki.configure block
321
+ config_addition = <<~RUBY
322
+
323
+ # Parasite attachment configuration
324
+ Hokipoki.configure do |config|
325
+ config.parasite_attachment = true
326
+ config.parasite_type = '#{options[:parasite_type]}'
327
+ end
328
+ RUBY
329
+
330
+ append_to_file main_config_file, config_addition
331
+ end
314
332
 
315
- append_to_file main_config_file, config_addition
316
333
  say "📝 Updated main hokipoki config", :green
317
334
  else
318
335
  # Create the config file if it doesn't exist
319
336
  create_file main_config_file, <<~RUBY
320
- # HokiPoki Configuration
321
-
322
- Rails.application.configure do |config|
323
- # Parasite attachment enabled
324
- config.parasite_attachment = true
325
- config.parasite_type = '#{options[:parasite_type]}'
326
- end
337
+ # HokiPoki Configuration
338
+ Hokipoki.configure do |config|
339
+ # Parasite attachment enabled
340
+ config.parasite_attachment = true
341
+ config.parasite_type = '#{options[:parasite_type]}'
342
+ end
327
343
  RUBY
328
344
  say "📝 Created hokipoki config with parasite settings", :green
329
345
  end
@@ -25,6 +25,8 @@ module Hokipoki
25
25
  :verbose_logging,
26
26
  :hive_mind_enabled,
27
27
  :claude_parasite_enabled,
28
+ :parasite_attachment,
29
+ :parasite_type,
28
30
  :redis_url
29
31
 
30
32
  def initialize
@@ -62,6 +64,11 @@ module Hokipoki
62
64
  # Legacy settings
63
65
  @hive_mind_enabled = false # Will be true after installation
64
66
  @claude_parasite_enabled = true
67
+
68
+ # Parasite attachment settings
69
+ @parasite_attachment = false
70
+ @parasite_type = 'claude_cli'
71
+
65
72
  @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')
66
73
  end
67
74
 
@@ -1,3 +1,3 @@
1
1
  module Hokipoki
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hokipoki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails Utilities