shackles 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWY1MDlmODBlNTc5NDVmZGNhZDY3ZWJlZjlhZTViMDExNjM5MDVkMA==
5
- data.tar.gz: !binary |-
6
- YWY1NTVhYmFjODI3YWMxNWRiODI1ZjM1MDRmNjQwOTZmNjc1OGNmNg==
2
+ SHA1:
3
+ metadata.gz: a45a30d2424d4f6ca4649f5b8550c2ce0dad49ce
4
+ data.tar.gz: e418e3e06a20492f747daf230658abe9268b0449
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZjkwZDllYjZkNTE4Nzg2MzE2M2E4ODIzY2FkNTkzY2IyNGE3YTk4Nzk0NThl
10
- Yjg5OTA0MjFkZDAyYWRhMjgzYjA3MmVjYmFmNGI0Njg2YWYxYzc0MmE5MjFk
11
- NDhmYjAwMjM1ODJhYjQxMmQ4M2RiODA4NTgyZjNjOTFlOGViNzI=
12
- data.tar.gz: !binary |-
13
- YWU4ODE4OTMzZTA3ZjE0YzlmYWEwZDExMGFiZjBjN2I3MjVlMDBmY2FiZGI4
14
- YWI5YzFkMzFkNmM4ZjAyYTlhNjE5ODIwNTYyYzdkMjE1NWY4MTllODg3MmRj
15
- MzVlYjYzYzkwOWQyZTI2NTY5NzA3MGFkOWYxNGJmOTUzODJmNTQ=
6
+ metadata.gz: 4f2938c73893179ff77868a82595f36ca93d15d9b9a90a2272601a0943cf1d616ae935ddb660123c34c11e60593026045fa4290cc77817510c6920d62fa09a1a
7
+ data.tar.gz: 2e9656b6c933e1efef156c439459f63340a3691591981360f727f669fe1e6094916ec2382b3ba855d792380e00d62c3beefce1a8317bb72780e8de870516bf2d
@@ -9,14 +9,20 @@ module Shackles
9
9
  end
10
10
 
11
11
  def []=(key, value)
12
+ super
12
13
  @spec.instance_variable_set(:@current_config, nil)
13
14
  @spec.instance_variable_get(:@config)[key] = value
14
15
  end
15
16
 
16
17
  def delete(key)
18
+ super
17
19
  @spec.instance_variable_set(:@current_config, nil)
18
20
  @spec.instance_variable_get(:@config).delete(key)
19
21
  end
22
+
23
+ def dup
24
+ Hash[self]
25
+ end
20
26
  end
21
27
 
22
28
  def self.included(klass)
@@ -1,3 +1,3 @@
1
1
  module Shackles
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -74,11 +74,15 @@ describe Shackles do
74
74
  spec = ConnectionSpecification.new(conf.dup, 'adapter')
75
75
  spec.config[:username].should == 'canvas'
76
76
  spec.config[:schema_search_path] = 'bob'
77
+ spec.config[:schema_search_path].should == 'bob'
77
78
  spec.config[:username].should == 'bob'
78
79
  Shackles.activate(:deploy) do
79
80
  spec.config[:schema_search_path].should == 'bob'
80
81
  spec.config[:username].should == 'deploy'
81
82
  end
83
+ external_config = spec.config.dup
84
+ external_config.class.should == Hash
85
+ external_config.should == spec.config
82
86
 
83
87
  spec.config = conf.dup
84
88
  spec.config[:username].should == 'canvas'
metadata CHANGED
@@ -1,75 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shackles
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.3'
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '4.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ! '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.3'
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '4.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: debugger
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ! '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ! '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: mocha
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ! '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ! '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: sqlite3
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ! '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ! '>='
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  description: Allows multiple environments in database.yml, and dynamically switching
@@ -97,17 +97,17 @@ require_paths:
97
97
  - lib
98
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ! '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ! '>='
105
+ - - ">="
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.2.0
110
+ rubygems_version: 2.2.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: ActiveRecord database environment switching for slaves and least-privilege