storey 2.0.0 → 2.0.1

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: 96b899561dd23de46f98076d2c0be5b4709bab72e203287f7c0768abb2bcf1be
4
- data.tar.gz: 7293df70c6f9cd032e0dd901ae7cd082f4e00a44363e8cce885540eead4beb16
3
+ metadata.gz: 9bb3f2b4defb8e7efc5b8fc40436f55af4f108e84a036acd96a88719b0ce609b
4
+ data.tar.gz: b7c0a0382f6b0569f310e89da8408623a334260773bfbb21ae22bae2c98cfc88
5
5
  SHA512:
6
- metadata.gz: 678ac169863de8312035dea1069d8bd081bc91b68a98e3fd43f09255d58223e0c46719e854bd3b1759c13d3563c1289b5a49df3c3aaa982010466a17c313e63e
7
- data.tar.gz: d1c97327f715e719938d092ca09119ec6f78d54757ed21c179895fdb528b501c5dfee9b1581a7ea28dbd3e6b5f61ff3962eae3ace55a853d4643bd3d83f6aac6
6
+ metadata.gz: 8f5cd71b0a6b1792e58dd0b2e47af04eb679b1cba49336f7e1a7f8c961568cc18d8fa810e553da368466e9786e1e6ec2d45af66f7613e08558a2427e463f45aa
7
+ data.tar.gz: 85c6de9f6818ec7fa46d6326a91c9c105a82e04e40e0ede0ba6744a78b60b61ced509ce041ec2f068d10c88df385f8b84553e1e6234397297ccce3b78d4592b1
data/CHANGELOG.md CHANGED
@@ -2,7 +2,11 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## [2.0.0]
5
+ ## [2.0.1] - 2018-06-27
6
+ ### Fixed
7
+ - Do not blow up `rake db:create` in Rails 5.2
8
+
9
+ ## [2.0.0] - 2018-06-26
6
10
  ### Added
7
11
  - Rails 5 support
8
12
  - Add ability to get the current schema as an array of strings (`array: true`)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- storey (1.0.0)
4
+ storey (2.0.0)
5
5
  easy_class_to_instance_method (~> 0.0.2)
6
6
  pg
7
7
  rails (>= 4.0.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- storey (1.0.0)
4
+ storey (2.0.0)
5
5
  easy_class_to_instance_method (~> 0.0.2)
6
6
  pg
7
7
  rails (>= 4.0.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- storey (1.0.0)
4
+ storey (2.0.0)
5
5
  easy_class_to_instance_method (~> 0.0.2)
6
6
  pg
7
7
  rails (>= 4.0.0)
@@ -1,3 +1,3 @@
1
1
  module Storey
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
data/lib/storey.rb CHANGED
@@ -31,13 +31,13 @@ module Storey
31
31
  extend self
32
32
 
33
33
  def init
34
- self.default_search_path = self.schema
35
34
  self.excluded_models ||= []
36
35
  self.persistent_schemas ||= []
37
36
  process_excluded_models
38
37
  end
39
38
 
40
39
  def default_search_path
40
+ @@default_search_path ||= self.schema
41
41
  default_search_paths = @@default_search_path.split(',')
42
42
  paths = default_search_paths + self.persistent_schemas
43
43
  paths.uniq!
@@ -2,15 +2,21 @@ require 'spec_helper'
2
2
 
3
3
  describe 'Storey', '#default_search_path' do
4
4
 
5
- it 'should include the persistent schemas' do
5
+ context "when #default_search_path has not been set before" do
6
+ it "defaults to the current schema" do
7
+ expect(Storey.default_search_path).to eq '"$user",public'
8
+ end
9
+ end
10
+
11
+ it 'includes the persistent schemas' do
6
12
  Storey.persistent_schemas = %w(hello there)
7
- Storey.default_search_path.should == '"$user",public,hello,there'
13
+ expect(Storey.default_search_path).to eq '"$user",public,hello,there'
8
14
  end
9
15
 
10
16
  context 'when the persistent schemas includes `public`' do
11
- it 'should only have one instance of public' do
17
+ it 'has one instance of public' do
12
18
  Storey.persistent_schemas = %w(public hello)
13
- Storey.default_search_path.should == '"$user",public,hello'
19
+ expect(Storey.default_search_path).to eq '"$user",public,hello'
14
20
  end
15
21
  end
16
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storey
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails