switch_point 0.5.0.pre → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +56 -0
- data/.rubocop_todo.yml +2 -0
- data/.travis.yml +21 -6
- data/Appraisals +55 -5
- data/CHANGELOG.md +23 -1
- data/Gemfile +6 -0
- data/README.md +36 -3
- data/Rakefile +12 -2
- data/assets/switch_point.svg +1 -1
- data/benchmark/proxy.rb +62 -0
- data/gemfiles/rails_3.2.gemfile +6 -2
- data/gemfiles/rails_4.0.gemfile +6 -2
- data/gemfiles/rails_4.1.gemfile +6 -2
- data/gemfiles/rails_4.2.gemfile +11 -0
- data/gemfiles/rails_5.0.gemfile +11 -0
- data/gemfiles/rails_5.1.gemfile +11 -0
- data/gemfiles/rails_5.2.gemfile +11 -0
- data/gemfiles/rails_6.0.gemfile +11 -0
- data/lib/switch_point.rb +17 -8
- data/lib/switch_point/config.rb +15 -15
- data/lib/switch_point/connection.rb +15 -14
- data/lib/switch_point/error.rb +12 -0
- data/lib/switch_point/model.rb +48 -16
- data/lib/switch_point/proxy.rb +23 -5
- data/lib/switch_point/proxy_repository.rb +2 -0
- data/lib/switch_point/query_cache.rb +22 -0
- data/lib/switch_point/version.rb +3 -1
- data/spec/models.rb +18 -5
- data/spec/spec_helper.rb +13 -3
- data/spec/switch_point/model_spec.rb +91 -18
- data/spec/switch_point/query_cache_spec.rb +78 -0
- data/spec/switch_point_spec.rb +69 -0
- data/switch_point.gemspec +22 -17
- metadata +76 -18
- data/gemfiles/rails_edge.gemfile +0 -7
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switch_point
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: benchmark-ips
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,6 +54,20 @@ dependencies:
|
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.8.22
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.8.22
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rack
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - ">="
|
@@ -70,30 +98,44 @@ dependencies:
|
|
70
98
|
name: rspec
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- - "
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.0
|
103
|
+
version: '3.0'
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- - "
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.0
|
110
|
+
version: '3.0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: rubocop
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
117
|
+
version: 0.50.0
|
90
118
|
type: :development
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
124
|
+
version: 0.50.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.16.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.16.1
|
97
139
|
- !ruby/object:Gem::Dependency
|
98
140
|
name: activerecord
|
99
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,6 +143,9 @@ dependencies:
|
|
101
143
|
- - ">="
|
102
144
|
- !ruby/object:Gem::Version
|
103
145
|
version: 3.2.0
|
146
|
+
- - "<"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: 6.1.0
|
104
149
|
type: :runtime
|
105
150
|
prerelease: false
|
106
151
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -108,6 +153,9 @@ dependencies:
|
|
108
153
|
- - ">="
|
109
154
|
- !ruby/object:Gem::Version
|
110
155
|
version: 3.2.0
|
156
|
+
- - "<"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 6.1.0
|
111
159
|
description: Switching database connection between readonly one and writable one.
|
112
160
|
email:
|
113
161
|
- eagletmt@gmail.com
|
@@ -117,6 +165,8 @@ extra_rdoc_files: []
|
|
117
165
|
files:
|
118
166
|
- ".gitignore"
|
119
167
|
- ".rspec"
|
168
|
+
- ".rubocop.yml"
|
169
|
+
- ".rubocop_todo.yml"
|
120
170
|
- ".travis.yml"
|
121
171
|
- Appraisals
|
122
172
|
- CHANGELOG.md
|
@@ -125,27 +175,35 @@ files:
|
|
125
175
|
- README.md
|
126
176
|
- Rakefile
|
127
177
|
- assets/switch_point.svg
|
178
|
+
- benchmark/proxy.rb
|
128
179
|
- gemfiles/rails_3.2.gemfile
|
129
180
|
- gemfiles/rails_4.0.gemfile
|
130
181
|
- gemfiles/rails_4.1.gemfile
|
131
|
-
- gemfiles/
|
182
|
+
- gemfiles/rails_4.2.gemfile
|
183
|
+
- gemfiles/rails_5.0.gemfile
|
184
|
+
- gemfiles/rails_5.1.gemfile
|
185
|
+
- gemfiles/rails_5.2.gemfile
|
186
|
+
- gemfiles/rails_6.0.gemfile
|
132
187
|
- lib/switch_point.rb
|
133
188
|
- lib/switch_point/config.rb
|
134
189
|
- lib/switch_point/connection.rb
|
190
|
+
- lib/switch_point/error.rb
|
135
191
|
- lib/switch_point/model.rb
|
136
192
|
- lib/switch_point/proxy.rb
|
137
193
|
- lib/switch_point/proxy_repository.rb
|
194
|
+
- lib/switch_point/query_cache.rb
|
138
195
|
- lib/switch_point/version.rb
|
139
196
|
- spec/models.rb
|
140
197
|
- spec/spec_helper.rb
|
141
198
|
- spec/switch_point/model_spec.rb
|
199
|
+
- spec/switch_point/query_cache_spec.rb
|
142
200
|
- spec/switch_point_spec.rb
|
143
201
|
- switch_point.gemspec
|
144
202
|
homepage: https://github.com/eagletmt/switch_point
|
145
203
|
licenses:
|
146
204
|
- MIT
|
147
205
|
metadata: {}
|
148
|
-
post_install_message:
|
206
|
+
post_install_message:
|
149
207
|
rdoc_options: []
|
150
208
|
require_paths:
|
151
209
|
- lib
|
@@ -153,20 +211,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
153
211
|
requirements:
|
154
212
|
- - ">="
|
155
213
|
- !ruby/object:Gem::Version
|
156
|
-
version:
|
214
|
+
version: 2.5.0
|
157
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
216
|
requirements:
|
159
|
-
- - "
|
217
|
+
- - ">="
|
160
218
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
219
|
+
version: '0'
|
162
220
|
requirements: []
|
163
|
-
|
164
|
-
|
165
|
-
signing_key:
|
221
|
+
rubygems_version: 3.1.4
|
222
|
+
signing_key:
|
166
223
|
specification_version: 4
|
167
224
|
summary: Switching database connection between readonly one and writable one.
|
168
225
|
test_files:
|
169
226
|
- spec/models.rb
|
170
227
|
- spec/spec_helper.rb
|
171
228
|
- spec/switch_point/model_spec.rb
|
229
|
+
- spec/switch_point/query_cache_spec.rb
|
172
230
|
- spec/switch_point_spec.rb
|