sequel-search-path 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 18c02e68988e33295e7308820956a65f40c666e4
4
- data.tar.gz: a8aa4a36a988a10c7cc114508afb40c8625cdd42
3
+ metadata.gz: acc2f2cb88f6d194fe3f62a980b88eda3620736e
4
+ data.tar.gz: 9b0efc849c707409646b575c16b4d40f0d8f3d57
5
5
  SHA512:
6
- metadata.gz: 0ee5a79fc0ccecf3e14d3bbc7e366c0d483a14ba10143228170b1f357a7530cf172eee38c5b020440f40550ed2ca4c09c2fcb7f8e0161a1b4d428a01b9b84a34
7
- data.tar.gz: afb99f180818c414602b74e004a72fbf6a13a0dca4de784f01f70af2a8ea686fb7bb356bab49d0723844c67e7de8c78d1e7788198da155b81f7d960a7aa3abbe
6
+ metadata.gz: 5e6e1afaa9b59081ad716fe7a1566da43594b81a97f8988528959a110b630c42d7c75fe27c2794c0729aa19a9e3b31c0189937934a589ecf8feba75bcac29f6c
7
+ data.tar.gz: d10bfc5b06818d9549e22feaec977fe3c9a415ce9889ac3272a2686cebd42ba995fc79ee14f939db487e91a1ccb63c0fe3eb3a4e41f5d275436536c9066612dd
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sequel
4
4
  module SearchPath
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -25,15 +25,18 @@ module Sequel
25
25
  Thread.current[schemas_key] ||= [:public]
26
26
  end
27
27
 
28
- def schemas=(schemas)
29
- schemas = schemas.map(&:to_sym).uniq
30
- Thread.current[schemas_key] = schemas
28
+ def schemas=(new_schemas)
29
+ new_schemas = new_schemas.map(&:to_sym).uniq
30
+
31
+ return if schemas == new_schemas
32
+
33
+ Thread.current[schemas_key] = new_schemas
31
34
 
32
35
  # Set the search_path in Postgres, unless it's in transaction rollback.
33
36
  # If it is, the search_path will be reset for us anyway, and the SQL
34
37
  # call will just raise another error.
35
38
  unless synchronize(&:transaction_status) == PG::PQTRANS_INERROR
36
- set_search_path(schemas)
39
+ set_search_path(new_schemas)
37
40
  end
38
41
  end
39
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-search-path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Hanks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-20 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler