atlasq 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cache/search_index/countries_by_currency.json +1 -0
- data/cache/search_index/countries_by_region.json +1 -0
- data/cache/search_index/direct_match_country.json +1 -0
- data/cache/search_index/direct_match_currency.json +1 -0
- data/cache/search_index/partial_match_country.json +1 -0
- data/cache/search_index/partial_match_currency.json +1 -0
- data/lib/atlasq/cache.rb +27 -0
- data/lib/atlasq/command/any.rb +7 -5
- data/lib/atlasq/command/country.rb +6 -3
- data/lib/atlasq/command/help.rb +2 -0
- data/lib/atlasq/command/money.rb +6 -5
- data/lib/atlasq/command/region.rb +3 -4
- data/lib/atlasq/command.rb +1 -0
- data/lib/atlasq/data.rb +48 -60
- data/lib/atlasq/format.rb +14 -39
- data/lib/atlasq/partial_match.rb +19 -0
- data/lib/atlasq/util/string.rb +41 -6
- data/lib/atlasq/util/word_map.rb +46 -0
- data/lib/atlasq/util.rb +1 -0
- data/lib/atlasq/version.rb +1 -1
- data/lib/atlasq.rb +2 -0
- metadata +11 -18
- data/lib/atlasq/data/currency.rb +0 -20
- data/lib/atlasq/data/region.rb +0 -24
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlasq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Robell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: countries
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '6.9'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: money-heuristics
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.1.1
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.1.1
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: tty-pager
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,8 +76,15 @@ executables:
|
|
90
76
|
extensions: []
|
91
77
|
extra_rdoc_files: []
|
92
78
|
files:
|
79
|
+
- cache/search_index/countries_by_currency.json
|
80
|
+
- cache/search_index/countries_by_region.json
|
81
|
+
- cache/search_index/direct_match_country.json
|
82
|
+
- cache/search_index/direct_match_currency.json
|
83
|
+
- cache/search_index/partial_match_country.json
|
84
|
+
- cache/search_index/partial_match_currency.json
|
93
85
|
- exe/atlasq
|
94
86
|
- lib/atlasq.rb
|
87
|
+
- lib/atlasq/cache.rb
|
95
88
|
- lib/atlasq/command.rb
|
96
89
|
- lib/atlasq/command/any.rb
|
97
90
|
- lib/atlasq/command/base.rb
|
@@ -102,12 +95,12 @@ files:
|
|
102
95
|
- lib/atlasq/command/usage.rb
|
103
96
|
- lib/atlasq/command/version.rb
|
104
97
|
- lib/atlasq/data.rb
|
105
|
-
- lib/atlasq/data/currency.rb
|
106
|
-
- lib/atlasq/data/region.rb
|
107
98
|
- lib/atlasq/format.rb
|
99
|
+
- lib/atlasq/partial_match.rb
|
108
100
|
- lib/atlasq/shell.rb
|
109
101
|
- lib/atlasq/util.rb
|
110
102
|
- lib/atlasq/util/string.rb
|
103
|
+
- lib/atlasq/util/word_map.rb
|
111
104
|
- lib/atlasq/version.rb
|
112
105
|
homepage:
|
113
106
|
licenses:
|
data/lib/atlasq/data/currency.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Atlasq
|
4
|
-
module Data
|
5
|
-
class Currency
|
6
|
-
# @return [String]
|
7
|
-
attr_reader :currency_code
|
8
|
-
|
9
|
-
# @return [Array<Hash>]
|
10
|
-
attr_reader :countries
|
11
|
-
|
12
|
-
# @param countries [Array<Hash>]
|
13
|
-
# @param currency_code [String] ISO4217 currency code
|
14
|
-
def initialize(countries:, currency_code:)
|
15
|
-
@countries = countries
|
16
|
-
@currency_code = currency_code
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
data/lib/atlasq/data/region.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Atlasq
|
4
|
-
module Data
|
5
|
-
class Region
|
6
|
-
# @return [Symbol]
|
7
|
-
attr_reader :type
|
8
|
-
|
9
|
-
# @return [String, nil]
|
10
|
-
attr_reader :name
|
11
|
-
|
12
|
-
# @return [Array<Hash>]
|
13
|
-
attr_reader :countries
|
14
|
-
|
15
|
-
# @param countries [Array<Hash>]
|
16
|
-
# @param type [Symbol] in Atlasq::Data::REGION_TYPES
|
17
|
-
def initialize(countries:, type:)
|
18
|
-
@type = type
|
19
|
-
@name = countries.dig(0, @type.to_s)
|
20
|
-
@countries = countries
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|