fictionArt 0.0.6 → 0.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fictionArt.rb +5 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 496fa080f2ac123fdd01cf3e9a4c9cb16f19b614094d555ac1c6c97cfd4d2e14
4
- data.tar.gz: a62dffae58d4a78ff2004abc9d49eca66184fcbba5379e111cbaef8ba536deee
3
+ metadata.gz: c1c828072a3b009f552ce76cf5a61e78168953bde35d1c87ada0fff90ef3d0b0
4
+ data.tar.gz: 47f3f92c1f579f5238c17ea20b9fb0f8dade32ea68dd14d582d0afefcd6bdec2
5
5
  SHA512:
6
- metadata.gz: 947a4d6f33714340df5e07c1d3b835650c5d376e2dfafc44aa69a256a63177a9ae8a95d6a024471fcc30571a16ac59f2149697d8f02e52c9137c3acd67d3d287
7
- data.tar.gz: a2e246537882422021a10e8d2c67aea93b8842ee84f2015d55f87a399d51fe5bb1fba6d40cb7c52c2a85fc656d5183d7f8cefc95069cf40c2faed62bdce0e48f
6
+ metadata.gz: 04be91d8132b61b0e1b98ccada1f1c835e0865297d1ca4cc521df9523cbc35026a40f1f15cc55dc0c7fa7c5adf77368e21e743f347261c49f2bff49429d12aa3
7
+ data.tar.gz: 37edb9fbd22c9afe354c183118dc1637a546d18e5359f0585b9b5ac48d1bb961bd3b471a086a853dbc069e19a9f06a2be72a4fc4b1b7c79b34f65396a0ae3cdf
data/lib/fictionArt.rb CHANGED
@@ -13,7 +13,7 @@ class FictionArt
13
13
  def initialize(text = "nothing")
14
14
 
15
15
  @image_chars ||= ' .~:+=o*x^%#@'.chars.to_a
16
- check = Dir.glob("images/#{text}.jpg")
16
+ check = Dir.glob("#{__dir__}/../images/#{text}.jpg")
17
17
 
18
18
  if check.length == 0
19
19
  if text == "nothing"
@@ -97,9 +97,9 @@ class FictionArt
97
97
 
98
98
  # Listing all currently possible characters
99
99
  def list_all
100
- list = Dir.glob("images/*.jpg")
100
+ list = Dir.glob("#{__dir__}/../images/*.jpg")
101
101
  list.each do |character|
102
- puts character.chomp(".jpg").slice(7..-1)
102
+ puts character[/.*images\/(.*).jpg/,1]
103
103
  end
104
104
  end
105
105
 
@@ -107,10 +107,10 @@ class FictionArt
107
107
  # Checking matching characters from character inputted
108
108
  def check_possible(text)
109
109
  puts "Possible Characters:"
110
- list = Dir.glob("images/*.jpg")
110
+ list = Dir.glob("#{__dir__}/../images/*.jpg")
111
111
 
112
112
  list.each do |character|
113
- character = character.chomp(".jpg").slice(7..-1)
113
+ character = character[/.*images\/(.*).jpg/,1]
114
114
  if character.downcase.include? text.downcase
115
115
  puts character
116
116
  elsif text.downcase.include? character.downcase
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fictionArt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vaibhav Thakkar