* Redirect /internal to /internal/articles avoiding annoying 404
* Set the navbar on two rows
* Add :main_social_image to SiteConfig and to the internal view
* Add simple tests
* Ameliorate the UI
* 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
* Turn CacheBuster into a module
This class used no internal state, so repeatedly creating short-lived objects seems wasteful.
* Consistently use string interpolation and parenthesis
* Destructure arrays into meaningful names, formatting
* Fix request spec for internal classified listings controller
Interestingly this works when asserting directly on the module, but not on a double.
Asserting directly in the module seems sufficient for this test so the indirection
was removed.
* Turn CacheBuster into a module
This class used no internal state, so repeatedly creating short-lived objects seems wasteful.
* Fix specs after rebasing
* WIP use redis-session-store for sessions
* Use Redis as session storage
* Add redis-server to Travis
* Use integer for SESSION_EXPIRY_SECONDS env variable
Co-Authored-By: rhymes <rhymesete@gmail.com>
* Remove sessions b/c no custom sessions logic
* Use ApplicationConfig instead
* Rename default value
* Remove rememberable module
* Persist the user for the test
* Remove remember_me related tests
* Revert 'undo remember_me' commits
* Add redis to procfile
* Cleanup devise configuration
* Move REDIS configuration in the basic configuration section
* Make sure the expiration time can't zero
* Restore old order and remove useless comment line
* Delete legacy session cookie after login
Once deployed the server will start using the new session cookie, this makes sure the legacy one is deleted on the user's browser
* Remove redis from Procfile
* Add signed, secure and httponly to the Redis session cookie
* Start with self deleting account
* Moved deleting user content and activity out of moderator hierarchy
* Added tests for the users delete services
* Tests for Users::DeleteComments
* User self-deletion (start)
* Some tests for user self-delete
* Specs for user self-deletion
* Test flash settings on users delete
* Added basic specs for the Users::DeleteJob
* Send notification when a user was destroyed
* Rename Users::DeleteJob to SelfDelete
* Change texts about self-deletion
* Fix users delete job spec
* Rescue and log exceptions while self-deleting user
* Added visible flash notices after deleting user
* Remove unneeded css for flash notice
* Fix link to a ghost account
* Remove redundant css
* Added github and twitter oauth apps links
* Rate limit daily user follows to 500 per day
Return an error in `POST /follows` JSON response when a user tries to follow more than 500 accounts in a single day.
Other Changes:
- Add a spec for follows#create.
* Turn daily account follow limit into an env var
* Avoid executing today follow count query when possible
user.following_users_count is a counter cache on how many users the person is already following, so if it's less than the limit we don't need to run the query and can just return it instead.
* Simplify today follow count query
Stop needlessly checking into the future, only check from the beginning of the day until now.
* Raise account follow limit error if followable_id count is over limit
Other changes:
- Always return JSON, the `respond_to` block from before was unnecessary since this endpoint always returns JSON.
- Rescue `DailyFollowAccountLimitReached` on the method and remove begin block, since the error can be raised from two places in the same method.
* Index created_at on users table
* Make adding created_at index on users table happen concurrently
* Rename DAILY_ACCOUNT_FOLLOW_LIMIT to RATE_LIMIT_FOLLOW_COUNT_DAILY
* Add RATE_LIMIT_FOLLOW_COUNT_DAILY to Envfile
* Move RATE_LIMIT_FOLLOW_COUNT_DAILY from env var to ApplicationConfig
* Adding spec around adding width/height to images
* Adding width/height to svgs on article page
* Improving the englishing of the test description
* Re-read final test description, this felt the clearest
* Just checking attriutes are present - not to fussed about much else
* 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
* Hide blocked users' content appropriately
* Use RESTful create route
* Update functionality to block the user
* Fix specs for new route
* Use const instead of var
* Add noopener and noreferrer
* Remove caching for blocked user ids
* Add new rule for lack of noopener noreferrer
* Update snapshot
* De-duplicate giphy_img? function in favor of a tested service.
Add a tested `GiphyService` and move `giphy_img?` function to it.
Make `labor/markdown_parser.rb` and `models/html_variant.rb` use the service version of the function.
* Refactor GiphyService into Giphy::Image class
Based on comments from @rhymes, I've changed this into a `Giphy::Image` class sincethe repo is currently being moved away from `XYZService` objects for namespacing and organization purposes.
* Fix typo
Update describe case to mention the current method name.
* added a condition to check if owner of the comment is in mentions
* added a test to check if comment owner can mention self
* fixed metion test by:
- adding a second user to simulate a owner of a comment
- change the user on comment to owned by newly created user
* Add specs for ArticleImageUploader
* Add specs for BadgeUploader
* Add specs for CoverImageUploader
* Add specs for ProfileImageUploader
* Refactor uploaders to inherit from BaseUploader
* Strip EXIF and GPS data from uploaded images
* Add ImageMagick to the docs
* Protect strip_exif
* Run Inspecting 1050 files
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.....................................................................................................................................................................................................................................................................................................
Offenses:
spec/models/article_spec.rb:195:7: C: RSpec/NestedGroups: Maximum example group nesting exceeded [4/3]. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups)
context "when description is empty" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1050 files inspected, 1 offense detected to fix autofixable errors
* Refactor to correct test
it was braking the rule RSpec/NestedGroups: Maximum example group nesting exceeded [4/3]. (http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NestedGroups)
* Run `rubocop --auto-gen-config` to regenrate `.rubocop_todo.yml`
* Initial changes for some new themes/fonts/etc.
* Add basic navbar config
* Finalize navbar config
* Make config_navbar non nullable
* Add dark_theme? to user decorator
* Prevent need for eager loading
* Add initial implementation of user block
* Remove debugger oops
* Add index and foreign keys for user_block table
* Use private method instead of exists
* Move channel handling logic to service object
* Update styling a bit
* Use profileDropdown file for future proofing
* Remove commented out code
* Render json: { result } for all endpoints
* Add statuses for sad paths
* Add better sad path handling in the JS
* Remove accidentally committed spec file
* Don't wait for DOM to load block button
* Use equality for accuracy in slug query
* Add status code for unauthorized requests
* Add missing comma sigh