Commit graph

8 commits

Author SHA1 Message Date
yheuhtozr
71b2724faa
app/services i18n (#16189) 2022-01-20 09:25:25 -05:00
Ikko Ashimine
dbf3cf75fa
Fix typo in create_from_controller_params.rb (#15171)
interation -> interaction
2021-10-25 10:42:40 -07:00
dependabot[bot]
816855ce3b
Bump rubocop from 1.17.0 to 1.18.0 (#14107)
* Bump rubocop from 1.17.0 to 1.18.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* yarn install

* Fix violations

* Restore the default aligned setting

* Trigger Travis CI

* Escape HTML

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: rhymes <github@rhymes.dev>
2021-07-01 13:51:49 +02:00
Mac Siri
009c14653a
Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
Michael Kohl
8425c847c3
Update CODEOWNERS and team names in TODO comments (#9460)
* Update CODEOWNERS

* Update teams in TODO comments

* Remove mentions of team cool
2020-07-24 12:17:20 +07:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Alex
9ee024f9d0
UserSubscription backend refactor (#9060)
* 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
2020-07-02 12:08:37 -04:00
Alex
8714a36d27
[deploy] User subscriptions API and backend updates (#8779)
* 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
2020-06-23 13:43:32 -04:00