* Add index and show pages for series
* Address code review
* Use `id` instead of `slug` to get collections
* Extract `collection_link` into the application helper
* Only count published articles
* Get rid of the `collection_link_class` method
* Add tests
* Fix test
* Use `**kwargs` instead of `options = {}`
* 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
* Create new restriced_liquid_tag role
* Update role spec
* Use new role over admin
* Add documentation for user_subscription_liquid_tag
* Stub roles to help avoid flaky specs
* Add user approved liquid tags to edit view
* Remove "simply". Coding is hard, yo!
* Update liquid_help
* Update liquid help
* Update and refactor dashboard specs
* Refactor role check for liquid tag docs
* Improve docs wording
* Refactor controller validations to model
* Update specs and move current email validation back
* Refactor #subscribed
* Cleanup UserSubscriptions::Create service
* Refactor service
* Move source inside of call for clarity
* Specs for UserSubscription::Create
* Cleanup spec
* Fix Article spec
* Updated for subscriber_email
* Add comment for explicitness of subscriber_email
* Fix reference in comment...oops!
* I know what I'm doing...sometimes...maybe
* Rename CachChecker - Subscription to IsSubscribed
* Use include vs eq in specs for error messages
* attr_accessor --> attr_reader
* Don't explicitly set nil
* Rename Create service to CreateFromService
* Use errors_as_sentence
* Rename service to CreateFromControllerParams
* Assign Struct to a new constant
* Stop allowing accented characters in tags
This commit will add strict frontend and backend validation for tags
disallowing accented characters.
* Update tags validation error message
* Add more character sets to tag validation spec
* Create "blank" EmailSubscriptionTag
* Refactor liquid_tags_used with spec
* Create /user_subscriptions#create
- Update liquid tag name to UserSubscriptionTag
* Add rate limiting and specs
* Add counter_culture for user_subscriptions
* Update /async_info/base_data
- Alphabetize user_data
- Add email
- Add subscription_source_article_ids
- Cache subscription_source_article_ids on User model
* Add stale email check and specs
* Change user_email to subscriber_email for clarity
* Restrict UserSubscriptionTag
* Rename RESTRICTED_TAGS to RESTRICTED_LIQUID_TAGS
* Make TODO comment more clear
* Refactor error responses and update specs
* Update type to source_type in error message
* Use constantize over safe_constantize
* Add check for active source
* Refactor checking of current_user's subscriptions
- Remove data from async_info
- Create a new service to fetch/cache a user's existing subscriptions
* Restrict email in base_data to admin roles
* Oops! Rename liquid tag file
* Change error back to result...oops!
* It's not goodbye, it's see you later. RIP email :/
* Add current_email to /user_subscriptions/base_data
* Revert adding current_email
* Undo async_info_controller changes/fix conflict
* Move params to constant
* Refactor SubscriptionCacheChecker
* Remove duplicate status code in JSON response
* Remove duplicate status code for #subscribed
* Use response.parsed_body
* Remove user guard in SubscriptionCacheChecker
* Add migrations for subscriber_email column
* Add new schema
* Update relationships, specs, and factory
* Use unless index_exists? over if !index_exists?
* Fix typo in last fix for migration
* Rename authored_user_subscriptions
- to source_authored_user_subcriptions
* Add factory methods and specs
- UserSubscription.make
- UserSubscription.make_new
- Article.new_user_subscription
- Article.create_user_subscription
* Remove self and &
* Change make_new to build
* new_user_subscription --> build_user_subscription
* Come on, Travis
* Add last_active_at datetime to Broadcasts table
* Add last_active_at to Broadcast index view
* Add callback to Broadcast.rb to update last_active_at
* Add a data_update script to backfill the last_active_at column on the Broadcasts table
* Add a spec for updating the last_active_at timestamp in models/broadcast_spec.rb
* Format last_active_at timestamp via strftime in index.html.erb
* Remove data_update_script: backfill_last_active_at_for_broadcasts
* Remove ActiveRecord::Dirty method from broadcast.rb
* Adjust callback in broadcast.rb and last_active_at timestamp format in index.html.erb
* Adjust time in #update_last_active_at and add the safe navigation operator to index.html.erb
* Accounts for nil last_active_at values in the view
* Uses Time.current in place of Time.zone.now
* Remove last_active_at param from Broadcasts::Controller
* Add spec to broadcasts_spec.rb to test the updated attribute via a request
* Adjust current_time in broadcasts_spec.rb
* Adjust Timecop.freeze in broadcasts_spec.rb to resolve Travis faliure (fingers crossed)
* Adjust expectation to compare against last_active_at timestamp rather than current time
* Adds Timecop back and stores last_active_at timestamp to test against
* Rename last_active_at to active_status_updated_at on Broadcasts table
- Renames last_active_at to active_status_updated_at in specs
- Renames last_active_at to active_status_updated_at in model
- Renames last_active_at to active_status_updated_at in view
- Adjusts spelling in spec descriptions
- Rewords active_status_updated_at in view to Last Active On
* Replace PollSkips find_or_create_by with create_or_find_by
* Use insert_all to add users to a channel in bulk
* Use bulk insert for DataUpdateScript and set private what shall be private
* oops
* Backend MVP
- Migration
- Model
- Associations
* Add factory, spec, and validations
- Add unqiue index for validations
* Fix specs
* Add author to email_subscriptions
* Add user association to set_author_id
* Add clarifying comment to set_author_id
* Writing is hard sometimes
* Rename email_subscriptions to subscription_sources
* UserSubscription and user_subscription_sourceable
* subscribers --> sourced_subscribers
* Add comment to explain UserSubscription model
* Replace Credits.import with .insert_all
* Fix Notifications::Reactions::Send and replace .import with .upsert to avoid race conditions
* Replace .import! with .upsert_all in Notifications::NotifiableAction::Send
* Replace PodcastEpisode.import! with upsert
* Stop testing gems, test the code
* Remove activerecord-import
* Fix redundancies
* clarify comment
* Replace Credit.import with insert_all
* hello knapsack
* Do not try to insert if there is nothing to
* Provide default crayon styles when creating banners
* Import crayons styles into /internal pages.
* Allow admins to use crayons banner styles when creating broadcasts.
* Preview banner styles with crayons.
* Use constant and helper for broadcast banner styles
* Add VALID_BANNER_STYLES frozen constant to Broadcast class.
* Add banner_style helper for determining banner style class.
* Use pick instead of pluck first
* Use touch_all instead of update_all
* Use destroy_by instead of where.destroy_all
* Use scopes
* Fix db:seed:replant
* Remove ActiveSupport::Cache::RedisCacheStore expires_in cache
* Create migrations
* Create PageRedirect model
* Refactor migration and add timestamps
* Add routes for internal/page_redirects
* Add index controller action and view
* Change background color of version in /internal
* Add page_redirect factory and index specs
* Fix specs
* Use ransack for search
* Alphabetize internal sidenav
* Rename spec
* Add edit view with destroy button
* Refactor page_redirect form partial
* Update error messages and fix redirect
* Small fixes and hookup new and create
* Specs FTW
* Fix migration, overridden --> source
* Add PageRedirect model specs
- Validate presence of status
* Update routes
* Code climate fixes
* Add old_slug_url and new_slug_url helper methods
* Prevent updating old_slug, refactor _form
* Add URLs to index view for slugs
* Better spec wording
* Change version to badges and add to edit view
* Update destroy response
* slug --> path 🙈
* Add PageRedirects to seed file
* Fix seed file
* ACTUALLY fix the seed file
* slug --> path in PageRedirect factory
* Remove bug fix from seeds file
* Move menu items to controller constant
* Update source type validation in model spec
* Rename page_redirect --> path_redirect
* Add AuditLog for admin create, destroy, and update
* Remove redundant index
* Cleanup old name of page_redirect
* Remove old model
* Update AuditLog to :internal
* Titleize search placeholder task in internal
* Add comment to explain MENU_ITEMS constant
* Add warning text on edit page about many updates
* Remove default and allow null on source
* Fix comment
* Add path_redirect validations and model specs
- Validate old_path != new_path
- Validate new_path isn't an existing redirect
* Add dual booting logic to Gemfile
This might be helpful for the Rails 6.0 upgrade project.
* Add more than one gemfile to Travis' configuration
We want to see how the application behaves with more than one Rails versions:
- Gemfile -> Rails 5.2
- Gemfile.next -> Rails 6.0
This will help us figure out what needs to be addressed before migrating to Rails 6.0.
If you want to read more about this technique (dual booting) you can check out this page: https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html
* Fix joins
* Upgrade Gemfile.next.lock
* Make sure we're installing the correct versions of gems
* Add Rails 6 notes
* Update rubocop in Gemfile.next.lock
* Fix organization spec
* Fix page_views_spec
* Add Rails 6 and run rails app:update
* Remove some tricks
* Remove Gemfile.next for now
* Fix .content_type deprecation
* Fix deprecation of .where.not NAND/NOR behavior
* Fix deprecation of parameterized emails
* Fix specs
* Remove next flag for now
* Fix spec (hopefully)
* Add wait_for_javascript
* Fix spec, thanks @maestromac!
* Try without wait for javascript hack
* Remove unnecessary bin/update
* Remove file that snuck in the rebase
* Update the vendored gems
* Replace migrate+db:setup with db:prepare
* Update vendored gems
* Fix Gemfile.lock and update vendored stuff
* Fix Gemfile.lock to be the same as master's minus the changes
Co-authored-by: rhymes <rhymesete@gmail.com>
* Add uniqueness validation to broadcast titles in broadcast.rb
* WIP: properly test title uniqueness in broadcast_spec.rb
* Add unique index for title and type_of on Broadcasts
* Adds a unique index to the Broadcasts table
* Adds broadcast.rb to .rubocop_todo.yml
* Resolve merge conflicts
* Add spec around duplicate broadcasts in broadcasts_spec.rb
* Adjust broadcast to be inactive in broadcasts_spec.rb