sylvia 0.2.3 → 0.2.5

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: b36536661b2da3b7b5831f99d79b1b6d7f57c40a43eddbf2026bc68e25b6c9c7
4
- data.tar.gz: 37ae0cb4923b95e61d12aba773f0833293cc9225a63df9221e12bec9b9f6b3de
3
+ metadata.gz: c34bb60cfa6051d1abc0e47ef8c98f2e041387d0f6629a976c873865243f16b3
4
+ data.tar.gz: 06f0445f90ba8b7966e89f9d5a643e35702324db20153728ba75111804f2e3d7
5
5
  SHA512:
6
- metadata.gz: b782bce866c39f346b0574b74662461c78ca423c5cb7c5512a81357626f35b817c8ac15c657199c5f927a41dfcd01fd1e06d49c337a6950895de06941c6a2374
7
- data.tar.gz: 3d42cbf0b1dfffc74c13e6dfe1cebede4a2f66b57b1fa683b37390634adebb96296c589f1fcc3c2ec559852f517c5d1ed164e8e4d1859ae0507019da3f07f22a
6
+ metadata.gz: 9dc1a2aae9564c61d52a137a5ef8a19ab943d0b62a4209eb6f9ffa381bb0649fa22d3745aff442d2f16975efbc2c2c206816d87a5cc08243ccac95564f11579a
7
+ data.tar.gz: 965069849d23eaa084fc7992dc7236e1da04fc2649129a0aaac80f6f0d410f6834d59f0590c87e6cb06cc804de662930eb96faa18f038cc00637871855964df8
data/lib/sylvia/llm.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module Sylvia
2
2
  class LLM
3
3
  FILE_NAME = 'sylvia.rb'
4
+ GITIGNORE_FILE = '.gitignore'
4
5
 
5
6
  def self.setup
6
7
  content = <<~RUBY
@@ -10,7 +11,6 @@ module Sylvia
10
11
  api_key = 'xxx'
11
12
  model_ai = 'gemini-2.0-flash'
12
13
 
13
-
14
14
  RubyLLM.configure do |config|
15
15
  config.gemini_api_key = api_key
16
16
  end
@@ -33,6 +33,20 @@ PROMPT
33
33
 
34
34
  File.write(FILE_NAME, content)
35
35
  puts "Created #{FILE_NAME}"
36
+
37
+ if File.exist?(GITIGNORE_FILE)
38
+ gitignore_content = File.read(GITIGNORE_FILE)
39
+ gitignore_content += "\n" unless gitignore_content.end_with?("\n")
40
+ if gitignore_content.include?(FILE_NAME)
41
+ puts "#{FILE_NAME} is already in #{GITIGNORE_FILE}"
42
+ else
43
+ File.open(GITIGNORE_FILE, 'a') { |f| f.puts FILE_NAME }
44
+ puts "Added #{FILE_NAME} to #{GITIGNORE_FILE}"
45
+ end
46
+ else
47
+ File.write(GITIGNORE_FILE, "#{FILE_NAME}\n")
48
+ puts "Created #{GITIGNORE_FILE} and added #{FILE_NAME}"
49
+ end
36
50
  end
37
51
 
38
52
  def self.run
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sylvia
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sylvia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - whdzera