Strainer_2.0 1.0 → 2.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/strainer/attributeparser.rb +2 -0
- data/lib/strainer/environment.rb +2 -1
- data/lib/strainer/strainer.rb +7 -2
- data/strainer.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a71e7e08f136cd52fe1d26ba009794b7c1d04f180d1cea8448cfb2182122c973
|
4
|
+
data.tar.gz: 469bd83e74933695db404e2835ac26826c73b6328eecc3ce0b52543441ee0a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d4eb33e5dc82ee2157384f52f47e571663bd1c6ba531cbc26454c09e3ff37bab1349e33ae34f8de3a59c47c183937e316e9db3cd805dd7fee2f72916e809b6c
|
7
|
+
data.tar.gz: 66e03c854fc4482a81c3a3cc2e6cb0badae3dcea9a2f210e16d401889bffafe1c6a1630e53c1616a799be93093b8c908b961271aa161412fbe67daa242ec84fe
|
data/Gemfile.lock
CHANGED
data/lib/strainer/environment.rb
CHANGED
data/lib/strainer/strainer.rb
CHANGED
@@ -3,7 +3,9 @@ require_relative './attributeparser.rb'
|
|
3
3
|
|
4
4
|
module Strainer
|
5
5
|
class Error < StandardError; end
|
6
|
-
|
6
|
+
|
7
|
+
puts "Choosing ALL returns a LOT of data in a hash, be ready for it!"
|
8
|
+
|
7
9
|
prompt = TTY::Prompt.new
|
8
10
|
first_choice = prompt.select("By what strain attribute would you like to search?", %w(Name Race Effect Flavor ALL))
|
9
11
|
|
@@ -20,6 +22,9 @@ encoded_second_choice = URI::encode("#{second_choice}") #changes spaces in the u
|
|
20
22
|
|
21
23
|
selection = AttributeParser.new("http://strainapi.evanbusse.com/rvxnT8j/strains/search/#{first_choice}/#{encoded_second_choice}")
|
22
24
|
|
23
|
-
|
25
|
+
results = selection.parse_json
|
26
|
+
|
27
|
+
puts Hirb::Helpers::AutoTable.render(results, fields: %w|id name race desc flavor effect|)
|
28
|
+
|
24
29
|
end
|
25
30
|
end
|
data/strainer.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Strainer_2.0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '2.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Ruhaak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Will allow a user to retrieve strain specific information such as Name,
|
14
14
|
Race, Effects & Flavor.
|