to_llm 0.1.3 → 0.1.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: 79e005ef579c63795093a10bc0318048894fdaef71f959eaac97ec46d9d12340
4
- data.tar.gz: 297867c42b4a9caf4d803798edd51deae0fcf63815f47a3e742ddd60cbf918ab
3
+ metadata.gz: 272e53a0ac0f7884371c9fa523c60f32dd23b4241d0dcc949c407fa4b45dea86
4
+ data.tar.gz: ef6267d899e4793b1c8d2763f2491fbd586ee1a503d105f3f394a4cdb2a1a7f8
5
5
  SHA512:
6
- metadata.gz: 3aaa9070c20e815f41aebb34bb933e4ac289e45b0640edb0abe80af02b818ed3e42d7c902194df3571363229c0b5fd839cd3fc3c8d90e04f6bed6f61f15523a1
7
- data.tar.gz: 9bde15f9c6be326a6659fd7d6d497234de245928c59179c0d5bc2487c254d446228684be518cbca768ec5a479e1449de2410db75ac02ff545cfd1426b7f17e65
6
+ metadata.gz: 79446a1b1042821384978913b7ff1d5b098020baeae8fb0df623c907d63273f7f40823d27c7c0953850b3630f2e972b6e40639f046929cbbabe33bb39965a091
7
+ data.tar.gz: f164be05f14d0581269830a483a5657c943e1f8c80cdf69bc2099fceb31d23113f9dd6c4c03e67dca3f0a2afdc139f58acc96fd4017dfb4a9b9d6123fbed8c52
@@ -119,8 +119,11 @@ namespace :to_llm do
119
119
  "Examples:\n" \
120
120
  " rails \"to_llm:extract[ALL,md]\"\n" \
121
121
  " rails \"to_llm:extract[MODELS,txt]\""
122
- task :extract, [:type_and_format] => :environment do |_t, args|
123
- if args[:type_and_format].blank?
122
+ task :extract, [:type, :format] => :environment do |_t, args|
123
+ type = (args[:type] || "ALL").upcase
124
+ format = (args[:format] || "txt").downcase
125
+
126
+ if args[:type].blank? || args[:format].blank?
124
127
  # No parameters passed -> show help message
125
128
  puts "--------------------------------------------------------------------"
126
129
  puts "Usage: rails \"to_llm:extract[TYPE,FORMAT]\""
@@ -133,9 +136,7 @@ namespace :to_llm do
133
136
  next
134
137
  end
135
138
 
136
- # Attempt to parse "TYPE,FORMAT"
137
- type, format = args[:type_and_format].split(",")
138
-
139
+
139
140
  if format.nil?
140
141
  # Old usage
141
142
  puts "You are using the old usage: rails to_llm:extract #{type}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ToLLM
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Carlos Maciel