prompt-lists 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/prompt_lists.rb +5 -5
- data/lists/photography/photographer.yml +852 -944
- metadata +3 -5
- data/lists/animal/all.yml +0 -1872
- data/lists/artist/all.yml +0 -1762
- /data/lists/color/{all.yml → color.yml} +0 -0
- /data/lists/feeling/{all.yml → emotion.yml} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a32d7160bd03ddb40bea30eaabeb90c2f4ba99e85c972c70fd26b43f6f33d19
|
4
|
+
data.tar.gz: 11e7d757572711d98ee978731ed99b81364d11e378f5f19f9b19ba3e1b539355
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5363c5c8edd63ea2c027b2f35b0284d9cf45c274bf9910eaf4328493aec16960690d52bbaac05b7d9aded9064cfc83e5cb1716d8f3caaeae21d002a23e2ca861
|
7
|
+
data.tar.gz: 18fc2b6cc2eebe17643c0f66e56af74dcb14987eb49771542518e0eee4bbd642c3a587570c588142a51eb832d23d27070ce593f6198b882885e329df0fbc843e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/prompt_lists.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'yaml'
|
4
4
|
|
5
5
|
module PromptLists
|
6
|
-
VERSION = '0.0.
|
6
|
+
VERSION = '0.0.4'
|
7
7
|
|
8
8
|
class List
|
9
9
|
def initialize(list_name, sublist_names)
|
@@ -14,7 +14,7 @@ module PromptLists
|
|
14
14
|
def method_missing(method_name, *args)
|
15
15
|
sublist = @sublists.find { |sublist| sublist == method_name }
|
16
16
|
if sublist
|
17
|
-
path = "lists/#{@id}/#{sublist}.yml"
|
17
|
+
path = File.expand_path("../lists/#{@id}/#{sublist}.yml", __dir__)
|
18
18
|
Sublist.new(path)
|
19
19
|
else
|
20
20
|
super
|
@@ -42,7 +42,7 @@ module PromptLists
|
|
42
42
|
|
43
43
|
class << self
|
44
44
|
def all
|
45
|
-
Dir["lists/*"].map do |list|
|
45
|
+
Dir[File.expand_path("../lists/*", __dir__)].map do |list|
|
46
46
|
list_name = File.basename(list)
|
47
47
|
List.new(list_name, load_sublists(list_name))
|
48
48
|
end
|
@@ -61,13 +61,13 @@ module PromptLists
|
|
61
61
|
private
|
62
62
|
|
63
63
|
def load_sublists(list_name)
|
64
|
-
Dir["lists/#{list_name}/*.yml"].map do |file_path|
|
64
|
+
Dir[File.expand_path("../lists/#{list_name}/*.yml", __dir__)].map do |file_path|
|
65
65
|
File.basename(file_path, ".yml").gsub(/-/, "_").to_sym
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
69
|
def list_exists?(list_name)
|
70
|
-
Dir.exist?("lists/#{list_name}")
|
70
|
+
Dir.exist?(File.expand_path("../lists/#{list_name}", __dir__))
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|