ridgepole 0.7.0.beta19 → 0.7.0.beta20

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: 3d69dc66de98a5b2e1b71adc21896d9cfb54a153
4
- data.tar.gz: 30cfacc9b97bb51ac60172a06c6ac157469210a0
3
+ metadata.gz: c4c0cfd9a7b1adc023b5917578969391ab60303a
4
+ data.tar.gz: c92c132c16fef3a322df668b252841b8f1415e82
5
5
  SHA512:
6
- metadata.gz: bc8cbc9963b3334d7848c07a31c294e35a5ca352a7420cf4f94733179330ba74180c00178a60a43806f6968f40e273b65f5f02338158d47a6af5a17b5aa77c41
7
- data.tar.gz: 5bae656215f07994b3da071953e9c7f82e2c95e49ffe3147f5bacbf5159fe9add6c34a8d428bb014b06829daf64ff9d6015bf6287aa2ac08dd171b1609d475cb
6
+ metadata.gz: 4d5c711b96933ccec3b517d939133f2e826481e6b582ed22150b8e49261a61690565f5780523497ff323371e320a5e2551e10abe2619fbfd994c8a7d04461902
7
+ data.tar.gz: 73ee9bae1a5425ac6a4922d24210faef787893d66d8c83e147add5e1b74e691604c64e6cab7f7db6045edde4f2efc8c359003476f46fc3a0a7b781c4d11cc959
data/README.md CHANGED
@@ -9,7 +9,7 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
9
9
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.6)](https://travis-ci.org/winebarrel/ridgepole)
10
10
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.6)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.6)
11
11
 
12
- [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta19-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta19)
12
+ [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta20-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta20)
13
13
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.7)](https://travis-ci.org/winebarrel/ridgepole)
14
14
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.7)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.7)
15
15
 
@@ -11,6 +11,7 @@ class Ridgepole::Diff
11
11
  if @options[:reverse]
12
12
  from, to = to, from
13
13
  end
14
+ check_table_existence(to)
14
15
 
15
16
  delta = {}
16
17
  relation_info = {}
@@ -528,4 +529,11 @@ class Ridgepole::Diff
528
529
  end
529
530
  end
530
531
  end
532
+
533
+ def check_table_existence(definition)
534
+ return unless @options[:tables]
535
+ @options[:tables].each do |table_name|
536
+ @logger.warn "[WARNING] '#{table_name}' definition is not found" unless definition.has_key?(table_name)
537
+ end
538
+ end
531
539
  end
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.7.0.beta19'
2
+ VERSION = '0.7.0.beta20'
3
3
  end
@@ -154,4 +154,13 @@ describe 'Ridgepole::Client.diff' do
154
154
  EOS
155
155
  }
156
156
  end
157
+
158
+ context 'without the target table' do
159
+ subject { Ridgepole::Client }
160
+
161
+ it {
162
+ expect(Ridgepole::Logger.instance).to receive(:warn).with(/definition is not found/)
163
+ subject.diff('', '', :tables => %w(some_table_name))
164
+ }
165
+ end
157
166
  end
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.7.0.beta19
4
+ version: 0.7.0.beta20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-03 00:00:00.000000000 Z
11
+ date: 2017-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -384,7 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
384
384
  version: 1.3.1
385
385
  requirements: []
386
386
  rubyforge_project:
387
- rubygems_version: 2.5.2
387
+ rubygems_version: 2.6.12
388
388
  signing_key:
389
389
  specification_version: 4
390
390
  summary: Ridgepole is a tool to manage DB schema.