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 +4 -4
- data/CHANGELOG.md +5 -1
- data/gemfiles/rails_5.0.gemfile.lock +1 -1
- data/gemfiles/rails_5.1.gemfile.lock +1 -1
- data/gemfiles/rails_5.2.gemfile.lock +1 -1
- data/lib/storey/version.rb +1 -1
- data/lib/storey.rb +1 -1
- data/spec/storey/default_search_path_spec.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bb3f2b4defb8e7efc5b8fc40436f55af4f108e84a036acd96a88719b0ce609b
|
4
|
+
data.tar.gz: b7c0a0382f6b0569f310e89da8408623a334260773bfbb21ae22bae2c98cfc88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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`)
|
data/lib/storey/version.rb
CHANGED
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
|
-
|
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.
|
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 '
|
17
|
+
it 'has one instance of public' do
|
12
18
|
Storey.persistent_schemas = %w(public hello)
|
13
|
-
Storey.default_search_path.
|
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.
|
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-
|
11
|
+
date: 2018-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|