Skip to content

feixionglee/panda

Repository files navigation

Panda

Short description and motivation.

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem 'panda'

And then execute:

$ bundle

Or install it yourself as:

$ gem install panda

Test

  1. run rails test: rails test
    1. 注意fixture加载的方式: panda_users(:one), 需要加namespace panda_
  2. run dummy app in the root folder: 'rails s'.
    1. 魔法在panda/bin/rails里面. APP_PATH = File.expand_path('../test/dummy/config/application', __dir__)
  3. postman scripts.
  4. 后台登录: http://localhost:3000/admin

Development

  1. 更新版本号: lib/panda/version

Rails tasks

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

Roadmap

  1. User
    1. User model
    2. Rest api for Avatar upload
    3. Identity model
    4. Profile model
  2. Login with devise
    1. 手机登录
    2. 微信登录
    3. 邮箱登录
    4. 账号密码登录
    5. 苹果登录
  3. Login with wechat
  4. User
  5. wx_pay, WechatMiniService from Tekapic.
  6. 优惠券
  7. 常用可通用的功能写到subfolder里面以gem的形式加载.
  8. swagger
  9. Kaminari pagination
  10. Localization
  11. ElasticSearch
  12. Redis
  13. ELK Log
  14. Sidekiq
  15. Puma auto restart. 解决ruby内存泄漏到问题
  16. OAuth
  17. JWT
  18. RPush
  19. ActiveAdmin
  20. 朋友圈
    1. 照片
    2. 文字
    3. 点赞
    4. 评论
    5. 搜索
    6. 订阅
  21. Panda installer
    1. 添加自动加载路径routes/*.rbconfig/application.rb里面去
    2. [ ]
  22. 订单系统
  23. 支付系统
  24. spree商城
  25. sentry rails
  26. newrelic 免费版
  27. devise authentication in go
  28. APIs in go
  29. nginx configuration
  30. APIs in python
  31. devise authentication in python
  32. 小程序generator
  33. RN app generator
  34. [ ]

Notes

  1. Rails Engine和Rails Plugin的区别.
  2. 加载本地gem: gem 'core', path: '../core'

Famous engine

  1. Rails is the biggest engine.
  2. Thredded, Thredded is a Rails 4.2+ forum/messageboard engine. Its goal is to be as simple and feature rich as possible.
  3. Spree,Spree is a complete open source e-commerce solution built with Ruby on Rails.
  4. Devise,Flexible authentication solution for Rails with Warden.

Useful gems

Useful links

  1. Start with rails engine
  2. A Guide to Rails Engines in the Wild: Real World Examples of Rails Engines in Action
  3. Rails 引擎初探

notes

  1. 默认Engine不会加载gemspec里面的内容,导致uninitialized constant DeviseTokenAuth错误. 解决办法:
    # 把下面的内容加入到lib/panda.rb顶部, https://stackoverflow.com/questions/5159607/rails-engine-gems-dependencies-how-to-load-them-into-the-application
    # requires all dependencies
     Gem.loaded_specs['yourengine'].dependencies.each do |d|
     require d.name
     end
  2. ActiveAdmin routes放engine namespace下面会导致资源加载的问题,解决办法是把routes放Rails.application.routes.draw do下面, 具体细节查看routes/api.rb.

mount activeadmin inside engine

  1. Define a resource inside an engine
  2. Example Engines

About

rails engine, 集合常用的功能

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published