Commit graph

31 commits

Author SHA1 Message Date
rhymes
864b13b9ab
[deploy] Rubocop: fix Rails/HasManyOrHasOneDependent for Ahoy::Visit and Badge (#9565)
* Fix Layout/EmptyLines

* Fix Rails/HasManyOrHasOneDependent for Ahoy::Visit

* Fix Rails/HasManyOrHasOneDependent for Badge
2020-07-31 11:43:50 -04:00
Michael Kohl
26ee8f194c
Rubocop: Move from OpenStruct to Struct in Organization (#9431)
* Move from OpenStruct to Struct in Organization

* Add data update script

* Introduce Articles::CachedEntity model

* Update data update script for new model

* Fix comment

* Update jbuilder
2020-07-30 21:04:05 +07:00
rhymes
5a2cae4fbb
Rubocop: enable and fix new Rails cops (#9537)
* Enable new Rails/* cops and use autocorrect on them

* Fixed Rails/PluckInWhere leftovers

* Fix Rails/DefaultScope

* Enable and fix Rails/PluckId

* Fix manual mistake with forcing autocorrection on Rails/PluckId

* Apply PR feedback to remove Rails/PluckId inline disables

* Apply PR feedback to get rid of Rails/PluckInWhere inline
2020-07-29 11:14:19 +02:00
Ben Halpern
bffa204310
[MERGE AFTER INVITATION PR] Add registered_at data script (#9331)
* Add registered_at data script

* Update lib/data_update_scripts/20200715140848_backfill_user_registered_at.rb
2020-07-27 12:28:06 -04:00
Julianna Tetreault
4a0784f080
Hotfix: Fix Typo in backfill_broadcastable_type_for_broadcasts (#9292) [deploy]
* Fix typo and replace .each with .find_each in broadcastable_type data_update script

* Adjust data_update script name to trigger script rerun
2020-07-13 10:50:29 -06:00
Julianna Tetreault
5f143c4308
Add Polymorphism to Broadcasts (Part 1) (#9231) [deploy]
* Add polymorphism to Broadcasts table
  - Adds a broadcastable_id column to Broadcasts
  - Adds a broadcastable_type column to Broadcasts

* Create Announcements and Welcome Notifications tables
  - Adds an Announcements table
  - Adds a Welcome Notifications table
  - Adds timestamps to both tables
  - Adds banner_style column to Announcements table

* Adds Announcement and Welcome Notification models
  - Adds an Announcement model in prep for polymorphism
  - Adds a WelcomeNotification model in prep for polymorphism

* Add data_update script to backfill type_of column for Broadcasts

* Add unique index on broadcastable_type and broadcastable_id on the Broadcasts table

* Add update! to the data_update script to backfill broadcastable_type
2020-07-13 09:36:19 -06:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
rhymes
70dc2429bc
Add timestamps to broadcasts (#8181)
* Add timestamps to broadcasts

* Update schema version
2020-06-01 18:11:38 +02:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Andy Zhao
b02bf5ed5a
[deploy] Sync public reactions count with positive reactions count (#8064) 2020-05-26 14:41:51 -05:00
Andy Zhao
e686d63d78
[deploy] Add public reactions count fields to Elasticsearch (#7956)
* Add public_reactions_count field to elasticsearch

* Add new data update scripts and update old ones

* Use BulkIndexWorker to batch indexing

* Use proper search class for handling feed content

* Remove redundant script oops

* Rename data update script and remove old specs

* Combine specs into one file
2020-05-20 13:06:48 -04:00
Andy Zhao
91b14d7d4b
[deploy] Add data update script to backfill public reaction count (#7932)
* Add data update script to backfill public rxn count

* Reduce to two transactions instead of three
2020-05-18 17:51:02 -04:00
rhymes
ae8a58fec2
[deploy] Decouple GitHub authentication from fetching GitHub issues (#7660)
* Improve error handling

* Add tests for Github::Client

* Add GithubIssue validation

* Refactor GithubIssue and fix bug with pull requests

* Improve tests

* Fix PR API URL generation

* Improve logic and get rid of the issue fragment

* Fix disappeared avatar

* Improve rendering

* Activate client side caching using Redis

* Remove unnecessary file

* Add RemoveGithubIssues data update script

* Fix comma

* Forgot to disable the approvals verify text

* Apply PR feedback
2020-05-04 16:17:16 -04:00
Molly Struve
a4cc606291
[deploy] Remove Elasticsearch from Index Worker Names (#7594) 2020-04-29 12:12:29 -05:00
Molly Struve
ee373fa6c0
[deploy] Remove Algolia from Article Model (#7540) 2020-04-28 09:55:48 -05:00
Molly Struve
51b9312cf1
silence duplicate data update scripts to optimize starting up a new env (#7340) 2020-04-17 12:30:56 +02:00
Molly Struve
01adfc377c
[deploy] Index all readinglist Reactions into Elasticsearch (#7310) 2020-04-16 09:36:05 -05:00
Molly Struve
e4de9c2742
[deploy] Resync Elasticsearch Docs that had Previous Bugs (#7230) 2020-04-13 09:39:19 -05:00
Guilherme Vinicius Moreira
9618ccc927
[deploy] Add new user attributes to elasticsearch (#7123)
* chore(user): add new user attributes to elasticsearch

* Fix schema.rb
2020-04-07 13:16:15 -04:00
Molly Struve
2c49b34ebf
Hotness Score for Tags Should Use Article positive_reactions_count (#6808) [deploy]
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-31 09:04:20 -05:00
Molly Struve
d20a50aa2b
sync feed content documents in Elasticsearch (#6888) [deploy] 2020-03-26 13:11:09 -05:00
Molly Struve
a4ce1625e3
Search Users for Chat Channels Frontend (#6626)
* 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
2020-03-13 10:26:32 -04:00
rhymes
ed66d7b181
Run BackfillColumnForBroadcasts only if the column still exists (#6508) 2020-03-09 15:38:34 +01:00
Molly Struve
82526989fc
Index Articles and Podcast Episodes to Elasticsearch (#6488) [deploy]
* Index Articles and PodcastEpisodes to Elasticsearch

* add callbacks to podcast episodes and specs

* refactor and clean up serializers
2020-03-06 16:39:36 -05:00
Molly Struve
731b89ca26
Index users into elasticsearch (#6489) [deploy] 2020-03-06 14:12:02 -05:00
Anna Buianova
df93e8d41e
Custom social preview template for tags (#6290) [deploy]
* Custom social preview template for tags

* Added index on tags social_preview_template + small refactoring

* Add checks if index exists to tags migration
2020-02-27 17:56:21 -05:00
Vaidehi Joshi
81e2a5efc3
Add active attribute to Broadcasts (#6318) [deploy]
* Add active attribute to Broadcasts

* Backfill active attribute on Broadcasts
2020-02-26 16:44:27 -05:00
Molly Struve
e752ff98af
Index ChatChannelMemberships to Elasticsearch (#6162) [deploy] 2020-02-19 14:29:16 -05:00
Alex
8d7b95ea15
Index ClassifiedListings to Elasticsearch (#6132) [deploy]
* 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
2020-02-19 09:55:37 -05:00
Ridhwana
6356089ee0
Re-index existing articles with DataUpdateScript (#6109) [deploy] 2020-02-17 10:14:50 -05:00
Molly Struve
ef9611d745
Create DataUpdateScript to Index all Tags (#6078) [deploy] 2020-02-14 14:17:52 -05:00