sylvia 0.2.3 → 0.2.4

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: b996946d6bd307b3b0e385963c238b74d564d90e23dc83d168b8924f83555eed
4
+ data.tar.gz: 1e45d396296e8a7a8a308e6598c48253e60f3fa9124d6f088673e18b58d126c9
5
5
  SHA512:
6
- metadata.gz: b782bce866c39f346b0574b74662461c78ca423c5cb7c5512a81357626f35b817c8ac15c657199c5f927a41dfcd01fd1e06d49c337a6950895de06941c6a2374
7
- data.tar.gz: 3d42cbf0b1dfffc74c13e6dfe1cebede4a2f66b57b1fa683b37390634adebb96296c589f1fcc3c2ec559852f517c5d1ed164e8e4d1859ae0507019da3f07f22a
6
+ metadata.gz: fd3ff4d9f5123c32367cd9da99a28630904fad70ae6c48cd63a514a7d03df865433a3c14995ca53d146c885bd7fba0ac3a15402d6c2964306e794219b1bf2032
7
+ data.tar.gz: c5092e04ef9610fce21844fdfd74d4eb51bdd366384e6dd30b622f5a056e90cab25a890800f516c338c2649e425221096e1404f863ce5554fbd635e841a9f99d
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,19 @@ 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).split("\n")
39
+ if gitignore_content.include?(FILE_NAME)
40
+ puts "#{FILE_NAME} is already in #{GITIGNORE_FILE}"
41
+ else
42
+ File.open(GITIGNORE_FILE, 'a') { |f| f.puts FILE_NAME }
43
+ puts "Added #{FILE_NAME} to #{GITIGNORE_FILE}"
44
+ end
45
+ else
46
+ File.write(GITIGNORE_FILE, "#{FILE_NAME}\n")
47
+ puts "Created #{GITIGNORE_FILE} and added #{FILE_NAME}"
48
+ end
36
49
  end
37
50
 
38
51
  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.4"
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - whdzera