We have decided enable indented-code-block because it is an expected
markdown feature. The trade-off here is that backticks will cause
rendering issues in codeblock.
* Refactor raise_error(specific_error) expectation
The full RSpec warining is
```
WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives,
since literally any other error would cause the expectation to pass,
including those raised by Ruby (e.g. NoMethodError, NameError and ArgumentError),
meaning the code you are intending to test may not even get reached.
Instead consider using `expect { }.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`.
```
* Refactor jsitor tests to test behaviour
As pointed out by @rhymes, the previous tests were not
testing actual behaviour. This is an attempt at improving the tests.
* Redo JSitor
- can now accept full url with params
- added more test
- redo jsitor guide
* Jsitor redo guide
- moved below JSFiddle
- add more instructions
* Refactor JSitor liquid tag
- Change the iframe size to 400
- can accept ID with or without params
- added ID_REGEX to check for id
- add more information on error
- added more test
- test for id with invalid link
- test for id with params
- test for id without params
* Refactor
- simplified regex, removed unnecessary groupings
- changed method name from link_valid? to validate_link
- changed error message
* Request change
- Added specific error message
- changed jsitor to JSitor
- changed JSITOR_URL constant to URL_REGEXP
- added space between URL_REGEXP and initialize method
* created jsitor liquid tag
- created a jsitor_tag.rb for jsitor liquid core
- created partial (_jsitor.html.erb) for jsitor liquid tag
* created test for jsitor liquid tag
- created spec for jsitor liquid tag
- generated jsitor_liquid_tag.approved.html
* added suggestion change
- removed regex
- change the full link to embeddable id
- removed dead code(methods) due to change logic
- removed checking of link since embeddable id will be parse as string
- removed parts of the test
- change the guide explanation
* Added lazy loading on iframe
* Add Stack Exchange Liquid tag
* Add Stack Exchange/Overflow tag
* Convert to integers
* Add better error handling
* Make all links open in new tab
* Adjust names and refactor a bit
* Use key for every API call
* Add new lines to end of svg files
* Add better error handling
* Fix edge case where input is not numeric
* Finalize Stackexhange tag design and functionality
* Fix css typo
* Update snapshots
* Fix snapshot back
* 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
* 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
* 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
* 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
* 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
* 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