Commit graph

1765 commits

Author SHA1 Message Date
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
Mac Siri
fc39f24ee3 Migrate feature test to system test (#2301)
* Move all features to system

* Remove database_cleaner & apply use_transactional_fixtures

* Move rspec-retry to :test

* Update Capybara config

* Update rails_helper

* Fix user_visits_a_comments_page_spec.rb

* Fix lint
2019-04-04 12:15:10 -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
Mac Siri
7147428821 Update Rails version on README [ci skip] 2019-04-03 14:15:17 -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
dependabot[bot]
0bc1b46535 Bump gibbon from 2.2.5 to 3.2.0 (#916)
Bumps [gibbon](https://github.com/amro/gibbon) from 2.2.5 to 3.2.0.
- [Release notes](https://github.com/amro/gibbon/releases)
- [Changelog](https://github.com/amro/gibbon/blob/master/CHANGELOG.md)
- [Commits](https://github.com/amro/gibbon/compare/v2.2.5...v3.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-02 13:24:42 -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
dependabot[bot]
9f4ab6d17a Bump twilio-ruby from 5.21.0 to 5.22.0 (#2254)
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.21.0 to 5.22.0.
- [Release notes](https://github.com/twilio/twilio-ruby/releases)
- [Changelog](https://github.com/twilio/twilio-ruby/blob/master/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.21.0...5.22.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 16:38:42 -04:00
dependabot[bot]
d36f33f849 Bump recaptcha from 4.13.1 to 4.13.2 (#2253) [ci skip]
Bumps [recaptcha](https://github.com/ambethia/recaptcha) from 4.13.1 to 4.13.2.
- [Release notes](https://github.com/ambethia/recaptcha/releases)
- [Changelog](https://github.com/ambethia/recaptcha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ambethia/recaptcha/compare/v4.13.1...v4.13.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 16:35:37 -04:00
dependabot[bot]
b8e567a350 Bump counter_culture from 2.1.2 to 2.1.4 (#2251) [ci skip]
Bumps [counter_culture](https://github.com/magnusvk/counter_culture) from 2.1.2 to 2.1.4.
- [Release notes](https://github.com/magnusvk/counter_culture/releases)
- [Changelog](https://github.com/magnusvk/counter_culture/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magnusvk/counter_culture/compare/v2.1.2...v2.1.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 16:35:02 -04:00
dependabot[bot]
a903160d4a Bump shoulda-matchers from 4.0.0.rc1 to 4.0.1 (#2252) [ci skip]
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 4.0.0.rc1 to 4.0.1.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/master/NEWS.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v4.0.0.rc1...v4.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 16:33:24 -04:00
dependabot[bot]
324d8fe6b1 Bump eslint from 5.15.3 to 5.16.0 (#2256) [ci skip]
Bumps [eslint](https://github.com/eslint/eslint) from 5.15.3 to 5.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v5.15.3...v5.16.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-04-01 16:32:45 -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
Jess Lee
e5b9a1b7b1 Disable Scout's remote ip collection (#2239) 2019-03-29 15:09:30 -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
Mac Siri
7c1418a87c Update Gemfile.lock 2019-03-27 18:35:54 -04:00
Filip Defar
7a3b16c1e5 Extract "following" action from "show" in DashboardsController (#2212) 2019-03-27 17:03:53 -04:00
Jess Lee
2b92371d4d Add Scout gem and config (#2219) 2019-03-27 14:01:24 -04:00
Anna Buianova
6e23483b94 Enable BinaryOperatorParameterName and BlockNesting cops (#2214) [ci skip] 2019-03-26 20:01:48 -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