shookach 0.0.2 → 0.1.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/.gitignore +15 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +67 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/shookach/version.rb +3 -0
- data/public/input/test_file.txt +12 -0
- data/public/output/.keep +0 -0
- data/shookach.gemspec +28 -0
- metadata +59 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da3e8de8ec51fd036c0c153ef9aeb067c5ee33b3277d22b6f20b89b3a1289a31
|
|
4
|
+
data.tar.gz: f8b4d264dfeff8c7747bbf67e9cedb9f867a2623f1368200011b444af2df01f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a252f3993754a9d4f5330dc7ff1f19cff5a38284bc2860461d8f2c710b6293460a131d47b029344c23737d7497d0efc00e3422c6303fba1b0a3c25daacf61fb
|
|
7
|
+
data.tar.gz: e72c7b00e9ca92cf268878abe7dd1d47d1f9b252d193bda984130f38de90f66612704700996b34f6944bc911624a3a25a2626d59b7389a7fa25d61e44ec7eeef
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Bohdan Chaban
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# SHOOKACH
|
|
2
|
+
|
|
3
|
+
Simple gem for basic full-text search
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
$ gem install shookach
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or with Bundler in your Gemfile.
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
gem 'shookach'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Getting started
|
|
18
|
+
|
|
19
|
+
### Indexing
|
|
20
|
+
|
|
21
|
+
Index files in `./public/input/` directory and store to `./public/output/`
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
Shookach.index
|
|
25
|
+
```
|
|
26
|
+
or
|
|
27
|
+
```ruby
|
|
28
|
+
rake shookach:index
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Index files from specific directory
|
|
32
|
+
|
|
33
|
+
```ruby
|
|
34
|
+
Shookach.index({library_path: 'path/to/input/dir/'})
|
|
35
|
+
```
|
|
36
|
+
or
|
|
37
|
+
```ruby
|
|
38
|
+
rake shookach:index['path/to/input/dir/']
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Store indexes file to specific directory
|
|
42
|
+
|
|
43
|
+
```ruby
|
|
44
|
+
Shookach.index({output_path: 'path/to/output/dir/'})
|
|
45
|
+
```
|
|
46
|
+
or
|
|
47
|
+
```ruby
|
|
48
|
+
rake shookach:index[,'path/to/output/dir/']
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Index files from specific directory and file to specific directory
|
|
52
|
+
|
|
53
|
+
```ruby
|
|
54
|
+
Shookach.index({library_path: 'path/to/input/dir/', output_path: 'path/to/output/dir/'})
|
|
55
|
+
```
|
|
56
|
+
or
|
|
57
|
+
```ruby
|
|
58
|
+
rake shookach:index['path/to/input/dir/','path/to/output/dir/']
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Contributing
|
|
62
|
+
|
|
63
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/BohdanChaban/shookach.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
require 'shookach'
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require 'irb'
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
|
|
2
|
+
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
|
|
3
|
+
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
|
|
4
|
+
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
|
|
5
|
+
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
|
|
6
|
+
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
|
7
|
+
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.
|
|
8
|
+
The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters,
|
|
9
|
+
as opposed to using 'Content here, content here', making it look like readable English.
|
|
10
|
+
Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text,
|
|
11
|
+
and a search for 'lorem ipsum' will uncover many web sites still in their infancy.
|
|
12
|
+
Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
|
data/public/output/.keep
ADDED
|
File without changes
|
data/shookach.gemspec
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
require './lib/shookach/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |s|
|
|
6
|
+
s.name = 'shookach'
|
|
7
|
+
s.version = Shookach::VERSION
|
|
8
|
+
s.authors = ['Bohdan Chaban']
|
|
9
|
+
s.email = 'b.chaban.91@gmail.com'
|
|
10
|
+
|
|
11
|
+
s.summary = 'Full-text search'
|
|
12
|
+
s.description = 'A simple gem for full-text search'
|
|
13
|
+
s.homepage = 'https://github.com/BohdanChaban/shookach'
|
|
14
|
+
s.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
18
|
+
s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
20
|
+
end
|
|
21
|
+
s.bindir = "exe"
|
|
22
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
|
+
s.require_paths = ["lib"]
|
|
24
|
+
|
|
25
|
+
s.add_development_dependency "bundler", "~> 1.16"
|
|
26
|
+
s.add_development_dependency "rake", "~> 10.0"
|
|
27
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
|
28
|
+
end
|
metadata
CHANGED
|
@@ -1,27 +1,82 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shookach
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bohdan Chaban
|
|
8
8
|
autorequire:
|
|
9
|
-
bindir:
|
|
9
|
+
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2018-08-08 00:00:00.000000000 Z
|
|
12
|
-
dependencies:
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.16'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.16'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '10.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '10.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '3.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '3.0'
|
|
13
55
|
description: A simple gem for full-text search
|
|
14
56
|
email: b.chaban.91@gmail.com
|
|
15
57
|
executables: []
|
|
16
58
|
extensions: []
|
|
17
59
|
extra_rdoc_files: []
|
|
18
60
|
files:
|
|
61
|
+
- ".gitignore"
|
|
62
|
+
- ".rspec"
|
|
63
|
+
- ".travis.yml"
|
|
64
|
+
- Gemfile
|
|
65
|
+
- LICENSE.txt
|
|
66
|
+
- README.md
|
|
67
|
+
- Rakefile
|
|
68
|
+
- bin/console
|
|
69
|
+
- bin/setup
|
|
19
70
|
- lib/shookach.rb
|
|
20
71
|
- lib/shookach/indexer.rb
|
|
21
72
|
- lib/shookach/railtie.rb
|
|
22
73
|
- lib/shookach/searcher.rb
|
|
74
|
+
- lib/shookach/version.rb
|
|
23
75
|
- lib/tasks/shookach.rake
|
|
24
|
-
|
|
76
|
+
- public/input/test_file.txt
|
|
77
|
+
- public/output/.keep
|
|
78
|
+
- shookach.gemspec
|
|
79
|
+
homepage: https://github.com/BohdanChaban/shookach
|
|
25
80
|
licenses:
|
|
26
81
|
- MIT
|
|
27
82
|
metadata: {}
|