VIM-like substitution bot for reddit comments
  • Ruby 84.7%
  • Haml 9.2%
  • SCSS 5.8%
  • Procfile 0.3%
Find a file
Anirban Mukhopadhyay 7fac118a7d bundler update
2019-03-25 22:12:02 -05:00
.circleci circleci configuration 2018-12-15 11:29:38 -06:00
spec Add way to retrieve replies with details 2018-02-10 23:40:48 -06:00
views fix to actually use sassc 2018-11-28 00:27:51 -06:00
.gitignore Add layout & ability to use SCSS 2018-02-09 10:47:33 -06:00
.rspec RSpec config & simplecov 2018-02-07 19:32:57 -06:00
.ruby-gemset Initialize a new JRuby project 2018-02-03 13:21:50 -06:00
.ruby-version upgrade tilt (proper sassc support) & jruby 2018-12-15 00:41:56 -06:00
bot.rb Add retry on errors after successful initialization & a heartbeat console message 2018-05-13 22:22:16 -05:00
comment_processor.rb Update comment_processor.rb 2018-05-05 14:08:40 -05:00
Gemfile bundler update 2019-03-25 22:12:02 -05:00
Gemfile.lock bundler update 2019-03-25 22:12:02 -05:00
globals.rb Add boxes around recent replies 2018-02-26 18:49:15 -06:00
Procfile Add sinatra, trinidad & haml 2018-02-08 22:25:05 -06:00
README.md circleci configuration 2018-12-15 11:29:38 -06:00
reply_store.rb Add way to retrieve replies with details 2018-02-10 23:40:48 -06:00
web.rb upgrade tilt (proper sassc support) & jruby 2018-12-15 00:41:56 -06:00

substitute-bot

CircleCI

A Reddit bot that provides the ability to search and replace parent comments. Supports Ruby regular expression syntax.

Setup

  • Clone this repo
  • gem install bundler
  • bundle install

Bot

  • ruby bot.rb

Web

  • ruby web.rb

Deployment on Heroku

  • heroku create
  • heroku addons:create heroku-redis:hobby-dev
  • Set environment variables for Reddit integrations
    • heroku config:set REDDIT_CLIENT_ID=<YOUR_CLIENT_ID>
    • heroku config:set REDDIT_CLIENT_SECRET=<YOUR_CLIENT_SECRET>
    • heroku config:set REDDIT_BOT_USERNAME=<YOUR_BOTS_USERNAME>
    • heroku config:set REDDIT_BOT_PASSWORD=<YOUR_BOTS_PASSWORD>
  • git push heroku master

Gems

Bot

  • sucker_punch (for threaded handling of comments)
  • Redd (Reddit API wrapper)
  • RSpec (for tests)
  • redis-namespace

Web

  • Sinatra
  • Haml
  • Sass

Testing

  • bundle exec rspec

Live

You can check out the live running web frontend @ https://substitute-bot.herokuapp.com/