* Add TwitterClient::Client
* Use TwitterClient::Client for Tweet
* Test retweets
* Test assignment to user
* Fix TweetTag spec
* Remove TwitterBot
* Fix some specs
* Fix RSS Reader specs
* chore: remove the description
* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently
* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>
* refactor: update the path to be dynamic
* refactor: change some other meta properties to be dynamic
* refactor: update the index
* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community
* feat: copyright year should be dynamic
* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url
* feat: space
* refactor: move the copyright notice to a helper
* refactor: use the community_qualified_name helper!
* refactor: start year is already a string
* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere
* chore:oops
* refactor: Change <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.
* refactor: Replace `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with ` <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`
* chore: update some other meta's
* feat: replace 'The Practical DEV' with 'DEV Community' and
* test: remove The :)
* test: copyright_notice
* fix: syntax error
* feat: name of community
* refactor: use app url
* fix: template strings
* fix: tag
* feat: update the app url parameters
* feat: add a community_name helper so we don't have to refer to an environment variable in the templates
* feat: take into account the case when the start year is a blank string
* feat: single quotes to double quotes
* test: add a test for the #community_name
* chore: update or codeclimate
* chore: amend the community helper
* refactor: use the community_name helper in here
* feat: update ApplicationConfig["COMMUNITY_NAME"] with community_name
* fix: Time.current.year needs to be a string :(
* chore: extra space
* chore: change to use community_qualified_name
* Add "Welcome" type to Broadcasts, allow dynamic "authoring" of Broadcasts
This adds a new `type_of` to the Broadcast model: "Welcome". As we begin to create a new "welcome notification" workflow, we'll categorize them by making them all of the same type.
This also adds a concept of a "welcoming user", which can be set via an ENV var. The WELCOMING_USER_ID will allow us to explicitly set (and change) which user in the database is the one that "sends" welcoming notification. In production, we plan for this to be dev.to/sloan.
* Allow WelcomeNotificationWorker to accept + send any kind of broadcast
This abstracts out the logic of deciding which broadcast to send from the woker into the calling method. This will help us send many different kinds of welcome notifications using one, resuable worker class.
* Raise if a Notification can't be created
* Add STAFF_USER_ID as an ENV var
This is in preparation for moving away from SiteConfig.staff_user_id, and replacing it with an ENV var. We will need to set this in production first, and then make a separate PR to replace all instances of staff_user_id with the newly-set ENV var.
* Introduce Sidekiq to the app and update RateLimitCheckerJob to use it
* fix rate limit checker spec with new sidekiq syntax
* add Sidekiq to tech stack overview
* Remove RateLimitChecker job change, add sidekiq web UI and testing support
* 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
* 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
* Add redis gem and client
* use keyword arguments in redis initializer
* check for REDISCLOUD_URL and fallback on REDIS_URL when connecting to redis
* dont parse Redis url in initializer
* [WIP] Extract DEV specifics to Env variables
* [WIP] Fix sendgrid url that I accidentally changed. Womp.
* Remove extra colon from 'variable' calls
* Trim :// off of app protocol
* Update Envfile TIMBER_LOGS default comment for accuracy
* Add API doc links for each service
* Add Stack Exchange Liquid tag
* Add Stack Exchange/Overflow tag
* Convert to integers
* Add better error handling
* Make all links open in new tab
* Adjust names and refactor a bit
* Use key for every API call
* Add new lines to end of svg files
* Add better error handling
* Fix edge case where input is not numeric
* Finalize Stackexhange tag design and functionality
* Fix css typo
* Update snapshots
* Fix snapshot back
* Get a job created that can create a webhook subscription for a twitch user login
* Remove ngork url
* Refactor add store the access token in the cache
* Get a controller stood up to recieve the webhooks. Now they just need to be processed
* Get User columns added and got webhook controller bones working
* Update the webhook job to use the User
* Add a way for the User to input their Twitch User Name. Plus a linter fix
* Delay webhook registration when profile is updated
* Don't add _ in username
* Use String columns
* Quick fix and add some more requests specs
* Specs for the webhook job
* Get a show page Twitch Live Streams. Just a straight embed of the Twitch Everything Embed UI. Works surprisingly well responsively, and works on all screen sizes
* Fix Gemfile.lock from merge issues
* Add support for expired tokens and add spec
* Add secrets to webhook registration and clean up spec to remove token logic
* Verify webhook secret and spec it
* Add rake task to enqueue webhook registration for all Users. This can be used from Heroku Scheduler
* Update the lease seconds to be for 5 days
* Actually lets do 7 so we can refresh twice a week and try to make sure that we can always miss one
* Hijack the existing Twitch logo instead of making a duplicate one
* Remove comment and replace with log line
* Remove some white space
* Log to Airbrake when webhook errors occur
* Move to passing in an id instead of User object
* Extract logic from Job to Service object
* Capitilize in the view
* Move out of models and into services
* Remove letover stub
* Remove one usage of Faraday
* Use HTTParty for all the HTTP here
* Initial classified listings work
* More work on tags
* Additional work finalizing stripe and getting the listings page along
* Finalize-ish listings 🤞
* add moderation email list columns
* automate tag moderator mailing list
* reorder logic for tag mod list
* add community mod list
* remove trusted privileges when reverting a user to a regular member
* automatically make tag mods community mods
* fix merge conflicts
* add community view
* make methods less complex based on code climate sugggestion
* add specs
* refactor tag moderator module
* fix spec
* 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
* Add basic Honeycomb initializers
* Add some basic instrumentation, capture basic IDs
* Correctly alphabetize Gemfile, embed env in dataset names
* Actually reorder Gemfile because I can read
* Add custom tracing instrumentation to RssReader
* Improve timing/tracing info in RssReader
* Even make sure Errors show up in trace if possible
* Make sure we capture this as Rails traffic
* Swap in dev/test Libhoney::Clients as appropriate
* Move context-snagging bits into lib/instrumentation.rb
* Merging Gemfile lines seems to be my Achilles heel
* Remove stream and add new notification views
* Actually remove Stream
* Move followers query to async method
* Remove unused tests and fix query
* Try using without delay instead
* Add without delay and escape HTML
* Make all tests pending for now