searchy-json 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -4
- data/README.md +2 -2
- data/lib/searchy.rb +1 -1
- data/lib/searchy/data.rb +1 -1
- data/lib/searchy/extracter.rb +1 -1
- data/lib/searchy/query.rb +1 -1
- data/lib/searchy/service.rb +3 -3
- data/lib/searchy/version.rb +2 -2
- data/searchy.gemspec +2 -2
- data/spec/searchy/service_spec.rb +2 -2
- metadata +2 -3
- data/searchy-json-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b31d32f50475a1e1e06b6b0503b83b199d590fbe9d02e6a02d2ecc646037d7b
|
4
|
+
data.tar.gz: 3da2227dcf3a6810cbdcc196d47d38a78bd6e48b7507a3d98875a8049e388ca2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea1c6822b1c07b7a556d5aa716f669efb44fb7b5111ed5ce68f8629d60a8d8d655eb8c25842ae252fdb6dffd4dc1b71e040b2a15055609cfcb0a23d7e104d5e
|
7
|
+
data.tar.gz: ca4dc483e67962698bc439537ffa05947a79b213390155a01710c5db7e8d80b13f8a4759fdfc2d69c156d1ea807af98ee9dba3216b9daf530b817566596e3151
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
searchy (0.
|
4
|
+
searchy-json (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -45,12 +45,10 @@ PLATFORMS
|
|
45
45
|
ruby
|
46
46
|
|
47
47
|
DEPENDENCIES
|
48
|
-
bundler (~> 1.17)
|
49
48
|
pry (~> 0.12)
|
50
|
-
rake (~> 10.0)
|
51
49
|
rspec (~> 3.0)
|
52
50
|
rubocop (~> 0.48.0)
|
53
|
-
searchy!
|
51
|
+
searchy-json!
|
54
52
|
|
55
53
|
BUNDLED WITH
|
56
54
|
1.17.3
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# SearchyJson
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/searchy`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
40
|
|
41
41
|
## Code of Conduct
|
42
42
|
|
43
|
-
Everyone interacting in the
|
43
|
+
Everyone interacting in the SearchyJson project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/searchy/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/searchy.rb
CHANGED
data/lib/searchy/data.rb
CHANGED
data/lib/searchy/extracter.rb
CHANGED
data/lib/searchy/query.rb
CHANGED
data/lib/searchy/service.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module SearchyJson
|
2
2
|
class Service
|
3
3
|
attr_reader :data_path, :primary_key, :search_fields
|
4
4
|
|
@@ -9,14 +9,14 @@ module Searchy
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def find(query)
|
12
|
-
search_query =
|
12
|
+
search_query = SearchyJson::Query.new(query)
|
13
13
|
Extracter.new(search_data, search_query).call
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
18
|
def search_data
|
19
|
-
@search_data ||=
|
19
|
+
@search_data ||= SearchyJson::Data.new(data_path, primary_key: primary_key, search_fields: search_fields).call
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
data/lib/searchy/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
2
|
-
VERSION = "0.
|
1
|
+
module SearchyJson
|
2
|
+
VERSION = "0.3.0"
|
3
3
|
end
|
data/searchy.gemspec
CHANGED
@@ -5,11 +5,11 @@ require 'searchy/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'searchy-json'
|
8
|
-
spec.version =
|
8
|
+
spec.version = SearchyJson::VERSION
|
9
9
|
spec.authors = ['bezrukavyi']
|
10
10
|
spec.email = ['yaroslav.bezrukavyi@gmail.com']
|
11
11
|
|
12
|
-
spec.summary = '
|
12
|
+
spec.summary = 'SearchyJson Json'
|
13
13
|
spec.description = 'Search in JSON file'
|
14
14
|
spec.homepage = 'https://github.com/bezrukavyi/searchy-json'
|
15
15
|
spec.license = 'MIT'
|
@@ -1,9 +1,9 @@
|
|
1
|
-
RSpec.describe
|
1
|
+
RSpec.describe SearchyJson::Service do
|
2
2
|
let!(:data_path) { File.join(File.dirname(__FILE__), '../../spec/fixtures/data.json') }
|
3
3
|
let!(:primary_key) { 'Name' }
|
4
4
|
let!(:search_fields) { ['Name', 'Type', 'Designed by'] }
|
5
5
|
|
6
|
-
subject {
|
6
|
+
subject { SearchyJson::Service.new(data_path: data_path, primary_key: primary_key, search_fields: search_fields) }
|
7
7
|
|
8
8
|
describe '#find' do
|
9
9
|
context 'Support reverse keywords' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: searchy-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bezrukavyi
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- lib/searchy/query.rb
|
78
78
|
- lib/searchy/service.rb
|
79
79
|
- lib/searchy/version.rb
|
80
|
-
- searchy-json-0.1.0.gem
|
81
80
|
- searchy.gemspec
|
82
81
|
- spec/fixtures/data.json
|
83
82
|
- spec/searchy/service_spec.rb
|
@@ -104,5 +103,5 @@ requirements: []
|
|
104
103
|
rubygems_version: 3.0.3
|
105
104
|
signing_key:
|
106
105
|
specification_version: 4
|
107
|
-
summary:
|
106
|
+
summary: SearchyJson Json
|
108
107
|
test_files: []
|
data/searchy-json-0.1.0.gem
DELETED
Binary file
|