Commit graph

70 commits

Author SHA1 Message Date
Duc Nguyen
2ebe70039a Feat: #3498 Display episode's published_at (#4272)
* feat: #3498 Display episode's published_at

* feat: #3498 Move methods to decorator

* feat: #3498 Add check if published_at present

* feat: #3498 Add testcase for showing published_at

* Fix build failure #3498

https://travis-ci.com/thepracticaldev/dev.to/builds/130734935

* feat: #3498 Fix testcase failed on Travis 130738295

* feat: #3498 Address comments on PR #4272

* feat: #3498 Delete unused

* feat: #3498 Refactor the use of decorate
2019-10-08 17:06:46 -04:00
Ben Halpern
b1b408e61c
Add more variation to home feed (#4069)
* Add more variance to home feed

* Fix array typo

* Fix up watercooler spec

* Fix up blackbox spec
2019-09-19 12:58:11 -07:00
Feruz Oripov
0ccc62ffa3 Refactoring possible unprotected redirect. (#3825)
* Refactoring possible unprotected redirect.

* Security refactoring tag_adjustments_controller.rb.

* Security refactoring tag_adjustments_controller.rb.

* Security refactoring articles_controller.rb.

* Security refactoring internal/welcome_controller.rb

* Security refactoring tags_controller.rb.

* Security refactoring comments_controller.rb.

* Security refactoring stories_controller.rb.
2019-08-27 10:13:38 -04:00
Anna Buianova
fabaeb5461 Introduced published field to podcasts (#3593)
* Published field for podcasts

* Add podcasts migration

* More specs for podcasts availability

* Show published in podcasts internal

* Update schema.rb with db:migrate
2019-08-01 09:29:13 -04:00
rhymes
1e72749cc0 Remove unnecessary pluck calls (#3534) [ci skip] 2019-07-24 12:01:09 -04:00
Anna Buianova
567579daf3 Podcast episodes statuses #2952 (#3386) 2019-07-12 10:03:57 -04:00
Anna Buianova
d6a151703c Podcasts reachable status #2952 (#3341)
* Podcasts reachable status #2952

* Specs for podcasts statuses
2019-07-02 09:18:27 -04:00
Ben Halpern
dcbb188cf1
Add pinned articles box to profiles (#3269)
* Initial pins work

* Add pin box to profiles

* Fix test snapshot spacing and optimize svg

* Fix listings spacing
2019-06-24 15:18:29 -04:00
Ben Halpern
456931f208
Further generalize pages and site Twitter handle (#3177)
* Further generalize pages and site Twitter handle

* Add footer mod change

* Remove giveaways dead code
2019-06-16 00:59:11 -04:00
Ben Halpern
2aa01d44a2
Add listings to home page (#2912) 2019-05-21 10:21:49 -04:00
Ben Halpern
c76abbbdb3
Allow users to follow podcasts (#2690)
* Allow users to follow podcasts

* Only display podcasts user follows

* Add main_color_hex to factory

* Fix podcast test and modify styles

* Fix tests

* Remove weird test
2019-05-04 15:30:40 -04:00
Ben Halpern
5e64ae874e
Remove includes user from stories query to reduce num queries and memory (#2662)
* Add profile_image_90 to serialized data on article

* Remove includes user from stories query
2019-05-02 15:58:58 -04:00
Ben Halpern
9578a15579
Remove unnecessary map functions in stories controller (#2402) 2019-04-12 01:10:08 -04:00
Ben Halpern
8c740b77ac
Add additional fragment caching to home page (#2401) 2019-04-12 00:42:28 -04:00
rhymes
5782ffd7e0 Use published scope for articles (#2374)
* Use published scope for articles

* Fix variable name

* The sequencing in the union query matters

* Fix spec

* Restore a published: true condition

* This test is actually misleading due to the union

* Revert this change, not sure why it's not a relation

* Fix useless diff
2019-04-11 13:18:26 -04:00
Andy Zhao
8ef611f879 Remove Honeycomb from the app (#2366)
* Remove Honeycomb related gems

* Remove Honeycomb related code from controllers

* Remove Honeycomb from RSS Reader

* Remove Honeycomb related files

* Remove Honeycomb related tests

* Remove leftover Honeycomb methods
2019-04-11 10:49:35 -04:00
Ben Halpern
bd95c6a8bf
Fix human language detection (#2338)
* Update language detection

* Modify feed to account for languages
2019-04-08 15:47:29 -04:00
Abraham Williams
b98565a931 Update rubocop to 0.67 (#2313) [ci skip] 2019-04-05 12:55:13 -04:00
Abraham Williams
9cb40e546b Enables Rails cops (#2186)
* Enable Rails cops

* Fix Rails/DynamicFindBy

* Fix Rails/HttpStatus

* Fix Rails/Blank

* Fix Rails/RequestReferer

* Fix Rails/ActiveRecordAliases

* Fix Rails/FindBy

* Fix Rails/Presence

* Fix Rails/Delegate

* Fix Rails/Validation

* Fix Rails/PluralizationGrammar

* Fix Rails/Present

* Fix Rails/Output

* Fix Rails/Blank

* Fix Rails/FilePath

* Fix Rails/InverseOf

* Fix Rails/LexicallyScopedActionFilter

* Add Rails/OutputSafety to TODO

* Add Rails/HasManyOrHasOneDependent to TODO

* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Tim Lange
3494264404 Enabled rubocop/lint (#2130)
* WIP: Enabled rubocop/lint

* FIX: Fixed failing test

* FIX: Small change to return

* FIX: Changed indent
2019-03-21 10:53:44 -04:00
Jess Lee
9c1e10cd9f Improve Internal Dashboards features(#2043) 2019-03-18 16:29:11 -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
Ben Halpern
ecb9f6da3d
Remove some hardcoded shecoded stuff (#2011) 2019-03-08 18:08:48 -08:00
Ben Halpern
27662eb924
Ben/shecoded tweaks (#2007)
* A few shecoded tweaks

* Refactor code
2019-03-08 08:16:10 -08:00
Ben Halpern
532903c688
Add experience level averaging to articles (#1922)
* Add experience level averaging to articles

* Adjust copy on /mod ratings page
2019-02-28 08:17:29 -08:00
Sean
1acd5b78ef Display tag moderators on tag page (#1739) 2019-02-12 14:58:31 -05:00
Ben Halpern
4bff494adc
Ping comments to pre-warm new comment trees (#1755) 2019-02-06 21:45:24 -04:00
Ben Halpern
71a419e5ee
Add profile_updated_at and github_repos_updated_at to avoid extra fet… (#1754)
* Add profile_updated_at and github_repos_updated_at to avoid extra fetches

* Fix variant_number issue

* Fix test
2019-02-06 20:39:15 -04:00
Ben Halpern
152f4a52ea
Remove unnecessary queries (#1717)
* filter unnecessary queries

* Adjust article query in a couple places

* Replace tagged_with in main tag query

* Cache_tagged_with additional queries

* Modify test

* Modify cached_tagged_with to account for single tags

* Add cached_tagged_with in a few more places
2019-02-02 21:40:34 -04:00
Ben Halpern
d7665fcc3f
Add comment template to post (#1692)
* add myself to the core contributors

* add comment template

* merge upstream

* make sure the template re-appears for top level comments after submission

* make interface admin only

* Adjust comment template form

* Fix merge conflicts

* Remove unnecessary comment template from json
2019-01-30 13:32:34 -05:00
Ben Halpern
ea63374408
Add below-article html variant (#1669)
* Add below-article html variant

* Fix tests for variant number

* Fix stories show tests for html_variants
2019-01-28 14:31:43 -05:00
Ben Halpern
2e667d0810
Lower number of comments showing on first page of article show (#1637) 2019-01-23 17:57:51 -05:00
Ben Halpern
fe26ad5778
Add additional home page caching (#1610) 2019-01-21 12:45:09 -05:00
Anna Buianova
9ccf0a07cb Refactored stories views (#1584) 2019-01-20 11:57:24 -05:00
Ben Halpern
b1f18f5bbc
Improve feed and add more randomness (#1570)
* Improve feed and add more randomness

* Fix tests

* Fix test score calc

* Modify home page test criteria
2019-01-16 16:01:14 -05:00
Anna Buianova
53e8490e75 Refactor redirect from the old username or organization slug (#1527) 2019-01-14 18:10:57 -05:00
Andy Zhao
68807c6df7 Allow Organizations to Update Slug/Username (#1411)
* Close anchor tag typo

* Remove confusing message in profile

* Fix typo in spec

* Add old_slug and old_old_slug fields to org

* Test for check_for_slug_change method

* Add ability for orgs to change slug

* Update copy to match new org language

* Add redirect for organizations with old slugs

* Use less queries for handling org/user redirect

* Use consistent syntax for user creation

* Test for organization slug redirects

* Refactor user article redirect
2019-01-10 14:16:43 -05: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
Anna Buyanova
074d50d2b7 Stories views reorganization (#1317)
* Added stories feature specs

* Structure feature specs

* Spec for the articles by tag page

* Spec for clicking "week" button on the tag page

* Reorganize stories views

* Feature spec for displaying sponsors on tag page

* Increase allowed rspec example length

* Spec for the users comments view

* Articles by tag: reeplace view code with rendering partials
2018-12-13 14:54:02 -05:00
Ben Halpern
651ab3ce35
Add point weights for tag follows (#1229)
* Add point weights for tag follows

* Adjust num articles to initially show up on home page

* Fix schema.rb

* Adjust follow policy spec

* Adjust dashboard styling for follow points form
2018-11-30 15:36:58 -05:00
Christine Yen
cff6b5d589 Add Honeycomb gem and initial instrumentation (#695)
* Add basic Honeycomb initializers

* Add some basic instrumentation, capture basic IDs

* Correctly alphabetize Gemfile, embed env in dataset names

* Actually reorder Gemfile because I can read

* Add custom tracing instrumentation to RssReader

* Improve timing/tracing info in RssReader

* Even make sure Errors show up in trace if possible

* Make sure we capture this as Rails traffic

* Swap in dev/test Libhoney::Clients as appropriate

* Move context-snagging bits into lib/instrumentation.rb

* Merging Gemfile lines seems to be my Achilles heel
2018-11-28 10:08:27 -05:00
Ben Halpern
cbf8d76d94
Add score minimum to a couple missing places (#1133) 2018-11-16 18:16:33 -05:00
Ben Halpern
79bc96e1ca
Simplify article show view/remove queries (#905) 2018-10-14 11:18:06 -04:00
Ben Halpern
221c363af0
Reduce queries in typical stories#show response + small fixes (#903)
* Reduce queries in typical stories#show response + small fixes

* Change const to git in non-es6 code
2018-10-13 19:38:38 -04:00
Ben Halpern
95dacf67fa
Fix feed issue which caused wrong posts to show up sometimes (#827) 2018-10-04 19:07:36 -04:00
Ben Halpern
97a8958a87
Rearrange some code to remove unnecessary queries (#787)
* Change harcoded memcache limit

* Rearrange some code to remove unnecessary queries
2018-10-02 10:59:51 -04:00
Ben Halpern
7e48a23afa
Ben/add more recent posts to home feed (#775)
* Add meta to sidebar and adjust ranking algo

* Update home feed to show more recent posts from folks you follow

* Only show recent posts on home feed if user signed in
2018-09-30 14:05:59 -04:00
Ben Halpern
4205d50bd8
Make home feed more relevant and varied (#757) 2018-09-27 13:21:51 -04:00
Ben Halpern
91f99036df
Update feed for slightly more customized top articles (#642)
* Update home feed logic and display

* Remove console log
2018-09-12 15:27:54 -04:00
Kohei Sugi
7760a8d196 Fix Lint/UselessAssignment (#388) 2018-08-23 15:03:29 -04:00