-
Notifications
You must be signed in to change notification settings - Fork 16
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
Migration from Rails 3.2.22.5 to 4.0 #13
Open
Combos93
wants to merge
40
commits into
aristofun:rails3to4migration
Choose a base branch
from
Combos93:migration_to_4.0
base: rails3to4migration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
пришлось фиксить тесты и допиливать код
…efault devise method
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gemfile
Убрал версии почти всех гемов, чтобы Bundler смог поставить гемы на Rails 4.0
Добавил сопутствующие гемы (+для миграции на 4.0)
AdminDashboard
Отключил админку, так как rails_admin 0.5.0 версии не уживается с Rails 4 => Надо новую админку!
Devise gem
Devise новой версии (3.5.10) работает уже немного по-другому
Controllers
Переписаны все контроллеры согласно Rails 4: добавлены strong_params, мелкий рефакторинг стиля. Хэшрокеты в ходу были на Rails 3.
Models
Небольшой рефакторинг (пока что): params вынесены в отдельные методы => стремимся в Clean Code. Небольшая переделка регулярных выражений для почты. Скоупы переписаны на лямбды.
Environments / Bundler
Переписаны среды разработки, согласно Rails 4: что-то добавлено, что-то устарело.
Initializers
Credentials рекапчи поменяли названия (см. документацию Рекапчи).
Form Builders
Билдеры Дивайса: переписаны - чтобы работало...
Locales
Пофиксил 2-ступенчатую структуру yml-файла. Не находился перевод.
Routes
Несущественный рефактор кодстайла. Хэшрокеты не в ходу в Rails 4 (использовались в R3 - сравните R-guides 3 и 4 версии...)
RSpec
Устранены устаревшие методы.
spec_helper
Пытаюсь пофиксить
within(:xpath, "//form[@action='#{user_session_path}']") do
Пока не получается побороть XPath (может что-то устарело; или я что-то позабыл переписать) - из-за этого валится 10 или 15 тестов (точно не помню сколько).
rails_helper
Не знаю, нужен ли он здесь....
Всего тестов 101 - валится 21 штука...
Это ещё не всё, ребята....