dbmanager 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,6 +35,7 @@ require 'active_support/deprecation'
35
35
  require 'active_support/core_ext/module'
36
36
  require 'active_support/ordered_hash'
37
37
  require 'active_support/core_ext/enumerable'
38
+ require 'active_support/core_ext/object/blank'
38
39
 
39
40
  %w[yml_parser adapters/mysql runner importer dumper].each do |string|
40
41
  require File.expand_path "../dbmanager/#{string}", __FILE__
@@ -24,8 +24,10 @@ module Dbmanager
24
24
  end
25
25
 
26
26
  def ignore_tables
27
- ignoretables.inject('') do |s, view|
28
- s << " --ignore-table=#{database}.#{view}"
27
+ if ignoretables.present?
28
+ ignoretables.inject('') do |s, view|
29
+ s << " --ignore-table=#{database}.#{view}"
30
+ end
29
31
  end
30
32
  end
31
33
 
@@ -1,3 +1,3 @@
1
1
  module Dbmanager
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -20,8 +20,17 @@ module Dbmanager
20
20
  end
21
21
 
22
22
  describe '#ignore_tables' do
23
- it 'returns expected string' do
24
- subject.ignore_tables.should == ' --ignore-table=demo_test.view0 --ignore-table=demo_test.view1'
23
+ context 'when there are tables to be skipped' do
24
+ it 'returns expected string' do
25
+ subject.ignore_tables.should == ' --ignore-table=demo_test.view0 --ignore-table=demo_test.view1'
26
+ end
27
+ end
28
+
29
+ context 'when there are no tables to be skipped' do
30
+ it 'returns nil' do
31
+ subject.stub!(:ignoretables => nil)
32
+ subject.ignore_tables.should be_nil
33
+ end
25
34
  end
26
35
  end
27
36
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dbmanager
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - andrea longhi
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-04 00:00:00 Z
13
+ date: 2012-04-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport