hokipoki 0.8.0 → 0.8.2

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: a3e90b9d154db9191acdd7edc681417cc7777b492797a77e72505be3e99e78dc
4
+ data.tar.gz: 05f6175e3485d3ce9f2ba58fd05dc1c8c0ed53fa007ac81f775ee31205347f8b
5
5
  SHA512:
6
- metadata.gz: c19ea3c29430b1a2fe1e897d393a96e48fa168c8934c047bc03f1d732fefbaf2efcad1ab644c235c7d8a32455c8f2d52d13ddfd85f03deaa7dddda3c05f6f70e
7
- data.tar.gz: b3caaa7e35a44bac2947f0637935dabfa59726789bc1a815a5830aad1f28ddf1cba248a445fc3abdf8f73f38f537fbf733a0f7b6c238f6c47d24e9361de6e94e
6
+ metadata.gz: dbbcd2354d6ee442d8fbda7a0065692792d8863c8332d7ba88dc389064b9f86ab71a7eb23908059f6c2e06a1ac7f3eb9722273f3f9c44a9d338363b8c6f2590c
7
+ data.tar.gz: 9ec6addf3ee80855af9e12d5ce6e3989d5c396467bac53ebdf51933766994563c64dc3e48570dcdb10e12031ae660ac033b20e83956750dc36d0b68762b1ea2f
@@ -302,28 +302,43 @@ 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 - insert before the final 'end'
310
+ insert_into_file main_config_file, before: /^end\s*$/ do
311
+ <<~RUBY
312
+
313
+ # Parasite attachment enabled
314
+ config.parasite_attachment = true
315
+ config.parasite_type = '#{options[:parasite_type]}'
316
+ RUBY
312
317
  end
313
- RUBY
318
+ else
319
+ # Add new Hokipoki.configure block
320
+ config_addition = <<~RUBY
321
+
322
+ # Parasite attachment configuration
323
+ Hokipoki.configure do |config|
324
+ config.parasite_attachment = true
325
+ config.parasite_type = '#{options[:parasite_type]}'
326
+ end
327
+ RUBY
328
+
329
+ append_to_file main_config_file, config_addition
330
+ end
314
331
 
315
- append_to_file main_config_file, config_addition
316
332
  say "📝 Updated main hokipoki config", :green
317
333
  else
318
334
  # Create the config file if it doesn't exist
319
335
  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
336
+ # HokiPoki Configuration
337
+ Hokipoki.configure do |config|
338
+ # Parasite attachment enabled
339
+ config.parasite_attachment = true
340
+ config.parasite_type = '#{options[:parasite_type]}'
341
+ end
327
342
  RUBY
328
343
  say "📝 Created hokipoki config with parasite settings", :green
329
344
  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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails Utilities