Permalink
Browse files

added engine

  • Loading branch information...
1 parent 2243e26 commit 8bb922a17eb40b7e2237ebf550e6b3092ecd19ca @russ1985 committed Aug 4, 2012
Showing with 6,016 additions and 0 deletions.
  1. +1 −0 lib/our_order_online/.rspec
  2. +26 −0 lib/our_order_online/.watchr
  3. +7 −0 lib/our_order_online/Gemfile
  4. +249 −0 lib/our_order_online/Gemfile.lock
  5. +3 −0 lib/our_order_online/README.md
  6. +30 −0 lib/our_order_online/Rakefile
  7. +40 −0 lib/our_order_online/app/controllers/our_order_online/base_controller.rb
  8. +3 −0 lib/our_order_online/app/model/extensions/party.rb
  9. +39 −0 lib/our_order_online/app/model/order.rb
  10. +4 −0 lib/our_order_online/app/model/order_item.rb
  11. +5 −0 lib/our_order_online/app/model/party_order.rb
  12. +3 −0 lib/our_order_online/app/model/topping.rb
  13. +3 −0 lib/our_order_online/config/routes.rb
  14. +84 −0 lib/our_order_online/coverage/.resultset.json
  15. +88 −0 lib/our_order_online/coverage/assets/0.5.3/app.js
  16. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/blank.gif
  17. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_close.png
  18. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_loading.png
  19. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_nav_left.png
  20. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_nav_right.png
  21. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_e.png
  22. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_n.png
  23. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_ne.png
  24. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_nw.png
  25. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_s.png
  26. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_se.png
  27. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_sw.png
  28. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_shadow_w.png
  29. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_title_left.png
  30. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_title_main.png
  31. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_title_over.png
  32. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancy_title_right.png
  33. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancybox-x.png
  34. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancybox-y.png
  35. BIN lib/our_order_online/coverage/assets/0.5.3/fancybox/fancybox.png
  36. +363 −0 lib/our_order_online/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.css
  37. +44 −0 lib/our_order_online/coverage/assets/0.5.3/fancybox/jquery.fancybox-1.3.1.pack.js
  38. BIN lib/our_order_online/coverage/assets/0.5.3/favicon_green.png
  39. BIN lib/our_order_online/coverage/assets/0.5.3/favicon_red.png
  40. BIN lib/our_order_online/coverage/assets/0.5.3/favicon_yellow.png
  41. +129 −0 lib/our_order_online/coverage/assets/0.5.3/highlight.css
  42. +1 −0 lib/our_order_online/coverage/assets/0.5.3/highlight.pack.js
  43. +18 −0 lib/our_order_online/coverage/assets/0.5.3/jquery-1.6.2.min.js
  44. +152 −0 lib/our_order_online/coverage/assets/0.5.3/jquery.dataTables.min.js
  45. +141 −0 lib/our_order_online/coverage/assets/0.5.3/jquery.timeago.js
  46. +174 −0 lib/our_order_online/coverage/assets/0.5.3/jquery.url.js
  47. BIN lib/our_order_online/coverage/assets/0.5.3/loading.gif
  48. BIN lib/our_order_online/coverage/assets/0.5.3/magnify.png
  49. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
  50. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
  51. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  52. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  53. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  54. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  55. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  56. BIN ...our_order_online/coverage/assets/0.5.3/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  57. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-icons_222222_256x240.png
  58. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-icons_2e83ff_256x240.png
  59. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-icons_454545_256x240.png
  60. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-icons_888888_256x240.png
  61. BIN lib/our_order_online/coverage/assets/0.5.3/smoothness/images/ui-icons_cd0a0a_256x240.png
  62. +295 −0 lib/our_order_online/coverage/assets/0.5.3/smoothness/jquery-ui-1.8.4.custom.css
  63. +383 −0 lib/our_order_online/coverage/assets/0.5.3/stylesheet.css
  64. +879 −0 lib/our_order_online/coverage/index.html
  65. +43 −0 lib/our_order_online/db/migrate/20120721153832_our_order_online_tables.rb
  66. +5 −0 lib/our_order_online/lib/our_order_online.rb
  67. +15 −0 lib/our_order_online/lib/our_order_online/engine.rb
  68. +9 −0 lib/our_order_online/lib/our_order_online/version.rb
  69. +19 −0 lib/our_order_online/our_order_online.gemspec
  70. +6 −0 lib/our_order_online/script/rails
  71. +13 −0 lib/our_order_online/spec/controllers/base_controller_spec.rb
  72. +7 −0 lib/our_order_online/spec/dummy/Rakefile
  73. +9 −0 lib/our_order_online/spec/dummy/app/assets/javascripts/application.js
  74. +7 −0 lib/our_order_online/spec/dummy/app/assets/stylesheets/application.css
  75. +3 −0 lib/our_order_online/spec/dummy/app/controllers/application_controller.rb
  76. +2 −0 lib/our_order_online/spec/dummy/app/helpers/application_helper.rb
  77. 0 lib/our_order_online/spec/dummy/app/mailers/.gitkeep
  78. 0 lib/our_order_online/spec/dummy/app/models/.gitkeep
  79. +14 −0 lib/our_order_online/spec/dummy/app/views/layouts/application.html.erb
  80. +4 −0 lib/our_order_online/spec/dummy/config.ru
  81. +44 −0 lib/our_order_online/spec/dummy/config/application.rb
  82. +10 −0 lib/our_order_online/spec/dummy/config/boot.rb
  83. +8 −0 lib/our_order_online/spec/dummy/config/database.yml
  84. +5 −0 lib/our_order_online/spec/dummy/config/environment.rb
  85. +27 −0 lib/our_order_online/spec/dummy/config/environments/spec.rb
  86. +7 −0 lib/our_order_online/spec/dummy/config/initializers/backtrace_silencers.rb
  87. +10 −0 lib/our_order_online/spec/dummy/config/initializers/inflections.rb
  88. +5 −0 lib/our_order_online/spec/dummy/config/initializers/mime_types.rb
  89. +7 −0 lib/our_order_online/spec/dummy/config/initializers/secret_token.rb
  90. +8 −0 lib/our_order_online/spec/dummy/config/initializers/session_store.rb
  91. +12 −0 lib/our_order_online/spec/dummy/config/initializers/wrap_parameters.rb
  92. +5 −0 lib/our_order_online/spec/dummy/config/locales/en.yml
  93. +3 −0 lib/our_order_online/spec/dummy/config/routes.rb
  94. 0 lib/our_order_online/spec/dummy/db/.keepdir
  95. +634 −0 lib/our_order_online/spec/dummy/db/schema.rb
  96. BIN lib/our_order_online/spec/dummy/db/spec.sqlite3
  97. 0 lib/our_order_online/spec/dummy/lib/assets/.gitkeep
  98. 0 lib/our_order_online/spec/dummy/log/.gitkeep
  99. +1,767 −0 lib/our_order_online/spec/dummy/log/spec.log
  100. +26 −0 lib/our_order_online/spec/dummy/public/404.html
  101. +26 −0 lib/our_order_online/spec/dummy/public/422.html
  102. +26 −0 lib/our_order_online/spec/dummy/public/500.html
  103. 0 lib/our_order_online/spec/dummy/public/favicon.ico
  104. +6 −0 lib/our_order_online/spec/dummy/script/rails
  105. +60 −0 lib/our_order_online/spec/spec_helper.rb
@@ -0,0 +1 @@
+--colour --drb
@@ -0,0 +1,26 @@
+def run_spec(file)
+ unless File.exist?(file)
+ puts "#{file} does not exist"
+ return
+ end
+
+ puts "Running #{file}"
+ system "bundle exec rspec #{file}"
+ puts
+end
+
+watch("^spec/lib/.*/*_spec.rb") do |match|
+ run_spec match[0]
+end
+
+watch("^spec/.*/*_spec.rb") do |match|
+ run_spec match[0]
+end
+
+watch("^app/(.*/.*).rb") do |match|
+ run_spec %{spec/#{match[1]}_spec.rb}
+end
+
+watch("^lib/(.*/.*).rb") do |match|
+ run_spec %{spec/lib/#{match[1]}_spec.rb}
+end
@@ -0,0 +1,7 @@
+source "http://rubygems.org"
+
+gemspec
+
+gem 'erp_dev_svcs', :path => '../compass_agile_enterprise/erp_dev_svcs'
+gem 'erp_base_erp_svcs', :path => '../compass_agile_enterprise/erp_base_erp_svcs'
+gem 'erp_tech_svcs', :path => '../compass_agile_enterprise/erp_tech_svcs'
@@ -0,0 +1,249 @@
+PATH
+ remote: .
+ specs:
+ our_order_online (1.0.3)
+
+PATH
+ remote: ../compass_agile_enterprise/erp_base_erp_svcs
+ specs:
+ erp_base_erp_svcs (3.0.4)
+ actionmailer (~> 3.1.0)
+ actionpack (~> 3.1.0)
+ activerecord (~> 3.1.0)
+ activeresource (~> 3.1.0)
+ activesupport (~> 3.1.0)
+ attr_encrypted (= 1.2.0)
+ awesome_nested_set (= 2.0.2)
+ data_migrator (= 1.7)
+ has_many_polymorphic (>= 2.0.1)
+ rails (~> 3.1.0)
+ railties (~> 3.1.0)
+ uuid (= 2.3.4)
+
+PATH
+ remote: ../compass_agile_enterprise/erp_dev_svcs
+ specs:
+ erp_dev_svcs (3.0.2)
+ cucumber-rails (~> 1.1.1)
+ database_cleaner
+ erp_base_erp_svcs (~> 3.0)
+ factory_girl_rails (~> 1.3.0)
+ rspec-rails (~> 2.7)
+ simplecov (~> 0.5)
+ spork (~> 0.9.0.rc)
+ sqlite3 (~> 1.3.4)
+ watchr
+
+PATH
+ remote: ../compass_agile_enterprise/erp_tech_svcs
+ specs:
+ erp_tech_svcs (3.0.8)
+ aws-sdk (= 1.5.2)
+ delayed_job_active_record (= 0.3.2)
+ erp_base_erp_svcs (~> 3.0)
+ paperclip (= 3.0.2)
+ pdfkit (= 0.4.6)
+ sorcery (= 0.7.12)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.6)
+ actionpack (= 3.1.6)
+ mail (~> 2.3.3)
+ actionpack (3.1.6)
+ activemodel (= 3.1.6)
+ activesupport (= 3.1.6)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.6)
+ rack-cache (~> 1.2)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.4)
+ activemodel (3.1.6)
+ activesupport (= 3.1.6)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.6)
+ activemodel (= 3.1.6)
+ activesupport (= 3.1.6)
+ arel (~> 2.2.3)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.6)
+ activemodel (= 3.1.6)
+ activesupport (= 3.1.6)
+ activesupport (3.1.6)
+ multi_json (>= 1.0, < 1.3)
+ addressable (2.3.1)
+ arel (2.2.3)
+ attr_encrypted (1.2.0)
+ encryptor (>= 1.1.1)
+ awesome_nested_set (2.0.2)
+ activerecord (>= 3.0.0)
+ aws-sdk (1.5.2)
+ httparty (~> 0.7)
+ json (~> 1.4)
+ nokogiri (>= 1.4.4)
+ uuidtools (~> 2.1)
+ bcrypt-ruby (3.0.1-x86-mingw32)
+ builder (3.0.0)
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.4)
+ ffi (~> 1.0, >= 1.0.6)
+ cocaine (0.2.1)
+ cucumber (1.2.1)
+ builder (>= 2.1.2)
+ diff-lcs (>= 1.1.3)
+ gherkin (~> 2.11.0)
+ json (>= 1.4.6)
+ cucumber-rails (1.1.1)
+ capybara (>= 1.1.1)
+ cucumber (>= 1.1.0)
+ nokogiri (>= 1.5.0)
+ data_migrator (1.7)
+ activerecord (>= 2.3.5)
+ database_cleaner (0.8.0)
+ delayed_job (3.0.3)
+ activesupport (~> 3.0)
+ delayed_job_active_record (0.3.2)
+ activerecord (> 2.1.0)
+ delayed_job (~> 3.0.0)
+ diff-lcs (1.1.3)
+ encryptor (1.1.3)
+ erubis (2.7.0)
+ factory_girl (2.2.0)
+ activesupport
+ factory_girl_rails (1.3.0)
+ factory_girl (~> 2.2.0)
+ railties (>= 3.0.0)
+ faraday (0.8.1)
+ multipart-post (~> 1.1)
+ ffi (1.1.0-x86-mingw32)
+ gherkin (2.11.1-x86-mingw32)
+ json (>= 1.4.6)
+ has_many_polymorphic (2.0.1)
+ rails (>= 3.0)
+ rspec-rails (~> 2.7)
+ simplecov (~> 0.5)
+ sqlite3 (~> 1.3.4)
+ hike (1.2.1)
+ httparty (0.8.3)
+ multi_json (~> 1.0)
+ multi_xml
+ i18n (0.6.0)
+ json (1.7.3)
+ libwebsocket (0.1.4)
+ addressable
+ macaddr (1.6.1)
+ systemu (~> 2.5.0)
+ mail (2.3.3)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.19)
+ multi_json (1.2.0)
+ multi_xml (0.5.1)
+ multipart-post (1.1.5)
+ nokogiri (1.5.5-x86-mingw32)
+ oauth (0.4.6)
+ oauth2 (0.5.2)
+ faraday (~> 0.7)
+ multi_json (~> 1.0)
+ paperclip (3.0.2)
+ activemodel (>= 3.0.0)
+ activerecord (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ cocaine (>= 0.0.2)
+ mime-types
+ pdfkit (0.4.6)
+ polyglot (0.3.3)
+ rack (1.3.6)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rails (3.1.6)
+ actionmailer (= 3.1.6)
+ actionpack (= 3.1.6)
+ activerecord (= 3.1.6)
+ activeresource (= 3.1.6)
+ activesupport (= 3.1.6)
+ bundler (~> 1.0)
+ railties (= 3.1.6)
+ railties (3.1.6)
+ actionpack (= 3.1.6)
+ activesupport (= 3.1.6)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.1)
+ rspec-rails (2.11.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.11.0)
+ rubyzip (0.9.9)
+ selenium-webdriver (2.25.0)
+ childprocess (>= 0.2.5)
+ libwebsocket (~> 0.1.3)
+ multi_json (~> 1.0)
+ rubyzip
+ simplecov (0.6.4)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ sorcery (0.7.12)
+ bcrypt-ruby (~> 3.0.0)
+ oauth (~> 0.4.4)
+ oauth2 (~> 0.5.1)
+ spork (0.9.2)
+ sprockets (2.0.4)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.6-x86-mingw32)
+ systemu (2.5.2)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ uuid (2.3.4)
+ macaddr (~> 1.0)
+ uuidtools (2.1.2)
+ watchr (0.7)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ x86-mingw32
+
+DEPENDENCIES
+ erp_base_erp_svcs!
+ erp_dev_svcs!
+ erp_tech_svcs!
+ our_order_online!
@@ -0,0 +1,3 @@
+#OurOrder Online
+
+Companion to Our Order app
@@ -0,0 +1,30 @@
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
+RDoc::Task.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'OurOrderOnline'
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
+load 'rails/tasks/engine.rake'
+
+Bundler::GemHelper.install_tasks
+
+require "rspec/core/rake_task"
+RSpec::Core::RakeTask.new(:spec)
+task :default => :spec
@@ -0,0 +1,40 @@
+module OurOrderOnline
+ class BaseController < ActionController::Base
+ #before_filter :require_login
+
+ def create_new_order
+ order = create_new_with_token
+
+ render :json => {:success => true, :order => order.to_json_hash}
+ end
+
+ def retrieve_order
+ token = params[:token]
+ order = Order.find_by_token(token)
+
+ if order
+ render :json => {:success => true, :order => order.to_json_hash}
+ else
+ render :json => {:success => false, :message => 'Could Not Find Order'}
+ end
+ end
+
+ protected
+ def is_ajax_request?
+ request.xhr? || params[:callback]
+ end
+
+ def not_authenticated
+ if is_ajax_request?
+ if params[:callback]
+ render :json => {:success => false, :errors => {:reason => 'Unauthenticated Request'}}, :callback => params[:callback]
+ else
+ render :json => {:success => false, :errors => {:reason => 'Unauthenticated Request'}}
+ end
+ else
+ render :text => 'Unauthenticated Request'
+ end
+ end
+
+ end #BaseController
+end #OurOrderOnline
@@ -0,0 +1,3 @@
+Party.class_eval do
+ has_many :orders
+end
Oops, something went wrong. Retry.

0 comments on commit 8bb922a

Please sign in to comment.