simple_rag 0.1.2 → 0.1.3

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: 8819bca51827c5ce7e25655046e7ac9890ed1d07e76216be3ad141727863291b
4
- data.tar.gz: d49fae4dc8987123feeea01fe353740744e33fb96893ca8a073c84d34fb9f5b4
3
+ metadata.gz: 2561f5f1e139dc1756fcf07e662970cfa513f4ccfc021cc97f9664ec793aba33
4
+ data.tar.gz: 43968aafd230f2f21a450ec512ee55654cd3f2af54bd90fa5fafa28b01db6ad1
5
5
  SHA512:
6
- metadata.gz: 5ea333e9d27b0324b80e4cd216e161e79f25e600f261d417052e63ce9da395922fa5d17b6db52c0f362adb2e90ebfcf9b8eb2a3a4e3adb05a17bc34ba9b3c534
7
- data.tar.gz: a759f83b16340393403fb422839b2cdff6e3990bcc78787224e1010599639b9bac4c19e017fd0aa3502ec55f4d148286ab28ecc6199a01e79c7127447743cbef
6
+ metadata.gz: 9391dcda0ebd8b721085b899c1ad95e31dcf8bad03b436d63711b65d92904f8b9097e01e6489072d4f28c78ff85f777c969be351c4fa48387e6c66ace17b52eb
7
+ data.tar.gz: ee6397e137c054c51c57b34e2872a231e88bbf01815a3a6f317546aa2a5786f238cf4245fa4463744fc6702e5c2d269369289da0ad09abdb6525d90038a3c812
@@ -8,7 +8,8 @@ module SimpleRag
8
8
  def load(url)
9
9
  response = HTTParty.get(url)
10
10
  text = response.body
11
- File.write(corrected_file_path, text)
11
+
12
+ File.write(get_absolute_path, text)
12
13
  @text = text
13
14
  text
14
15
  end
@@ -29,12 +30,9 @@ module SimpleRag
29
30
  index
30
31
  end
31
32
 
32
- private
33
- def corrected_file_path
34
- #Todo: Fix this terrible hack.
35
- # Get the absolute path to the 'data' directory within the gem
36
- data_dir = File.expand_path('../../../data', __FILE__)
37
- file_path = File.join(data_dir, 'essay.txt')
33
+ #TODO: Strip out this hack.
34
+ def get_absolute_path
35
+ File.expand_path('../../../data/essay.txt', __FILE__)
38
36
  end
39
37
  end
40
38
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleRag
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_rag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Landon Gray