Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 1.65 KB

README.md

File metadata and controls

91 lines (64 loc) · 1.65 KB

TheComments Dummy App

Create DIR for development

mkdir the_comments_dev
cd the_comments_dev

Clone dependencies

git clone [email protected]:TheComments/dummy_app.git
git clone [email protected]:TheComments/the_comments_base
git clone [email protected]:TheComments/the_comments_manager
git clone [email protected]:TheComments/the_comments_subscriptions
git clone [email protected]:TheComments/the_comments_antispam_services

Setup your RVM environment

rvm use ruby-2.2.0@the_comments_dev --create

Bundle

cd dummy_app/
bundle install --binstubs

Setup of AntiSpam Services for TheComments/AntiSpam

  1. Get YANDEX CLEANWEB api key https://tech.yandex.ru/keys/get/?service=cw
  2. Get AKISMET api keys http://akismet.com

config/initializers/the_comments_base.rb

TheCommentsBase.configure do |config|
  # PARAMS

  config.yandex_cleanweb_api_key  = 'YOUR-YCW-SECRET-TOCKEN'

  config.akismet_api_key          = 'YOUR-AKISMET-SECRET-TOCKEN'
  config.akismet_blog             = 'YOUR-AKISMET-WEBSITE-NAME'
end

Setup of Email service for TheComments/Subscribtions

You can create any fake Gmail Account for testing, then change config file:

config/settings.yml

mailer:
  service: smtp
  host: 'localhost:3000'

  smtp:
    email:    [email protected]
    password: MyGMailPa$$worD

    authentication: plain
    address: 'smtp.gmail.com'
    domain:  'gmail.com'
    port:    587

App start

rake db:bootstrap_and_seed

rails s -p 3000 -b localhost

Browser

http://localhost:3000/

Tests start

RAILS_ENV=test rake db:bootstrap
RAILS_ENV=test rspec --format documentation