redi_search 1.0.2 → 1.0.3

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.
data/.travis.yml ADDED
@@ -0,0 +1,31 @@
1
+ ---
2
+ env:
3
+ global:
4
+ - CC_TEST_REPORTER_ID=fec34310f03fd2cc767a85fa23d5102f3dca67b9cc967a48d9940027731394e8
5
+ sudo: false
6
+ language: ruby
7
+ cache:
8
+ directories:
9
+ - gemfiles/vendor/bundle
10
+ - /home/travis/.rvm/
11
+ services: docker
12
+ before_script:
13
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
+ - chmod +x ./cc-test-reporter
15
+ - ./cc-test-reporter before-build
16
+ before_install:
17
+ - docker run -d -p 6379:6379 redislabs/redisearch:latest --protected-mode no --loadmodule /usr/lib/redis/modules/redisearch.so
18
+ after_script:
19
+ - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
20
+ rvm:
21
+ - 2.6
22
+ - 2.5
23
+ gemfile:
24
+ - gemfiles/rails_6.gemfile
25
+ - gemfiles/rails_52.gemfile
26
+ - gemfiles/rails_51.gemfile
27
+ jobs:
28
+ include:
29
+ - stage: Lint
30
+ script: bundle exec rubocop --config=./.rubocop.yml
31
+ rvm: 2.6
data/Appraisals ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise "rails-6" do
4
+ gem "rails", "6.0.0.rc1"
5
+ end
6
+
7
+ appraise "rails-52" do
8
+ gem "rails", "< 6.0", ">= 5.2"
9
+ end
10
+
11
+ appraise "rails-51" do
12
+ gem "rails", "< 5.2", ">= 5.1"
13
+ end
data/Gemfile ADDED
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ gemspec
8
+
9
+ gem "faker"
10
+ gem "mocha"
11
+ gem "pry"
12
+ gem "pry-rails"
13
+ gem "rubocop"
14
+ gem "rubocop-performance"
15
+ gem "rubocop-rails"
16
+ gem "simplecov"
17
+ gem "sqlite3"
18
+
19
+ gem "rails", "6.0.0.rc1"
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ task default: :test
data/bin/console ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "redi_search"
6
+
7
+ require "pry"
8
+ Pry.start
data/bin/publish ADDED
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "pathname"
5
+ require "fileutils"
6
+ require_relative "../lib/redi_search/version"
7
+
8
+ # path to your application root.
9
+ APP_ROOT = Pathname.new File.expand_path("..", __dir__)
10
+ MASTER_CHECK = <<~MASTER_CHECK
11
+ if [ $(git symbolic-ref --short -q HEAD) != 'master' ];
12
+ then exit 1;
13
+ fi
14
+ MASTER_CHECK
15
+ VERSION_TYPES = %w(major minor patch).freeze
16
+
17
+ def system!(*args)
18
+ system(*args) || abort("\n== Command #{args} failed ==")
19
+ end
20
+
21
+ abort("\n== Version Type incorrect ==") unless VERSION_TYPES.include?(ARGV[0])
22
+
23
+ abort("\n== Not on master") unless system(MASTER_CHECK)
24
+
25
+ current_version = RediSearch::VERSION.split(".").map(&:to_i)
26
+
27
+ case ARGV[0]
28
+ when "major"
29
+ current_version[0] += 1
30
+ current_version[1] = 0
31
+ current_version[2] = 0
32
+ when "minor"
33
+ current_version[1] += 1
34
+ current_version[2] = 0
35
+ when "patch"
36
+ current_version[2] += 1
37
+ end
38
+
39
+ joined_version = current_version.join(".")
40
+
41
+ FileUtils.chdir APP_ROOT do
42
+ contents = <<~FILE
43
+ # frozen_string_literal: true
44
+
45
+ module RediSearch
46
+ VERSION = "#{joined_version}"
47
+ end
48
+ FILE
49
+
50
+ puts "== Updating version to #{joined_version} =="
51
+ File.write("lib/redi_search/version.rb", contents)
52
+
53
+ system! "git add lib/redi_search/version.rb"
54
+
55
+ puts "== Committing updated files =="
56
+ system! "git commit -m 'Version bump to #{joined_version}'"
57
+ system! "git push"
58
+
59
+ puts "== Building gem =="
60
+ system! "bundle exec rake build"
61
+
62
+ puts "== Publishing gem =="
63
+ built_gem_path = "pkg/redi_search-#{joined_version}.gem"
64
+ github_host = "https://rubygems.pkg.github.com/npezza93"
65
+
66
+ system! "gem push --key github --host #{github_host} #{built_gem_path}"
67
+ system! "gem push #{built_gem_path}"
68
+ end
data/bin/setup ADDED
@@ -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
data/bin/test ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $: << File.expand_path("../test", __dir__)
5
+
6
+ require "bundler/setup"
7
+ require "rails/plugin/test"
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faker"
6
+ gem "minitest", "~> 5.0"
7
+ gem "mocha"
8
+ gem "pry"
9
+ gem "pry-rails"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rails"
13
+ gem "simplecov"
14
+ gem "sqlite3"
15
+ gem "rails", "< 5.2", ">= 5.1"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faker"
6
+ gem "minitest", "~> 5.0"
7
+ gem "mocha"
8
+ gem "pry"
9
+ gem "pry-rails"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rails"
13
+ gem "simplecov"
14
+ gem "sqlite3"
15
+ gem "rails", "< 6.0", ">= 5.2"
16
+
17
+ gemspec path: "../"
@@ -0,0 +1,17 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "faker"
6
+ gem "minitest", "~> 5.0"
7
+ gem "mocha"
8
+ gem "pry"
9
+ gem "pry-rails"
10
+ gem "rubocop"
11
+ gem "rubocop-performance"
12
+ gem "rubocop-rails"
13
+ gem "simplecov"
14
+ gem "sqlite3"
15
+ gem "rails", "6.0.0.rc1"
16
+
17
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RediSearch
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "redi_search/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "redi_search"
9
+ spec.version = RediSearch::VERSION
10
+ spec.authors = "Nick Pezza"
11
+ spec.email = "npezza93@gmail.com"
12
+
13
+ spec.summary = %q(RediSearch ruby wrapper that can integrate with Rails)
14
+ spec.homepage = "https://github.com/npezza93/redi_search"
15
+ spec.license = "MIT"
16
+ spec.require_path = "lib"
17
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
18
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test)/}) }
19
+ end
20
+
21
+ spec.metadata["github_repo"] = "ssh://github.com/npezza93/redi_search"
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = spec.homepage
24
+ spec.metadata["changelog_uri"] =
25
+ "https://github.com/npezza93/redi_search/releases"
26
+
27
+ spec.required_ruby_version = ">= 2.5.0"
28
+
29
+ spec.add_runtime_dependency "activemodel", ">= 5.1", "< 6.1"
30
+ spec.add_runtime_dependency "activesupport", ">= 5.1", "< 6.1"
31
+ spec.add_runtime_dependency "redis", ">= 4.0", "< 5.0"
32
+
33
+ spec.add_development_dependency "appraisal", "~> 2.2"
34
+ spec.add_development_dependency "bundler", ">= 1.17", "< 3"
35
+ spec.add_development_dependency "minitest", "~> 5.0"
36
+ spec.add_development_dependency "rake", "~> 12.0"
37
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redi_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pezza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -138,9 +138,26 @@ executables: []
138
138
  extensions: []
139
139
  extra_rdoc_files: []
140
140
  files:
141
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
142
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
143
+ - ".github/logo.svg"
144
+ - ".gitignore"
145
+ - ".rubocop.yml"
146
+ - ".travis.yml"
147
+ - Appraisals
141
148
  - CODE_OF_CONDUCT.md
149
+ - Gemfile
142
150
  - LICENSE.txt
143
151
  - README.md
152
+ - Rakefile
153
+ - bin/console
154
+ - bin/publish
155
+ - bin/setup
156
+ - bin/test
157
+ - gemfiles/.bundle/config
158
+ - gemfiles/rails_51.gemfile
159
+ - gemfiles/rails_52.gemfile
160
+ - gemfiles/rails_6.gemfile
144
161
  - lib/redi_search.rb
145
162
  - lib/redi_search/add.rb
146
163
  - lib/redi_search/alter.rb
@@ -184,6 +201,7 @@ files:
184
201
  - lib/redi_search/spellcheck.rb
185
202
  - lib/redi_search/spellcheck/result.rb
186
203
  - lib/redi_search/version.rb
204
+ - redi_search.gemspec
187
205
  homepage: https://github.com/npezza93/redi_search
188
206
  licenses:
189
207
  - MIT