search_ui 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c17da01199e19d7266178d6d469dffff01c796214271242bf68c9541da888754
4
- data.tar.gz: 56a66a3d4b717937d5dd37942b47da072288a96df55d5eea334590cdb493e5df
3
+ metadata.gz: 4a803ca8341878f37100f33b2f5268777de2cada78ca41d7c15e23b280335d4a
4
+ data.tar.gz: 372d50be19da24197c621e845578570d475e39e30556e714f1591f5e15218ffe
5
5
  SHA512:
6
- metadata.gz: 92fdf1ed5ce3657e9359ec0d1b14ef3762725258835e67ab9f64e01074abdd018c7d0d67c0e250707dcc4d6829f0c058723046f797bdaa7e071962d6072b88b1
7
- data.tar.gz: 6a94e4e1410cedbdd0ca0e227f0592ad75537aa878285fbf9080aa75effa42a52851fec693ff12f21ce518dbaacc5f740f325006034e9464f49cb0a9ad045c46
6
+ metadata.gz: 475d576708b5ac59bc8092c398f19b725fb4bd32bfda7132a8990a323e49a2a0457b986081312ce7ef8056d7bb3a90f398a0fe5fee133c200c0ddf48011e45f2
7
+ data.tar.gz: ea0e599531f233a74119f0581e97b10708ac57008a7d69309cc63997bf75d66ffd030d520bfa97da49662bbd2ce34f2c8c0cf5e7d4452d8ec48c8dc3e1d1c4ad
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/search_it CHANGED
@@ -2,12 +2,21 @@
2
2
 
3
3
  require 'search_ui'
4
4
  require 'tins/terminal'
5
+ require 'tins/go'
6
+ include Tins::GO
5
7
  require 'amatch'
6
8
  include SearchUI
7
9
 
10
+ opts = go('f:')
8
11
 
9
- choices = ARGV
10
- exit if choices.empty?
12
+ choices =
13
+ if filename = opts[?f]
14
+ File.readlines(filename).map(&:chomp)
15
+ elsif ARGV.empty?
16
+ exit
17
+ else
18
+ ARGV
19
+ end
11
20
 
12
21
  found = Search.new(
13
22
  match: -> answer {
@@ -1,6 +1,6 @@
1
1
  module SearchUi
2
2
  # SearchUi version
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/search_ui.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: search_ui 0.0.2 ruby lib
2
+ # stub: search_ui 0.0.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "search_ui".freeze
6
- s.version = "0.0.2"
6
+ s.version = "0.0.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2023-09-05"
11
+ s.date = "2023-09-30"
12
12
  s.description = "This library allows a user to search an array of objects\n interactively in the console by matching the pattern a user inputs to an\n array of objects and pick one of the remaining objects.".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["search_it".freeze]
@@ -18,26 +18,15 @@ Gem::Specification.new do |s|
18
18
  s.licenses = ["MIT".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "SearchUi -- Search User Interface".freeze, "--main".freeze, "README.md".freeze]
20
20
  s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
21
- s.rubygems_version = "3.3.26".freeze
21
+ s.rubygems_version = "3.4.1".freeze
22
22
  s.summary = "Library to provide a user interface for searching in a console".freeze
23
23
 
24
- if s.respond_to? :specification_version then
25
- s.specification_version = 4
26
- end
24
+ s.specification_version = 4
27
25
 
28
- if s.respond_to? :add_runtime_dependency then
29
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.12.0"])
30
- s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.0"])
31
- s.add_development_dependency(%q<debugger>.freeze, [">= 0"])
32
- s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0"])
33
- s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.0"])
34
- s.add_runtime_dependency(%q<amatch>.freeze, ["~> 0.0"])
35
- else
36
- s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.12.0"])
37
- s.add_dependency(%q<simplecov>.freeze, ["~> 0.0"])
38
- s.add_dependency(%q<debugger>.freeze, [">= 0"])
39
- s.add_dependency(%q<tins>.freeze, ["~> 1.0"])
40
- s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.0"])
41
- s.add_dependency(%q<amatch>.freeze, ["~> 0.0"])
42
- end
26
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.12.0"])
27
+ s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.0"])
28
+ s.add_development_dependency(%q<debugger>.freeze, [">= 0"])
29
+ s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.0"])
30
+ s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.0"])
31
+ s.add_runtime_dependency(%q<amatch>.freeze, ["~> 0.0"])
43
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2023-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.3.26
145
+ rubygems_version: 3.4.1
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Library to provide a user interface for searching in a console