ydd 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1,6 +1 @@
1
-
2
- if [[ -d "$rvm_path/environments" && -s "$rvm_path/environments/ree-1.8.7-2010.02@ydd" ]] ; then
3
- \. "$rvm_path/environments/ree-1.8.7-2010.02@ydd"
4
- else
5
- rvm --create use "ree-1.8.7-2010.02@ydd"
6
- fi
1
+ rvm --create use "@ydd"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -131,7 +131,8 @@ module YDD
131
131
  def self.tables
132
132
  base_tables = YDD.connection.tables
133
133
  base_tables &= YDD.tables if YDD.tables.present?
134
- base_tables
134
+ base_tables.reject! { |table| YDD.schema_tables.include?(table) } if YDD.skip_schema?
135
+ base_tables
135
136
  end
136
137
 
137
138
  def self.dump_table(io, table)
data/lib/ydd.rb CHANGED
@@ -18,6 +18,10 @@ module YDD
18
18
  !!skip_schema
19
19
  end
20
20
 
21
+ def self.schema_tables
22
+ [ 'schema_info', 'schema_migrations' ]
23
+ end
24
+
21
25
  def self.skip_data?
22
26
  !!skip_data
23
27
  end
@@ -71,9 +75,15 @@ module YDD
71
75
  if !File.directory?(directory)
72
76
  raise Error, "Please provide a valid directory - #{directory} doesn't exist."
73
77
  end
74
- check_files! directory, "schema.rb", "data.yml"
75
- SchemaManager.load File.join(directory, "schema.rb") unless skip_schema?
76
- DataManager.load File.join(directory, "data.yml") unless skip_data?
78
+ unless skip_schema?
79
+ check_files! directory, "schema.rb"
80
+ SchemaManager.load File.join(directory, "schema.rb")
81
+ end
82
+
83
+ unless skip_data?
84
+ check_files! directory, "data.yml"
85
+ DataManager.load File.join(directory, "data.yml")
86
+ end
77
87
  end
78
88
 
79
89
  def self.check_files!(dir, *files)
data/ydd.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ydd}
8
- s.version = "0.0.6"
8
+ s.version = "0.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adam Wiggins", "Orion Henry", "Darcy Laycock"]
12
- s.date = %q{2010-09-22}
12
+ s.date = %q{2010-11-08}
13
13
  s.default_executable = %q{ydd}
14
14
  s.description = %q{
15
15
  YDD is a tool (a fork of yaml_db really) to make it generally easy
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ydd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Wiggins
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-09-22 00:00:00 +08:00
20
+ date: 2010-11-08 00:00:00 +08:00
21
21
  default_executable: ydd
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency