* hook up user search for chat channels to Elasticsearch
* Add spaces
* run specs
* add more spaces
* reset travis file
* add another data upadte script to reindex Users
* Add ClassifiedListingEsIndexWorker & spec
* Update ClassifiedListing model
- Add es index methods (inline and async)
- Index ClassifiedListing to es after_commit
- Add serialized_search_hash
- Update model specs for new methods
- Add serializers referenced in new model method
* Update specs
* Create DataUpdateScript to index ClassifiedListings
* Fix formatting
* Fix codeclimate :/
* Use match_array instead of keys.sort
* Change find_by! to find
* Update spec
* Update mappings for ClassifiedListing
* Update specs
* Implement refactor with Searchable module
* Increase cache TTL for social preview images
These are expensive to generate + don't change often. We can have a long cache.
Ideally, they would never expire, and get auto evicted by redis when space fills up. But I don't think a `nil` ttl is possible when a default
is set in the Rails config (see production.rb).
So I set it to a real long value. + test to guard against it accidently being changed.
* Try a cache expiration of 6.weeks as suggested by @mstruve in PR
* 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`
* Add HtmlCssToImage for generating images
This will be used by social_previews to convert the templates into images.
Setup a fallback image primarily for local dev, so that this won't cause
errors if authentication is missing.
Caching is setup to use contents of the html/css. So it with
autobust/generate a new image whenever the markup changes.
* Update Article social preview template to not be random
+ Being random breaks caching (since we generate cachekey by a SHA of html content)
+ Use Roboto for when generating via HTML/CSS to Image
* Update Tag social preview template to not be random
+ Make rand deterministic so it doesn't break caching
* Update user social preview template for html/csstoimage
* Update shecoded template to work with both url2png and htmlcsstoimage
* Add ability to respond to .png for social previews controller
When adding .png to the url, these routes will now generate an image and
redirect to it.
This leaves the existing pages as they were, so we're backwards
compatible with all the existing links out in the world.
* Fix merge conflicts
* Remove some duplication
* Improve spec descriptions/read better
* clean up setting template with a ternary
* 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