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

Rails 4.1 #774

Merged
merged 74 commits into from
Jul 25, 2014
Merged

Rails 4.1 #774

merged 74 commits into from
Jul 25, 2014

Conversation

squidgetx
Copy link
Contributor

Main Changes:

  • Upgrade every gem except bootstrap
    • Papertrail can use the standard gem instead of git
    • rubycasclient-rails was removed and rubycasclient was upgrade to use the project master branch
    • RailsAdmin replaced active_admin
    • jQuery Datepicker was removed, the relevant code was replaced with pure jquery
    • Replace spork with spring
    • Remove deprecated assets group
  • Lambdafy many scopes and other blocks for proper processing in Rails 4.1
  • Replace all match routes with get or post as appropriate
  • Modify many regexes to not allow multiline input
  • Standardize the way Time.now and Date.today are handled (should always be Time.current and Date.current, these take the time zone specified in config into account where the other methods will use system time, which fails in any case where the server is in a different time zone than the client including Travis sometimes). Override Date.today, .tomorrow, and .yesterday in rails_extensions.rb
  • Refactor users_controller create and update actions to not use ridiculous JS templates and add quick_new and quick_create to make things simpler
  • Replace deprecated button_to_function with simple link_to with onclick() attributes
  • update some deprecated spec syntax (and in some cases, removed some specs that were unnecessary) (TODO: update it should syntax with expect syntax)

@squidgetx
Copy link
Contributor Author

Fixed up that user controller bug; I had changed around the users controller without updating the spec accordingly

@orenyk
Copy link
Contributor

orenyk commented Jul 25, 2014

The fuubar issue apparently shows up at the end of tthe rspec run (which I hadn't gotten to:

The Fuubar formatter uses the deprecated formatter interface not supported directly by RSpec 3.  To continue to use this formatter you must install the `rspec-legacy_formatters` gem, which provides support for legacy formatters or upgrade the formatter to a compatible version.  Formatter added at: /home/oren/.rvm/gems/ruby-2.1.1@STC-reservations/gems/rspec-core-3.0.2/exe/rspec:4:in `<top (required)>'

Trying a workaround from here fixed it!

@orenyk
Copy link
Contributor

orenyk commented Jul 25, 2014

two more deprecation warnings but all tests pass, I'm going to add them to #779. After we finish the 3.4.0 hotfixes I'll come back to this for a second look-over so we can merge.

@orenyk
Copy link
Contributor

orenyk commented Jul 25, 2014

On a separate note, I'd also like to update to Ruby 2.1.2 with this release since there are known issues building 2.1.1 which popped up while investigating Vagrant (#769). I assume there are no breaking changes, but we should review the changelog quickly to make sure.

@dgoerger
Copy link
Contributor

The changelog for 2.1.2 reveals no obvious breakage points (entirely bugfixes and minor version dependency upgrades afaict), so we should go for it imo.

@dgoerger
Copy link
Contributor

merge conflict whaddup

also can we bump the Ruby version to 2.1.2?

@squidgetx
Copy link
Contributor Author

sure

@dgoerger
Copy link
Contributor

We just have to deal with the new always-red flash notices, right?

@squidgetx
Copy link
Contributor Author

oh i totally forgot about that

@mnquintana
Copy link
Contributor

@dgoerger Is that pending the Bootstrap upgrade? (#245)

@dgoerger
Copy link
Contributor

The reservations Index table will error out if you've deleted an equipment model. This may or may not also be a problem on master.

The highlighted line in the error log says

<div id="remove_button"><%= link_to "Remove", remove_from_cart_path(EquipmentModel.find(model_id)),

The strace is:

app/views/reservations/_list_items_in_cart.html.erb:9:in `block in _app_views_reservations__list_items_in_cart_html_erb___2229732808842901798_69985735141420'
app/views/reservations/_list_items_in_cart.html.erb:6:in `each'
app/views/reservations/_list_items_in_cart.html.erb:6:in `_app_views_reservations__list_items_in_cart_html_erb___2229732808842901798_69985735141420'
app/views/reservations/_cart_sidebar.html.erb:12:in `_app_views_reservations__cart_sidebar_html_erb__4576819197525304015_69985735979940'
app/views/layouts/_sidebar.html.erb:8:in `_app_views_layouts__sidebar_html_erb__3348795142785350702_69985736050280'
app/views/layouts/application_with_sidebar.html.erb:20:in `_app_views_layouts_application_with_sidebar_html_erb__1298167178947175694_69985737414040'

_EDIT:_ This is also erring out on the catalogue index.

_EDIT2:_ This is not a problem on master.

@dgoerger
Copy link
Contributor

nevermind, that equipment model had been in my cart and is also an issue on master.

@dgoerger
Copy link
Contributor

I submitted the Quick New User button with the "NetID" of Donny Darko [my netid], and it renders the catalogue page in the modal consistently even after rebooting the browser, server, and entire VM. All of the links and routes look correct, though, so I don't know what this is about.

screenshot from 2014-07-25 15 06 04

@squidgetx is currently unable to replicate, @orenyk please verify either way.

@dgoerger
Copy link
Contributor

... I suddenly can't replicate this after switching to a different branch and switching back. Weird.

dgoerger added a commit that referenced this pull request Jul 25, 2014
@dgoerger dgoerger merged commit 0feb71d into master Jul 25, 2014
@dgoerger dgoerger deleted the rails_41 branch July 25, 2014 19:47
@orenyk
Copy link
Contributor

orenyk commented Jul 25, 2014

Great. I'm not at a computer so it would have taken me a while to check,
but if the issue disappeared then that's good enough for me.

@freemanoid
Copy link

Override Date.today, .tomorrow, and .yesterday in rails_extensions.rb

You don't need to touch .tomorrow and .yesterday because they consider server time zone.

Date.tomorrow

def tomorrow
  ::Date.current.tomorrow
end

@squidgetx
Copy link
Contributor Author

Nice catch.

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.

5 participants