Socket
Book a DemoInstallSign in
Socket

shared_food

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shared_food

0.1.3
bundlerRubygems
Version published
Maintainers
1
Created
Source

SharedFood

共享食物数据模块,后续可以扩展成所有对食物数据的依赖,并适当的服务化相关的业务 (通过http 或者 grpc) 提供服务。

安装

gem 'shared_food', git: 'git@git.boohee.cn:ruby/shared_food.git' branch: 'v0.0.1'

配置

  • 在 database.yml 中增加 ifood 相关数据库配置
## ifood
ifood_development:
  <<: *default
  database: ifood_dev

ifood_test:
  <<: *default
  database: ifood_test

ifood_qa:
  <<: *default
  host: boohee-qa
  database: ifood_qa

ifood_production:
  <<: *default
  database: ifood_pd 
  • 如果要更改 image_host 路径,在 config/environments/.rb 中增加如下配置代码

SharedFood.config do |conf| conf.ifood_image_host = 'f1.boohee.com' conf.food_image_host = 's.boohee.cn' conf.up_image_host = 'up.boohee.cn' end

使用

直接使用 food 相关 model,如 Food, FoodUnit, FoodLight, FoodIngredient 等 如果使用全文检索

Food#search_with_fields(keyword, page = 1, per_page = 20) 返回 foods 和 total_pages

FAQs

Package last updated on 30 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.