Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing the regex used for detecting that a generator template was a m…

…igration (it didn't include final '.erb'). Related to the issue GH-1885 about bad revisions numbering
  • Loading branch information...
commit 5ed46526d8c9acbee8f0af85c57f7cebf0b4ee6f 1 parent 19de862
@brenes brenes authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  core/lib/refinery/extension_generation.rb
View
2  core/lib/refinery/extension_generation.rb
@@ -122,7 +122,7 @@ def extension_path_for(path, extension, apply_tmp = true)
if options[:namespace].present? || options[:extension].present?
# Increment the migration file leading number
# Only relevant for nested or namespaced extensions, where a previous migration exists
- if %r{/migrate/\d+\w*.rb\z} === path
+ if %r{/migrate/\d+.*\.rb.erb\z} === path
if last_migration = Dir["#{destination_pathname.join(path.split(File::SEPARATOR)[0..-2].join(File::SEPARATOR), '*.rb')}"].sort.last
path.gsub!(%r{\d+_}) { |m| "#{last_migration.match(%r{migrate/(\d+)_})[1].to_i + 1}_" }
end
Please sign in to comment.
Something went wrong with that request. Please try again.