* Rename remove_association to remove_identity and future proof its tests
* Use the signin_path everywhere
* Generalize account settings
* Use delegation
* Use Devise registry to list available providers
* Cleanups following Devise+Omniauth docs
* More cleanups
* Use helpers
* More cleanups
* Oops, forgot to remove these specs
* Add Authentication providers
* Making strides on refactoring
* New usr from Twitter
* Existing Twitter user
* Existing user Github
* Test skip_confirmation!
* Refactor a bit and add simplecov groups
* Test user already logged in
* Rename to Authentication::Authenticator
* Refactor to a common class
* Add existing user test for twitter login
* Refactor global handler
* Fix spec and comment Twitter provider
* Update comments and strategy TODO
* Move providers loading code to Authentication::Providers
* add SubclassResponsibility error
* Use delegation
* chore: does not look like this file is being used anywhere
* fix: the svg's didn't seem to be resizing because we did not have a viewBox tag on the svg
* chore: update spec file
* add tons of colors
* add tons of colors
* moving cheese around and prepping for new theming system
* documenting
* .
* moving theme code to own files
* replacing some variables
* whitespaces
* replacing another batch of variables
* get rid of another variable
* replace loading animation variable with one-fits-all-sizes
* get rid of theme-anchor-color
* remove code colors variables
* another batch of variables replaced
* mostly bringing in variables for haxor theme
* remove invert-image variable for chat
* remove another inver-image variable
* forgot to remove reaction-background variable
* remove border variable
* series
* .
* remove another variable
* remove another variable..
* another batch of variables
* and more...
* drop comments
* Update approval file for tweet
Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
With let_it_be, we define variables that are created for the whole
context. In case we update them in an example, there might be a
discrepancy between the object and its value in the database, since the
database is cleaned between examples, but not the object itself.
This is what happened here with the `article` object. In one of the
tests, we update its organization, and in another, we reupdate it. The
problem is that the `article` object still thinks it has an
organization, but it has been cleaned in the database. So setting the
same organization id to the object doesn't trigger the SQL query, and
the article in the database still doesn't have an organization attached.
One solution is to use `reload: true` as a parameter of `let_it_be`: it
will reload the object from the database at the beginning of each test. To
make sure we don't have other dormant traps like this one, what I
propose is to either have `reload: true`, or to have the object
readonly to avoid getting to a difference between the object and its
database value.
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