From bbe08585fcf93e57033a3e4b7371c1e90e170e98 Mon Sep 17 00:00:00 2001 From: superuser Date: Wed, 14 Jun 2017 18:57:10 +0630 Subject: [PATCH 1/9] before pull --- config/secrets.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/secrets.yml b/config/secrets.yml index 6d442fa9..ce7eb8ba 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -19,4 +19,5 @@ test: # Do not keep production secrets in the repository, # instead read values from the environment. production: - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> + secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 + From d608bd5c300acaf109ed95ac55861937d71b1ee8 Mon Sep 17 00:00:00 2001 From: superuser Date: Thu, 15 Jun 2017 09:43:22 +0630 Subject: [PATCH 2/9] before pull --- config/environments/production.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 5aa66a01..423c7de1 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -8,15 +8,15 @@ Rails.application.configure do # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. - config.eager_load = true + config.eager_load = false # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true - + config.serve_static_assets = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + #config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier From a4211166de5c7d0a2e3864865b86259d1feac080 Mon Sep 17 00:00:00 2001 From: superuser Date: Thu, 15 Jun 2017 11:53:27 +0630 Subject: [PATCH 3/9] before pull --- app/assets/javascripts/origami.js | 1 + config/environments/production.rb | 2 +- config/puma.rb | 56 +++++-------------------------- 3 files changed, 11 insertions(+), 48 deletions(-) diff --git a/app/assets/javascripts/origami.js b/app/assets/javascripts/origami.js index 4a7e3d50..2e354dff 100644 --- a/app/assets/javascripts/origami.js +++ b/app/assets/javascripts/origami.js @@ -11,6 +11,7 @@ // about supported directives. // //= require jquery +//= require tether //= require bootstrap //= require jquery_ujs //= require turbolinks diff --git a/config/environments/production.rb b/config/environments/production.rb index 423c7de1..fc0e6b9a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -23,7 +23,7 @@ Rails.application.configure do # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false + config.assets.compile = true # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb diff --git a/config/puma.rb b/config/puma.rb index c7f311f8..b39a4ff2 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,47 +1,9 @@ -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum, this matches the default thread size of Active Record. -# -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i -threads threads_count, threads_count - -# Specifies the `port` that Puma will listen on to receive requests, default is 3000. -# -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -# -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the number of `workers` to boot in clustered mode. -# Workers are forked webserver processes. If using threads and workers together -# the concurrency of the application would be max `threads` * `workers`. -# Workers do not work on JRuby or Windows (both of which do not support -# processes). -# -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } - -# Use the `preload_app!` method when specifying a `workers` number. -# This directive tells Puma to first boot the application and load code -# before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. -# -# preload_app! - -# The code in the `on_worker_boot` will be called if you are using -# clustered mode by specifying a number of `workers`. After each worker -# process is booted this block will be run, if you are using `preload_app!` -# option you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, Ruby -# cannot share connections between processes. -# -# on_worker_boot do -# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -# end - -# Allow puma to be restarted by `rails restart` command. -plugin :tmp_restart +application_path = '/home/superuser/Application/production/sxrestaurant' +directory application_path +environment 'production' +daemonize true +pidfile "#{application_path}/tmp/pids/puma.pid" +state_path "#{application_path}/tmp/pids/puma.state" +stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +bind 'tcp://0.0.0.0:9292' +workers 2 From 37dd8c9e5af771d121db8e6195a2bfbea26808db Mon Sep 17 00:00:00 2001 From: superuser Date: Thu, 15 Jun 2017 14:07:54 +0630 Subject: [PATCH 4/9] before pull --- app/assets/javascripts/CRM.js | 3 ++- app/assets/javascripts/OQS.js | 1 + config/puma.rb.save | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 config/puma.rb.save diff --git a/app/assets/javascripts/CRM.js b/app/assets/javascripts/CRM.js index ee1c6a41..ff41cfdd 100644 --- a/app/assets/javascripts/CRM.js +++ b/app/assets/javascripts/CRM.js @@ -11,9 +11,10 @@ // about supported directives. // //= require jquery +//= require tether //= require bootstrap //= require jquery_ujs //= require turbolinks //= require cable //= require jquery-ui -//= require bootstrap-datepicker \ No newline at end of file +//= require bootstrap-datepicker diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 3674e235..74ce5eec 100644 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -11,6 +11,7 @@ // about supported directives. // //= require jquery +//= require tether //= require bootstrap //= require jquery_ujs //= require turbolinks diff --git a/config/puma.rb.save b/config/puma.rb.save new file mode 100644 index 00000000..5f82e805 --- /dev/null +++ b/config/puma.rb.save @@ -0,0 +1,9 @@ +lapplication_path = '/home/superuser/Application/production/sxrestaurant' +directory application_path +environment 'production' +daemonize true +pidfile "#{application_path}/tmp/pids/puma.pid" +state_path "#{application_path}/tmp/pids/puma.state" +stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +bind 'tcp://0.0.0.0:9292' +workers 2 From d8a5c2043fc54fbcd4d3be35bda18899184dedc8 Mon Sep 17 00:00:00 2001 From: superuser Date: Thu, 15 Jun 2017 15:06:44 +0630 Subject: [PATCH 5/9] before pull --- config/sidekiq.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/sidekiq.yml b/config/sidekiq.yml index a5c462c3..fa0b1e15 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -1,7 +1,6 @@ ---- :concurrency: 25 -:pidfile: ./tmp/pids/sidekiq.pid -:logfile: ./log/sidekiq.log +:pidfile: /home/superuser/Application/production/sxrestaurant/tmp/pids/sidekiq.pid +:logfile: /home/superuser/Application/production/sxrestaurant/log/sidekiq.log :queues: - default - [high_priority, 2] From 64db775dd310f8758c96eaedb028cb7219b310f6 Mon Sep 17 00:00:00 2001 From: superuser Date: Tue, 20 Jun 2017 16:13:13 +0630 Subject: [PATCH 6/9] edited api/bill_controller --- app/controllers/api/bill_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index 6b1fb225..94b785f5 100644 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -22,6 +22,7 @@ class Api::BillController < Api::ApiController @status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee) end + end From e85f22fb79f2ed5a2bcb5781aa6f840a86e53cd3 Mon Sep 17 00:00:00 2001 From: superuser Date: Tue, 27 Jun 2017 12:11:07 +0630 Subject: [PATCH 7/9] update for bill --- app/controllers/api/bill_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index 0408c858..16ebf256 100644 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -32,7 +32,7 @@ class Api::BillController < Api::ApiController #shop detail shop_details = Shop.find(1) - customer= Customer.where('customer_id=' + @sale_data.customer_id) + customer= Customer.find(@sale_data.customer_id) # get member information member_info = Customer.get_member_account(customer) From 44faf2f56e38d776532b437c541dbfd7a86e68de Mon Sep 17 00:00:00 2001 From: superuser Date: Fri, 30 Jun 2017 14:19:30 +0630 Subject: [PATCH 8/9] before pull --- config/.database.yml.swp | Bin 0 -> 1024 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 config/.database.yml.swp diff --git a/config/.database.yml.swp b/config/.database.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..09f1aac2254ab80602bde572a7cb45dd3e551f06 GIT binary patch literal 1024 zcmYc?$V<%2S1{5u)iY*50$w}}48^4dsYRv5sYOWQ*qCs2x&i*d*c3p;QW8rNlM;(l V^(u37@F*LV8V!Nb5TH{C002=+5nBKN literal 0 HcmV?d00001 From f23bbd69364de1372517f0243ef3bc84d4165a69 Mon Sep 17 00:00:00 2001 From: superuser Date: Fri, 30 Jun 2017 19:33:04 +0630 Subject: [PATCH 9/9] merge with origin master --- app/controllers/api/bill_controller.rb | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index cc9e2f26..a51ce93e 100644 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -24,11 +24,9 @@ class Api::BillController < Api::ApiController @sale = Sale.new @status, @sale_id = @sale.generate_invoice_from_order(params[:order_id], current_login_employee, get_cashier) end -<<<<<<< HEAD - - @sale_data = Sale.find_by_sale_id(@sale_id) - @sale_items = SaleItem.where("sale_id=?",@sale_id) -======= + + #@sale_data = Sale.find_by_sale_id(@sale_id) + #@sale_items = SaleItem.where("sale_id=?",@sale_id) # Not Use for these printed bill cannot give customer # @sale_data = Sale.find_by_sale_id(@sale_id) @@ -45,22 +43,16 @@ class Api::BillController < Api::ApiController # # get printer info # print_settings=PrintSetting.find_by_unique_code(unique_code) ->>>>>>> 18094f5a71174d84305cfefd3a39db8123b65cff # # Calculate Price by accounts # item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items) -<<<<<<< HEAD - customer= Customer.find(@sale_data.customer_id) + #customer= Customer.find(@sale_data.customer_id) # get member information - member_info = Customer.get_member_account(customer) -======= ->>>>>>> 18094f5a71174d84305cfefd3a39db8123b65cff + #member_info = Customer.get_member_account(customer) # printer = Printer::ReceiptPrinter.new(print_settings) # printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details) - - end