Commit graph

1232 commits

Author SHA1 Message Date
Anna Buianova
4ef7635ae0 Don't make additional SQL query on remembering user (#2335)
* Don't save when remembering user on sign in (WIP)

* Specs for AuthorizationService
2019-04-08 10:12:19 -04:00
Sidak Singh Aulakh
dbac5f6d19 Fixed fluid-comments in dark mode (#2246)
* Fixed fluid-comments

the inline fluid-comments in dark mode are now matching the syntax followed in the default theme.

* grey -> gray

* Added lighten function to fallback variable

Added lighten function to the fallback variable for anchor tags in fluid-comments
2019-04-07 17:12:49 -04:00
rhymes
3b4bda89df Upgrade Honeycomb gem, fix and improve RssReader tests (#2319)
* Switch from deprecated honeycomb-rails to honeycomb-beeline

* Improve error handling, tests and add refactoring

* Fix multiple fetching test and add one more

The test wasn't actually testing the correct behavior, because the class
by default force fetches. It worked because it wasn't reloading the user
from the database.

* Test that Honeycomb's client is doing its thing

* Use some defensive programming to avoid any possible problem during shutdown

* Fix typo

* Use the new API to add fields to the current measured event

* Use default instrumentation and add user info to event

* Replace user.email with user.username, less personal data around

* Use mocking instead of calling Honeycomb.init

* Freeze time before traveling

* Remove a flaky test dependent on rand
2019-04-07 15:27:53 -04:00
Perlat Kociaj
b4484ba06d integrations github repos hover and text color (#2302) 2019-04-07 15:25:41 -04:00
Ben Halpern
5f3fd96960
Modify social share button and functionality (#2316)
* Modify social share button and functionality

* Some nightmode changes tossed in

* Style adjustments and test snapshot fix
2019-04-06 14:49:52 -04:00
rhymes
a1787d0702 Fixed some Style/* rubocop violations (#2314)
* Fix Style/FormatString and Style/TrivialAccessors

* Fix Style/NegatedIf and Style/DoubleNegation

* Style/ClassAndModuleChildren is already enabled by default

* Fix Style/GlobalVars

* Group all style/ cops inside rubocop config file
2019-04-06 14:24:33 -04:00
Maxime Piard
8d67a06bd9 darken following weight input background for it to be readable (#2318) 2019-04-06 11:37:23 -04:00
Ben Halpern
42a5124fe4
Clean up videos page and add tests (#2315) 2019-04-05 16:05:50 -04:00
Jess Lee
175569fb97 "/videos" (#2291)
* set up video route

* add video index

* update styling

* fix mobile full width styling

* bust cache when new video is created

* add unlimited scrolling
2019-04-05 14:02:03 -04:00
Abraham Williams
b98565a931 Update rubocop to 0.67 (#2313) [ci skip] 2019-04-05 12:55:13 -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
Ben Halpern
d7e2a07064
Finalize suggest-a-tweet functionality (#2310) 2019-04-04 19:23:03 -04:00
Ben Halpern
1552df98d2
Add ability for trusted users to suggest social copy for posts (#2306)
* Add ability for trusted users to suggest social copy for posts

* Fix schema

* Fix tests

* Fix test
2019-04-04 17:01:58 -04:00
rhymes
5e9867ec56 Simplify AnalyticsService code (#2308)
* Add basic tests for Analytics service

* User/Organization are always required

* Add some data to the test

* Use queries and date times

* Fix AnalyticsService interface in the controller

* s/HTTP_API_KEY/api-key

* Defend against nils and support datetime objects

* Update app/services/analytics_service.rb

Co-Authored-By: rhymes <rhymesete@gmail.com>

* Use SQL sum, not Rails sum

* Group average_read_time

* Use SQL, not Rails

* Use ISO date

* Fix specs
2019-04-04 16:07:57 -04:00
Andy Zhao
3e89796d9d Add API Analytics Endpoints (#2293)
* Add API endpoints for analytics

* Remove comment and spacing

* Use proper time formatting

* Refactor and clean up some logic

* Add pro and org member traits

* Use shared examples for analytics API spec

* Add analytics authorization specs

* Remove accidental include Pundit

* Raise not_authorized for invalid requests

* Make attributes and time methods private

* Add custom UnauthorizedError

* Raise and use rescue_from to handle 4xx requests

* Enforce date parameters to follow a specific format

* Use current user to allow same origin requests

* Use custom headers and not params for token auth

* Default to current user for same origin requests

* Use correct boolean for choosing user

* Update tests to use request headers and add stricter tests
2019-04-04 10:52:45 -04:00
Andy Zhao
7ade338002 Use nil instead of empty string w/ new db constraints (#2300) 2019-04-03 17:28:08 -04:00
Miguel Piedrafita
72dfcae674 Fix Blogcast styling issues (#2298) 2019-04-03 16:12:28 -04:00
rhymes
3a53d5797e Upgrade Rails to 5.2.3 (#1408) 2019-04-03 13:08:59 -04:00
Anna Buianova
509c11e86f New comment notifications to Active Jobs #1996 (#2287)
* Send new comment notification service + specs

* Call new comment notification service from the model

* Return to non-bang notifications create

* An ActiveJob for the new comment notifications

* Call comments notification ActiveJob from Notification
2019-04-03 11:38:30 -04:00
Mohammadjavad Raadi
1fd637cd37 Fixes Upload Video Section Background Color in Night Mode Theme #2245 (#2296) 2019-04-03 09:58:16 -04:00
rhymes
dc2414c174 Add tests to PodcastEpisodesController (#2297)
* Add tests for existing API PodcastEpisodesController

* Generate only index route

There's no need to generate all routes if they are not implemented
2019-04-03 09:57:48 -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
Ben Halpern
5cc1109de4
Conditionally run feed validation (#2292) 2019-04-02 17:48:53 -04:00
Anna Buianova
d1db3abc35 Optimize sign in: User (#2237)
* Unique index on users email, conditional user unique validations

* Only uniqueness validations are conditional
2019-04-02 17:12:35 -04:00
Mohammadjavad Raadi
9f02062eb8 Fixes night mode issue #2244 (#2285)
* Patched article's comments/discussion styling according to night mode design (#2244)

* Fixed header title color

* Fixed article header background color and its border color

* Fixed "code of conduct" text and anchor link color

* Patched article's comments/discussion styling according to night mode design (#2244)

* Fixed "code of conduct" text and anchor link color

* Fixes night mode issue #2244
2019-04-02 16:08:26 -04:00
Ben Halpern
b0ad7f8c74
Some night theme code, other style adjustments, and extracted app name into ENV var (#2289)
* Style, theme adjustments, plus generalization work

* Modify login cta style on home page

* Modify text
2019-04-02 13:10:28 -04:00
Filip Defar
512c9ee8a0 Extract "followers" action from "show" in DashboardsController (#2270) 2019-04-01 18:43:44 -04:00
Ben Halpern
490645ea92
Add sponsors to sponsors page and add sponsor order field (#2284)
* Add sponsorship page

* Fix schema

* dev => DEV
2019-04-01 18:24:47 -04:00
Ben Halpern
c90be27677
Ignore unnecessary airbrake notices (#2283) 2019-04-01 17:40:50 -04:00
Ben Halpern
cc0e4b40dd
Allow orgs to be marked as sponsors (#2282)
* Allow orgs to be marked as sponsors

* Remove community sponsor condition
2019-04-01 16:41:25 -04:00
Mac Siri
beca74c587 Revert "Make comic sans default (#2257)"
This reverts commit 8865422bcf.
2019-04-01 12:49:46 -04:00
Ben Halpern
8865422bcf
Make comic sans default (#2257)
* Make comic sans default

* Add safe navigation for comic sans

* Add rails production clause

* Do html variant dismissal differently

* Do html variant dismissal differently
2019-04-01 08:48:51 -04:00
rhymes
c99fb27451 Add published in the SQL query to retrieve article (#2248)
Since we're already asking the DB to retrieve an article, we can directly ask it to filter out published articles without checking at runtime.
2019-04-01 06:24:17 -04:00
rhymes
54ccef4766 Fix error with articles API and unknown username (#2247)
Currently the articles API breaks the server when called with an unknown username. It should return nothing like when called with an unknown tag.
2019-03-31 10:47:48 -04:00
Ben Halpern
f1048c3cb9
Add night theme code in various places (#2243) 2019-03-30 18:04:32 -04:00
Perlat Kociaj
5b043e356d Fixes Github Repositories not visible #2227 (#2241)
Add theme container background color to GitHub repositories container in settings/integrations page.
2019-03-30 13:24:52 -04: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
Paul
b22b3e3048 Fixed color to use custom property. (#2240) 2019-03-29 17:46:00 -04:00
Anna Buianova
75a977172c Fix notifications about the new child comments (#2233) 2019-03-29 12:51:10 -04:00
Jess Lee
ece498caf8 add form validation so points cannot be nil (#2236) 2019-03-28 17:42:43 -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
Jess Lee
9f74fd3794 Clear cache when merging users (#2229) 2019-03-28 12:26:14 -04:00
Anna Buianova
9c56e4413a Rubocop fixes (#2232)
* Enable ClassVars cop

* Enable Style/MultilineBlockChain cop

* Enable Style/SignalException

* Remove config parts matching with the default config

* Fix rubocop issue

* Moved cops that need to be fixed into the .rubocop_todo.yml
2019-03-28 07:35:17 -04:00
Filip Defar
7a3b16c1e5 Extract "following" action from "show" in DashboardsController (#2212) 2019-03-27 17:03:53 -04:00
Lito
2ebd37aba2 Improved article slug generation (#2218)
* Improved article slug generation

Ruby on Rails has a built-in slug generator since Rails 2.2

This generator fix the slug generation when non english characters are used on title improving SEO. For example: https://dev.to/lito_ordes/redimensionando-imgenes-en-tiempo-de-ejecucin-con-packer-57c6

* Ruby on Rails has a built-in slug generator since Rails 2.2

This generator fix the slug generation when non english characters are used on title improving SEO. For example: https://dev.to/lito_ordes/redimensionando-imgenes-en-tiempo-de-ejecucin-con-packer-57c6

* Ruby on Rails has a built-in slug generator since Rails 2.2 

This generator fix the slug generation when non english characters are used on title improving SEO. For example: https://dev.to/lito_ordes/redimensionando-imgenes-en-tiempo-de-ejecucin-con-packer-57c6

* Ruby on Rails has a built-in slug generator since Rails 2.2

This generator fix the slug generation when non english characters are used on title improving SEO. For example: https://dev.to/lito_ordes/redimensionando-imgenes-en-tiempo-de-ejecucin-con-packer-57c6

* Ruby on Rails has a built-in slug generator since Rails 2.2 

This generator fix the slug generation when non english characters are used on title improving SEO. For example: https://dev.to/lito_ordes/redimensionando-imgenes-en-tiempo-de-ejecucin-con-packer-57c6

* Fix downcase transform on event model
2019-03-26 13:39:35 -04:00
Ben Halpern
d1e73dceba
Clean up new chat channel functionality and add tests (#2220) 2019-03-26 13:35:32 -04:00
Mario See
91968e3860 block/report abuse in dev-connect (#2074)
* block chat method

* block and report buttons

* styling

* more styling

* add id redirect

* remove whitespace

* authorize channel in block_chat method

* remove trailing whitespace

* make variable local

* validate using policy

* check channel direct

* fix comparison in chat_channel model

* fix channel variable
2019-03-26 11:53:30 -04:00
Ben Halpern
50c765ed10
Add several recommended tags for onboarding (#2217) 2019-03-26 10:51:36 -04:00
Glenn Carremans
cfd61b3b37 Inverted social icons in night theme (#2209) 2019-03-26 09:51:41 -04:00
Ali Spittel
ed1906b02e Fix dark theme issues with the pro dashboard (#2178) 2019-03-25 16:02:28 -04:00