Commit graph

9 commits

Author SHA1 Message Date
rhymes
3dae3ff797
Upgrade rubocop* packages to the latest version and fix violations (#11972)
* Update erb_lint to track newer Rubocop versions

* Update rubocop-rspec to 2.1

* Fix Rails/WhereEquals and Style/RedundantParentheses

* Upgrade rubocop to 1.1.0

* Enable Rubocop 1.1 cops

* Upgrade rubocop to 1.2.0

* Enable Rubocop 1.2 cops

* Upgrade rubocop to 1.3.0

* Enable Rubocop 1.3 cops

* Enable Rubocop 1.4 cops

* Enable Rubocop 1.5 cops

* Upgrade rubocop to 1.6.x

* Restore previous .reject

* Fork the PR to make sure we don't inject unwanted code accidentally
2020-12-21 18:29:43 +01:00
Mac Siri
73127aca01 Remove controller specs (#2224)
* Create more request specs

* Update wording

* Update guard to work with requests

* Fix broken spec

* Remove rails-controller-testing gem

* Move article_specs

* Move last controller spec out

* Remove controller spec config

* Fix broken spec

* Remove all use of render_template

* Refactor spec

* Tweak User#remember_me

* Create ArticleAnalyticFetcher spec

* Undo User#remember_me

* Use srand in rspec

* Create FeedbackMessagesHelper spec

* Add DigestMailer spec

* Fix broken test
2019-03-29 19:05:02 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
rhymes
6553f08d94 Rubocop cleanups (#1415)
* Update rubocop-todo.yml with new violations

* Fix Layout/EmptyLine* rules

* Fix Layout/Indentation* rules

* Fix remaining Layout/* rules

* Fix Lint/DuplicateMethods by removing unused accessor

* Fix Lint/IneffectiveAccessModifier

* Fix Lint/MissingCopEnableDirective

* Re-run rubocop auto gen config

* Fix Layout/RescueEnsureAlignment

* Fix Naming/* rules

* Fix some RSpec/* rules

* Fix typos

* Fix RSpec/LetBeforeExamples

* Series should only be an attr_writer, not an attr_accessor

* Fix RSpec/InstanceVariable

* Fix RSpec/InstanceVariable

* Fix RSpec/RepeatedDescription and RSpec/RepeatedExample

* Fix Style/ClassAndModuleChildren

* Fix Style/ConditionalAssignment

* Fix some Style/* rules

* Trigger Travis CI build because failing tests are not failing locally

* Revert "Fix Style/ClassAndModuleChildren"

This reverts commit 1686801d8a1516ba1894f79e24401a20dea65f99.
2019-01-02 11:20:02 -05:00
Ben Halpern
302e8f202d
Add HTML variants for cta optimization and other nav bar adjustments (#970)
* Add HTML variants for cta optimization and other nav bar adjustments

* Fix 1==1 non-random mistake

* Spruce up org call-to-action

* Change default text color

* Add html variant trial and success request specs

* Fix article sidebar caching issue

* One line adjustment

* Modify schema

* Add include ActionView::Helpers::TagHelper to user_tag_spec

* Modify follow_button to remove session context

* Dummy commit

* Change Edit Article to Edit Post

* Dummy commit

* Fix rubocop concerns

* Fix rubocop style
2018-10-22 17:03:57 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Mac Siri
9d32af7b6c Implement periodic email digest (#123)
* Create EmailDigest WIP

* Add email_digest_periodic to User model

* Add email digest setting to notification

* Draft thoughts (?)  WIP

* Implement EmailDigest's features

* Remove hard-coded email digest vars

* Create spec for EmailDigest

* Fix something

* Temp work

* Run migration & Yarn

* Move email logic out of EmailDigest

* Improve email logic

* Improve EmailLogic'specs

* Update copy

* Change positive_reactions_count limit

For non-followed articles we should have a higher limit. So this change modifies that.
2018-03-27 13:29:08 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00