rhymera 0.1.0 → 0.1.1

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: 5b96a95db9092b81d0e49e6d605149a786591d3163c00b54ac16fe6b8135b7ca
4
- data.tar.gz: aa3427319c0277b7a03950d8332fce7877b25c805d45410e83353f4eaefb64d5
3
+ metadata.gz: 8e97e953e301b42a87bc7e5896d7328eb285078fba9b9b5d86c50c712f4a09e9
4
+ data.tar.gz: ed8ff913a3adaa2e8a21b42546ecbb9a6485e36cc2fac065be57b1bfc2499c08
5
5
  SHA512:
6
- metadata.gz: 7978d48c09e80951451e2ad7f225dfc6e37dbafd652b41031855b5e1fd428ba913583b214a79f60ebf63a54540e28ee915be25ee247a9928f887e016a4e91e01
7
- data.tar.gz: 5041c8f4e50df8e96307cf1d3a2c15505061b44635b48aea6dd3353050f237a522f5e93334eb8f0a0b353061394c2b676daae35973378893038affcdc66c129f
6
+ metadata.gz: b55094fe8a0982688e50f3f50790e59b597010612606948e8e35844f4118af31c9f7f5ce714628ed67a2dca525fa92c73de9b3e4d4c9346411b163ca753e5d04
7
+ data.tar.gz: cd774e679211aeb3765dc6d96830358d01ce057609d5700df131737ae91e9f04eef97e3a5424b9838a5d07f960bec7eaf3ebe21310fb3e89fd6f3059fc25b17d
@@ -1,4 +1,5 @@
1
1
  CHANGELOG
2
2
  ===
3
3
 
4
- - Version 0.1: first working release!
4
+ - Version 0.1.0: first working release!
5
+ - Version 0.1.1: fixed bug in `detail_view` logic
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rhymera (0.1.0)
4
+ rhymera (0.1.1)
5
5
  clipboard (~> 1.3)
6
6
  tty-prompt (~> 0.23)
7
7
 
@@ -40,7 +40,12 @@ module Rhymera
40
40
  results << @list.entries.map { |ent| { ent.word.to_s => ent } }
41
41
  result = prompt.select("#{@function} for '#{@word}' and other options:", results)
42
42
 
43
- @word = result.word
43
+ @word = if result.instance_of?(Rhymera::Rhyme) ||
44
+ result.instance_of?(Rhymera::Portmanteau)
45
+ result.word
46
+ else
47
+ result
48
+ end
44
49
  detail_view(result)
45
50
  end
46
51
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rhymera
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhymera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Cline
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -123,7 +123,6 @@ files:
123
123
  - lib/rhymera/rhymebrain.rb
124
124
  - lib/rhymera/version.rb
125
125
  - rhymera.gemspec
126
- - scratch.rb
127
126
  homepage: https://github.com/revarcline/rhymera
128
127
  licenses: []
129
128
  metadata:
data/scratch.rb DELETED
@@ -1,31 +0,0 @@
1
- require 'tty-prompt'
2
- require_relative 'lib/rhymera'
3
- prompt = TTY::Prompt.new
4
- port_list = Rhymera::List.new(function: 'getPortmanteaus', word: 'fancy')
5
-
6
- prompt.yes?('is this working?')
7
-
8
- prompt.select('Select a result for more info',
9
- port_list.entries.map(&:word))
10
-
11
- object = prompt.select('Select a result for more info',
12
- port_list.entries.map { |entry| { entry.word.to_s => entry } })
13
-
14
- object.instance_variables
15
-
16
- object.instance_variables.first.to_s.gsub('@', '')
17
-
18
- object.source_one
19
-
20
- object.instance_variables.each do |var|
21
- arg = var.to_s.gsub('@', '')
22
- puts "#{arg.capitalize}: #{object.send(arg)}"
23
- end
24
-
25
- Rhymera::List.all
26
-
27
- Rhymera::List.all.first.class.to_s.split('::')[1]
28
- Rhymera::List.all.first.entries.first.word
29
-
30
- Rhymera::List.all.first.query
31
- Rhymera::List.all.first.type[3..]