caterpillar 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/lib/caterpillar.rb +1 -1
- data/lib/caterpillar/liferay.rb +4 -4
- data/lib/caterpillar/portlet.rb +2 -2
- data/lib/caterpillar/task.rb +9 -1
- metadata +4 -4
data/ChangeLog
CHANGED
data/lib/caterpillar.rb
CHANGED
data/lib/caterpillar/liferay.rb
CHANGED
@@ -195,8 +195,8 @@ module Caterpillar # :nodoc:
|
|
195
195
|
end
|
196
196
|
|
197
197
|
xml = ''
|
198
|
-
|
199
|
-
doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
198
|
+
doc.write(xml, -1) # no indentation, tag and text should be on same line
|
199
|
+
#doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
200
200
|
return xml.gsub('\'', '"') # fix rexml attribute single quotes to double quotes
|
201
201
|
end
|
202
202
|
|
@@ -234,8 +234,8 @@ module Caterpillar # :nodoc:
|
|
234
234
|
end
|
235
235
|
|
236
236
|
xml = ''
|
237
|
-
|
238
|
-
doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
237
|
+
doc.write(xml, -1) # no indentation, tag and text should be on same line
|
238
|
+
#doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
239
239
|
return xml.gsub('\'', '"') # fix rexml attribute single quotes to double quotes
|
240
240
|
end
|
241
241
|
|
data/lib/caterpillar/portlet.rb
CHANGED
@@ -63,8 +63,8 @@ module Caterpillar
|
|
63
63
|
app.elements << self.filter_mapping(portlet)
|
64
64
|
end
|
65
65
|
xml = ''
|
66
|
-
|
67
|
-
doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
66
|
+
doc.write(xml, -1) # no indentation, tag and text should be on same line
|
67
|
+
#doc.write(xml, 4) # without identation is very dificult to reconfigure those files in production
|
68
68
|
return xml.gsub('\'', '"') # fix rexml attribute single quotes to double quotes
|
69
69
|
end
|
70
70
|
|
data/lib/caterpillar/task.rb
CHANGED
@@ -168,10 +168,18 @@ module Caterpillar
|
|
168
168
|
ActiveRecord::Base.establish_connection
|
169
169
|
info 'Creating YAML fixtures from %s database' % RAILS_ENV
|
170
170
|
|
171
|
+
# define and create the target directory
|
172
|
+
target =
|
173
|
+
(defined? RAILS_ROOT) ?
|
174
|
+
File.join(RAILS_ROOT,'test','fixtures') : 'fixtures'
|
175
|
+
if !File.exists?(target)
|
176
|
+
FileUtils.mkdir_p(target)
|
177
|
+
end
|
178
|
+
|
171
179
|
(ActiveRecord::Base.connection.tables - skip_tables).each do |table|
|
172
180
|
i = "000"
|
173
181
|
File.open(
|
174
|
-
File.join(
|
182
|
+
File.join(target,table+'.yml'), 'w'
|
175
183
|
) do |file|
|
176
184
|
info file.inspect
|
177
185
|
data = ActiveRecord::Base.connection.select_all(sql % table)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caterpillar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 3
|
10
|
+
version: 1.4.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mikael Lammentausta
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-07-03 00:00:00 +03:00
|
19
19
|
default_executable: caterpillar
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|