molo 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Molo.gemspec +2 -2
- data/VERSION +1 -1
- data/vendor/yaml_db/lib/serialization_helper.rb +29 -4
- metadata +4 -4
data/Molo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{molo}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joel Moss", "Todd Huss", "Michael Grosser"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-17}
|
13
13
|
s.email = %q{joel@developwithstyle.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.markdown"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
@@ -17,11 +17,24 @@ module SerializationHelper
|
|
17
17
|
|
18
18
|
def dump_to_dir(dirname, *opts)
|
19
19
|
options = opts.extract_options!
|
20
|
+
|
21
|
+
except = options[:except].is_a?(String) ? options[:except].split(',') : options[:except]
|
22
|
+
only = options[:only].is_a?(String) ? options[:only].split(',') : options[:only]
|
23
|
+
|
20
24
|
begin; Dir.mkdir(dirname); rescue; end;
|
21
25
|
tables = @dumper.tables
|
22
26
|
tables.each do |table|
|
23
|
-
|
24
|
-
|
27
|
+
if except.present? and except.include? table
|
28
|
+
puts " excluding #{table}"
|
29
|
+
next
|
30
|
+
end
|
31
|
+
|
32
|
+
if only.present? and !only.include? table
|
33
|
+
puts " excluding #{table}"
|
34
|
+
next
|
35
|
+
end
|
36
|
+
|
37
|
+
puts " -- dumping data: #{table}"
|
25
38
|
|
26
39
|
io = File.new "#{dirname}/#{table}.#{@extension}", "w"
|
27
40
|
@dumper.before_table(io, table)
|
@@ -143,10 +156,22 @@ module SerializationHelper
|
|
143
156
|
|
144
157
|
def self.dump(io, *opts)
|
145
158
|
options = opts.extract_options!
|
159
|
+
|
160
|
+
except = options[:except].is_a?(String) ? options[:except].split(',') : options[:except]
|
161
|
+
only = options[:only].is_a?(String) ? options[:only].split(',') : options[:only]
|
146
162
|
|
147
163
|
tables.each do |table|
|
148
|
-
|
149
|
-
|
164
|
+
if except.present? and except.include? table
|
165
|
+
puts " excluding #{table}"
|
166
|
+
next
|
167
|
+
end
|
168
|
+
|
169
|
+
if only.present? and !only.include? table
|
170
|
+
puts " excluding #{table}"
|
171
|
+
next
|
172
|
+
end
|
173
|
+
|
174
|
+
puts " -- dumping data: #{table}"
|
150
175
|
|
151
176
|
before_table(io, table)
|
152
177
|
dump_table(io, table)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: molo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 2
|
10
|
+
version: 0.7.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joel Moss
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-12-
|
20
|
+
date: 2010-12-17 00:00:00 +00:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|