Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AO3-5036 Update to ruby 2.3 #2937

Merged
merged 11 commits into from Aug 19, 2017

Conversation

Projects
None yet
3 participants
Contributor

zz9pzza commented Jun 12, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5036

Purpose

Update the ruby language to 2.3.

Testing

I would check that work searching works as intended

zz9pzza added some commits Jun 10, 2017

app/controllers/works_controller.rb
cache_sweeper :collection_sweeper
cache_sweeper :feed_sweeper
# we want to extract the countable params from work_search and move them into their fields
def clean_work_search_params
- if params[:work_search].present? && params[:work_search][:query].present?
+ #https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/
@houndci-bot

houndci-bot Jun 12, 2017

Missing space after #.

@sarken

sarken Aug 1, 2017

Owner

Drive-by comment! This page is informative, but I'm not sure which part(s) of it is relevant to the code. A more helpful comment might be something like "We use dup instead of clone here because we don't want to copy the frozen state of the object" or "Using dup here means the original object also gets modified when we do the gt/lt swap below" or whatever.

app/controllers/works_controller.rb
- if params[:work_search].present? && params[:work_search][:query].present?
+ #https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/
+ clean_params = work_search_params&.dup
+ clean_params[:query] = clean_params[:query].dup unless clean_params[:query].nil?
@houndci-bot

houndci-bot Jun 12, 2017

Unnecessary spacing detected.

It looks like this has some merge conflicts now that will need to be resolved.

zz9pzza added some commits Aug 7, 2017

app/controllers/works_controller.rb
+ # https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/
+ # While nearly identical, clone does one more thing than dup.
+ # In clone, the frozen state of the object is also copied.
+ # In dup, it’ll always be thawed.
@houndci-bot

houndci-bot Aug 8, 2017

Use only ascii symbols in comments.

app/controllers/works_controller.rb
+ # In dup, it’ll always be thawed.
+
+ clean_params = work_search_params&.dup
+ clean_params[:query] = clean_params[:query].dup unless clean_params[:query].nil?
@houndci-bot

houndci-bot Aug 8, 2017

Unnecessary spacing detected.

zz9pzza added some commits Aug 8, 2017

@sarken sarken merged commit 7a3713e into otwcode:master Aug 19, 2017

2 of 3 checks passed

Scrutinizer Timed out
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound No violations found. Woof!

@zz9pzza zz9pzza deleted the zz9pzza:AO3-5036 branch Aug 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment