13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/milkshake/rails_extentions/migrations.rb', line 13
def migrations_with_milkshake
return @migrations if @migrations
all_migrations = []
all_migrations.concat(migrations_without_milkshake)
Milkshake.environment.gemspecs.each do |gemspec|
migrations_path_for_gemspec = File.join(gemspec.full_gem_path, 'db', 'migrate')
if File.directory?(migrations_path_for_gemspec)
original_migrations_path = @migrations_path
@migrations = nil
@migrations_path = migrations_path_for_gemspec
all_migrations.concat(migrations_without_milkshake)
@migrations_path = original_migrations_path
end
end
all_migrations = all_migrations.sort_by(&:version)
down? ? all_migrations.reverse : all_migrations
@migrations = all_migrations
end
|