sequel-postgres-schemata 0.1.0 → 0.1.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: 82a2bd1a15e792cf64681981c3be64c1e11d71cb
4
- data.tar.gz: cedd9abd2407e342c4b5f1e1e8f99dbe20086004
3
+ metadata.gz: 19a6bd55ee209d55b9ed8b40f512e46c8dd653a0
4
+ data.tar.gz: f3c09f224851e466b74ec3084021b6ae569b82a7
5
5
  SHA512:
6
- metadata.gz: a0774f6ba877d48a5c9c81cb9254768eb7717529fb30362c209e208f054e8fc720a4d8cec06495c7fa76cd9681cad5fb7e3511c21f7e0a4843541c12137f6ad0
7
- data.tar.gz: d273ce571db7b5f2e73214a99b3406b01afa3f20e7ac4e1014182766595d411f0c017c403eaa92c3e4e705b0817aeca1fea4ac78b8412e9b04d69c587d753726
6
+ metadata.gz: 4734e50fb9ee0f01e8527fce37abde0bf094160265a3df49d6d29c6ceca2a8a147b49cae80f25c87e28269ddc193eb1c565e7f0c369094007fb724e2d10ddd84
7
+ data.tar.gz: e8ee300214d5776a1c27bc894c4973e15b0055e52639187394a712eb5bd8bdcbec1ec059cb25bb35ec704d4b9d69b0daf9147a0cbbc93e73f4ae415bda0f1d45
@@ -69,9 +69,13 @@ module Sequel
69
69
 
70
70
  def run_with_search_path path, &block
71
71
  old_path = search_path
72
- self.search_path = path
73
- yield
74
- self.search_path = old_path
72
+
73
+ begin
74
+ self.search_path = path
75
+ yield
76
+ ensure
77
+ self.search_path = old_path
78
+ end
75
79
  end
76
80
 
77
81
  SHOW_SEARCH_PATH = "SHOW search_path".freeze
@@ -1,7 +1,7 @@
1
1
  module Sequel
2
2
  module Postgres
3
3
  module Schemata
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -30,6 +30,20 @@ describe Sequel::Postgres::Schemata do
30
30
  db.search_path.should == %i(foo public)
31
31
  end
32
32
 
33
+ it "resets the search path when the given block raises an error" do
34
+ class MyContrivedError < StandardError; end
35
+
36
+ begin
37
+ db.search_path :bar do
38
+ db.search_path.should == %i(bar)
39
+ raise MyContrivedError.new
40
+ end
41
+ rescue MyContrivedError
42
+ # Gobble.
43
+ end
44
+ db.search_path.should == %i(foo public)
45
+ end
46
+
33
47
  it "accepts symbols as arglist" do
34
48
  db.search_path :bar, :baz do
35
49
  db.search_path.should == %i(bar baz)
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-postgres-schemata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Rzepecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.14'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.14'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pg
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.16'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.16'
83
83
  description: Allows easy manipulation of Postgres schemas from Ruby with Sequel
@@ -87,7 +87,7 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
90
+ - ".gitignore"
91
91
  - Gemfile
92
92
  - LICENSE.txt
93
93
  - README.md
@@ -108,21 +108,20 @@ require_paths:
108
108
  - lib
109
109
  required_ruby_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - '>='
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.1.4
121
+ rubygems_version: 2.4.4
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Postgres schema manipulation
125
125
  test_files:
126
126
  - spec/schemata_spec.rb
127
127
  - spec/spec_helper.rb
128
- has_rdoc: