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 CHANGED
@@ -1,3 +1,6 @@
1
+ = 1.4.3
2
+ - regression fix for XML format; Liferay is very picky about newlines
3
+
1
4
  = 1.4.2
2
5
  - regression fix for --describe
3
6
 
@@ -8,7 +8,7 @@
8
8
  #++
9
9
 
10
10
  module Caterpillar
11
- VERSION = '1.4.2' unless defined? Caterpillar::VERSION
11
+ VERSION = '1.4.3' unless defined? Caterpillar::VERSION
12
12
  end
13
13
 
14
14
  this_file = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
@@ -195,8 +195,8 @@ module Caterpillar # :nodoc:
195
195
  end
196
196
 
197
197
  xml = ''
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
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
- #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
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
 
@@ -63,8 +63,8 @@ module Caterpillar
63
63
  app.elements << self.filter_mapping(portlet)
64
64
  end
65
65
  xml = ''
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
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
 
@@ -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(RAILS_ROOT,'test','fixtures',table+'.yml'), 'w'
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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 2
10
- version: 1.4.2
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-06-23 00:00:00 +03:00
18
+ date: 2010-07-03 00:00:00 +03:00
19
19
  default_executable: caterpillar
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency