├── log └── .keep ├── app ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── concerns │ │ └── .keep │ ├── menu_item.rb │ ├── application_record.rb │ └── category.rb ├── assets │ ├── images │ │ └── .keep │ ├── config │ │ └── manifest.js │ ├── stylesheets │ │ ├── images.scss │ │ ├── categories.scss │ │ ├── menu_items.scss │ │ ├── application.css │ │ └── scaffolds.scss │ └── javascripts │ │ ├── categories.coffee │ │ ├── images.coffee │ │ ├── menu_items.coffee │ │ └── application.js ├── controllers │ ├── concerns │ │ └── .keep │ ├── application_controller.rb │ ├── images_controller.rb │ ├── categories_controller.rb │ └── menu_items_controller.rb ├── helpers │ ├── images_helper.rb │ ├── categories_helper.rb │ ├── menu_items_helper.rb │ └── application_helper.rb └── views │ ├── categories │ ├── show.json.jbuilder │ └── index.json.jbuilder │ ├── menu_items │ ├── show.json.jbuilder │ └── index.json.jbuilder │ └── layouts │ └── application.html.erb ├── lib ├── assets │ └── .keep └── tasks │ └── .keep ├── public ├── favicon.ico ├── .gitignore ├── CNAME ├── assets │ └── .sprockets-manifest-73e52e14d182e0d1ac0d8f33115224e8.json ├── images │ ├── menu-tile.jpg │ ├── menu │ │ ├── A │ │ │ └── A.jpg │ │ ├── B │ │ │ └── B.jpg │ │ ├── C │ │ │ └── C.jpg │ │ ├── D │ │ │ └── D.jpg │ │ ├── F │ │ │ └── F.jpg │ │ ├── L │ │ │ └── L.jpg │ │ ├── T │ │ │ └── T.jpg │ │ ├── V │ │ │ └── V.jpg │ │ ├── CM │ │ │ └── CM.jpg │ │ ├── CU │ │ │ └── CU.jpg │ │ ├── DK │ │ │ └── DK.jpg │ │ ├── DS │ │ │ └── DS.jpg │ │ ├── FR │ │ │ └── FR.jpg │ │ ├── FY │ │ │ └── FY.jpg │ │ ├── NF │ │ │ └── NF.jpg │ │ ├── NL │ │ │ └── NL.jpg │ │ ├── NS │ │ │ └── NS.jpg │ │ ├── PF │ │ │ └── PF.jpg │ │ ├── SO │ │ │ └── SO.jpg │ │ ├── SP │ │ │ └── SP.jpg │ │ ├── SR │ │ │ └── SR.jpg │ │ ├── SS │ │ │ └── SS.jpg │ │ ├── VG │ │ │ └── VG.jpg │ │ └── CSR │ │ │ └── CSR.jpg │ ├── star-k-logo.png │ ├── jumbotron_1200.jpg │ ├── jumbotron_768.jpg │ ├── jumbotron_992.jpg │ ├── specials-tile.jpg │ ├── restaurant-logo.png │ ├── restaurant-logo_large.png │ ├── restaurant-logo_small.png │ ├── restaurant-logo-favicon.png │ ├── restaurant-logo_medium.png │ └── spinner.svg ├── lib │ ├── ng-file-upload │ │ ├── .versions │ │ ├── FileAPI.flash.swf │ │ ├── README.md │ │ ├── package.js │ │ ├── bower.json │ │ └── LICENSE │ └── jasmine-2.4.1 │ │ └── jasmine_favicon.png ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── src │ ├── public │ │ ├── public.html │ │ ├── public.module.js │ │ ├── awards.html │ │ ├── menu-category │ │ │ ├── menu-category.component.js │ │ │ └── menu-category.html │ │ ├── menu │ │ │ ├── menu.controller.js │ │ │ └── menu.html │ │ ├── menu-items │ │ │ ├── menu-items.controller.js │ │ │ └── menu-items.html │ │ ├── menu-item │ │ │ ├── menu-item.component.js │ │ │ └── menu-item.html │ │ ├── home │ │ │ └── home.html │ │ ├── public.routes.js │ │ └── about.html │ ├── admin │ │ ├── menu-item │ │ │ ├── menu-item-edit.html │ │ │ ├── menu-item-edit.controller.js │ │ │ ├── menu-item-admin.html │ │ │ └── menu-item-admin.component.js │ │ ├── admin.html │ │ ├── category │ │ │ ├── category-list.html │ │ │ ├── category-items.controller.js │ │ │ ├── category-list.component.js │ │ │ └── category-items.html │ │ ├── admin.module.js │ │ ├── admin-auth │ │ │ ├── admin-auth.html │ │ │ └── admin-auth.controller.js │ │ ├── auth.interceptor.js │ │ ├── login │ │ │ ├── login.html │ │ │ └── login.controller.js │ │ ├── services │ │ │ ├── login.service.js │ │ │ ├── current-user.service.js │ │ │ └── authredirector.service.js │ │ └── admin.routes.js │ ├── common │ │ ├── common.module.js │ │ ├── loading │ │ │ ├── loading.component.js │ │ │ └── loading.interceptor.js │ │ └── menu.service.js │ └── restaurant.module.js ├── robots.txt ├── css │ ├── common.css │ └── admin.css ├── README.md ├── spec │ ├── admin │ │ ├── services │ │ │ ├── current-user.service.spec.js │ │ │ └── login.service.spec.js │ │ ├── menu-service.decorator.spec.js │ │ ├── auth.interceptor.spec.js │ │ ├── category │ │ │ ├── category-items.controller.spec.js │ │ │ └── category-list.component.spec.js │ │ └── menu-item │ │ │ └── menu-item-admin.component.spec.js │ ├── public │ │ ├── menu-category │ │ │ └── menu-category.component.spec.js │ │ ├── menu-item │ │ │ └── menu-item.component.spec.js │ │ ├── menu │ │ │ └── menu.controller.spec.js │ │ └── menu-items │ │ │ └── menu-items.controller.spec.js │ └── common │ │ └── loading │ │ ├── loading.component.spec.js │ │ └── loading.interceptor.spec.js ├── 500.html ├── 422.html └── 404.html ├── test ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── category_test.rb │ └── menu_item_test.rb ├── controllers │ ├── .keep │ └── images_controller_test.rb ├── fixtures │ ├── .keep │ ├── categories.yml │ └── menu_items.yml ├── integration │ └── .keep └── test_helper.rb ├── .ruby-version ├── vendor └── assets │ ├── javascripts │ └── .keep │ └── stylesheets │ └── .keep ├── bin ├── rake ├── bundle ├── rails ├── spring ├── update └── setup ├── db ├── menu_items_images │ ├── A │ │ ├── A.jpg │ │ ├── A1.jpg │ │ ├── A2.jpg │ │ ├── A3.jpg │ │ ├── A4.jpg │ │ ├── A5.jpg │ │ ├── A6.jpg │ │ ├── A7.jpg │ │ ├── A8.jpg │ │ ├── A9.jpg │ │ ├── A10.jpg │ │ └── A11.jpg │ ├── B │ │ ├── B.jpg │ │ ├── B1.jpg │ │ ├── B2.jpg │ │ ├── B3.jpg │ │ ├── B4.jpg │ │ ├── B5.jpg │ │ ├── B6.jpg │ │ ├── B7.jpg │ │ ├── B8.jpg │ │ ├── B9.jpg │ │ ├── B10.jpg │ │ ├── B11.jpg │ │ ├── B12.jpg │ │ ├── B13.jpg │ │ ├── B14.jpg │ │ ├── B15.jpg │ │ └── B16.jpg │ ├── C │ │ ├── C.jpg │ │ ├── C1.jpg │ │ ├── C2.jpg │ │ ├── C3.jpg │ │ ├── C4.jpg │ │ ├── C5.jpg │ │ ├── C6.jpg │ │ ├── C7.jpg │ │ ├── C8.jpg │ │ ├── C9.jpg │ │ ├── C10.jpg │ │ ├── C11.jpg │ │ ├── C12.jpg │ │ ├── C13.jpg │ │ ├── C14.jpg │ │ ├── C15.jpg │ │ ├── C16.jpg │ │ ├── C17.jpg │ │ ├── C18.jpg │ │ └── C19.jpg │ ├── D │ │ ├── D.jpg │ │ ├── D1.jpg │ │ ├── D2.jpg │ │ ├── D3.jpg │ │ ├── D4.jpg │ │ ├── D5.jpg │ │ ├── D6.jpg │ │ ├── D7.jpg │ │ ├── D8.jpg │ │ ├── D9.jpg │ │ ├── D10.jpg │ │ ├── D11.jpg │ │ ├── D12.jpg │ │ ├── D13.jpg │ │ ├── D14.jpg │ │ ├── D15.jpg │ │ ├── D16.jpg │ │ ├── D17.jpg │ │ └── D18.jpg │ ├── F │ │ ├── F.jpg │ │ ├── F1.jpg │ │ ├── F2.jpg │ │ ├── F3.jpg │ │ ├── F4.jpg │ │ ├── F5.jpg │ │ ├── F6.jpg │ │ ├── F7.jpg │ │ ├── F8.jpg │ │ ├── F9.jpg │ │ ├── F10.jpg │ │ ├── F11.jpg │ │ └── F12.jpg │ ├── L │ │ ├── L.jpg │ │ ├── L1.jpg │ │ ├── L2.jpg │ │ ├── L3.jpg │ │ ├── L4.jpg │ │ ├── L5.jpg │ │ ├── L6.jpg │ │ ├── L7.jpg │ │ ├── L8.jpg │ │ ├── L9.jpg │ │ ├── L10.jpg │ │ ├── L11.jpg │ │ ├── L12.jpg │ │ ├── L13.jpg │ │ ├── L14.jpg │ │ ├── L15.jpg │ │ ├── L16.jpg │ │ ├── L17.jpg │ │ ├── L18.jpg │ │ ├── L19.jpg │ │ ├── L20.jpg │ │ ├── L21.jpg │ │ ├── L22.jpg │ │ ├── L23.jpg │ │ ├── L24.jpg │ │ ├── L26.jpg │ │ ├── L27.jpg │ │ └── L28.jpg │ ├── T │ │ ├── T.jpg │ │ ├── T1.jpg │ │ ├── T2.jpg │ │ ├── T3.jpg │ │ └── T4.jpg │ ├── V │ │ ├── V.jpg │ │ ├── V1.jpg │ │ ├── V2.jpg │ │ ├── V3.jpg │ │ ├── V4.jpg │ │ ├── V5.jpg │ │ ├── V6.jpg │ │ └── V7.jpg │ ├── CM │ │ ├── CM.jpg │ │ ├── CM1.jpg │ │ ├── CM2.jpg │ │ ├── CM3.jpg │ │ ├── CM4.jpg │ │ └── CM5.jpg │ ├── CSR │ │ ├── CSR.jpg │ │ ├── CSR1.jpg │ │ ├── CSR2.jpg │ │ ├── CSR3.jpg │ │ └── CSR4.jpg │ ├── CU │ │ ├── CU.jpg │ │ ├── CU21.jpg │ │ ├── CU22.jpg │ │ └── CU23.jpg │ ├── DK │ │ ├── DK.jpg │ │ ├── DK1.jpg │ │ ├── DK2.jpg │ │ └── DK3.jpg │ ├── DS │ │ ├── DS.jpg │ │ ├── DS1.jpg │ │ └── DS2.jpg │ ├── FR │ │ ├── FR.jpg │ │ ├── FR1.jpg │ │ ├── FR2.jpg │ │ ├── FR3.jpg │ │ ├── FR4.jpg │ │ └── FR5.jpg │ ├── FY │ │ ├── FY.jpg │ │ ├── FY1.jpg │ │ ├── FY2.jpg │ │ ├── FY3.jpg │ │ ├── FY4.jpg │ │ └── FY5.jpg │ ├── NF │ │ ├── NF.jpg │ │ ├── NF10.jpg │ │ ├── NF11.jpg │ │ ├── NF12.jpg │ │ └── NF13.jpg │ ├── NL │ │ ├── NL.jpg │ │ ├── NL1.jpg │ │ ├── NL2.jpg │ │ └── NL3.jpg │ ├── NS │ │ ├── NS.jpg │ │ ├── NS1.jpg │ │ ├── NS2.jpg │ │ ├── NS3.jpg │ │ └── NS4.jpg │ ├── PF │ │ ├── PF.jpg │ │ ├── PF1.jpg │ │ ├── PF2.jpg │ │ ├── PF3.jpg │ │ ├── PF4.jpg │ │ └── PF5.jpg │ ├── SO │ │ ├── SO.jpg │ │ ├── SO1.jpg │ │ ├── SO2.jpg │ │ ├── SO3.jpg │ │ ├── SO4.jpg │ │ ├── SO5.jpg │ │ ├── SO6.jpg │ │ └── SO7.jpg │ ├── SP │ │ ├── SP.jpg │ │ ├── SP1.jpg │ │ ├── SP2.jpg │ │ ├── SP3.jpg │ │ ├── SP4.jpg │ │ ├── SP5.jpg │ │ ├── SP6.jpg │ │ ├── SP7.jpg │ │ └── SP8.jpg │ ├── SR │ │ ├── SR.jpg │ │ ├── SR1.jpg │ │ ├── SR10.jpg │ │ ├── SR11.jpg │ │ ├── SR12.jpg │ │ ├── SR13.jpg │ │ ├── SR14.jpg │ │ ├── SR15.jpg │ │ ├── SR16.jpg │ │ ├── SR17.jpg │ │ ├── SR18.jpg │ │ ├── SR19.jpg │ │ ├── SR2.jpg │ │ ├── SR20.jpg │ │ ├── SR21.jpg │ │ ├── SR22.jpg │ │ ├── SR23.jpg │ │ ├── SR24.jpg │ │ ├── SR25.jpg │ │ ├── SR26.jpg │ │ ├── SR27.jpg │ │ ├── SR28.jpg │ │ ├── SR29.jpg │ │ ├── SR3.jpg │ │ ├── SR30.jpg │ │ ├── SR31.jpg │ │ ├── SR32.jpg │ │ ├── SR33.jpg │ │ ├── SR34.jpg │ │ ├── SR35.jpg │ │ ├── SR36.jpg │ │ ├── SR37.jpg │ │ ├── SR38.jpg │ │ ├── SR39.jpg │ │ ├── SR4.jpg │ │ ├── SR40.jpg │ │ ├── SR41.jpg │ │ ├── SR42.jpg │ │ ├── SR43.jpg │ │ ├── SR5.jpg │ │ ├── SR6.jpg │ │ ├── SR7.jpg │ │ ├── SR8.jpg │ │ └── SR9.jpg │ ├── SS │ │ ├── SS.jpg │ │ ├── SS1.jpg │ │ ├── SS10.jpg │ │ ├── SS11.jpg │ │ ├── SS12.jpg │ │ ├── SS13.jpg │ │ ├── SS14.jpg │ │ ├── SS2.jpg │ │ ├── SS3.jpg │ │ ├── SS4.jpg │ │ ├── SS5.jpg │ │ ├── SS6.jpg │ │ ├── SS7.jpg │ │ ├── SS8.jpg │ │ └── SS9.jpg │ └── VG │ │ ├── VG.jpg │ │ ├── VG1.jpg │ │ ├── VG10.jpg │ │ ├── VG11.jpg │ │ ├── VG12.jpg │ │ ├── VG13.jpg │ │ ├── VG14.jpg │ │ ├── VG2.jpg │ │ ├── VG3.jpg │ │ ├── VG4.jpg │ │ ├── VG5.jpg │ │ ├── VG6.jpg │ │ ├── VG7.jpg │ │ ├── VG8.jpg │ │ └── VG9.jpg ├── migrate │ ├── 20160731205241_add_image_base64_encoded_to_menu_items.rb │ ├── 20151029040232_create_categories.rb │ └── 20151029041842_create_menu_items.rb ├── categories.csv ├── seeds.rb └── schema.rb ├── config ├── spring.rb ├── boot.rb ├── environment.rb ├── cable.yml ├── initializers │ ├── session_store.rb │ ├── mime_types.rb │ ├── cors.rb │ ├── rails_api_auth.rb │ ├── filter_parameter_logging.rb │ ├── application_controller_renderer.rb │ ├── cookies_serializer.rb │ ├── backtrace_silencers.rb │ ├── assets.rb │ ├── wrap_parameters.rb │ ├── inflections.rb │ └── new_framework_defaults.rb ├── routes.rb ├── database.yml ├── locales │ └── en.yml ├── secrets.yml ├── application.rb ├── environments │ ├── test.rb │ ├── development.rb │ ├── scaleddownproduction.rb │ └── production.rb └── puma.rb ├── config.ru ├── Rakefile ├── .gitignore └── Gemfile /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 3.1.4 2 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/CNAME: -------------------------------------------------------------------------------- 1 | davidchuschinabistro.com -------------------------------------------------------------------------------- /app/helpers/images_helper.rb: -------------------------------------------------------------------------------- 1 | module ImagesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/categories_helper.rb: -------------------------------------------------------------------------------- 1 | module CategoriesHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/menu_items_helper.rb: -------------------------------------------------------------------------------- 1 | module MenuItemsHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /public/assets/.sprockets-manifest-73e52e14d182e0d1ac0d8f33115224e8.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /app/models/menu_item.rb: -------------------------------------------------------------------------------- 1 | class MenuItem < ApplicationRecord 2 | belongs_to :category, optional: true 3 | end 4 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end -------------------------------------------------------------------------------- /public/images/menu-tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu-tile.jpg -------------------------------------------------------------------------------- /public/images/menu/A/A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/A/A.jpg -------------------------------------------------------------------------------- /public/images/menu/B/B.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/B/B.jpg -------------------------------------------------------------------------------- /public/images/menu/C/C.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/C/C.jpg -------------------------------------------------------------------------------- /public/images/menu/D/D.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/D/D.jpg -------------------------------------------------------------------------------- /public/images/menu/F/F.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/F/F.jpg -------------------------------------------------------------------------------- /public/images/menu/L/L.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/L/L.jpg -------------------------------------------------------------------------------- /public/images/menu/T/T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/T/T.jpg -------------------------------------------------------------------------------- /public/images/menu/V/V.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/V/V.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/T/T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/T/T.jpg -------------------------------------------------------------------------------- /db/menu_items_images/T/T1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/T/T1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/T/T2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/T/T2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/T/T3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/T/T3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/T/T4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/T/T4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/V/V7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/V/V7.jpg -------------------------------------------------------------------------------- /public/images/menu/CM/CM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/CM/CM.jpg -------------------------------------------------------------------------------- /public/images/menu/CU/CU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/CU/CU.jpg -------------------------------------------------------------------------------- /public/images/menu/DK/DK.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/DK/DK.jpg -------------------------------------------------------------------------------- /public/images/menu/DS/DS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/DS/DS.jpg -------------------------------------------------------------------------------- /public/images/menu/FR/FR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/FR/FR.jpg -------------------------------------------------------------------------------- /public/images/menu/FY/FY.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/FY/FY.jpg -------------------------------------------------------------------------------- /public/images/menu/NF/NF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/NF/NF.jpg -------------------------------------------------------------------------------- /public/images/menu/NL/NL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/NL/NL.jpg -------------------------------------------------------------------------------- /public/images/menu/NS/NS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/NS/NS.jpg -------------------------------------------------------------------------------- /public/images/menu/PF/PF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/PF/PF.jpg -------------------------------------------------------------------------------- /public/images/menu/SO/SO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/SO/SO.jpg -------------------------------------------------------------------------------- /public/images/menu/SP/SP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/SP/SP.jpg -------------------------------------------------------------------------------- /public/images/menu/SR/SR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/SR/SR.jpg -------------------------------------------------------------------------------- /public/images/menu/SS/SS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/SS/SS.jpg -------------------------------------------------------------------------------- /public/images/menu/VG/VG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/VG/VG.jpg -------------------------------------------------------------------------------- /public/images/star-k-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/star-k-logo.png -------------------------------------------------------------------------------- /db/menu_items_images/A/A10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/A/A11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/A/A11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B15.jpg -------------------------------------------------------------------------------- /db/menu_items_images/B/B16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/B/B16.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C15.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C16.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C17.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C18.jpg -------------------------------------------------------------------------------- /db/menu_items_images/C/C19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/C/C19.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CM/CM5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CM/CM5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CSR/CSR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CSR/CSR.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CU/CU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CU/CU.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CU/CU21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CU/CU21.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CU/CU22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CU/CU22.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CU/CU23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CU/CU23.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D15.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D16.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D17.jpg -------------------------------------------------------------------------------- /db/menu_items_images/D/D18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/D/D18.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DK/DK.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DK/DK.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DK/DK1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DK/DK1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DK/DK2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DK/DK2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DK/DK3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DK/DK3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DS/DS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DS/DS.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DS/DS1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DS/DS1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/DS/DS2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/DS/DS2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/F/F12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/F/F12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FR/FR5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FR/FR5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/FY/FY5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/FY/FY5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L15.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L16.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L17.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L18.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L19.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L20.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L21.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L22.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L23.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L24.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L26.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L27.jpg -------------------------------------------------------------------------------- /db/menu_items_images/L/L28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/L/L28.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NF/NF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NF/NF.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NF/NF10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NF/NF10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NF/NF11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NF/NF11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NF/NF12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NF/NF12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NF/NF13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NF/NF13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NL/NL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NL/NL.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NL/NL1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NL/NL1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NL/NL2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NL/NL2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NL/NL3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NL/NL3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NS/NS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NS/NS.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NS/NS1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NS/NS1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NS/NS2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NS/NS2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NS/NS3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NS/NS3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/NS/NS4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/NS/NS4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/PF/PF5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/PF/PF5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SO/SO7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SO/SO7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SP/SP8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SP/SP8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR15.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR16.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR17.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR18.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR19.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR20.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR20.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR21.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR22.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR23.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR23.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR24.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR25.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR25.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR26.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR26.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR27.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR27.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR28.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR29.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR30.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR31.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR32.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR32.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR33.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR33.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR34.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR34.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR35.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR35.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR36.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR37.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR37.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR38.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR38.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR39.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR39.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR40.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR40.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR41.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR41.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR42.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR42.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR43.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR43.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SR/SR9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SR/SR9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/SS/SS9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/SS/SS9.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG10.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG11.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG12.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG13.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG14.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG4.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG5.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG6.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG7.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG8.jpg -------------------------------------------------------------------------------- /db/menu_items_images/VG/VG9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/VG/VG9.jpg -------------------------------------------------------------------------------- /public/images/jumbotron_1200.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/jumbotron_1200.jpg -------------------------------------------------------------------------------- /public/images/jumbotron_768.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/jumbotron_768.jpg -------------------------------------------------------------------------------- /public/images/jumbotron_992.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/jumbotron_992.jpg -------------------------------------------------------------------------------- /public/images/menu/CSR/CSR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/menu/CSR/CSR.jpg -------------------------------------------------------------------------------- /public/images/specials-tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/specials-tile.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CSR/CSR1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CSR/CSR1.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CSR/CSR2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CSR/CSR2.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CSR/CSR3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CSR/CSR3.jpg -------------------------------------------------------------------------------- /db/menu_items_images/CSR/CSR4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/db/menu_items_images/CSR/CSR4.jpg -------------------------------------------------------------------------------- /public/images/restaurant-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/restaurant-logo.png -------------------------------------------------------------------------------- /public/lib/ng-file-upload/.versions: -------------------------------------------------------------------------------- 1 | angular:angular@1.2.24 2 | danialf:ng-file-upload@12.0.3 3 | meteor@1.1.10 4 | underscore@1.0.4 5 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /app/views/categories/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @category, :id, :short_name, :name, :special_instructions, :created_at, :updated_at 2 | -------------------------------------------------------------------------------- /public/images/restaurant-logo_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/restaurant-logo_large.png -------------------------------------------------------------------------------- /public/images/restaurant-logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/restaurant-logo_small.png -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /public/images/restaurant-logo-favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/restaurant-logo-favicon.png -------------------------------------------------------------------------------- /public/images/restaurant-logo_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/images/restaurant-logo_medium.png -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /public/lib/jasmine-2.4.1/jasmine_favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/lib/jasmine-2.4.1/jasmine_favicon.png -------------------------------------------------------------------------------- /public/lib/ng-file-upload/FileAPI.flash.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/lib/ng-file-upload/FileAPI.flash.swf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhu-ep-coursera/restaurant-server/HEAD/public/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /app/models/category.rb: -------------------------------------------------------------------------------- 1 | class Category < ApplicationRecord 2 | has_many :menu_items, dependent: :destroy 3 | 4 | def to_param 5 | short_name 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: redis://localhost:6379/1 10 | -------------------------------------------------------------------------------- /public/src/public/public.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/models/category_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class CategoryTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/models/menu_item_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class MenuItemTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_restaurant_menu_server_session' 4 | -------------------------------------------------------------------------------- /test/controllers/images_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ImagesControllerTest < ActionController::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/images.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the images controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/views/categories/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@categories) do |category| 2 | json.extract! category, :id, :short_name, :name, :special_instructions 3 | json.url category_url(category, format: :json) 4 | end 5 | -------------------------------------------------------------------------------- /config/initializers/cors.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.middleware.insert_before 0, Rack::Cors do 2 | allow do 3 | origins '*' 4 | resource '*', headers: :any, methods: [:get, :post, :patch, :put] 5 | end 6 | end -------------------------------------------------------------------------------- /config/initializers/rails_api_auth.rb: -------------------------------------------------------------------------------- 1 | RailsApiAuth.tap do |raa| 2 | # Turn off SSL redirection in development 3 | raa.force_ssl = false if Rails.env.development? 4 | 5 | raa.edx_domain = 'edxdomain.org' 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/categories.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the categories controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/menu_items.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the menu_items controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /db/migrate/20160731205241_add_image_base64_encoded_to_menu_items.rb: -------------------------------------------------------------------------------- 1 | class AddImageBase64EncodedToMenuItems < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :menu_items, :image_base64_encoded, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /public/src/public/public.module.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | /** 4 | * Public restaurant application. Includes the common module and ui-router. 5 | */ 6 | angular.module('public', ['ui.router', 'common']); 7 | 8 | })(); 9 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /app/assets/javascripts/categories.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/images.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/menu_items.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /public/src/public/awards.html: -------------------------------------------------------------------------------- 1 |
2 |

Awards

3 | 4 |

David Chu's China Bistro is a recepient of multiple awards for its great food and service.

5 |

Details are coming soon.

6 |
-------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /public/src/admin/menu-item/menu-item-edit.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /public/lib/ng-file-upload/README.md: -------------------------------------------------------------------------------- 1 | # angular-file-upload-bower 2 | 3 | bower distribution of [angular-file-upload](https://github.com/danialfarid/angular-file-upload). 4 | All issues and pull request must be sumbitted to [angular-file-upload](https://github.com/danialfarid/angular-file-upload) 5 | 6 | -------------------------------------------------------------------------------- /public/src/admin/admin.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/views/menu_items/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @menu_item, :id, :short_name, :name, :description, :price_small, :price_large, :small_portion_name, :large_portion_name, :created_at, :updated_at 2 | json.category_short_name(@menu_item.category.short_name) 3 | json.image_present(!!@menu_item.image_base64_encoded) 4 | 5 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | resources :menu_items, param: :short_name, except: [:edit, :new], constraints: { format: :json } 3 | resources :categories, param: :short_name, except: [:edit, :new], constraints: { format: :json } 4 | resources :images, param: :short_name, only: [:show] 5 | end 6 | -------------------------------------------------------------------------------- /public/src/public/menu-category/menu-category.component.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('public') 5 | .component('menuCategory', { 6 | templateUrl: 'src/public/menu-category/menu-category.html', 7 | bindings: { 8 | category: '<' 9 | } 10 | }); 11 | 12 | 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /test/fixtures/categories.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | short_name: MyString 5 | name: MyString 6 | special_instructions: MyText 7 | 8 | two: 9 | short_name: MyString 10 | name: MyString 11 | special_instructions: MyText 12 | -------------------------------------------------------------------------------- /db/migrate/20151029040232_create_categories.rb: -------------------------------------------------------------------------------- 1 | class CreateCategories < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :categories do |t| 4 | t.string :short_name 5 | t.string :name 6 | t.text :special_instructions 7 | 8 | t.timestamps null: false 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /public/src/admin/category/category-list.html: -------------------------------------------------------------------------------- 1 |
2 |
4 | 5 | {{category.name}} 6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /public/src/public/menu/menu.controller.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('public') 5 | .controller('MenuController', MenuController); 6 | 7 | MenuController.$inject = ['menuCategories']; 8 | function MenuController(menuCategories) { 9 | var $ctrl = this; 10 | $ctrl.menuCategories = menuCategories; 11 | } 12 | 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /public/src/common/common.module.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('common', []) 5 | .constant('ApiPath', 'https://www.davidchuschinabistro.com') 6 | .config(config); 7 | 8 | config.$inject = ['$httpProvider']; 9 | function config($httpProvider) { 10 | $httpProvider.interceptors.push('loadingHttpInterceptor'); 11 | } 12 | 13 | })(); 14 | -------------------------------------------------------------------------------- /app/views/menu_items/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.menu_items @menu_items do |menu_item| 2 | json.(menu_item, :id, :short_name, :name, :description, :price_small, :price_large, :small_portion_name, :large_portion_name) 3 | json.image_present(!!menu_item.image_base64_encoded) 4 | end 5 | json.category(@category, :short_name, :name, :special_instructions) if @category.present? 6 | -------------------------------------------------------------------------------- /public/src/public/menu-items/menu-items.controller.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('public') 5 | .controller('MenuItemsController', MenuItemsController); 6 | 7 | MenuItemsController.$inject = ['menuItems']; 8 | function MenuItemsController(menuItems) { 9 | var $ctrl = this; 10 | $ctrl.menuItems = menuItems; 11 | } 12 | 13 | })(); 14 | -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require File.expand_path('../../config/environment', __FILE__) 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RestaurantMenuServer 5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /public/css/common.css: -------------------------------------------------------------------------------- 1 | .loading-indicator { 2 | display: block; 3 | width: 70px; 4 | position: fixed; 5 | left: 0; 6 | right: 0; 7 | margin: 0 auto; 8 | top: 40%; 9 | z-index: 100; 10 | background-color: #FFF; 11 | } 12 | 13 | .loading-indicator img { 14 | width: 70px; 15 | background-color: #FFF; 16 | } 17 | 18 | .ui-view-placeholder { 19 | margin-top: 60px; 20 | } 21 | -------------------------------------------------------------------------------- /app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | 3 | protect_from_forgery with: :exception 4 | skip_before_action :verify_authenticity_token, if: :json_request? 5 | 6 | protected 7 | 8 | def ssl_configured? 9 | !Rails.env.development? 10 | end 11 | 12 | private 13 | 14 | def json_request? 15 | request.format.json? 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /public/src/admin/admin.module.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('admin', ['ui.router', 'common', 'ngFileUpload']) 5 | .run(run); 6 | 7 | run.$inject = ['$rootScope', 'AuthRedirectorService'] 8 | function run($rootScope, AuthRedirectorService) { 9 | // Apply auth rules when state changes 10 | $rootScope.$on('$stateChangeStart', AuthRedirectorService.onStateChangeStart); 11 | } 12 | 13 | 14 | })(); 15 | -------------------------------------------------------------------------------- /public/src/public/menu-category/menu-category.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | {{$ctrl.category.name}} 5 | {{$ctrl.category.name}} 6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /public/src/admin/category/category-items.controller.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .controller('CategoryItemsController', CategoryItemsController); 6 | 7 | 8 | CategoryItemsController.$inject = ['category', 'menuItems']; 9 | function CategoryItemsController(category, menuItems) { 10 | var $ctrl = this; 11 | $ctrl.category = category; 12 | $ctrl.menuItems = menuItems.menu_items; 13 | } 14 | 15 | 16 | })(); 17 | -------------------------------------------------------------------------------- /public/lib/ng-file-upload/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | name: "danialf:ng-file-upload", 3 | "version": "12.0.4", 4 | summary: "Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support", 5 | git: "https://github.com/danialfarid/ng-file-upload.git" 6 | }); 7 | 8 | Package.onUse(function (api) { 9 | api.use('angular:angular@1.2.0', 'client'); 10 | api.addFiles('ng-file-upload-all.js', 'client'); 11 | }); 12 | 13 | -------------------------------------------------------------------------------- /public/src/public/menu/menu.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | Substituting white rice with brown rice or fried rice after 3:00pm will be $1.50 for a pint and $2.50 for a quart. 5 |
6 | 7 | 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /public/src/public/menu-items/menu-items.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 | {{ menuItemsCtrl.menuItems.category.special_instructions}} 7 |
8 | 9 | 11 | 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /public/README.md: -------------------------------------------------------------------------------- 1 | # Restaurant 2 | 3 | Restaurant front-end implementation in AngularJS for David Chu's China Bistro. 4 | 5 | Enroll in the [complete free course on AngularJS][aeac87f1] 6 | [aeac87f1]: https://www.coursera.org/learn/single-page-web-apps-with-angularjs "AngularJS course" 7 | 8 | [Single Page Web Applications with AngularJS][39804538] 9 | [39804538]: https://www.coursera.org/learn/single-page-web-apps-with-angularjs "Enroll in the course on AngluarJS" 10 | -------------------------------------------------------------------------------- /public/src/restaurant.module.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | /** 5 | * Restaurant module that includes the public module as a dependency 6 | */ 7 | angular.module('restaurant', ['public', 'admin']) 8 | .config(config); 9 | 10 | config.$inject = ['$urlRouterProvider']; 11 | function config($urlRouterProvider) { 12 | 13 | // If user goes to a path that doesn't exist, redirect to public root 14 | $urlRouterProvider.otherwise('/'); 15 | } 16 | 17 | })(); 18 | -------------------------------------------------------------------------------- /public/lib/ng-file-upload/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ng-file-upload", 3 | "main": "ng-file-upload.js", 4 | "homepage": "https://github.com/danialfarid/ng-file-upload", 5 | "dependencies": { 6 | "angular": ">1.2.0" 7 | }, 8 | "authors": [ 9 | "danialf " 10 | ], 11 | "description": "Lightweight Angular JS directive to upload files. Support drag&drop, paste image, progress and abort", 12 | "ignore": [], 13 | "license": "MIT" 14 | } 15 | -------------------------------------------------------------------------------- /public/src/public/menu-item/menu-item.component.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('public') 5 | .component('menuItem', { 6 | templateUrl: 'src/public/menu-item/menu-item.html', 7 | bindings: { 8 | menuItem: '<' 9 | }, 10 | controller: MenuItemController 11 | }); 12 | 13 | 14 | MenuItemController.$inject = ['ApiPath']; 15 | function MenuItemController(ApiPath) { 16 | var $ctrl = this; 17 | $ctrl.basePath = ApiPath; 18 | } 19 | 20 | })(); 21 | -------------------------------------------------------------------------------- /db/migrate/20151029041842_create_menu_items.rb: -------------------------------------------------------------------------------- 1 | class CreateMenuItems < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :menu_items do |t| 4 | t.string :short_name 5 | t.string :name 6 | t.text :description 7 | t.float :price_small 8 | t.float :price_large 9 | t.string :small_portion_name 10 | t.string :large_portion_name 11 | t.references :category, index: true, foreign_key: true 12 | 13 | t.timestamps null: false 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | unless defined?(Spring) 7 | require "rubygems" 8 | require "bundler" 9 | 10 | if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) 11 | Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } 12 | gem "spring", match[1] 13 | require "spring/binstub" 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path 7 | Rails.application.config.assets.paths = [] 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 11 | # Rails.application.config.assets.precompile += %w( search.js ) 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-journal 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | !/log/.keep 17 | /tmp 18 | -------------------------------------------------------------------------------- /app/controllers/images_controller.rb: -------------------------------------------------------------------------------- 1 | class ImagesController < ApplicationController 2 | before_action :set_menu_item, only: [:show] 3 | 4 | def show 5 | if @menu_item && @menu_item.image_base64_encoded 6 | send_data Base64.decode64(@menu_item.image_base64_encoded), 7 | type:'image/jpeg', disposition: 'inline' 8 | else 9 | render file: 'public/404', status: 404, formats: [:html] 10 | end 11 | end 12 | 13 | private 14 | def set_menu_item 15 | @menu_item = MenuItem.find_by short_name: params[:short_name] 16 | end 17 | 18 | end 19 | -------------------------------------------------------------------------------- /test/fixtures/menu_items.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | short_name: MyString 5 | name: MyString 6 | description: MyText 7 | price_small: 1.5 8 | price_large: 1.5 9 | small_portion_name: MyString 10 | large_portion_name: MyString 11 | category_id: 12 | 13 | two: 14 | short_name: MyString 15 | name: MyString 16 | description: MyText 17 | price_small: 1.5 18 | price_large: 1.5 19 | small_portion_name: MyString 20 | large_portion_name: MyString 21 | category_id: 22 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /public/src/admin/admin-auth/admin-auth.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

5 | Administrator Dashboard 6 | 7 |

8 |
9 |
10 | 11 |
12 |

Categories

13 | 14 |
15 |
16 | 17 |

Click a category to display menu items

18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /public/src/admin/auth.interceptor.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .factory('authHttpInterceptor', AuthHttpInterceptor); 6 | 7 | 8 | AuthHttpInterceptor.$inject = ['CurrentUserService']; 9 | function AuthHttpInterceptor(CurrentUserService) { 10 | return { 11 | request: function (config) { 12 | if (CurrentUserService.isAuthenticated()) { 13 | config.headers.Authorization = 14 | "Bearer " + CurrentUserService.getAccessToken(); 15 | } 16 | 17 | return config; 18 | } 19 | }; 20 | } 21 | 22 | })(); 23 | -------------------------------------------------------------------------------- /public/src/admin/category/category-list.component.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .component('categoryList', { 6 | templateUrl: 'src/admin/category/category-list.html', 7 | controller: CategoryListController 8 | }); 9 | 10 | 11 | CategoryListController.$inject = ['MenuService']; 12 | function CategoryListController(MenuService) { 13 | var $ctrl = this; 14 | 15 | $ctrl.$onInit = function () { 16 | MenuService.getCategories().then(function (categories) { 17 | $ctrl.categories = categories; 18 | }); 19 | }; 20 | } 21 | 22 | 23 | })(); 24 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at http://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /public/src/common/loading/loading.component.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('common') 5 | .component('loading', { 6 | template: '', 7 | controller: LoadingController 8 | }); 9 | 10 | 11 | LoadingController.$inject = ['$rootScope']; 12 | function LoadingController ($rootScope) { 13 | var $ctrl = this; 14 | var listener; 15 | 16 | $ctrl.$onInit = function() { 17 | $ctrl.show = false; 18 | listener = $rootScope.$on('spinner:activate', onSpinnerActivate); 19 | }; 20 | 21 | $ctrl.$onDestroy = function() { 22 | listener(); 23 | }; 24 | 25 | function onSpinnerActivate(event, data) { 26 | $ctrl.show = data.on; 27 | } 28 | } 29 | 30 | })(); 31 | -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery 14 | //= require jquery_ujs 15 | //= require turbolinks 16 | //= require_tree . 17 | -------------------------------------------------------------------------------- /public/src/admin/admin-auth/admin-auth.controller.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .controller('AdminAuthController', AdminAuthController); 6 | 7 | 8 | AdminAuthController.$inject = ['$location', 'LoginService', 'CurrentUserService']; 9 | function AdminAuthController($location, LoginService, CurrentUserService) { 10 | var $ctrl = this; 11 | 12 | $ctrl.logout = function () { 13 | // Make sure user is logged in 14 | if (!CurrentUserService.isAuthenticated()) { 15 | return; 16 | } 17 | 18 | LoginService.logout(CurrentUserService.getAccessToken()).then(function () { 19 | CurrentUserService.saveToken('', ''); 20 | $location.path("/"); 21 | }); 22 | }; 23 | } 24 | 25 | 26 | })(); 27 | -------------------------------------------------------------------------------- /public/src/admin/login/login.html: -------------------------------------------------------------------------------- 1 |
2 |

Administrator Login

3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
15 |
16 | 19 |
20 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any styles 10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new 11 | * file per style scope. 12 | * 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby "3.1.4" 3 | 4 | gem 'rails', '~> 5' 5 | gem 'sassc-rails' 6 | gem 'uglifier', '>= 1.3.0' 7 | gem 'coffee-rails', '~> 4.1.0' 8 | gem 'jquery-rails' 9 | gem 'turbolinks' 10 | gem 'jbuilder', '~> 2.0' 11 | 12 | # Needed after Ruby upgrade to 3.1.4 13 | # gem 'bigdecimal', '1.3.0' 14 | # gem 'globalid', '1.1.0' 15 | 16 | gem 'sdoc', '~> 0.4.0', group: :doc 17 | gem 'puma' 18 | gem 'sqlite3', '1.6.3', group: :development 19 | 20 | group :development, :test do 21 | gem 'web-console', '~> 2.0' 22 | gem 'spring' 23 | end 24 | 25 | group :production do 26 | gem 'pg', '~> 0.20' # the latest pg gem does not play nicely with Heroku... 27 | gem 'rails_12factor' 28 | end 29 | 30 | gem 'rack-cors', require: 'rack/cors' 31 | gem 'rails_api_auth' 32 | gem 'nokogiri', '>= 1.10.4' 33 | 34 | gem 'sprockets', '~> 3.7.2' 35 | -------------------------------------------------------------------------------- /bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'pathname' 3 | require 'fileutils' 4 | include FileUtils 5 | 6 | # path to your application root. 7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 8 | 9 | def system!(*args) 10 | system(*args) || abort("\n== Command #{args} failed ==") 11 | end 12 | 13 | chdir APP_ROOT do 14 | # This script is a way to update your development environment automatically. 15 | # Add necessary update steps to this file. 16 | 17 | puts '== Installing dependencies ==' 18 | system! 'gem install bundler --conservative' 19 | system('bundle check') || system!('bundle install') 20 | 21 | puts "\n== Updating database ==" 22 | system! 'bin/rails db:migrate' 23 | 24 | puts "\n== Removing old logs and tempfiles ==" 25 | system! 'bin/rails log:clear tmp:clear' 26 | 27 | puts "\n== Restarting application server ==" 28 | system! 'bin/rails restart' 29 | end 30 | -------------------------------------------------------------------------------- /public/src/public/menu-item/menu-item.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /public/src/admin/category/category-items.html: -------------------------------------------------------------------------------- 1 | 2 |

{{categoryItemsCtrl.category.name}}

3 |
4 |
5 |
Name
6 |
Description
7 |
Price
8 |
Action
9 |
10 |
11 |
{{menuItem.name}}
12 |
{{menuItem.description}}
13 |
{{menuItem.price_small || '-'}} / {{menuItem.price_large}}
14 |
15 | 16 |
17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /public/src/admin/menu-item/menu-item-edit.controller.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .controller('MenuItemEditController', MenuItemEditController); 6 | 7 | 8 | MenuItemEditController.$inject = ['$stateParams', '$state', 'menuItem', '$log']; 9 | function MenuItemEditController($stateParams, $state, menuItem, $log) { 10 | var $ctrl = this; 11 | $ctrl.menuItem = menuItem; 12 | 13 | $ctrl.onSave = function (menuItem) { 14 | $state.go('admin.auth.category', 15 | {categoryId: menuItem.category_short_name}, 16 | {reload: true}); // tells resolves to refresh 17 | }; 18 | 19 | $ctrl.onCancel = function () { 20 | $state.go('admin.auth.category', 21 | {categoryId: menuItem.category_short_name}); 22 | }; 23 | 24 | $ctrl.onError = function (response) { 25 | $log.error(response); // for debugging 26 | }; 27 | 28 | } 29 | 30 | 31 | })(); 32 | -------------------------------------------------------------------------------- /db/categories.csv: -------------------------------------------------------------------------------- 1 | short_name,name,special_instructions 2 | L,Lunch,"Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll." 3 | A,Soup, 4 | B,Appetizers, 5 | SP,Chef's Recommendations, 6 | C,Chicken, 7 | F,Beef, 8 | V,Veal, 9 | DK,Duck, 10 | VG,Vegetables, 11 | CU,Curry, 12 | NL,Noodles (Lo Mein), 13 | NF,Mei Fan (Very Fine Noodles), 14 | PF,Pan Fried Noodles, 15 | FR,Fried Rice, 16 | CM,Chow Mein, 17 | FY,Egg Foo Young, 18 | SO,Side Orders, 19 | DS,Desserts, 20 | D,Dinner Combo,"Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll." 21 | SR,Sushi Menu,"Contains raw ingredients. Consuming raw or undercooked meat, poultry, or seafood may increase your risk of food borne illness." -------------------------------------------------------------------------------- /public/src/admin/services/login.service.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .service('LoginService', LoginService); 6 | 7 | LoginService.$inject = ['$http', 'ApiPath']; 8 | function LoginService($http, ApiPath) { 9 | var service = this; 10 | 11 | /** Retrieves an access token using a username and password */ 12 | service.getAccessToken = function(username, password) { 13 | var params = { 14 | 'username': username, 15 | 'password': password, 16 | 'grant_type': 'password' 17 | }; 18 | 19 | return $http.post(ApiPath + '/token', params).then(function(response) { 20 | return response.data.access_token; 21 | }); 22 | }; 23 | 24 | 25 | /** Make request to revoke current token */ 26 | service.logout = function (tokenValue) { 27 | var params = { 28 | token_type_hint: 'access_token', 29 | token: tokenValue 30 | }; 31 | 32 | return $http.post(ApiPath + '/revoke', params); 33 | }; 34 | 35 | } 36 | 37 | 38 | })(); 39 | -------------------------------------------------------------------------------- /public/src/admin/services/current-user.service.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .service('CurrentUserService', CurrentUserService); 6 | 7 | /** 8 | * Used to store and track information about the currently logged in user. 9 | * This is intended to be injected any time we need some user metadata 10 | * or to find out if the user is authenticated. 11 | **/ 12 | function CurrentUserService() { 13 | var service = this; 14 | var _username = ''; 15 | var _accessToken = ''; 16 | 17 | /** 18 | * Load the current user with username and token 19 | */ 20 | service.saveToken = function(username, token) { 21 | _username = username; 22 | _accessToken = token; 23 | }; 24 | 25 | 26 | service.getUsername = function() { 27 | return _username; 28 | }; 29 | 30 | 31 | service.getAccessToken = function() { 32 | return _accessToken; 33 | }; 34 | 35 | 36 | service.isAuthenticated = function() { 37 | return _accessToken !== ''; 38 | }; 39 | 40 | } 41 | 42 | 43 | })(); 44 | -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'pathname' 3 | require 'fileutils' 4 | include FileUtils 5 | 6 | # path to your application root. 7 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) 8 | 9 | def system!(*args) 10 | system(*args) || abort("\n== Command #{args} failed ==") 11 | end 12 | 13 | chdir APP_ROOT do 14 | # This script is a starting point to setup your application. 15 | # Add necessary setup steps to this file. 16 | 17 | puts '== Installing dependencies ==' 18 | system! 'gem install bundler --conservative' 19 | system('bundle check') || system!('bundle install') 20 | 21 | # puts "\n== Copying sample files ==" 22 | # unless File.exist?('config/database.yml') 23 | # cp 'config/database.yml.sample', 'config/database.yml' 24 | # end 25 | 26 | puts "\n== Preparing database ==" 27 | system! 'bin/rails db:setup' 28 | 29 | puts "\n== Removing old logs and tempfiles ==" 30 | system! 'bin/rails log:clear tmp:clear' 31 | 32 | puts "\n== Restarting application server ==" 33 | system! 'bin/rails restart' 34 | end 35 | -------------------------------------------------------------------------------- /public/src/admin/services/authredirector.service.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .service('AuthRedirectorService', AuthRedirectorService); 6 | 7 | 8 | AuthRedirectorService.$inject = ['$state', 'CurrentUserService']; 9 | function AuthRedirectorService($state, CurrentUserService) { 10 | var service = this; 11 | 12 | /** 13 | * Processes the logic when a state begins. We ensure that 14 | * the user is authenticated before letting them proceed 15 | * to the next page. 16 | */ 17 | service.onStateChangeStart = function(event, toState, toParams, fromState, fromParams) { 18 | // Only redirect if going to any admin state, 19 | // unless going directly to login 20 | if (toState.name.indexOf('admin.') === 0 && 21 | toState.name != 'admin.login' && 22 | !CurrentUserService.isAuthenticated()) { 23 | event.preventDefault(); 24 | $state.go('admin.login', { 25 | 'toState': toState, 26 | 'toParams': toParams 27 | }); 28 | } 29 | }; 30 | 31 | } 32 | 33 | 34 | })(); 35 | -------------------------------------------------------------------------------- /config/secrets.yml: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Your secret key is used for verifying the integrity of signed cookies. 4 | # If you change this key, all old signed cookies will become invalid! 5 | 6 | # Make sure the secret is at least 30 characters and all random, 7 | # no regular words or you'll be exposed to dictionary attacks. 8 | # You can use `rake secret` to generate a secure secret key. 9 | 10 | # Make sure the secrets in this file are kept private 11 | # if you're sharing your code publicly. 12 | 13 | development: 14 | secret_key_base: f4f748d9b807a73d148eca61ce1d1d5ffc1af777ef3e30055cd8dbaa20db6c1b40c7a5bd2e4c0fdf963fef3fb9294dc1917fe1a3f65f6f5c561b9ea0f7e1dded 15 | 16 | test: 17 | secret_key_base: 0023664685ed71c1b7f2154fd5f65cc269fbd4af0891288e5af36d24bee17a432d0b16094ee6bf238d6b88654d62aa31cf66f490c04098f857e0e22f724b4115 18 | 19 | # Do not keep production secrets in the repository, 20 | # instead read values from the environment. 21 | production: 22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 23 | 24 | scaleddownproduction: 25 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> 26 | -------------------------------------------------------------------------------- /public/lib/ng-file-upload/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 danialfarid 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /public/spec/admin/services/current-user.service.spec.js: -------------------------------------------------------------------------------- 1 | describe('The CurrentUserService', function() { 2 | 'use strict'; 3 | 4 | var CurrentUserService; 5 | /** 6 | * Gets called before each unit test it() 7 | */ 8 | beforeEach(function() { 9 | // Load module 10 | module('admin'); 11 | 12 | // Load any dependencies 13 | inject(function ($injector) { 14 | CurrentUserService = $injector.get('CurrentUserService'); 15 | }); 16 | }); 17 | 18 | it('should indicate that user is not authenticated', function() { 19 | expect(CurrentUserService).toBeDefined(); 20 | expect(CurrentUserService.isAuthenticated()).toBe(false); 21 | }); 22 | 23 | it('should load a username and token and indicate that user is authenticated', function() { 24 | var username = 'john.doe'; 25 | var token = 'my-secret-token'; 26 | 27 | expect(CurrentUserService).toBeDefined(); 28 | expect(CurrentUserService.isAuthenticated()).toBe(false); 29 | CurrentUserService.saveToken(username, token); 30 | 31 | expect(CurrentUserService.getUsername()).toBe(username); 32 | expect(CurrentUserService.getAccessToken()).toBe(token); 33 | expect(CurrentUserService.isAuthenticated()).toBe(true); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /public/spec/admin/menu-service.decorator.spec.js: -------------------------------------------------------------------------------- 1 | describe('The MenuService decorator', function() { 2 | 'use strict'; 3 | 4 | var $httpBackend; 5 | var MenuService; 6 | var ApiPath; 7 | var menuItem = { 8 | id: 1, 9 | short_name: "A1", 10 | name: "Egg Drop Soup", 11 | description: "chicken broth with egg drop", 12 | price_small: 2.25, 13 | price_large: 4.5, 14 | small_portion_name: "pint", 15 | large_portion_name: "quart", 16 | image_present: true 17 | }; 18 | 19 | /** 20 | * Gets called before each unit test it() 21 | */ 22 | beforeEach(function() { 23 | // Load module 24 | module('admin'); 25 | 26 | // Load any dependencies 27 | inject(function ($injector) { 28 | $httpBackend = $injector.get('$httpBackend'); 29 | MenuService = $injector.get('MenuService'); 30 | ApiPath = $injector.get('ApiPath'); 31 | }); 32 | }); 33 | 34 | it('should save a menu item', function() { 35 | $httpBackend 36 | .expectPUT(ApiPath + '/menu_items/' + menuItem.short_name, menuItem) 37 | .respond(menuItem); 38 | MenuService.saveMenuItem(menuItem).then(function(savedMenuItem) { 39 | expect(savedMenuItem).toEqual(menuItem); 40 | }); 41 | $httpBackend.flush(); 42 | }); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /app/controllers/categories_controller.rb: -------------------------------------------------------------------------------- 1 | class CategoriesController < ApplicationController 2 | include RailsApiAuth::Authentication 3 | 4 | force_ssl if: :ssl_configured?, only: [:update, :create, :destroy] 5 | 6 | before_action :authenticate!, only: [:update, :create, :destroy] 7 | before_action :set_category, only: [:show, :update, :destroy] 8 | 9 | def index 10 | @categories = Category.all.order(:id) 11 | end 12 | 13 | def show 14 | end 15 | 16 | def create 17 | @category = Category.new(category_params) 18 | 19 | if @category.save 20 | render :show, status: :created, location: @category 21 | else 22 | render json: @category.errors, status: :unprocessable_entity 23 | end 24 | end 25 | 26 | def update 27 | if @category.update(category_params) 28 | render :show, status: :ok, location: @category 29 | else 30 | render json: @category.errors, status: :unprocessable_entity 31 | end 32 | end 33 | 34 | def destroy 35 | @category.destroy 36 | head :no_content 37 | end 38 | 39 | private 40 | def set_category 41 | @category = Category.find_by short_name: params[:short_name] 42 | end 43 | 44 | def category_params 45 | params.require(:category).permit(:short_name, :name, :special_instructions) 46 | end 47 | 48 | end -------------------------------------------------------------------------------- /public/spec/public/menu-category/menu-category.component.spec.js: -------------------------------------------------------------------------------- 1 | describe('The menuCategory component', function() { 2 | 'use strict'; 3 | 4 | var menuCategoryComponent; 5 | var category = 6 | { 7 | "id": 61, 8 | "short_name": "L", 9 | "name": "Lunch", 10 | "special_instructions": "Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll.", 11 | "created_at": "2016-08-05T19:41:59.147Z", 12 | "updated_at": "2016-08-05T19:41:59.147Z" 13 | }; 14 | 15 | /** 16 | * Gets called before each unit test it() 17 | */ 18 | beforeEach(function() { 19 | // Load module 20 | module('public'); 21 | 22 | // Load any dependencies 23 | inject(function ($injector) { 24 | var $componentController = $injector.get('$componentController'); 25 | menuCategoryComponent = $componentController('menuCategory', null, { 26 | category: category 27 | }); 28 | 29 | }); 30 | }); 31 | 32 | it('should initialize with category', function() { 33 | expect(menuCategoryComponent).toBeDefined(); 34 | expect(menuCategoryComponent.category).toEqual(category); 35 | }); 36 | 37 | 38 | 39 | }); 40 | -------------------------------------------------------------------------------- /public/src/admin/login/login.controller.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .controller('LoginController', LoginController); 6 | 7 | 8 | /** 9 | * Handles login form credentials and redirects user to page. 10 | */ 11 | LoginController.$inject = ['$state', 'LoginService', 'CurrentUserService']; 12 | function LoginController($state, LoginService, CurrentUserService) { 13 | var $ctrl = this; 14 | $ctrl.username = ''; 15 | $ctrl.password = ''; 16 | $ctrl.error = ''; 17 | 18 | /** 19 | * Handles when user clicks the login button. 20 | */ 21 | $ctrl.login = function() { 22 | LoginService.getAccessToken($ctrl.username, $ctrl.password).then(function(accessToken) { 23 | CurrentUserService.saveToken($ctrl.username, accessToken); 24 | 25 | // If user went directly to login page, redirect to admin home 26 | if(!$state.params || !$state.params.toState) { 27 | $state.go('admin.auth'); 28 | } 29 | else { 30 | $state.go($state.params.toState.name, $state.params.toParams); 31 | } 32 | }, function(response) { 33 | // Login failed 34 | $ctrl.error = "Login Failed: Username and/or Password did not match."; 35 | }); 36 | }; 37 | 38 | 39 | $ctrl.valid = function() { 40 | return ($ctrl.username !== '' && $ctrl.password !== ''); 41 | }; 42 | 43 | } 44 | 45 | 46 | })(); 47 | -------------------------------------------------------------------------------- /app/assets/stylesheets/scaffolds.scss: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | color: #333; 4 | font-family: verdana, arial, helvetica, sans-serif; 5 | font-size: 13px; 6 | line-height: 18px; 7 | } 8 | 9 | p, ol, ul, td { 10 | font-family: verdana, arial, helvetica, sans-serif; 11 | font-size: 13px; 12 | line-height: 18px; 13 | } 14 | 15 | pre { 16 | background-color: #eee; 17 | padding: 10px; 18 | font-size: 11px; 19 | } 20 | 21 | a { 22 | color: #000; 23 | 24 | &:visited { 25 | color: #666; 26 | } 27 | 28 | &:hover { 29 | color: #fff; 30 | background-color: #000; 31 | } 32 | } 33 | 34 | div { 35 | &.field, &.actions { 36 | margin-bottom: 10px; 37 | } 38 | } 39 | 40 | #notice { 41 | color: green; 42 | } 43 | 44 | .field_with_errors { 45 | padding: 2px; 46 | background-color: red; 47 | display: table; 48 | } 49 | 50 | #error_explanation { 51 | width: 450px; 52 | border: 2px solid red; 53 | padding: 7px; 54 | padding-bottom: 0; 55 | margin-bottom: 20px; 56 | background-color: #f0f0f0; 57 | 58 | h2 { 59 | text-align: left; 60 | font-weight: bold; 61 | padding: 5px 5px 5px 15px; 62 | font-size: 12px; 63 | margin: -7px; 64 | margin-bottom: 0px; 65 | background-color: #c00; 66 | color: #fff; 67 | } 68 | 69 | ul li { 70 | font-size: 12px; 71 | list-style: square; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /public/spec/public/menu-item/menu-item.component.spec.js: -------------------------------------------------------------------------------- 1 | describe('The menuItem component', function() { 2 | 'use strict'; 3 | 4 | var menuItemComponent; 5 | var menuItem = { 6 | "id": 850, 7 | "short_name": "L1", 8 | "name": "Orange Chicken2", 9 | "description": "chunks of chicken, breaded and deep-fried with sauce containing orange peels; white meat by request: for pint $1 extra, for large $2 extra", 10 | "price_small": null, 11 | "price_large": 9.75, 12 | "small_portion_name": null, 13 | "large_portion_name": null, 14 | "created_at": "2016-08-05T19:42:11.381Z", 15 | "updated_at": "2016-08-19T20:02:06.803Z", 16 | "category_short_name": "L", 17 | "image_present": true 18 | }; 19 | /** 20 | * Gets called before each unit test it() 21 | */ 22 | beforeEach(function() { 23 | // Load module 24 | module('public'); 25 | 26 | // Load any dependencies 27 | inject(function ($injector) { 28 | var $componentController = $injector.get('$componentController'); 29 | menuItemComponent = $componentController('menuItem', null, { 30 | menuItem: menuItem 31 | }); 32 | }); 33 | }); 34 | 35 | it('should initialize with menu item', function() { 36 | expect(menuItemComponent).toBeDefined(); 37 | expect(menuItemComponent.menuItem).toEqual(menuItem); 38 | }); 39 | 40 | 41 | 42 | }); 43 | -------------------------------------------------------------------------------- /public/css/admin.css: -------------------------------------------------------------------------------- 1 | .login { 2 | margin: 0 auto; 3 | padding: 20px; 4 | } 5 | .login div:first-of-type { 6 | width: 300px; 7 | margin: 0 auto; 8 | } 9 | 10 | .categories a { 11 | color: #f6b319; 12 | } 13 | .categories div { 14 | padding: 5px; 15 | } 16 | .categories .selected { 17 | background-color: #557c3e; 18 | } 19 | 20 | .admin-img { 21 | border: 4px solid #f6b319; 22 | width: 250px; 23 | } 24 | .login-error { 25 | color: #ff0000; 26 | font-size: 1.2em; 27 | } 28 | 29 | .error { 30 | color: #ff0000; 31 | } 32 | 33 | .has-error .control-label { 34 | color: #ff0000; 35 | } 36 | .has-error .form-control { 37 | border-color: #ff0000; 38 | } 39 | .has-error .input-group-addon { 40 | border-color: #ff0000; 41 | color: #ff0000; 42 | } 43 | 44 | .admin-item-list .row { 45 | margin-bottom: 8px; 46 | padding-top: 15px; 47 | padding-bottom: 15px; 48 | border-bottom: 1px solid #fff; 49 | } 50 | .admin-item-titles { 51 | border-bottom: 1px solid #fff; 52 | border-top: 1px solid #fff; 53 | font-weight: bold; 54 | font-size: 1.1em; 55 | } 56 | .admin-item-list button.btn.btn-primary { 57 | background-color: #f6b319; 58 | border-color: #f6b319; 59 | color: #3F0C1F; 60 | } 61 | .admin-item-price { 62 | width: 250px; 63 | } 64 | .admin-item-price input[type='number'] { 65 | height: 36px; 66 | } 67 | .admin-item-portion input { 68 | width: 60px; 69 | } 70 | -------------------------------------------------------------------------------- /public/src/public/home/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Picture of restaurant 4 |
5 |
6 |
7 | 8 |
9 | 14 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /config/initializers/new_framework_defaults.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | # 3 | # This file contains migration options to ease your Rails 5.0 upgrade. 4 | # 5 | # Once upgraded flip defaults one by one to migrate to the new default. 6 | # 7 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. 8 | 9 | Rails.application.config.action_controller.raise_on_unfiltered_parameters = true 10 | 11 | # Enable per-form CSRF tokens. Previous versions had false. 12 | Rails.application.config.action_controller.per_form_csrf_tokens = false 13 | 14 | # Enable origin-checking CSRF mitigation. Previous versions had false. 15 | Rails.application.config.action_controller.forgery_protection_origin_check = false 16 | 17 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. 18 | # Previous versions had false. 19 | ActiveSupport.to_time_preserves_timezone = false 20 | 21 | # Require `belongs_to` associations by default. Previous versions had false. 22 | Rails.application.config.active_record.belongs_to_required_by_default = false 23 | 24 | # Do not halt callback chains when a callback returns false. Previous versions had true. 25 | # ActiveSupport.halt_callback_chains_on_return_false = true 26 | 27 | # Rails.application.config.assets.precompile = false 28 | Rails.application.config.assets.precompile = [] 29 | Rails.application.config.assets.enabled = false 30 | 31 | -------------------------------------------------------------------------------- /public/src/common/loading/loading.interceptor.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | "use strict"; 3 | 4 | angular.module('common') 5 | .factory('loadingHttpInterceptor', LoadingHttpInterceptor); 6 | 7 | LoadingHttpInterceptor.$inject = ['$rootScope', '$q']; 8 | /** 9 | * Tracks when a request begins and finishes. When a 10 | * request starts, a progress event is emitted to allow 11 | * listeners to determine when a request has been initiated. 12 | * When the response completes or a response error occurs, 13 | * we assume the request has ended and emit a finish event. 14 | */ 15 | function LoadingHttpInterceptor($rootScope, $q) { 16 | 17 | var loadingCount = 0; 18 | var loadingEventName = 'spinner:activate'; 19 | 20 | return { 21 | request: function (config) { 22 | // console.log("Inside interceptor, config: ", config); 23 | 24 | if (++loadingCount === 1) { 25 | $rootScope.$broadcast(loadingEventName, {on: true}); 26 | } 27 | 28 | return config; 29 | }, 30 | 31 | response: function (response) { 32 | if (--loadingCount === 0) { 33 | $rootScope.$broadcast(loadingEventName, {on: false}); 34 | } 35 | 36 | return response; 37 | }, 38 | 39 | responseError: function (response) { 40 | if (--loadingCount === 0) { 41 | $rootScope.$broadcast(loadingEventName, {on: false}); 42 | } 43 | 44 | return $q.reject(response); 45 | } 46 | }; 47 | } 48 | 49 | })(); 50 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | require 'csv' 2 | require "base64" 3 | 4 | 5 | Category.destroy_all 6 | 7 | CSV.foreach("#{Rails.root}/db/categories.csv", headers: true) do |row| 8 | Category.create! short_name: row["short_name"], 9 | name: row["name"], 10 | special_instructions: row["special_instructions"] || "" 11 | end 12 | 13 | # Menu Item images 14 | files = Dir["#{Rails.root}/db/menu_items_images/**/*.jpg"].map { |file| [File.basename(file, ".jpg"), file]} 15 | file_map = Hash[*files.flatten(1)] 16 | 17 | CSV.foreach("#{Rails.root}/db/menu_items.csv", headers: true) do |row| 18 | category = Category.find_by! short_name: row["category_id"] 19 | menu_item_short_name = row["short_name"] 20 | 21 | # Read and base64 encode the image 22 | filepath = file_map[menu_item_short_name] || "" 23 | image_base64_encoded = nil 24 | if File.exists? filepath 25 | image_data = File.binread(filepath) 26 | image_base64_encoded = Base64.encode64(image_data) 27 | end 28 | 29 | MenuItem.create! short_name: menu_item_short_name, 30 | name: row["name"], 31 | description: row["description"] || "", 32 | price_small: row["price_small"], 33 | price_large: row["price_large"], 34 | small_portion_name: row["small_portion_name"], 35 | large_portion_name: row["large_portion_name"], 36 | category: category, 37 | image_base64_encoded: image_base64_encoded 38 | end -------------------------------------------------------------------------------- /public/spec/admin/auth.interceptor.spec.js: -------------------------------------------------------------------------------- 1 | describe('The authHttpInterceptor factory', function() { 2 | 'use strict'; 3 | 4 | var authHttpInterceptor; 5 | var CurrentUserService; 6 | 7 | /** 8 | * Gets called before each unit test it() 9 | */ 10 | beforeEach(function() { 11 | // Load module 12 | module('admin'); 13 | 14 | // Load any dependencies 15 | inject(function ($injector) { 16 | authHttpInterceptor = $injector.get('authHttpInterceptor'); 17 | CurrentUserService = $injector.get('CurrentUserService'); 18 | }); 19 | }); 20 | 21 | it('should have the Authorization header property populated if user is authenticated', function() { 22 | var username = 'john.doe'; 23 | var token = 'secret'; 24 | var config = { 25 | headers: {} 26 | }; 27 | 28 | expect(authHttpInterceptor).toBeDefined(); 29 | 30 | // Simulate user logging in 31 | CurrentUserService.saveToken(username, token); 32 | 33 | var authConfig = authHttpInterceptor.request(config); 34 | expect(authConfig).toBeDefined(); 35 | expect(authConfig.headers.Authorization).toBe('Bearer ' + token); 36 | }); 37 | 38 | it('should NOT have the Authorization header property populated when user is not authenticated', function() { 39 | var config = { 40 | headers: {} 41 | }; 42 | expect(authHttpInterceptor).toBeDefined(); 43 | var authConfig = authHttpInterceptor.request(config); 44 | expect(authConfig).toBeDefined(); 45 | expect(authConfig.headers.Authorization).not.toBeDefined(); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /config/application.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../boot', __FILE__) 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module RestaurantMenuServer 10 | class Application < Rails::Application 11 | # Settings in config/environments/* take precedence over those specified here. 12 | # Application configuration should go into files in config/initializers 13 | # -- all .rb files in that directory are automatically loaded. 14 | 15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. 16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. 17 | # config.time_zone = 'Central Time (US & Canada)' 18 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] 21 | # config.i18n.default_locale = :de 22 | 23 | # Do not swallow errors in after_commit/after_rollback callbacks. 24 | config.active_record.raise_in_transactional_callbacks = true 25 | config.assets.initialize_on_precompile = false 26 | 27 | config.assets.precompile = [] 28 | config.assets.enabled = false 29 | 30 | config.middleware.insert_before 0, "Rack::Cors" do 31 | allow do 32 | origins '*' 33 | resource '*', headers: :any, methods: [:get, :post, :delete, :put, :patch] 34 | end 35 | end 36 | 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /public/spec/public/menu/menu.controller.spec.js: -------------------------------------------------------------------------------- 1 | describe('The MenuController', function() { 2 | 'use strict'; 3 | 4 | var menuController; 5 | var menuCategories = [ 6 | { 7 | "id": 61, 8 | "short_name": "L", 9 | "name": "Lunch", 10 | "special_instructions": "Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll.", 11 | "url": "https://david-chu-auth.herokuapp.com/categories/L.json" 12 | }, 13 | { 14 | "id": 62, 15 | "short_name": "A", 16 | "name": "Soup", 17 | "special_instructions": "", 18 | "url": "https://david-chu-auth.herokuapp.com/categories/A.json" 19 | } 20 | ]; 21 | 22 | /** 23 | * Gets called before each unit test it() 24 | */ 25 | beforeEach(function() { 26 | // Load module 27 | module('public'); 28 | 29 | // Load any dependencies 30 | inject(function ($injector) { 31 | var $controller = $injector.get('$controller'); 32 | var $log = $injector.get('$log'); 33 | 34 | // Instantiate controller 35 | menuController = $controller('MenuController', { 36 | $log: $log, 37 | menuCategories: menuCategories 38 | }); 39 | }); 40 | }); 41 | 42 | it('should initialize with menu categories', function() { 43 | expect(menuController).toBeDefined(); 44 | expect(menuController.menuCategories).toEqual(menuCategories); 45 | }); 46 | 47 | 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /public/src/public/public.routes.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | angular.module('public') 5 | .config(routeConfig); 6 | 7 | /** 8 | * Configures the routes and views 9 | */ 10 | routeConfig.$inject = ['$stateProvider']; 11 | function routeConfig ($stateProvider) { 12 | // Routes 13 | $stateProvider 14 | .state('public', { 15 | absract: true, 16 | templateUrl: 'src/public/public.html' 17 | }) 18 | .state('public.home', { 19 | url: '/', 20 | templateUrl: 'src/public/home/home.html' 21 | }) 22 | .state('public.menu', { 23 | url: '/menu', 24 | templateUrl: 'src/public/menu/menu.html', 25 | controller: 'MenuController', 26 | controllerAs: 'menuCtrl', 27 | resolve: { 28 | menuCategories: ['MenuService', function (MenuService) { 29 | return MenuService.getCategories(); 30 | }] 31 | } 32 | }) 33 | .state('public.menuitems', { 34 | url: '/menu/{category}', 35 | templateUrl: 'src/public/menu-items/menu-items.html', 36 | controller: 'MenuItemsController', 37 | controllerAs: 'menuItemsCtrl', 38 | resolve: { 39 | menuItems: ['$stateParams','MenuService', function ($stateParams, MenuService) { 40 | return MenuService.getMenuItems($stateParams.category); 41 | }] 42 | } 43 | }) 44 | .state('public.about', { 45 | url: '/about', 46 | templateUrl: 'src/public/about.html' 47 | }) 48 | .state('public.awards', { 49 | url: '/awards', 50 | templateUrl: 'src/public/awards.html' 51 | }); 52 | } 53 | })(); 54 | -------------------------------------------------------------------------------- /public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /public/spec/public/menu-items/menu-items.controller.spec.js: -------------------------------------------------------------------------------- 1 | describe('The MenuItemsController', function() { 2 | 'use strict'; 3 | 4 | var menuItemsController; 5 | var menuItemsByCategory = { 6 | menu_items: [ 7 | { 8 | "id": 853, 9 | "short_name": "L4", 10 | "name": "Kung Pao Chicken", 11 | "description": "beef sauteed with carrots and celery, in a spicy Szechuan sauce", 12 | "price_small": null, 13 | "price_large": 9.75, 14 | "small_portion_name": null, 15 | "large_portion_name": null, 16 | "image_present": true 17 | } 18 | ], 19 | category: { 20 | "short_name": "L", 21 | "name": "Lunch", 22 | "special_instructions": "Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll." 23 | } 24 | }; 25 | /** 26 | * Gets called before each unit test it() 27 | */ 28 | beforeEach(function() { 29 | // Load module 30 | module('public'); 31 | 32 | // Load any dependencies 33 | inject(function ($injector) { 34 | var $controller = $injector.get('$controller'); 35 | var $log = $injector.get('$log'); 36 | 37 | // Instantiate controller 38 | menuItemsController = $controller('MenuItemsController', { 39 | $log: $log, 40 | menuItems: menuItemsByCategory 41 | }); 42 | }); 43 | }); 44 | 45 | it('should initialize with menu items', function() { 46 | expect(menuItemsController).toBeDefined(); 47 | expect(menuItemsController.menuItems).toEqual(menuItemsByCategory); 48 | }); 49 | 50 | 51 | 52 | }); 53 | -------------------------------------------------------------------------------- /app/controllers/menu_items_controller.rb: -------------------------------------------------------------------------------- 1 | class MenuItemsController < ApplicationController 2 | include RailsApiAuth::Authentication 3 | 4 | force_ssl if: :ssl_configured?, only: [:update, :create, :destroy] 5 | 6 | before_action :authenticate!, only: [:update, :create, :destroy] 7 | before_action :set_menu_item, only: [:show, :update, :destroy] 8 | 9 | def index 10 | if params[:category].present? 11 | @category = Category.find_by short_name: params[:category] 12 | @menu_items = [] 13 | @menu_items = @category.menu_items unless @category.nil? 14 | else 15 | # Avoid N+1 queries... 16 | @menu_items = MenuItem.includes(:category).all 17 | end 18 | end 19 | 20 | def show 21 | end 22 | 23 | def create 24 | @menu_item = MenuItem.new(menu_item_params) 25 | 26 | if @menu_item.save 27 | render :show, status: :created, location: @menu_item 28 | else 29 | render json: @menu_item.errors, status: :unprocessable_entity 30 | end 31 | end 32 | 33 | def update 34 | if @menu_item.update(menu_item_params) 35 | render :show, status: :ok, location: @menu_item 36 | else 37 | render json: @menu_item.errors, status: :unprocessable_entity 38 | end 39 | end 40 | 41 | def destroy 42 | @menu_item.destroy 43 | head :no_content 44 | end 45 | 46 | private 47 | def set_menu_item 48 | @menu_item = MenuItem.find_by short_name: params[:short_name] 49 | end 50 | 51 | def menu_item_params 52 | params.require(:menu_item).permit(:short_name, :name, :description, 53 | :price_small, :price_large, :small_portion_name, 54 | :large_portion_name, :category_id, :image_base64_encoded) 55 | end 56 | 57 | end 58 | -------------------------------------------------------------------------------- /public/src/common/menu.service.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('common') 5 | .service('MenuService', MenuService); 6 | 7 | 8 | MenuService.$inject = ['$http', 'ApiPath']; 9 | function MenuService($http, ApiPath) { 10 | var service = this; 11 | 12 | service.getCategories = function () { 13 | return $http.get(ApiPath + '/categories.json').then(function (response) { 14 | return response.data; 15 | }); 16 | }; 17 | 18 | 19 | service.getMenuItems = function (category) { 20 | var config = {}; 21 | if (category) { 22 | config.params = {'category': category}; 23 | } 24 | 25 | return $http.get(ApiPath + '/menu_items.json', config).then(function (response) { 26 | return response.data; 27 | }); 28 | }; 29 | 30 | 31 | service.getMenuItems = function (shortName) { 32 | var config = {}; 33 | if (shortName) { 34 | config.params = {category: shortName}; 35 | } 36 | 37 | return $http.get(ApiPath + '/menu_items.json', config).then(function (response) { 38 | return response.data; 39 | }); 40 | } 41 | 42 | 43 | service.getCategory = function (shortName) { 44 | return $http.get(ApiPath + '/categories/' + shortName + '.json').then(function (response) { 45 | return response.data; 46 | }); 47 | }; 48 | 49 | 50 | service.getMenuItem = function(shortName) { 51 | return $http.get(ApiPath + '/menu_items/' + shortName + '.json') 52 | .then(function(response) { 53 | return response.data; 54 | }); 55 | }; 56 | 57 | 58 | service.saveMenuItem = function (menuItem) { 59 | return $http.put(ApiPath + '/menu_items/' + menuItem.short_name, menuItem) 60 | .then(function (response) { 61 | return response.data; 62 | }); 63 | }; 64 | 65 | } 66 | 67 | 68 | 69 | })(); 70 | -------------------------------------------------------------------------------- /public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /public/spec/admin/category/category-items.controller.spec.js: -------------------------------------------------------------------------------- 1 | describe('The CategoryItemsController', function() { 2 | 'use strict'; 3 | 4 | var categoryItemsController; 5 | var menuItems = { 6 | menu_items:[ 7 | { 8 | "id": 853, 9 | "short_name": "L4", 10 | "name": "Kung Pao Chicken", 11 | "description": "beef sauteed with carrots and celery, in a spicy Szechuan sauce", 12 | "price_small": null, 13 | "price_large": 9.75, 14 | "small_portion_name": null, 15 | "large_portion_name": null, 16 | "image_present": true 17 | } 18 | ] 19 | }; 20 | 21 | var category = { 22 | "short_name": "L", 23 | "name": "Lunch", 24 | "special_instructions": "Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll." 25 | }; 26 | 27 | /** 28 | * Gets called before each unit test it() 29 | */ 30 | beforeEach(function() { 31 | // Load module 32 | module('admin'); 33 | 34 | // Load any dependencies 35 | inject(function ($injector) { 36 | var $controller = $injector.get('$controller'); 37 | var $log = $injector.get('$log'); 38 | 39 | // Instantiate controller 40 | categoryItemsController = $controller('CategoryItemsController', { 41 | $log: $log, 42 | menuItems: menuItems, 43 | category: category 44 | }); 45 | }); 46 | }); 47 | 48 | it('should initialize with menu items and category', function() { 49 | expect(categoryItemsController).toBeDefined(); 50 | expect(categoryItemsController.menuItems).toEqual(menuItems.menu_items); 51 | expect(categoryItemsController.category).toEqual(category); 52 | }); 53 | 54 | 55 | 56 | }); 57 | -------------------------------------------------------------------------------- /config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure public file server for tests with Cache-Control for performance. 16 | config.public_file_server.enabled = true 17 | config.public_file_server.headers = { 18 | 'Cache-Control' => 'public, max-age=3600' 19 | } 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | config.action_mailer.perform_caching = false 31 | 32 | # Tell Action Mailer not to deliver emails to the real world. 33 | # The :test delivery method accumulates sent emails in the 34 | # ActionMailer::Base.deliveries array. 35 | config.action_mailer.delivery_method = :test 36 | 37 | # Print deprecation notices to the stderr. 38 | config.active_support.deprecation = :stderr 39 | 40 | # Raises error for missing translations 41 | # config.action_view.raise_on_missing_translations = true 42 | end 43 | -------------------------------------------------------------------------------- /config/environments/development.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # In the development environment your application's code is reloaded on 5 | # every request. This slows down response time but is perfect for development 6 | # since you don't have to restart the web server when you make code changes. 7 | config.cache_classes = false 8 | 9 | # Do not eager load code on boot. 10 | config.eager_load = false 11 | 12 | # Show full error reports. 13 | config.consider_all_requests_local = true 14 | 15 | # Enable/disable caching. By default caching is disabled. 16 | if Rails.root.join('tmp/caching-dev.txt').exist? 17 | config.action_controller.perform_caching = true 18 | 19 | config.cache_store = :memory_store 20 | config.public_file_server.headers = { 21 | 'Cache-Control' => 'public, max-age=172800' 22 | } 23 | else 24 | config.action_controller.perform_caching = false 25 | 26 | config.cache_store = :null_store 27 | end 28 | 29 | # Don't care if the mailer can't send. 30 | config.action_mailer.raise_delivery_errors = false 31 | 32 | config.action_mailer.perform_caching = false 33 | 34 | # Print deprecation notices to the Rails logger. 35 | config.active_support.deprecation = :log 36 | 37 | # Raise an error on page load if there are pending migrations. 38 | config.active_record.migration_error = :page_load 39 | 40 | # Debug mode disables concatenation and preprocessing of assets. 41 | # This option may cause significant delays in view rendering with a large 42 | # number of complex assets. 43 | config.assets.debug = true 44 | 45 | # Suppress logger output for asset requests. 46 | config.assets.quiet = true 47 | 48 | # Raises error for missing translations 49 | # config.action_view.raise_on_missing_translations = true 50 | 51 | # Use an evented file watcher to asynchronously detect changes in source code, 52 | # routes, locales, etc. This feature depends on the listen gem. 53 | # config.file_watcher = ActiveSupport::EventedFileUpdateChecker 54 | end 55 | -------------------------------------------------------------------------------- /db/schema.rb: -------------------------------------------------------------------------------- 1 | # encoding: UTF-8 2 | # This file is auto-generated from the current state of the database. Instead 3 | # of editing this file, please use the migrations feature of Active Record to 4 | # incrementally modify your database, and then regenerate this schema definition. 5 | # 6 | # Note that this schema.rb definition is the authoritative source for your 7 | # database schema. If you need to create the application database on another 8 | # system, you should be using db:schema:load, not running all the migrations 9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 10 | # you'll amass, the slower it'll run and the greater likelihood for issues). 11 | # 12 | # It's strongly recommended that you check this file into your version control system. 13 | 14 | ActiveRecord::Schema.define(version: 20160731205241) do 15 | 16 | create_table "categories", force: :cascade do |t| 17 | t.string "short_name" 18 | t.string "name" 19 | t.text "special_instructions" 20 | t.datetime "created_at", null: false 21 | t.datetime "updated_at", null: false 22 | end 23 | 24 | create_table "logins", force: :cascade do |t| 25 | t.string "identification", null: false 26 | t.string "password_digest" 27 | t.string "oauth2_token", null: false 28 | t.string "uid" 29 | t.string "single_use_oauth2_token" 30 | t.integer "user_id" 31 | t.datetime "created_at" 32 | t.datetime "updated_at" 33 | t.string "provider" 34 | end 35 | 36 | create_table "menu_items", force: :cascade do |t| 37 | t.string "short_name" 38 | t.string "name" 39 | t.text "description" 40 | t.float "price_small" 41 | t.float "price_large" 42 | t.string "small_portion_name" 43 | t.string "large_portion_name" 44 | t.integer "category_id" 45 | t.datetime "created_at", null: false 46 | t.datetime "updated_at", null: false 47 | t.text "image_base64_encoded" 48 | end 49 | 50 | add_index "menu_items", ["category_id"], name: "index_menu_items_on_category_id" 51 | 52 | end 53 | -------------------------------------------------------------------------------- /config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum, this matches the default thread size of Active Record. 6 | # 7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i 8 | threads threads_count, threads_count 9 | 10 | # Specifies the `port` that Puma will listen on to receive requests, default is 3000. 11 | # 12 | port ENV.fetch("PORT") { 3000 } 13 | 14 | # Specifies the `environment` that Puma will run in. 15 | # 16 | environment ENV.fetch("RAILS_ENV") { "development" } 17 | 18 | # Specifies the number of `workers` to boot in clustered mode. 19 | # Workers are forked webserver processes. If using threads and workers together 20 | # the concurrency of the application would be max `threads` * `workers`. 21 | # Workers do not work on JRuby or Windows (both of which do not support 22 | # processes). 23 | # 24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 25 | 26 | # Use the `preload_app!` method when specifying a `workers` number. 27 | # This directive tells Puma to first boot the application and load code 28 | # before forking the application. This takes advantage of Copy On Write 29 | # process behavior so workers use less memory. If you use this option 30 | # you need to make sure to reconnect any threads in the `on_worker_boot` 31 | # block. 32 | # 33 | # preload_app! 34 | 35 | # The code in the `on_worker_boot` will be called if you are using 36 | # clustered mode by specifying a number of `workers`. After each worker 37 | # process is booted this block will be run, if you are using `preload_app!` 38 | # option you will want to use this block to reconnect to any threads 39 | # or connections that may have been created at application boot, Ruby 40 | # cannot share connections between processes. 41 | # 42 | # on_worker_boot do 43 | # ActiveRecord::Base.establish_connection if defined?(ActiveRecord) 44 | # end 45 | 46 | # Allow puma to be restarted by `rails restart` command. 47 | plugin :tmp_restart 48 | -------------------------------------------------------------------------------- /public/spec/common/loading/loading.component.spec.js: -------------------------------------------------------------------------------- 1 | describe('The loading component', function() { 2 | 'use strict'; 3 | 4 | var loadingComponent; 5 | var $rootScope; 6 | 7 | /** 8 | * Gets called before each unit test it() 9 | */ 10 | beforeEach(function() { 11 | // Load module 12 | module('common'); 13 | 14 | // Load any dependencies 15 | inject(function ($injector) { 16 | var $componentController = $injector.get('$componentController'); 17 | $rootScope = $injector.get('$rootScope'); 18 | 19 | /** 20 | * Creates a loading component. 21 | * 22 | * The first parameter designates the name of the component whos controller you are retrieving 23 | * 24 | * The second parameter allows you to inject controller locals. In this case, we include 25 | * a $rootScope. 26 | * 27 | * The third parameter is where you would include items in the `bindings` for a component. Since 28 | * we don't have any bindings here, we leave null. 29 | * 30 | * https://docs.angularjs.org/api/ngMock/service/$componentController 31 | */ 32 | loadingComponent = $componentController('loading', { 33 | $rootScope: $rootScope 34 | }, null); 35 | 36 | }); 37 | }); 38 | 39 | it('should initialize and not show by default', function() { 40 | // Angular does not automatically call $onInit 41 | // 42 | // See the battle here 43 | // https://github.com/angular/angular.js/issues/14129 44 | loadingComponent.$onInit(); 45 | 46 | // Once initialized, we expect show = false since that's what 47 | // we include in our $onInit() 48 | expect(loadingComponent.show).toBe(false); 49 | }); 50 | 51 | 52 | it('should toggle the show property to show/hide an image', function() { 53 | loadingComponent.$onInit(); 54 | 55 | // Ensure default state is false 56 | expect(loadingComponent.show).toBe(false); 57 | 58 | // Trigger event to show 59 | $rootScope.$emit('spinner:activate', {on: true}); 60 | expect(loadingComponent.show).toBe(true); 61 | 62 | // Trigger event to hide 63 | $rootScope.$emit('spinner:activate', {on: false}); 64 | expect(loadingComponent.show).toBe(false); 65 | }); 66 | 67 | }); 68 | -------------------------------------------------------------------------------- /public/src/admin/admin.routes.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .config(config); 6 | 7 | config.$inject = ['$stateProvider', '$httpProvider']; 8 | function config($stateProvider, $httpProvider) { 9 | $httpProvider.interceptors.push('authHttpInterceptor'); 10 | $httpProvider.defaults.headers.common.Accept = 'application/json'; 11 | 12 | $stateProvider 13 | 14 | // Contains base state that all admin states inherit 15 | .state('admin', { 16 | url: '/admin', 17 | abstract: true, 18 | templateUrl: 'src/admin/admin.html' 19 | }) 20 | // Contains state that all authenticated states inherit 21 | .state('admin.auth', { 22 | url: '', 23 | templateUrl: 'src/admin/admin-auth/admin-auth.html', 24 | controller: 'AdminAuthController', 25 | controllerAs: 'adminAuth' 26 | }) 27 | .state('admin.login', { 28 | url: '/login', 29 | templateUrl: 'src/admin/login/login.html', 30 | controller: 'LoginController', 31 | controllerAs: 'loginCtrl', 32 | // These are params that this state expects to be populated 33 | // Allows us to pass via $state.go(path, params) 34 | params: { 35 | toParams: null, 36 | toState: null 37 | } 38 | }) 39 | .state('admin.auth.category', { 40 | url: '/category/{categoryId}', 41 | templateUrl: 'src/admin/category/category-items.html', 42 | controller: 'CategoryItemsController', 43 | controllerAs: 'categoryItemsCtrl', 44 | resolve: { 45 | category: ['$stateParams', 'MenuService', function ($stateParams, MenuService) { 46 | return MenuService.getCategory($stateParams.categoryId); 47 | }], 48 | menuItems: ['$stateParams', 'MenuService', function ($stateParams, MenuService) { 49 | return MenuService.getMenuItems($stateParams.categoryId); 50 | }] 51 | } 52 | }) 53 | 54 | .state('admin.auth.category.menuitem', { 55 | url: "/menuitem/{menuItemId}", 56 | templateUrl: "src/admin/menu-item/menu-item-edit.html", 57 | controller: 'MenuItemEditController', 58 | controllerAs: 'menuItemEditCtrl', 59 | resolve: { 60 | menuItem: ['$stateParams', 'MenuService', function ($stateParams, MenuService) { 61 | return MenuService.getMenuItem($stateParams.menuItemId); 62 | }] 63 | } 64 | });; 65 | } 66 | 67 | })(); 68 | -------------------------------------------------------------------------------- /public/src/public/about.html: -------------------------------------------------------------------------------- 1 |
2 |

About This Website

3 |
4 |

It may be hard to tell, but this website does much more than just help you choose a delicious dish from this cozy 5 | little restaurant. The website of this restaurant has served over 100,000 students all over the world (and counting), teaching them 6 | the skills of how to develop a website from scratch.

7 | 8 |

9 | The development of this website was part of the curriculum of 2 Coursera.org 10 | courses: HTML, CSS, and Javascript 11 | for Web Developers and Single Page 12 | Web Applications with AngularJS. 13 |
All courses have an option to be taken for free. 14 |

15 | 16 |

17 | As of November, 2016, both courses made it to the #1 Top Rated Course spot (among close to 1,800 available courses). 18 |

19 | 20 |

21 | To give you a little preview, here is a video from one of the courses: 22 |

23 | 24 |
25 |

26 | 27 |

28 | The courses and this site was not a labor of just one person. We owe a debt of gratitute to: 29 |

    30 |
  • Moshe Chaikin of StoryWithLight.com, 31 | who not only filmed and produced the Field Trip video (featured above), but also provided food photography so the users of the site can 32 | see a picture of each dish.
  • 33 |
  • Kalman Hazins, who coded the backend service for this website.
  • 34 |
  • Finally, the owners of David Chu's China Bistro restaurant who graciously agreed to assist us in this project.
  • 35 |
36 |

37 | 38 |

* The final implementation of this site is done in AngularJS. If you would like the see the version of this site without 39 | the Angular framework, click here. 40 |

41 | 42 |
43 | 44 |
-------------------------------------------------------------------------------- /public/spec/admin/services/login.service.spec.js: -------------------------------------------------------------------------------- 1 | describe('The LoginService', function() { 2 | 'use strict'; 3 | 4 | var LoginService; 5 | var AuthRedirectorService; 6 | var ApiPath; 7 | var $httpBackend; 8 | var accessTokenResponse = { 9 | access_token: 'my-secret-token' 10 | }; 11 | var $rootScope; 12 | var $state; 13 | 14 | /** 15 | * Gets called before each unit test it() 16 | */ 17 | beforeEach(function() { 18 | // Load module 19 | module('admin'); 20 | 21 | // Load any dependencies 22 | inject(function ($injector) { 23 | LoginService = $injector.get('LoginService'); 24 | AuthRedirectorService = $injector.get('AuthRedirectorService'); 25 | ApiPath = $injector.get('ApiPath'); 26 | $httpBackend = $injector.get('$httpBackend'); 27 | $rootScope = $injector.get('$rootScope'); 28 | $state = $injector.get('$state'); 29 | }); 30 | 31 | // Turn off listener that's initiated in run method for the purposes 32 | // of manually adding it with each unit test 33 | $rootScope.$$listeners['$stateChangeStart'] = null; 34 | }); 35 | 36 | it('should retrieve access token using username and password', function() { 37 | var username = 'john.doe'; 38 | var password = 'secret'; 39 | var params = { 40 | 'username': username, 41 | 'password': password, 42 | 'grant_type': 'password' 43 | }; 44 | 45 | expect(LoginService).toBeDefined(); 46 | $httpBackend.expectPOST(ApiPath + '/token', params ).respond(accessTokenResponse); 47 | 48 | LoginService.getAccessToken(username, password).then(function (accessToken) { 49 | expect(accessToken).toEqual(accessTokenResponse.access_token); 50 | }); 51 | $httpBackend.flush(); 52 | 53 | }); 54 | 55 | it('should redirect user to login page when not authenticaated', function() { 56 | // Pass our onStateChangeStart handler from LoginService 57 | $rootScope.$on('$stateChangeStart', AuthRedirectorService.onStateChangeStart); 58 | 59 | // We're less concerned about the actual contents of the html template. We 60 | // simply just tell it to return empty because we are required to account 61 | // for the GET request. 62 | $httpBackend.whenGET('src/admin/admin.html').respond(''); 63 | $httpBackend.whenGET('src/admin/login/login.html').respond(''); 64 | 65 | // Attempt to go to home admin state 66 | $state.go('admin.auth'); 67 | 68 | // Must call $digest to ensure state transition occurs 69 | $rootScope.$digest(); 70 | $httpBackend.flush(); 71 | 72 | // Expect that our onStateChangeStart handler redirects unauthenticated 73 | // user to login state 74 | expect($state.current.name).toBe('admin.login'); 75 | }); 76 | }); 77 | -------------------------------------------------------------------------------- /public/spec/admin/category/category-list.component.spec.js: -------------------------------------------------------------------------------- 1 | describe('The categoryList component', function() { 2 | 'use strict'; 3 | 4 | var categoryListComponent; 5 | var $rootScope; 6 | var $httpBackend; 7 | var ApiPath; 8 | var categoriesResponse = [ 9 | { 10 | id: 61, 11 | short_name: "L", 12 | name: "Lunch", 13 | special_instructions: "Sunday-Friday 11:15am-3:00pm. Served with your choice of rice (Vegetable Fried RIce, Steamed Rice, Brown Rice), AND EITHER soup (Hot & Sour, Wonton, Vegetable, Egg Drop, Chicken Corn Soup) OR veggie egg roll. $1.00 extra to have both soup and egg roll.", 14 | url: "https://david-chu-auth.herokuapp.com/categories/L.json" 15 | }, 16 | { 17 | id: 62, 18 | short_name: "A", 19 | name: "Soup", 20 | special_instructions: "", 21 | url: "https://david-chu-auth.herokuapp.com/categories/A.json" 22 | }, 23 | { 24 | id: 63, 25 | short_name: "B", 26 | name: "Appetizers", 27 | special_instructions: "", 28 | url: "https://david-chu-auth.herokuapp.com/categories/B.json" 29 | } 30 | 31 | ]; 32 | 33 | /** 34 | * Gets called before each unit test it() 35 | */ 36 | beforeEach(function() { 37 | // Load module 38 | module('admin'); 39 | 40 | // Load any dependencies 41 | inject(function ($injector) { 42 | var $componentController = $injector.get('$componentController'); 43 | var $log = $injector.get('$log'); 44 | var MenuService = $injector.get('MenuService'); 45 | $httpBackend = $injector.get('$httpBackend'); 46 | $rootScope = $injector.get('$rootScope'); 47 | ApiPath = $injector.get('ApiPath'); 48 | 49 | /** 50 | * Creates a categoryList component. 51 | * 52 | * https://docs.angularjs.org/api/ngMock/service/$componentController 53 | */ 54 | categoryListComponent = $componentController('categoryList', { 55 | $log: $log, 56 | MenuService: MenuService 57 | }, null); 58 | 59 | }); 60 | }); 61 | 62 | it('should initialize and retrieve categories', function() { 63 | expect(categoryListComponent).toBeDefined(); 64 | expect(categoryListComponent.$onInit).toBeDefined(); 65 | $httpBackend.expectGET(ApiPath + '/categories.json').respond(categoriesResponse); 66 | 67 | // Since no categories have been retrieved, categories should not be defined 68 | expect(categoryListComponent.categories).not.toBeDefined(); 69 | 70 | // Call component initializer 71 | categoryListComponent.$onInit(); 72 | 73 | // Ensure mock http calls complete 74 | $httpBackend.flush(); 75 | 76 | // Categories should now be populated 77 | expect(categoryListComponent.categories).toEqual(categoriesResponse); 78 | }); 79 | 80 | 81 | 82 | }); 83 | -------------------------------------------------------------------------------- /public/spec/admin/menu-item/menu-item-admin.component.spec.js: -------------------------------------------------------------------------------- 1 | describe('The menuItemAdmin component', function() { 2 | 'use strict'; 3 | 4 | var menuItemAdminComponent; 5 | var $httpBackend; 6 | var $rootScope; 7 | var ApiPath; 8 | 9 | var menuItem = { 10 | id: 1, 11 | short_name: "A1", 12 | name: "Egg Drop Soup", 13 | description: "chicken broth with egg drop", 14 | price_small: 2.25, 15 | price_large: 4.5, 16 | small_portion_name: "pint", 17 | large_portion_name: "quart", 18 | image_present: true 19 | }; 20 | 21 | var funcBindings = { 22 | onSave: function() {}, 23 | onCancel: function() {}, 24 | onError: function() {} 25 | }; 26 | 27 | /** 28 | * Gets called before each unit test it() 29 | */ 30 | beforeEach(function() { 31 | // Load module 32 | module('admin'); 33 | 34 | // Load any dependencies 35 | inject(function ($injector) { 36 | var $componentController = $injector.get('$componentController'); 37 | $rootScope = $injector.get('$rootScope'); 38 | $httpBackend = $injector.get('$httpBackend'); 39 | ApiPath = $injector.get('ApiPath'); 40 | 41 | // Set up spies for function expressions 42 | spyOn(funcBindings, 'onCancel'); 43 | spyOn(funcBindings, 'onSave'); 44 | spyOn(funcBindings, 'onError'); 45 | 46 | // Create component 47 | menuItemAdminComponent = $componentController('menuItemAdmin', null, { 48 | menuItem: angular.copy(menuItem), 49 | onCancel: funcBindings.onCancel, 50 | onSave: funcBindings.onSave, 51 | onError: funcBindings.onError 52 | }); 53 | }); 54 | }); 55 | 56 | it('should initialize and execute cancel function expression', function() { 57 | expect(menuItemAdminComponent).toBeDefined(); 58 | expect(menuItemAdminComponent.menuItem).toBeDefined(); 59 | expect(funcBindings.onCancel).not.toHaveBeenCalled(); 60 | menuItemAdminComponent.cancel(); 61 | expect(funcBindings.onCancel).toHaveBeenCalled(); 62 | }); 63 | 64 | 65 | it('should initialize and execute onSave function expression', function() { 66 | // Simulate successful sav 67 | $httpBackend 68 | .expectPUT(ApiPath + '/menu_items/' + menuItem.short_name, menuItem) 69 | .respond(menuItem); 70 | 71 | menuItemAdminComponent.saveMenuItem(); 72 | $httpBackend.flush(); 73 | expect(funcBindings.onSave).toHaveBeenCalled(); 74 | }); 75 | 76 | it('should initialize and execute onError function expression', function() { 77 | // Simulate error response 78 | $httpBackend 79 | .expectPUT(ApiPath + '/menu_items/' + menuItem.short_name, menuItem) 80 | .respond(500, menuItem); 81 | 82 | menuItemAdminComponent.saveMenuItem(); 83 | $httpBackend.flush(); 84 | expect(funcBindings.onError).toHaveBeenCalled(); 85 | 86 | }); 87 | }); 88 | -------------------------------------------------------------------------------- /public/images/spinner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/src/admin/menu-item/menu-item-admin.html: -------------------------------------------------------------------------------- 1 |

{{ $ctrl.menuItem.name }}

2 | 3 |
4 |
5 |
6 | 9 | 10 |
11 | 13 |
14 | 15 |
16 | 20 | Image must be 250w X 150h pixels 21 |
22 | 23 |
24 |
25 | 26 | 27 |
28 | 29 | 30 |
Menu item name is a required field
31 |
32 | 33 |
34 | 35 | 36 |
Menu item description is a required field
37 |
38 | 39 |
40 |
41 | 42 |
43 |
$
44 | 45 |
46 | 47 |
48 |
49 |
50 | 51 |
52 | 53 |
54 |
$
55 | 56 |
57 | 58 |
59 |
60 |
61 |
{{$ctrl.priceErrorMessage}}
62 |
63 | 64 |
65 | 66 | 67 |
68 | 69 |
70 | -------------------------------------------------------------------------------- /public/spec/common/loading/loading.interceptor.spec.js: -------------------------------------------------------------------------------- 1 | describe('The loadingHttpInterceptor factory', function() { 2 | 'use strict'; 3 | 4 | var loadingHttpInterceptor; 5 | var $rootScope; 6 | var onBroadcastFunc; 7 | 8 | /** 9 | * Gets called before each unit test it() 10 | */ 11 | beforeEach(function() { 12 | // Load module 13 | module('public'); 14 | 15 | // Load any dependencies 16 | inject(function ($injector) { 17 | loadingHttpInterceptor = $injector.get('loadingHttpInterceptor'); 18 | $rootScope = $injector.get('$rootScope'); 19 | }); 20 | 21 | // Set up a spy to watch when the method that we pass into $rootScope.$on() is 22 | // executed 23 | var funcToSpy = function (event, payload) {}; 24 | onBroadcastFunc = jasmine.createSpy('onBroadcastFunc', funcToSpy); 25 | }); 26 | 27 | it('should simulate 1 request and 1 response emitting a spinner:active event with on = true and on = false', function() { 28 | 29 | expect(loadingHttpInterceptor).toBeDefined(); 30 | 31 | 32 | // Set up the listener for $on. onBroadcastFunc is the spy we created earlier that contains 33 | // additional methods that jasmine uses to track when it has been called 34 | $rootScope.$on('spinner:activate', onBroadcastFunc); 35 | 36 | // Simulate when the interceptor request() is executed 37 | loadingHttpInterceptor.request(null); 38 | 39 | // Ensure method we've been spying on has been called 40 | expect(onBroadcastFunc.calls.any()).toBe(true); 41 | 42 | // Ensure that the second argument from the $on function we passed in 43 | // has a property on and the value for on = true 44 | expect(onBroadcastFunc.calls.mostRecent().args[1].on).toBe(true); 45 | 46 | // Simulate when response() is executed 47 | loadingHttpInterceptor.response(null); 48 | 49 | // Ensure that second argument from $on function has a value of on = false 50 | expect(onBroadcastFunc.calls.mostRecent().args[1].on).toBe(false); 51 | }); 52 | 53 | it('should simulate 1 request and 1 response error emitting a spinner:active event with on = true and on = false', function() { 54 | 55 | expect(loadingHttpInterceptor).toBeDefined(); 56 | 57 | 58 | // Set up the listener for $on. onBroadcastFunc is the spy we created earlier that contains 59 | // additional methods that jasmine uses to track when it has been called 60 | $rootScope.$on('spinner:activate', onBroadcastFunc); 61 | 62 | // Simulate when the interceptor request() is executed 63 | loadingHttpInterceptor.request(null); 64 | 65 | // Ensure method we've been spying on has been called 66 | expect(onBroadcastFunc.calls.any()).toBe(true); 67 | 68 | // Ensure that the second argument from the $on function we passed in 69 | // has a property on and the value for on = true 70 | expect(onBroadcastFunc.calls.mostRecent().args[1].on).toBe(true); 71 | 72 | // Simulate when response() is executed 73 | loadingHttpInterceptor.responseError(null); 74 | 75 | // Ensure that second argument from $on function has a value of on = false 76 | expect(onBroadcastFunc.calls.mostRecent().args[1].on).toBe(false); 77 | }); 78 | 79 | }); 80 | -------------------------------------------------------------------------------- /public/src/admin/menu-item/menu-item-admin.component.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | angular.module('admin') 5 | .component('menuItemAdmin', { 6 | templateUrl: 'src/admin/menu-item/menu-item-admin.html', 7 | bindings: { 8 | menuItem: '<', 9 | onSave: '&', 10 | onError: '&', 11 | onCancel: '&' 12 | }, 13 | controller: MenuItemAdminController 14 | }); 15 | 16 | 17 | MenuItemAdminController.$inject = ['MenuService', 'ApiPath', 'Upload']; 18 | function MenuItemAdminController(MenuService, ApiPath, Upload) { 19 | var $ctrl = this; 20 | $ctrl.apiBasePath = ApiPath + '/images'; 21 | 22 | // Forces browser to think it's a new image URL 23 | $ctrl.cacheBuster = new Date().getTime(); 24 | 25 | $ctrl.cancel = function () { 26 | $ctrl.onCancel(); 27 | }; 28 | 29 | 30 | $ctrl.save = function () { 31 | Upload.base64DataUrl($ctrl.file).then(function (dataUrl) { 32 | var base64 = getBase64(dataUrl); 33 | if (base64) { 34 | $ctrl.menuItem.image_base64_encoded = base64; 35 | } 36 | 37 | $ctrl.saveMenuItem(); 38 | }); 39 | }; 40 | 41 | 42 | $ctrl.saveMenuItem = function () { 43 | return MenuService.saveMenuItem($ctrl.menuItem).then(function (menuItem) { 44 | $ctrl.menuItem = menuItem; 45 | $ctrl.onSave({menuItem: menuItem}); 46 | }, function (response) { 47 | $ctrl.onError({response: response}); 48 | }) 49 | }; 50 | 51 | 52 | function getBase64(dataUrl) { 53 | // Make sure we have a dataurl 54 | if (!dataUrl) { 55 | return null; 56 | } 57 | 58 | // Make sure the contents are populated. Split 59 | // to pull out base64 60 | // 61 | // Format: data:;base64, 62 | var splitDataUrl = dataUrl.split(','); 63 | if (splitDataUrl.length !== 2) { 64 | return null; 65 | } 66 | 67 | var base64 = splitDataUrl[1]; 68 | return base64; 69 | } 70 | 71 | 72 | $ctrl.valid = function () { 73 | if (!$ctrl.validatePrices()) { 74 | return false; 75 | } 76 | if ($ctrl.form.$invalid) { 77 | return false; 78 | } 79 | return true; 80 | }; 81 | 82 | $ctrl.validatePrices = function () { 83 | if (!$ctrl.menuItem.price_small && !$ctrl.menuItem.price_large) { 84 | $ctrl.priceErrorMessage = 'Price is required'; 85 | return false; 86 | } 87 | 88 | if ($ctrl.menuItem.price_small && $ctrl.menuItem.price_large) { 89 | if (!$ctrl.menuItem.small_portion_name || !$ctrl.menuItem.large_portion_name) { 90 | $ctrl.priceErrorMessage = 'Portion names are required for both prices'; 91 | return false; 92 | } 93 | } 94 | 95 | if ($ctrl.menuItem.small_portion_name && !$ctrl.menuItem.price_small) { 96 | $ctrl.priceErrorMessage = 'If portion is filled in, an associated price must be entered'; 97 | return false; 98 | } 99 | 100 | if ($ctrl.menuItem.large_portion_name && !$ctrl.menuItem.price_large) { 101 | $ctrl.priceErrorMessage = 'If portion is filled in, an associated price must be entered'; 102 | return false; 103 | } 104 | 105 | $ctrl.priceErrorMessage = ''; 106 | return true; 107 | }; 108 | } 109 | 110 | 111 | })(); 112 | -------------------------------------------------------------------------------- /config/environments/scaleddownproduction.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application 18 | # Add `rack-cache` to your Gemfile before enabling this. 19 | # For large-scale production use, consider using a caching reverse proxy like 20 | # NGINX, varnish or squid. 21 | # config.action_dispatch.rack_cache = true 22 | 23 | # Disable serving static files from the `/public` folder by default since 24 | # Apache or NGINX already handles this. 25 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? 26 | 27 | # Compress JavaScripts and CSS. 28 | config.assets.js_compressor = :uglifier 29 | # config.assets.css_compressor = :sass 30 | 31 | # Do not fallback to assets pipeline if a precompiled asset is missed. 32 | config.assets.compile = false 33 | 34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets, 35 | # yet still be able to expire them through the digest params. 36 | config.assets.digest = true 37 | 38 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 39 | 40 | # Specifies the header that your server uses for sending files. 41 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 43 | 44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 45 | config.force_ssl = false 46 | 47 | # Use the lowest log level to ensure availability of diagnostic information 48 | # when problems arise. 49 | config.log_level = :debug 50 | 51 | # Prepend all log lines with the following tags. 52 | # config.log_tags = [ :subdomain, :uuid ] 53 | 54 | # Use a different logger for distributed setups. 55 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) 56 | 57 | # Use a different cache store in production. 58 | # config.cache_store = :mem_cache_store 59 | 60 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 61 | # config.action_controller.asset_host = 'http://assets.example.com' 62 | 63 | # Ignore bad email addresses and do not raise email delivery errors. 64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 65 | # config.action_mailer.raise_delivery_errors = false 66 | 67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 68 | # the I18n.default_locale when a translation cannot be found). 69 | config.i18n.fallbacks = true 70 | 71 | # Send deprecation notices to registered listeners. 72 | config.active_support.deprecation = :notify 73 | 74 | # Use default logging formatter so that PID and timestamp are not suppressed. 75 | config.log_formatter = ::Logger::Formatter.new 76 | 77 | # Do not dump schema after migrations. 78 | config.active_record.dump_schema_after_migration = false 79 | end 80 | -------------------------------------------------------------------------------- /config/environments/production.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # Code is not reloaded between requests. 5 | config.cache_classes = true 6 | 7 | # Eager load code on boot. This eager loads most of Rails and 8 | # your application in memory, allowing both threaded web servers 9 | # and those relying on copy on write to perform better. 10 | # Rake tasks automatically ignore this option for performance. 11 | config.eager_load = true 12 | 13 | # Full error reports are disabled and caching is turned on. 14 | config.consider_all_requests_local = false 15 | config.action_controller.perform_caching = true 16 | 17 | # Disable serving static files from the `/public` folder by default since 18 | # Apache or NGINX already handles this. 19 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? 20 | 21 | # Compress JavaScripts and CSS. 22 | config.assets.js_compressor = :uglifier 23 | # config.assets.css_compressor = :sass 24 | 25 | # Do not fallback to assets pipeline if a precompiled asset is missed. 26 | config.assets.compile = false 27 | 28 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb 29 | 30 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. 31 | # config.action_controller.asset_host = 'http://assets.example.com' 32 | 33 | # Specifies the header that your server uses for sending files. 34 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache 35 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX 36 | 37 | # Mount Action Cable outside main process or domain 38 | # config.action_cable.mount_path = nil 39 | # config.action_cable.url = 'wss://example.com/cable' 40 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] 41 | 42 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 43 | # config.force_ssl = true 44 | 45 | # Use the lowest log level to ensure availability of diagnostic information 46 | # when problems arise. 47 | config.log_level = :debug 48 | 49 | # Prepend all log lines with the following tags. 50 | config.log_tags = [ :request_id ] 51 | 52 | # Use a different cache store in production. 53 | # config.cache_store = :mem_cache_store 54 | 55 | # Use a real queuing backend for Active Job (and separate queues per environment) 56 | # config.active_job.queue_adapter = :resque 57 | # config.active_job.queue_name_prefix = "restaurant_menu_server_#{Rails.env}" 58 | config.action_mailer.perform_caching = false 59 | 60 | # Ignore bad email addresses and do not raise email delivery errors. 61 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. 62 | # config.action_mailer.raise_delivery_errors = false 63 | 64 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to 65 | # the I18n.default_locale when a translation cannot be found). 66 | config.i18n.fallbacks = true 67 | 68 | # Send deprecation notices to registered listeners. 69 | config.active_support.deprecation = :notify 70 | 71 | # Use default logging formatter so that PID and timestamp are not suppressed. 72 | config.log_formatter = ::Logger::Formatter.new 73 | 74 | # Use a different logger for distributed setups. 75 | # require 'syslog/logger' 76 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') 77 | 78 | if ENV["RAILS_LOG_TO_STDOUT"].present? 79 | logger = ActiveSupport::Logger.new(STDOUT) 80 | logger.formatter = config.log_formatter 81 | config.logger = ActiveSupport::TaggedLogging.new(logger) 82 | end 83 | 84 | # Do not dump schema after migrations. 85 | config.active_record.dump_schema_after_migration = false 86 | end 87 | --------------------------------------------------------------------------------