ridgepole 0.4.10.beta → 0.4.10

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: c94a6425997f6cd4ead8b3d6be5ef734d9703f38
4
- data.tar.gz: 7730498d43ccd4777048c42739a39833b74d6ae6
3
+ metadata.gz: f1d584003fbd27702c2fc29781c9860993134373
4
+ data.tar.gz: 2c5aae588f9b18515955fc99434e8919d8b87af8
5
5
  SHA512:
6
- metadata.gz: 378afba2ce1141ef75c7bbb6d1c83d3e37455c9d4f329cb4a77e9559ce571dc3f2174cac4222b2507cbfd47f0e5764f6d10a0be82035b52586843770e8d440d1
7
- data.tar.gz: 224a578f5472a0427628d2bb62bb7bbfcb9b925243cf42aaa759e1414ade0aa68b3d5ca47058a61e5ee113c823bdbb75ffd703c551a4f56edb8a095900879a3b
6
+ metadata.gz: 94841e78eee16e09d990824b759d08bd9d130a81668da42fab85e05ff382fa71529e4b45f098d9d728d62a3b2733951427cb1371b6d4d28b2e019bad5aa4de86
7
+ data.tar.gz: aced3591d88cfc8bfee2575c5d51bbf9a2fac2d6a57fd1e492f786a267358dcadd58f8e0e673a047a4103a4fd0839e89fd23872a868c24a410b465e1ed6ba685
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.4.10.beta'
2
+ VERSION = '0.4.10'
3
3
  end
@@ -158,6 +158,47 @@ describe 'Ridgepole::Client#diff -> migrate' do
158
158
  }
159
159
  end
160
160
 
161
+ context 'when rename table (dry-run)' do
162
+ let(:actual_dsl) {
163
+ <<-RUBY
164
+ create_table "employees", primary_key: "emp_no", force: true do |t|
165
+ t.date "birth_date", null: false
166
+ t.string "first_name", limit: 14, null: false
167
+ t.string "last_name", limit: 16, null: false
168
+ t.string "gender", limit: 1, null: false
169
+ t.date "hire_date", null: false
170
+ end
171
+
172
+ add_index "employees", ["first_name"], name: "first_name", using: :btree
173
+ RUBY
174
+ }
175
+
176
+ let(:expected_dsl) {
177
+ <<-RUBY
178
+ create_table "employees2", primary_key: "emp_no", force: true, renamed_from: 'employees' do |t|
179
+ t.date "birth_date", null: false
180
+ t.string "first_name", limit: 14, null: false
181
+ t.string "last_name", limit: 16, null: false
182
+ t.string "gender", limit: 1, null: false
183
+ t.date "hire_date", null: false
184
+ end
185
+
186
+ add_index "employees2", ["first_name"], name: "first_name", using: :btree
187
+ RUBY
188
+ }
189
+
190
+ before { subject.diff(actual_dsl).migrate }
191
+ subject { client }
192
+
193
+ it {
194
+ delta = subject.diff(expected_dsl)
195
+ expect(delta.differ?).to be_truthy
196
+ expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
197
+ delta.migrate(noop: true)
198
+ expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
199
+ }
200
+ end
201
+
161
202
  context 'when rename table (not found)' do
162
203
  before { restore_tables }
163
204
  subject { client }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10.beta
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -218,9 +218,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '0'
219
219
  required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  requirements:
221
- - - '>'
221
+ - - '>='
222
222
  - !ruby/object:Gem::Version
223
- version: 1.3.1
223
+ version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
226
  rubygems_version: 2.0.14