Git Product home page Git Product logo

rails_template's Introduction

Template for tiny Rails app with Telegram bot

Here you can find template for tiny Rails application with Telegram bot. The repository itself is generated with this template.

What do you get:

  • telegram-bot.
  • RSpec for tests.
  • Pry for debug.
  • Simple bot controller.

This is just a template bot and it doesn't have much commands to show. For more complex example see telegram_bot_app.

For non-Rails app here is another example.

Setup

Here is a command to generate smallest possible installation of rails. Choose yourself what railties to enable:

rails new app_name \
  --api \
  --skip-action-mailer \
  --skip-active-record \
  --skip-action-cable \
  --skip-test \
  -m https://raw.githubusercontent.com/telegram-bot-rb/rails_template/master/rails_template.rb

After setup:

  • Add this lines to bin/setup:

    puts "\n== Copying sample files =="
    system 'bin/copy_samples'
  • Setup bot config in config/secrets.yml.

  • Uncomment this line in spec/rails_helper.rb:

    Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
  • Optional. Uncomment default configuration in spec/spec_helper.rb.

  • Optional. If you don't use ActiveRecord, you may want to remove config/database.yml line from bin/copy_samples and .gitignore.

Development

bin/rails telegram:bot:poller

Deployment

  • Edit capistrano config.
  • Make sure to add config/secrets.yml (and config/database.yml if exists) to shared folder on servers.
  • See instructions in wiki

License

MIT

rails_template's People

Contributors

arusa avatar kashak avatar printercu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.