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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 865cd6643ebbfc5adc8f873a9c7f9b7e5a91fb5f719f03985541aa6cbcd7ef3d
4
- data.tar.gz: 35c647ccc636e9441cd2df6d5c1dcc0ccb19eb38cd10b1520b5ee0594940b3d0
3
+ metadata.gz: da3e8de8ec51fd036c0c153ef9aeb067c5ee33b3277d22b6f20b89b3a1289a31
4
+ data.tar.gz: f8b4d264dfeff8c7747bbf67e9cedb9f867a2623f1368200011b444af2df01f8
5
5
  SHA512:
6
- metadata.gz: aeabad7c1dcd7daed2824662243d27f84ab9d7bc320b4df51bae527a321d56814e5e51135a92cc59aa8c29f664fddaa2c1717c8cbf52fd7e8baf7a7377995f4d
7
- data.tar.gz: d8aca686d11a684a45f8f0c45b9e4515ec6fad2f9f8d1cc320ccfbba655b5c84e0445c8da9068be0d953bb06653e41bf0125c27dc89d64420a347f009fbef86e
6
+ metadata.gz: 6a252f3993754a9d4f5330dc7ff1f19cff5a38284bc2860461d8f2c710b6293460a131d47b029344c23737d7497d0efc00e3422c6303fba1b0a3c25daacf61fb
7
+ data.tar.gz: e72c7b00e9ca92cf268878abe7dd1d47d1f9b252d193bda984130f38de90f66612704700996b34f6944bc911624a3a25a2626d59b7389a7fa25d61e44ec7eeef
@@ -0,0 +1,15 @@
1
+ .idea/
2
+ public/output/*.yml
3
+ Gemfile.lock
4
+ *.gem
5
+ /.bundle/
6
+ /.yardoc
7
+ /_yardoc/
8
+ /coverage/
9
+ /doc/
10
+ /pkg/
11
+ /spec/reports/
12
+ /tmp/
13
+
14
+ # rspec failure tracking
15
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.16.2
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in shookach.gemspec
6
+ gemspec
@@ -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.
@@ -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).
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -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__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ module Shookach
2
+ VERSION = '0.1.0'
3
+ end
@@ -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).
File without changes
@@ -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.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bohdan Chaban
8
8
  autorequire:
9
- bindir: bin
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
- homepage: http://rubygems.org/gems/shookach
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: {}