Closed lsitu closed 7 years ago
@ucsdlib/developers Please review, comments ... Thanks.
Looks :+1: to me, and I agree with @mcritchlow comments above.
@ucsdlib/developers I've updated the PR to use the new pattern to fetch field values from solr_doc as @mcritchlow suggested. Please review, comments ... Thanks.
BTW, It seems like that the develop branch of the current horton codebase is broken with error "uninitialized constant ActionView::CompiledTemplates::Flipflip", an obviousFlipflop
typo. And I can't rebase it. I think we must have been upgraded to a wrong hyrax version recently! Does anyone see that error?
Here are the steps to replicate it after checking out the latest develop branch from https://github.com/ucsdlib/horton:
From the dashboard, click on menuWorks
on the middle of the left panel (or http://localhost:3000/dashboard/my/works?locale=en).
@lsitu The version didn't change which is still '2.0.0.alpha'. It was upgraded to the latest commit at that point: projecthydra-labs/hyrax@562b8ff, see https://github.com/ucsdlib/horton/pull/109,
as the ticket required: https://github.com/ucsdlib/horton/issues/93,
And all our local tests passed.
As you know the hyrax is keeping on developing, it is not surprised if it is conflict with our local development and we need to stay up to date with Hyrax development. You may upgrade to the latest commit from hyrax master branch to see if it works fine to you.
@hweng It was fixed 14 days ago, just shortly after the hyrax commit that are used for horton upgrade: https://github.com/projecthydra-labs/hyrax/commit/6688333c9343fd7d2e19594661522a826d871951
@lsitu Sounds good. Just upgrade to the latest commit. We might need to keep on upgrading it in each sprint.
@mcritchlow I tried to feed Rubocop to make it happy but still got it failed, though I've made lots of unnecessary changes for a shorter variable name, using if block instead of appending the modifier at the end, adding comments like "# frozen_string_literal: true" to all class/module, disabled line length check and method length check in some cases, manipulating for indentation, using the %i pattern as suggested for array etc. But I still can't get it passed for the following cases:
During feeding Rubocop to fix the errors, there are some inconsistency message like "Layout/TrailingBlankLines: Final newline missing.", "Layout/IndentationConsistency: Inconsistent indentation detected.", "Performance/StringReplacement: Use tr instead of gsub." etc.
It seems like we should run into the same situation that hyrax do. I think we may need to consider the following changes:
@lsitu, this should probably be a team decision since everyone is impacted, so @VivianChu and @hweng please give a 👍 or 👎 to each of Longshou's proposed changes to the rubocop config above.
I think it is a very good argument to align with the Hyrax rubocop conventions since we periodically have to override parts of that codebase. My thoughts on each:
# frozen_string_literal: true
as noted in the cop description make this cop happy?@mcritchlow For #4, the cop just won't be happy with comment # frozen_string_literal: true
added on the top of the module definition for modules like FileSetIndexer and IndexesAttributes even. But I can give it another try to add it to the body of the module definition to see how it goes.
@lsitu if it didn't work, I'd say disable as you proposed. Not worth the hassle then, imo
It is fine for me :+1:. Overall we have to agree that the rubocop is a great tool which points out some bad style in your code to fix.
👍
@ucsdlib/developers Per our discussions above, I've added PR https://github.com/ucsdlib/horton/pull/114 for rubocop configuration. Please review and comments. Thanks.
@ucsdlib/developers The style check is passed now. Please review and comments ... Thanks.
👍
Fixes #84, #85, #92, #59
Implemented the new rights metadata model with support for the edit form, Batch Import and UI display.
Changes proposed in this pull request: