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
Update gems #338
Update gems #338
Conversation
@@ -0,0 +1,5 @@ | |||
class AddAdminFlagToUsers < ActiveRecord::Migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
@@ -40,8 +40,8 @@ class UsersControllerTest < ActionController::TestCase | |||
should "be able to create accounts" do | |||
UsersController.any_instance.expects(:verify_recaptcha).returns(true) | |||
assert_difference 'User.count' do | |||
put :create, user: { name: "Fubert Barfuß", password: 'jeheim', | |||
password_confirmation: 'jeheim', email: 'fubert@example.com'}, read: 1 | |||
put :create, user: { name: "Fubert Barfuß", password: 'strengjeheim', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use keyword arguments instead of positional arguments for http call: put.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -30,8 +30,8 @@ class UsersControllerTest < ActionController::TestCase | |||
should "not be able to create accounts when failing reCAPTCHA" do | |||
UsersController.any_instance.expects(:verify_recaptcha).returns(false) | |||
assert_no_difference 'User.count' do | |||
put :create, user: { name: "Fubert Barfuß", password: 'jeheim', | |||
password_confirmation: 'jeheim', email: 'fubert@example.com'}, read: 1 | |||
put :create, user: { name: "Fubert Barfuß", password: 'strengjeheim', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use keyword arguments instead of positional arguments for http call: put.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -1,7 +1,7 @@ | |||
module Authlogic | |||
module RequestSpecHelper | |||
def sign_in(user) | |||
post user_session_path, user_session: { email: user.email, password: 'jeheim' } | |||
post user_session_path, user_session: { email: user.email, password: 'strengjeheim' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use keyword arguments instead of positional arguments for http call: post.
require 'codeclimate-test-reporter' | ||
CodeClimate::TestReporter.start | ||
end | ||
require 'simplecov' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
class AdminConstraint | ||
def matches?(request) | ||
return false unless request.cookie_jar['user_credentials'].present? | ||
user = User.find_by_persistence_token(request.cookie_jar['user_credentials'].split(':')[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use find_by instead of dynamic find_by_persistence_token.
@@ -0,0 +1,7 @@ | |||
class AdminConstraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
* Passwords now need to be 8 characters long (new default in authlogic). * To login to the Sidekiq web interface, log in to opensnp.org, if you have the `admin` flag set, you will find it at the usual place.
ab107f3
to
5e24052
Compare
assert_difference 'User.count' do | ||
put :create, user: { name: "Fubert Barfuß", password: 'jeheim', | ||
password_confirmation: 'jeheim', email: 'fubert@example.com'}, read: 1 | ||
put :create, user: { name: "Fubert Barfuß", password: 'strengjeheim', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use keyword arguments instead of positional arguments for http call: put.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -1,4 +1,4 @@ | |||
ENV["RAILS_ENV"] = "test" | |||
ENV['RAILS_ENV'] = 'test' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
f88be45
to
0e23ed9
Compare
@@ -0,0 +1,21 @@ | |||
namespace :rubocop do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frozen string literal comment.
On the CI two tests failed because the ReCaptcha site key wasn't set, even though ReCaptcha should be completely ignored in the tests.
This should be good to go, now. |
Looks good to me. @philippbayer any complains from your side? 😺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(trying this new review system for the first time) Looks good to me. Thanks for making the 🐶 happy!
Sooo... should I merge or do we wait for @philippbayer to respond? 🙂 |
Fire away, I think @philippbayer just arrived in 🇩🇪 this morning from 🇯🇵 , so it would be a few days before he's able to read straight again. 😂 |
have the
admin
flag set, you will find it at the usual place.inherit_from: .rubocop_todo.yml
from.rubocop.yml
, so Hound does complain about all the issues. I also added a few tasks for running Rubocop.