From f8164e483c0b20da6e83e2fa734572c4201a8539 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Wed, 18 Apr 2018 14:50:16 +0630 Subject: [PATCH 01/15] update puma production and remove develop --- config/puma.rb | 59 ++++++++------------------------------- config/puma.rb.production | 11 -------- 2 files changed, 11 insertions(+), 59 deletions(-) delete mode 100755 config/puma.rb.production diff --git a/config/puma.rb b/config/puma.rb index c8e0145e..cd3f0829 100755 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,48 +1,11 @@ -# 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="#{File.expand_path("../..", __FILE__)}" +directory application_path +#environment ENV.fetch("RAILS_ENV") { "production" } +environment "production" +pidfile "#{application_path}/tmp/puma/pid" +state_path "#{application_path}/tmp/puma/state" +stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" +port ENV.fetch("PORT") { 62158 } +workers 2 +preload_app! + diff --git a/config/puma.rb.production b/config/puma.rb.production deleted file mode 100755 index cd3f0829..00000000 --- a/config/puma.rb.production +++ /dev/null @@ -1,11 +0,0 @@ -application_path="#{File.expand_path("../..", __FILE__)}" -directory application_path -#environment ENV.fetch("RAILS_ENV") { "production" } -environment "production" -pidfile "#{application_path}/tmp/puma/pid" -state_path "#{application_path}/tmp/puma/state" -stdout_redirect "#{application_path}/log/puma.stdout.log", "#{application_path}/log/puma.stderr.log" -port ENV.fetch("PORT") { 62158 } -workers 2 -preload_app! - From 61e8d6e2b5907489e5ae1d7e755995c1ba128713 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 10:28:31 +0630 Subject: [PATCH 02/15] update shift_sale migration file --- config/secrets.yml | 2 +- db/migrate/20170626191519_create_shift_sales.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/secrets.yml b/config/secrets.yml index 6e8b73d4..84a824ba 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -24,7 +24,7 @@ test: # instead read values from the environment. production: secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: connect.smartsales.asia/api #192.168.1.147:3002/api + sx_provision_url: https://connect.pos-myanmar.com/bensai/api #192.168.1.147:3002/api server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L diff --git a/db/migrate/20170626191519_create_shift_sales.rb b/db/migrate/20170626191519_create_shift_sales.rb index f18a2c1c..bd19a8cf 100755 --- a/db/migrate/20170626191519_create_shift_sales.rb +++ b/db/migrate/20170626191519_create_shift_sales.rb @@ -21,7 +21,7 @@ class CreateShiftSales < ActiveRecord::Migration[5.1] t.integer :dining_count, :default => 0 t.integer :takeaway_count, :default => 0 t.integer :member_count, :default => 0 - t.decimal :total_rounding,, :precision => 10, :scale => 2, :null => false, :default => 0.00 + t.decimal :total_rounding, :precision => 10, :scale => 2, :null => false, :default => 0.00 t.integer :total_receipt, :default => 0 t.decimal :total_void, :default => 0 t.timestamps From 99e000e0003d1a9254b7042cc35573c671c4bc99 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 10:31:02 +0630 Subject: [PATCH 03/15] update shift_sale migration file --- config/secrets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/secrets.yml b/config/secrets.yml index 84a824ba..b0d7c5c8 100755 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -24,7 +24,7 @@ test: # instead read values from the environment. production: secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22 - sx_provision_url: https://connect.pos-myanmar.com/bensai/api #192.168.1.147:3002/api + sx_provision_url: https://connect.pos-myanmar.com/api #192.168.1.147:3002/api server_mode: application cipher_type: AES-256-CBC sx_key: Wh@t1$C2L From 1913ada8e56e07ab8c9e557fa9dfe02a499625a7 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 15:23:08 +0630 Subject: [PATCH 04/15] update --- app/views/origami/paymal/index.html.erb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/origami/paymal/index.html.erb b/app/views/origami/paymal/index.html.erb index 6818fbad..5594eb13 100644 --- a/app/views/origami/paymal/index.html.erb +++ b/app/views/origami/paymal/index.html.erb @@ -328,7 +328,6 @@ var payment_amount = parseFloat($("#used_amount").text()); setTimeout(function(){ code=getQRCode(); - alert(code) if(sale_id != 0 && code != ""){ $.ajax({ type: "POST", @@ -345,7 +344,6 @@ url: "<%=origami_payment_paymal_path%>", data: {payment_amount:payment_amount,membership_id:0,sale_id:sale_id,transaction_ref:data.transaction_ref,account_no:code}, success: function(result){ - alert(result) if(result.status == true){ swal({ title: "Information!", From f638837f81d380a707aaed71a39035e61852cd41 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 15:48:39 +0630 Subject: [PATCH 05/15] update dinga and paymal view for tabcap --- app/views/origami/dinga/index.html.erb | 11 +++++++++-- app/views/origami/paymal/index.html.erb | 7 +++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/views/origami/dinga/index.html.erb b/app/views/origami/dinga/index.html.erb index 1a7bd798..4c4bff3d 100644 --- a/app/views/origami/dinga/index.html.erb +++ b/app/views/origami/dinga/index.html.erb @@ -107,6 +107,12 @@ +
+

Card Tap

+
+ +
+
@@ -118,7 +124,7 @@ From 8d3946fede5b108c0401b341c68656547c7dec68 Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 19 Apr 2018 15:49:38 +0630 Subject: [PATCH 06/15] update dinga and paymal view for tabcap --- app/views/origami/dinga/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/origami/dinga/index.html.erb b/app/views/origami/dinga/index.html.erb index 4c4bff3d..70b572db 100644 --- a/app/views/origami/dinga/index.html.erb +++ b/app/views/origami/dinga/index.html.erb @@ -124,7 +124,7 @@