-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add changes_file field (adds new mappings) #392
Conversation
@@ -490,6 +492,25 @@ sub import_tarball { | |||
} | |||
} | |||
|
|||
sub set_changes_file { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll just need to add some logic here to deal with perl
distributions, since the Changes file there is perldelta.pod
. Have a look at the Changes controller. Basically, once this work is complete and everything is reindexed, we'll want to use this new field rather than all of the logic in that controller.
So basically, you're taking the controller logic and applying it to the changes_file
field so that we no longer have to discover where this file is on every request to the Changes controller.
And the field should have the name of the file or the path to the file? |
I think we want the path to the file. In most cases it'll just be the file name anyway, but in Perl's case it could be something like |
@andreeap, there's a perl in our fakepan. Could you test against that as well? |
@oalders This is ready for review. |
@@ -271,6 +273,34 @@ sub _build_files { | |||
return \@files; | |||
} | |||
|
|||
sub set_changes_file { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick here. This should be get_changes_file
, since it's only returning the file name and not setting it on the document. The setter is actually $document->changes_file()
;
I made the changes by adding a second file. |
Looks good, thanks! |
@andreeap could you rebase and fix the merge conflict? |
add changes_file field (adds new mappings)
This is a fix for #299 and it is ready for review.