Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

[1553] Update dependencies (May 2016) #1565

Merged
merged 1 commit into from
Jun 1, 2016
Merged

Conversation

orenyk
Copy link
Contributor

@orenyk orenyk commented May 15, 2016

Resolves #1553

  • Highlights:
    • Update Devise to v4.1
    • Update Capybara to v2.7
  • Email validators are now more permissive due to Devise update
  • Capybara matchers no longer return hidden inputs by default
  • Several new rubocop cops were implemented and dealt with

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch 2 times, most recently from ae9fb47 to f3234e4 Compare May 15, 2016 20:47
@orenyk
Copy link
Contributor Author

orenyk commented May 15, 2016

Whoops forgot to update .travis.yml with the new Ruby version.

@esoterik
Copy link
Collaborator

Any reason we didn't update to ruby 2.3?

@orenyk
Copy link
Contributor Author

orenyk commented May 18, 2016

Excellent point, I'll update and adjust.

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch from f3234e4 to a993dd6 Compare May 19, 2016 16:39
@orenyk
Copy link
Contributor Author

orenyk commented May 19, 2016

Updated with Ruby 2.3.1, we can merge this once we're done with #1566 (I'll have to rebase).

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch 2 times, most recently from 5003a94 to 2edb90d Compare May 22, 2016 05:48
@orenyk
Copy link
Contributor Author

orenyk commented May 22, 2016

Updated a few gems that had since pushed minor updates and rebased onto the latest master, resolving merge conflicts from #1538.

@@ -19,7 +19,8 @@

it 'has the appropriate columns' do
expect(csv.first.split(',')).to eq(
FactoryGirl.build(model).attributes.keys - PROTECTED_COLS)
FactoryGirl.build(model).attributes.keys - PROTECTED_COLS
)
Copy link
Collaborator

@esoterik esoterik May 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this preferable over this?

expect(csv.first.split(',')).to \
  eq(FactoryGirl.build(model).attributes.keys - PROTECTED_COLS)

(Before I definitely preferred the split parentheses but now that rubocop forces the separate parenthesis line I think I prefer the above...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I prefer it your way, I'll go through and update where possible.

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch from 2edb90d to 7ecbbed Compare May 24, 2016 01:44
@orenyk
Copy link
Contributor Author

orenyk commented May 24, 2016

Updated a bunch of rubocop fixes and had another update, ready for another look-through!

EDIT Also found another instance of #1528

config.mailer_sender = if AppConfig.table_exists? && !AppConfig.first.nil?
AppConfig.first.admin_email
else
config.mailer_sender = 'admin@reservations.app'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config.mailer_sender can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@esoterik
Copy link
Collaborator

left a few small comments!

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch from 7ecbbed to 62ebbb1 Compare May 25, 2016 04:31
@orenyk
Copy link
Contributor Author

orenyk commented May 25, 2016

Fixed, nice catches 😄. One more review?

@@ -64,7 +65,7 @@ def self.item_to_row(item)
# get the average of an array of values, discounting nil values
def self.average2(arr)
arr = arr.reject(&:nil?)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this the same as arr.compact!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to address this comment since it's not really included in #1570 (as compared to most of the other comments) and then we should be good to go.

end
new_notes += "\n#{name} changed from " + old_val + ' to ' + new_val\
+ '.' if old_val && new_val
end
new_notes += "\n\n" + notes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as this

@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch from 62ebbb1 to c95ffcd Compare May 27, 2016 00:42
@orenyk
Copy link
Contributor Author

orenyk commented May 27, 2016

Updated Report.average2 to address your comment, switched out an if...else with a guard clause while I was in there 😄. If you're cool with that change then this is good to go!

@esoterik
Copy link
Collaborator

yup, this is good to go

@orenyk
Copy link
Contributor Author

orenyk commented May 31, 2016

Great! I'm actually going to block this on #1566 after which I'll rebase and deal with any new rubocop errors before squashing for a final review.

@orenyk
Copy link
Contributor Author

orenyk commented May 31, 2016

Rebasing now

Resolves #1553
- Highlights:
  - Update Ruby to 2.2.5
  - Update Devise to v4.1
  - Update Capybara to v2.7
- Email validators are now more permissive due to Devise update
- Capybara matchers no longer return hidden inputs by default
- Several new rubocop cops were implemented and dealt with
@orenyk orenyk force-pushed the 1553_dependency_update_201605 branch from c95ffcd to 23d45c3 Compare May 31, 2016 21:48
@orenyk
Copy link
Contributor Author

orenyk commented May 31, 2016

@esoterik ready for another glance through, there were merge conflicts in the following files:

spec/lib/tasks/email_*_reminder_spec.rb
spec/controllers/contact_controller_spec.rb
spec/lib/csv_export_spec.rb

and a new rubocop error (missing .freeze in spec/controllers/reservations_controller_spec.rb). It passed specs and the updated rubocop (so should have green builds) - let me know when you've had a chance to skim through it so we can merge.

@esoterik
Copy link
Collaborator

esoterik commented Jun 1, 2016

I think this is ready!

@orenyk
Copy link
Contributor Author

orenyk commented Jun 1, 2016

Thanks!

@orenyk orenyk merged commit 3127c81 into master Jun 1, 2016
@orenyk
Copy link
Contributor Author

orenyk commented Jun 1, 2016

Of course a few of our dependencies are already out of date, but nothing critical 😛. Let's aim to revisit this in a month (I'll open up a new issue).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants