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 +4 -4
- data/README.md +7 -3
- data/Rakefile +20 -0
- data/circle.yml +17 -0
- data/dev_tasks/spec.rake +1 -6
- data/lib/stub_solr/version.rb +1 -1
- metadata +2 -2
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfdc89260913319a1d4c3939ee3dfba95feae29d
|
4
|
+
data.tar.gz: 3ebd59479e416bb97557a990302b310eb3e6636a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
68
|
-
|
69
|
-
|
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/*
|
78
|
+
sh "bundle exec ruby -I test #{ENV['SPEC'] || 'test/*_test.rb'}"
|
84
79
|
end
|
85
80
|
end
|
86
81
|
|
data/lib/stub_solr/version.rb
CHANGED
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
|
+
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
|