Ben Halpern
6c2498b1b8
Render correct editor based on article's existing format ( #2856 )
...
* Render correct editor based on article's existing format
* Add check for user in /new
2019-05-16 15:25:43 -04:00
cyrillefr
68f06c2076
send_milestone_notification in own job ( #2804 )
...
- that calls a service
- spec for job + move spec to service
- minor refactoring
2019-05-16 13:46:50 -04:00
Anna Buianova
dd0fbf002b
ActiveJob for updating notifications #1996 ( #2839 )
...
* Notifications::Update service
* Update notifications ActiveJob
* Raise an exception when wrong notifiable class passed to a job
2019-05-15 12:37:25 -04:00
Kobe Raypole
509c7a3388
Move async article methods to ActiveJob ( #2647 )
2019-05-10 12:52:00 -04:00
cyrillefr
ecdbee64ab
Move tag adjustment notification to Active Jobs ( #2654 )
2019-05-10 11:06:29 -04:00
rhymes
e626002260
Add alternative texts to images ( #2771 ) [ci skip]
2019-05-09 11:16:03 -04:00
rhymes
4e591fea1c
Show localized date/time on hover for articles/comments ( #2722 )
...
* Add article decorator published_timestamp
* Use time HTML5 element and refactor date in partial
* Add published_timestamp to Article
Adding `published_timestamp` to the homepage we can then use JS to render the full timestamp localized for the user.
We've also added the timestamp to the index and the API
* Display article published timestamp on hover
* Use time also in the article show page
* Add timestamp to bottom articles as well
* Remove published_timestamp from index because it is not used
* Fix broken specs
* Add more article dates specs
* Refactor date initializers
2019-05-09 11:05:17 -04:00
Ben Halpern
41d3f7ef39
Add credits counter_culter to users and orgs ( #2689 )
2019-05-04 10:50:48 -04:00
Ben Halpern
15ea00328c
Award credits along with badge achievements ( #2683 )
2019-05-03 15:38:25 -04:00
Ben Halpern
5891b2ea58
Add application "page" model ( #2657 )
...
* Generate page model
* Add page model
* Conditionally modify html rendering
2019-05-02 18:24:06 -04:00
Ben Halpern
f12f00decd
Add profile_image_90 to serialized data on article ( #2661 )
2019-05-02 15:47:22 -04:00
Ben Halpern
821d45104a
Create serialized cached user and cached organization for articles ( #2658 )
...
* Create cached user and cached organization for articles
* Remove pages table
2019-05-02 14:42:28 -04:00
Anna Buianova
065ef29e31
Added unique index to notifications #2124 ( #2213 )
...
* Added unique index to notifications #2124
* Fix migration + add index to schema.rb
* Shoulda matcher notification unique validation
2019-05-01 13:15:06 -04:00
Ben Halpern
158f56bc9d
Add page for users to "manage" their posts after publication (distribution, etc.) ( #2627 )
...
* Set up basic /manage route
* Add basic article manage page
* Add tips and finalize permissions for /manage
* Add final test and add manage button to article show
* Update failing specs
2019-05-01 09:00:09 -04:00
Anna Buianova
dd11478659
Change format of the user languages_settings #2369 ( #2496 )
...
* Change format of user preferred languages
* Make sure user language settings are set by default
* Add missing expect to the user spec
* Fix users/misc template
* Move existing languages to a constant
* Remove commented user code
* Move languages out of User model
* Update preferred languages accordingly to the available languages
* Set user estimated language only if the language is available
* Fix Portuguese spelling #2582
2019-04-30 17:01:19 -04:00
Anna Buianova
d2d405ad37
Add validation to classified_listings user and organization ( #2625 )
2019-04-30 09:35:08 -04:00
rhymes
af83bab2d0
Escape range separator ( #2593 )
...
The char "-" in regexp defaults a a separator for a range of character, for example: "a-z", Ruby is smart enough to understand "-_" is no range but it does emit a warning, by properly escaping the char "-" we ensure that no warning or issues can arise in the future.
2019-04-29 14:27:26 -04:00
rhymes
743316b528
Move send new badge achievement notification to ActiveJob ( #2474 )
2019-04-29 10:51:08 -04:00
Ben Halpern
076047e13b
Add proper filtering for inappropriate tags in listings ( #2611 )
2019-04-29 09:21:42 -04:00
Bolarinwa Balogun
1578befdf1
Add Twitch to Profile Links ( #2557 )
2019-04-25 16:14:28 -04:00
Anna Buianova
46b1b1d28a
Fix lints ( #2553 ) [ci skip]
2019-04-25 07:56:15 -04:00
Ben Halpern
78138532c8
Classified Listings ( #2545 )
...
* Initial classified listings work
* More work on tags
* Additional work finalizing stripe and getting the listings page along
* Finalize-ish listings 🤞
2019-04-24 16:17:01 -04:00
rhymes
9d2c89fd2f
Upgrade factory_bot_rails to 5.2.0 ( #2532 ) [ci skip]
2019-04-23 13:21:22 -04:00
Andy Zhao
182a787ac4
Add OrganizationMembership model ( #2471 )
...
* Remove deprecated analytics role
* Make anchor tag a bit more readable
* Add OrganizationMembership table and model
* Add organization_membership associations
* Add unique indices for user_id and org_id
* Wrap update and create calls in transactions
* Remove specs of deprecated analytics_beta_tester
2019-04-22 14:08:02 -04:00
Andy Zhao
4e8787f606
Convert underscores in article slugs properly ( #2472 )
2019-04-17 12:35:37 -04:00
rhymes
7d3fb0c0b5
Enable random order for specs ( #2466 ) [ci skip]
2019-04-17 11:30:23 -04:00
Ben Halpern
4b1b137c0f
Fix/augment dashboard and article view count issues ( #2449 )
2019-04-15 10:24:38 -04:00
Anna Buianova
d27874adc9
Move estimating user default language to ActiveJob ( #2373 )
...
* Move estimating user language logic to a service object
* Call a service from a User#estimate_default_language!
* ActiveJob for estimating default user language
* Call ActiveJob from the User#estimate_default_language
* Handle nil user email when estimating default language
* Switch user.estimate_default_language_without_delay! to estimate_default_language! in specs
2019-04-13 15:54:22 -04:00
Ali Spittel
409c280c10
pinkify DEV ( #2425 )
2019-04-13 11:25:02 -04:00
rhymes
d0441bb456
Enable Rails/TimeZone cop ( #2334 ) [ci skip]
2019-04-09 15:38:28 -04:00
Anna Buianova
f1d371c670
Set users email to nil instead of blank ( #2305 )
...
* Set users email to nil instead of blank
* Remove uniqueness validation duplication for users
* Fix organization following test in case the name contains quotes
2019-04-08 19:12:56 -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
Anna Buianova
1b9f2432f6
Conditional validations for user github_username and twitter_username #2061 ( #2312 )
...
* Conditional validation for usernames
* Allow nil, not blank for usernames
2019-04-05 11:35:26 -04:00
Anna Buianova
1a0d4667c5
Unique twitter and github usernames #2061 ( #2255 )
...
* Set github and twitter usernames to nil if they are blank
* Verify github and twitter username in the Admin::UsersController (just in case)
* Add unique indexs on users twitter_username and github_username
2019-04-02 18:16:29 -04:00
Anna Buianova
75a977172c
Fix notifications about the new child comments ( #2233 )
2019-03-29 12:51:10 -04:00
Anna Buianova
4b02fe87a4
Optimize sign in: Identity #2061 ( #2231 )
...
* Add unique index to identity
* Conditional uniqueness validations on identities
* Remove redundant Identity specs
2019-03-28 16:10:23 -04:00
Anna Buianova
e1968e815b
Extract new reaction notification to ActiveJob ( #2122 )
2019-03-25 13:54:21 -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
Ben Halpern
7f27aa32c7
Add areas for DEV Shop displays on left sidebar ( #2162 )
...
* Add areas for DEV Shop displays
* Update display_ad spec
* Add organization to spec
* Add orgs to specs properly
2019-03-22 09:57:37 -04:00
cyrillefr
a2fcbdc4a4
Enable performance rubocop cops ( #2140 )
2019-03-21 16:01:45 -04:00
Abraham Williams
9c55121dcc
Update deprecated Faker::Overwatch use ( #2142 ) [skip ci]
2019-03-21 12:17:16 -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
Anna Buianova
f0e9c0cfef
Extract sending new follower notification to a separate job ( #2030 )
2019-03-20 12:51:09 -04:00
Ben Halpern
91bd6322ad
Add organic page view sums and modify seo boostables ( #2109 )
...
* Add organic page view sums and modify seo boostables
* Add score minimum for SEO boostable
2019-03-19 09:32:26 -04:00
Anna Buianova
825128edc4
Fix reaction notification json data when a reaction is destroyed ( #2112 )
...
* Add specs for notification sending when a destroyed reaction is passed
* Keep only persisted reactions data in the notification
2019-03-19 08:34:24 -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
Mario See
d8709c0334
Implement open inbox for dev-connect ( #1563 )
2019-03-15 14:39:57 -04:00
Ben Halpern
d6ab255a45
Allow users to configure to use night mode (beta) and sans-serif article body ( #2072 )
...
* Initial work for config
* Add config for users
* Fix schema
2019-03-15 13:11:53 -04:00
Anna Buianova
96de5a4f60
Don't send new follower notification when followable is a tag #2041 ( #2050 )
...
* Enable djs to confirm follow spec fail
* Don't send new follower notification when followable is a tag
2019-03-13 08:16:20 -07:00
Ben Halpern
825aa9be91
Add page_view model ( #1985 )
...
* Add page_view model
* Uncomment DJ routes
* Add time on site max and don't update article page views every time
2019-03-07 11:53:33 -08:00