Commit graph

57 commits

Author SHA1 Message Date
Mac Siri
5f85250220
Update to Chromedriver 76 (#3587) [ci skip] 2019-07-30 17:58:21 -04:00
dependabot-preview[bot]
ebefca6a8a Bump capybara from 3.26.0 to 3.27.0 (#3556) 2019-07-30 16:47:08 -04:00
Anna Buianova
135d1ddf2b Don't check url and create podcast episode when there's no enclosure url (#3460)
* Don't check url and create podcast episode when there's no enclosure url

* Keep a couple of records of podcast's rss for test
2019-07-12 12:54:14 -04:00
Anna Buianova
3d81753285 Rescue possible SSLError when fetching a podcast (#3374) 2019-07-03 10:36:36 -04:00
Anna Buianova
6395fe48e2 Moved podcast fixtures to their own folder (#3343) [ci skip] 2019-07-01 12:37:28 -04:00
dependabot-preview[bot]
9c6673adc4 Bump rouge from 3.3.0 to 3.4.1 (#3289) [ci skip]
* Bump rouge from 3.3.0 to 3.4.1

Bumps [rouge](https://github.com/jneen/rouge) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/jneen/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jneen/rouge/compare/v3.3.0...v3.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update approvals
2019-06-27 17:26:07 -04:00
Anna Buianova
bfa1bdc37f More specs and refactoring podcasts fetching (#3245)
* More specs and refactoring podcasts fetching

* Fixed PodcastFeed references in tests

* Pass podcast_id instead of podcast to CreateEpisode
2019-06-21 21:31:15 -04:00
Ben Halpern
df44cbd254
Change design of main feed CTA and remove from tag pages (#3050)
* Change design of main feed CTA and remove from tag pages (to prevent complexity)

* Lock Chromedriver to 74.0.3729.6

* Fix tests and modify reserved words (tack on)

* Removed less useful shared examples from rspec

* Remove references to file that no longer exists in test

* Remove unneeded tests
2019-06-05 14:33:22 -04:00
briwa
b35fc23a82 refactor(svgs): remove empty group tags (#3002)
* refactor(svgs): remove empty group tags

* fix(spec): update liquid tag twitter spec
2019-05-31 08:54:31 -04:00
Mac Siri
6d1638ed68 Unskip all skipped specs (#2941)
* Change all login_as to sign_in

* Unskip comment spec

* Create new specs

* Turn on Webdriver caching

* Set logger for Omniauth in test

* Update editor system spec

* Fix editor approval file

* Update video_controller

* Update TagAdjustmentUpdateService's spec

* Update users api spec

* Update stories_index_spec

* Remove redundant spec file

* Remove residual code

* Change ClassifiedListing spec

* Update NotificationsIndex spec
2019-05-25 11:04:38 -04:00
Mohammadjavad Raadi
1a960cfb44 Fix TwitterTag's video control bug (#2869) 2019-05-22 13:32:37 -04:00
rhymes
941ab4178b Articles API: create and update (#2844)
* Add system test to create article from the editor

* Move article creation from API to app controller

* Fix system test to edit posts

* Move article update from API to app controller

* Rewrite create article API using API key

* Add main_image and canonical_url to allowed creation params

* Rewrite update article API using API key

* Fix tests and have Comments API inherit from API
2019-05-16 12:26:24 -04:00
Mario See
7dd811a578 Utilize ERB template for GitHub Liquid tags (#2777) [ci skip] 2019-05-14 15:21:23 -04:00
Mario See
86d8128dd9 Utilize ERB template in CodepenTag (#2748) [ci skip] 2019-05-09 19:33:59 -04:00
Mario See
e0d4329089 Utilize ERB template in SoundcloudTag (#2752) [ci skip] 2019-05-09 16:17:03 -04:00
Mario See
84eb7ceb75 Utilize ERB template in Instagram liquid tag (#2749) [ci skip] 2019-05-09 13:20:22 -04:00
Mario See
20a50fb0f8 Utilize ERB template in Youtube/Vimeo liquid tag (#2728) [ci skip] 2019-05-09 12:44:00 -04:00
rhymes
e626002260 Add alternative texts to images (#2771) [ci skip] 2019-05-09 11:16:03 -04:00
Mario See
767029bc10 JS Fiddle Liquid tag render to utilize ActionController (#2746) [ci skip] 2019-05-08 13:05:07 -04:00
Mario See
68239c4cf8 Change Runkit liquid tag to utilize ActionController (#2723) 2019-05-07 16:44:20 -04:00
Mario See
b1f97a0657 Change Twitter liquid tag to utilize ActionController (#2721) [ci skip] 2019-05-07 16:40:50 -04:00
Anna Buianova
74d676c4c3 Remove unused code (#2567) [ci skip] 2019-04-26 12:16:16 -04:00
rhymes
8e6ca966ed Switch from chromedriver-helper to webdrivers (#2465) [ci skip] 2019-04-16 13:46:23 -04:00
Andy Zhao
53d3091f73 Add single article functionality to articles analytics (#2339)
* Add specs for single article functionality

* Add single article functionality

* Use article_id instead of single_article_id

* Add published: true when querying for one article

* Use article_id in specs oops
2019-04-08 19:57:13 -04:00
cyrillefr
4fd66372dc Enable Layout/AlignParameters (#2340)
Check if the parameters on a multi-line method call or definition are aligned.

Resolves: #2021
2019-04-08 18:47:34 -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
rhymes
3a53d5797e Upgrade Rails to 5.2.3 (#1408) 2019-04-03 13:08:59 -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
Mac Siri
1137d6fba4 Improve specs (#1693)
* Lock erb_lint

* Refactor moderation spec

* Remove & replace RequestSpecHelper

* Update uid to sequence

* Lower the need for persistence in specs

* Update moderation spec

* Update shoulda-matchers

* Enable backgroundjobs and update commenct spec

* Fix fail specs

* Update comment's validations

* Remove redundent specs

* Actually turn off DJ

* Apply run_background_jobs_immediately

* Remove giveawy specs

* Create Identity spec
2019-02-04 15:56:00 -04:00
Andrew Bone
b56865915c Jsfiddle LiquidTag (#1509)
* Create jsfiddle_tag.rb

Add liquid tag for jsfiddle

* Create jsfiddle_tag-spec.rb

Add liquid tag for jsfiddle

* Update _editor_guide_text.html.erb

Add liquid tag for jsfiddle

* Updates for rubocop

* Edit boilerplate

Change some of the boiler plate code.

* rubocop compliance

* Fixed name

Fixed file name

* Fixed boiler plate

Changed codepen to jsfiddle

* Update guide text

Change the Guide Text to be jsfiddle specific.

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>

* Fixed typo in spec

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>

* Update Valid Link

* Update jsfiddle_tag.rb

* Add Approved html

* Remove double slash

* Revert change

* Fix XSS error

* Remove extra line

* Remove extra slash

* Remove extra slash

* Make DRY

* rubocop compliance

* Change test logic

* Revert test to Approvals

* Fix HTML approved
2019-01-17 15:44:01 -05:00
Mac Siri
f4ca4a15e5 Fix liquid tag parsing error (#1481)
* Fix liquid tag parsing error

* Update spec
2019-01-07 15:54:57 -05:00
Arun Kumar
80a23ba403 Fix rubocop offenses (#1452) 2019-01-03 09:23:38 -05:00
rhymes
dbf5fc63ad Fix Rubocop Security/Open (#1447)
* Re-run rubocop autogen config

* Fix Layout/* violations

* Fix Security/Open and use HEAD if GET is not needed
2019-01-02 16:35:19 -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
Jason Yu
3af90f1d0e remove punctuations in header anchor links (#1219)
* remove punctuations in header anchor links

* remove punctuations first

* added test case for punctuation headings
2018-11-29 15:16:09 -05:00
Gabriel Lebec
1e2749be24 feat(markdown): add ids to headers (#713)
* feat(markdown): add anchors for headers

* Fix markdown anchors impl and spec

* Fixes tests for markdown anchors

* Use name for anchors instead of IDs

* Fix approval file

* Remove emojis in links and hyphenate only spaces
2018-11-20 18:17:07 -05:00
Andy Zhao
a1010201f2 Notifications part 2 (#1156)
* Remove stream and add new notification views

* Actually remove Stream

* Move followers query to async method

* Remove unused tests and fix query

* Try using without delay instead

* Add without delay and escape HTML

* Make all tests pending for now
2018-11-19 18:14:24 -05:00
Nathan Sebhastian
76f6a8f9df codepen embed add default-tab param (#880)
* codepen embed add default-tab param

* add codepen default-tab documentation in help tab
2018-11-07 13:31:20 -05:00
Mac Siri
5287d4a03b Create DelayedJob config and misc DX changes (#979)
* Change from #after_save to #after_create

* Update .babelrc

* Update cloud_name for test

* Update SlackBot's RssReader channel

* Update helpful-hints.md

* Create .gitdocs.json

* Remove serve-docs script

* Update docs/helpful-hints.md

* Update approval

* Revert "Change from #after_save to #after_create"

This reverts commit 548ee0d2c0d56a1aa67316468f4106ac9f437662.

* Create delayed_job.rb

* Bump ancestry gem to 3.0.3

* Fix broken spec

* Remove manual Delayed::Job config in test

* Update spec_helper.rb

* Fix broken specs

* Mute SlackBot in test

* Remove weekly-dgiest.yml

* Create PodcastEpisodeDecorator
2018-10-26 13:15:14 -04:00
dgolant
3a81c82b28 Add liquid tag for Soundcloud (#844)
* Add liquid tag for Soundcloud

Adds a liquid tag for soundcloud links. Currently does not support customizing autplay, display for comments, or color.

* Strip HTML from Soundcloud tag input

We want to prevent potential XSS exploits, so we sanitize all link input

* Add Soundcloud tag documentation to editor guide
2018-10-09 13:51:59 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
dependabot[bot]
eafefd7422 Bump octokit from 4.8.0 to 4.12.0 (#744) [ci skip]
* Bump octokit from 4.8.0 to 4.12.0

Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.8.0 to 4.12.0.
- [Release notes](https://github.com/octokit/octokit.rb/releases)
- [Changelog](https://github.com/octokit/octokit.rb/blob/master/RELEASE.md)
- [Commits](https://github.com/octokit/octokit.rb/compare/v4.8.0...v4.12.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update spec
2018-09-25 17:04:58 -04:00
Mac Siri
32d15f2820 Update test suite configuration (#702)
* Update DatabaseCleaner

* Only retry in CI

* Update rubocop precommit hook

* Update spec

* Restructure spec configs WIP

* Restructure spec configs WIP

* Create OmniauthMacros

* Fix broken spec

* Update spec
2018-09-24 14:40:22 -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
40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00
Mac Siri
1555388f12 Migrate to Travis CI --skip-ci (#588)
* Create .travis.yml

* Update .travis.yml

* Add postgresql to travis

* Change travis's postgresql version

* Add chrome addon to travis

* Adjust travis config --skip-ci

* Change travis dist

* Change travis to use Chrome --skip-ci

* Use IntegraitonHelpers --skip-ci

* Add no-sandbox option to headless chrome

* Add sudo to travis

* Fix broken spec

* Update travis.yml

* Change how travis store bundler cache

* Update chromedriver command

* Add CodeClimate to travis --skip-ci

* Remove deadcode --skip-ci

* Remove dead code

* Change rspec-retry back to 3

* Add deploy script to travis

* Safelist only master for Travis --skip-ci
2018-07-16 17:11:42 -04:00
Ben Halpern
92a541a517
Add a couple specs for notifications and pages (#522)
* Add a couple specs

* Remove stream VCR from notifications_spec

* Add github readme spec

* Add notifications count specs

* Add guards in notifications controller

* Fix test

* Fix test
2018-06-29 14:14:36 -04:00
Mac Siri
808550afb0 Create 'proper_status' shared context (#506) 2018-06-29 10:43:46 -04:00