stub_solr 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dfd9c8199e4ab5c50789791f3149ed9e2c89aac
4
- data.tar.gz: e9ac7ef59532089aabee78d66df601068287b42c
3
+ metadata.gz: bfdc89260913319a1d4c3939ee3dfba95feae29d
4
+ data.tar.gz: 3ebd59479e416bb97557a990302b310eb3e6636a
5
5
  SHA512:
6
- metadata.gz: edcf6aaa16e0bbdca4f64e9ee76a3c1599d320461214d67c17063f682b9a392ee9df14dcd14709d3900294b023a8171e9515896fffeea9b515d298cf6c8d50dd
7
- data.tar.gz: 13badb963b7b8303ea4476d99e379622e1b9b22c0be94ef345cfd0b011637eea64b09974702b67a23ff55d3a9600238d16f4fe5252dd62284aaea3b57bff9af0
6
+ metadata.gz: d763e18b42519ef78114699d73b4f95c537210db9e10934ef9253410f154fcb7c4ff2c0434a96fe478e0220af37ed4b56a4ad7647041330de3ce085991ccd2a6
7
+ data.tar.gz: f0d4c8fb320660ace148fb9b9b626d8c8adfb042df3f7f5b82f4b2c6d7274f0cae4be36424ce75e35d3469a6bdb8175da4792c2b36f9714a42f18cd0a49541f2
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # StubSolr
2
2
 
3
+ [![CircleCI](https://circleci.com/gh/jaigouk/stub_solr.svg?style=svg)](https://circleci.com/gh/jaigouk/stub_solr)
4
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/876fa24223c44959812c9686e542d701)](https://www.codacy.com/app/jaigouk/stub_solr?utm_source=github.com&utm_medium=referral&utm_content=jaigouk/stub_solr&utm_campaign=Badge_Grade)
5
+
3
6
  `Sunspot.session = Sunspot::Rails::StubSessionProxy.new(Sunspot.session)` is enough for most of cases but if you want more than `allow_any_instance_of(Sunspot::Rails::StubSessionProxy::Search).to receive(:results).and_return(myExpectedResults)` this gem can be helpful. `kaminari` for pagination and plain AR to mimic resutls.
4
7
 
5
8
  this gem depends on `2.2.6` version of sunspot, sunspot_rails.
@@ -64,9 +67,10 @@ For range search like `greater_than`, it uses array to check an attribute is for
64
67
 
65
68
  ## Development
66
69
 
67
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
68
-
69
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
70
+ ```
71
+ bundle install
72
+ rake test
73
+ ```
70
74
 
71
75
  ## Contributing
72
76
 
data/Rakefile CHANGED
@@ -13,9 +13,29 @@ CLEAN.include TO_CLEAN
13
13
  task :environment do
14
14
  end
15
15
 
16
+ namespace :sunspot do
17
+ namespace :solr do
18
+ task start: :environment do
19
+ system "if [ -f sunspot-solr.pid ]; then bundle exec sunspot-solr stop || true; fi"
20
+
21
+ system "bundle exec sunspot-solr start -p 8983"
22
+ system "wait_until_solr_responds 8983"
23
+ system "/bin/echo 'launched solr in test mode'"
24
+ end
25
+ task stop: :environment do
26
+ system "if [ -f sunspot-solr.pid ]; then bundle exec sunspot-solr stop || true; fi"
27
+ system "/bin/echo 'stopped solr in test mode'"
28
+ end
29
+ end
30
+ end
16
31
  FileList['dev_tasks/*.rake'].each { |file| load(file) }
17
32
  task :default => [:spec]
18
33
 
34
+ desc 'run specs (same as default or spec)'
35
+ task :test=> [:spec] do
36
+ puts "running tests"
37
+ end
38
+
19
39
  desc 'Install bleeding edge gems locally'
20
40
  task :install do
21
41
  system "rm *.gem"
data/circle.yml ADDED
@@ -0,0 +1,17 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.3.1
4
+ services:
5
+ - postgresql
6
+ environment:
7
+ RAILS_ENV: test
8
+
9
+ test:
10
+ pre:
11
+ - gem install rake
12
+ override:
13
+ - rake spec RAILS=5.0.0.1
14
+ post:
15
+ - gem install bundler-audit
16
+ - bundle-audit update
17
+ - bundle-audit check
data/dev_tasks/spec.rake CHANGED
@@ -71,16 +71,11 @@ namespace :spec do
71
71
  FileUtils.cp_r File.join(rails_template_path, "."), rails_app_path(version)
72
72
  end
73
73
 
74
- # task :load_fixtures do
75
- # puts "loading fixtures..."
76
- # sh "bundle exec rake db:fixtures:load RAILS_ENV=test FIXTURES_DIR='test/fixtures'"
77
- # end
78
-
79
74
  task :run do
80
75
  ENV['BUNDLE_GEMFILE'] = gemfile_path(version)
81
76
  ENV['RAILS_ROOT'] = rails_app_path(version)
82
77
 
83
- sh "bundle exec ruby -I test #{ENV['SPEC'] || 'test/*_spec.rb'}"
78
+ sh "bundle exec ruby -I test #{ENV['SPEC'] || 'test/*_test.rb'}"
84
79
  end
85
80
  end
86
81
 
@@ -1,3 +1,3 @@
1
1
  module StubSolr
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stub_solr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaigouk Kim
@@ -131,11 +131,11 @@ extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
133
  - ".rubocop.yml"
134
- - ".travis.yml"
135
134
  - Gemfile
136
135
  - LICENSE.txt
137
136
  - README.md
138
137
  - Rakefile
138
+ - circle.yml
139
139
  - dev_tasks/release.rake
140
140
  - dev_tasks/spec.rake
141
141
  - gemfiles/.bundle/config
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
-
5
- rvm:
6
- - 2.3.1
7
- before_install: gem install bundler -v 1.12.5
8
-
9
- env:
10
- - GEM=sunspot
11
- - GEM=sunspot_rails RAILS=5.0.0.1
12
- - GEM=sunspot_solr