solr_wrapper 0.9.0 → 0.9.1

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: 21a2a6e484329fe66c2531342783d9ac4007a1a3
4
- data.tar.gz: 25cd86f3084f418c6a88192986b0ba6d6a2013b5
3
+ metadata.gz: d57530a891dcb0e5a17da665b949b8b941dd59ba
4
+ data.tar.gz: c572a382099a877b347e2646a5c768a1cdf60c76
5
5
  SHA512:
6
- metadata.gz: 08b856eb075be3bb9521531f700ba0dd367f18917a787cda40537419707c16a69abc6c6ad27c1a64459a6642a73c7e0aa705d41e5fcc1a13d212dc5708b020fe
7
- data.tar.gz: 9ee588f5119ad0806f84178b2969e7b06f26d3a0407913e5f0a99ae5d80585249a6b360e64e032795d778b3bc04173ab8419ad1b6ef4616a6eb2ea38a7e97481
6
+ metadata.gz: 247b9f2dfd93ec8518b9a6d38310c6019cbe4f1e524d75078b0c116d661b4783954e0962f89d930b7686e2e6be29dc7f6f26a658a81635425240cdf4b94cefb2
7
+ data.tar.gz: 47c717d155ba07b715bd888ac3f20ee19f93c4d4fb4886857fecb73e530916323f1759a4b3da63f4cef7ec2f7dcf600dddb8c42f2e98f6cc56a97b958caca6a1
@@ -55,7 +55,7 @@ module SolrWrapper
55
55
  end
56
56
 
57
57
  def default_download_dir
58
- if defined? Rails
58
+ if defined?(Rails) && Rails.root
59
59
  File.join(Rails.root, 'tmp')
60
60
  else
61
61
  Dir.tmpdir
@@ -1,3 +1,3 @@
1
1
  module SolrWrapper
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
data/lib/solr_wrapper.rb CHANGED
@@ -29,7 +29,7 @@ module SolrWrapper
29
29
  @default_instance ||= instance(default_instance_options)
30
30
  end
31
31
 
32
- def self.instance(options)
32
+ def self.instance(options = {})
33
33
  SolrWrapper::Instance.new(options)
34
34
  end
35
35
 
@@ -13,6 +13,14 @@ describe SolrWrapper do
13
13
  end
14
14
  end
15
15
 
16
+ describe '.instance' do
17
+ context 'without arguments' do
18
+ it 'inherits the defaults' do
19
+ expect(SolrWrapper.instance.port).to eq '8983'
20
+ end
21
+ end
22
+ end
23
+
16
24
  describe ".default_instance_options=" do
17
25
  it "sets default options" do
18
26
  SolrWrapper.default_instance_options = { port: '1234' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solr_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-13 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip