ridgepole 0.6.1 → 0.6.2.beta

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: 0c287d5249583bb0731d62c35c07cf21e5f31832
4
- data.tar.gz: 48eef8cdf214e8116abd3af5839f24bd48545d02
3
+ metadata.gz: 10751a0be8715415c49e53c36c3a680fd750c588
4
+ data.tar.gz: 26e11384576d90d1990ce4fb3b97cebd49b28977
5
5
  SHA512:
6
- metadata.gz: b59228292c232bed171304c90e40130c2ed7d36d2a7ce7cf97d3170214fea5fc28f60b85239d85c5253463b083564e47f8d021ee0b56ce1523a119449bc4d7fe
7
- data.tar.gz: 08316ff60e257ae2898b0b9c3033657703a15cb831f3a18aa9112855e06bf394cee10356c985142b36759ba1524578ccf2e80525ae66742cb42d76dd0d8e4b6e
6
+ metadata.gz: 8934dbf80a48ec8c5f702648b625dc4f531536ce59cfc55f5e214c9490562529bc1e095aa360cf292e1da49040976f8290ae343bb4a0806bbf3f803c155aac0e
7
+ data.tar.gz: 672e590d27876c45095256d74e3cb769f0f04d055517a60306a25c9562875d5ee3fe2021f5ee9e2d70ccba746e88af74a4a391e05d09d9a34efffd954b5ee667
@@ -41,9 +41,9 @@ class Ridgepole::Client
41
41
  logger = Ridgepole::Logger.instance
42
42
 
43
43
  logger.verbose_info('# Parse DSL1')
44
- definition1, execute1 = load_definition(dsl_or_config1)
44
+ definition1, execute1 = load_definition(dsl_or_config1, options)
45
45
  logger.verbose_info('# Parse DSL2')
46
- definition2, execute2 = load_definition(dsl_or_config2)
46
+ definition2, execute2 = load_definition(dsl_or_config2, options)
47
47
 
48
48
  logger.verbose_info('# Compare definitions')
49
49
  diff = Ridgepole::Diff.new(options)
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.6.1'
2
+ VERSION = '0.6.2.beta'
3
3
  end
@@ -128,6 +128,20 @@ if mysql_awesome_enabled?
128
128
  delta.migrate
129
129
  expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
130
130
  }
131
+
132
+ describe '#diff' do
133
+ it {
134
+ Tempfile.open("#{File.basename __FILE__}.#{$$}") do |f|
135
+ f.puts(actual_dsl)
136
+ f.flush
137
+
138
+ out, status = run_ridgepole('--diff', "'#{JSON.dump(conn_spec)}'", f.path, '--enable-mysql-awesome', '--dump-without-table-options')
139
+
140
+ expect(out).to be_empty
141
+ expect(status.success?).to be_truthy
142
+ end
143
+ }
144
+ end
131
145
  end
132
146
  end
133
147
  end
data/spec/spec_helper.rb CHANGED
@@ -220,3 +220,10 @@ end
220
220
  def unsigned_false_if_enabled2(prefix = ', ', suffix = '')
221
221
  if_mysql_awesome_enabled("#{prefix}:unsigned=>false#{suffix}")
222
222
  end
223
+
224
+ def run_ridgepole(*args)
225
+ Dir.chdir(File.expand_path('../..', __FILE__)) do
226
+ cmd = [:bundle, :exec, './bin/ridgepole'] + args
227
+ Open3.capture2e(cmd.join(' '))
228
+ end
229
+ 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.6.1
4
+ version: 0.6.2.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-16 00:00:00.000000000 Z
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -244,9 +244,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
244
244
  version: '0'
245
245
  required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - '>='
247
+ - - '>'
248
248
  - !ruby/object:Gem::Version
249
- version: '0'
249
+ version: 1.3.1
250
250
  requirements: []
251
251
  rubyforge_project:
252
252
  rubygems_version: 2.0.14