m-icol 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b782bf4ed7e10d97ce9549bea17279d928f02884
4
+ data.tar.gz: e513b8d7df1e302ef3beb27036ba4276a80622c8
5
+ SHA512:
6
+ metadata.gz: 1be393586271cf68131f20f6449e71b310193dbfe354b2d29dd4c9ca43b3672fbf6b969ae86c178f89c13819dd85628ca1f32cd011e85103e8df6eabf29f69d2
7
+ data.tar.gz: 43ebab67c28a0c06a5142c239d25cd9a67292bc32ab04d1e31ea68f95aa875208403a153c651b5310050e3e08903c56baaac76a731e0563f9692830c48b301f0
@@ -0,0 +1,20 @@
1
+ Copyright 2017 divyajayan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ = Icol
2
+
3
+ This project rocks and uses MIT-LICENSE.
@@ -0,0 +1,26 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'M::Icol'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+
21
+ load 'rails/tasks/statistics.rake'
22
+
23
+
24
+
25
+ Bundler::GemHelper.install_tasks
26
+
@@ -0,0 +1,13 @@
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/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
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
+ */
@@ -0,0 +1,21 @@
1
+ module M
2
+ module Icol
3
+ class ApplicationController < ::ApplicationController
4
+ include Pundit
5
+ protect_from_forgery
6
+ authorize_resource
7
+
8
+ before_filter :authenticate_user!
9
+ before_filter :block_inactive_user!
10
+
11
+ # rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
12
+ #
13
+ # private
14
+ #
15
+ # def user_not_authorized
16
+ # flash[:alert] = "You are not authorized to perform this action."
17
+ # redirect_to(request.referrer || root_path)
18
+ # end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,76 @@
1
+ module M
2
+ module Icol
3
+ class CustomersController < ApplicationController
4
+ respond_to :json
5
+
6
+ include Approval2::ControllerAdditions
7
+
8
+ def new
9
+ @customer = Customer.new
10
+ end
11
+
12
+ def create
13
+ @customer = Customer.new(params[:customer])
14
+ if !@customer.valid?
15
+ render "new"
16
+ else
17
+ @customer.created_by = current_user.id
18
+ @customer.save!
19
+ flash[:alert] = 'Customer successfully created and is pending for approval'
20
+ redirect_to @customer
21
+ end
22
+ end
23
+
24
+ def update
25
+ @customer = Customer.unscoped.find_by_id(params[:id])
26
+ @customer.attributes = params[:customer]
27
+ if !@customer.valid?
28
+ render "edit"
29
+ else
30
+ @customer.updated_by = current_user.id
31
+ @customer.save!
32
+ flash[:alert] = 'Customer successfully modified successfully'
33
+ redirect_to @customer
34
+ end
35
+ rescue ActiveRecord::StaleObjectError
36
+ @customer.reload
37
+ flash[:alert] = 'Someone edited the customer the same time you did. Please re-apply your changes to the customer.'
38
+ render "edit"
39
+ end
40
+
41
+ def show
42
+ @customer = Customer.unscoped.find_by_id(params[:id])
43
+ end
44
+
45
+ def index
46
+ customers = (params[:approval_status].present? and params[:approval_status] == 'U') ? Customer.unscoped.where("approval_status =?",'U').order("id desc") : Customer.order("id desc")
47
+ @customers_count = customers.count
48
+ @customers = customers.paginate(:per_page => 10, :page => params[:page]) rescue []
49
+ end
50
+
51
+ def audit_logs
52
+ @record = Customer.unscoped.find(params[:id]) rescue nil
53
+ @audit = @record.audits[params[:version_id].to_i] rescue nil
54
+ end
55
+
56
+ def approve
57
+ redirect_to unapproved_records_path(group_name: 'icol')
58
+ end
59
+
60
+ private
61
+
62
+ def customer_params
63
+ params.require(:customer).permit(:customer_code, :app_code, :settings_cnt,
64
+ :lock_version, :last_action, :updated_by, :notify_url, :validate_url,
65
+ :http_username, :http_password, :approval_status, :approved_version,
66
+ :approved_id,
67
+ :setting1_name, :setting1_type, :setting1_value,
68
+ :setting2_name, :setting2_type, :setting2_value,
69
+ :setting3_name, :setting3_type, :setting3_value,
70
+ :setting4_name, :setting4_type, :setting4_value,
71
+ :setting5_name, :setting5_type, :setting5_value
72
+ )
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,9 @@
1
+ module M
2
+ module Icol
3
+ module ApplicationHelper
4
+ def l(object, options = {})
5
+ super(object, options) if object
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ module M
2
+ module Icol
3
+ class Customer < ActiveRecord::Base
4
+ self.table_name = 'icol_customers'
5
+ include Approval2::ModelAdditions
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Icol</title>
5
+ <%= stylesheet_link_tag "icol/application", media: "all" %>
6
+ <%= javascript_include_tag "icol/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,15 @@
1
+ - can = can? :approve, @record
2
+ - approve_flag = @record.enable_approve_button?
3
+ %a.btn{"data-toggle" => "modal", :href => "#{!(can && approve_flag) ? '#' : '#myModalApprove'}", :role => "button", :class => "btn btn-primary #{(can && approve_flag) ? '' : 'disabled'}"} Approve
4
+ .modal.hide.fade{"id" => "myModalApprove", "aria-hidden" => "true", "aria-labelledby" => " myModalLabel", :role => "dialog", :tabindex => "-1"}
5
+ .modal-header
6
+ %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
7
+ %h3#myModalLabel Approve
8
+ #error_message{:style => 'color:red'}
9
+ .modal-body
10
+ = simple_form_for @record, :url => {:action => 'approve'}, :method => :put, :html=>{:id=>"transition"} do |ef|
11
+ = ef.input :updated_by, :as => :hidden, :input_html => {:value => current_user.id}
12
+ = submit_tag "Approve", :class=>"btn btn-primary transition_button", :id => "transition_button"
13
+ %p{:style => 'color:green;'}
14
+ = created_or_edited_by(@record)
15
+ %br
@@ -0,0 +1,62 @@
1
+ = simple_form_for @customer, :html => {:class=>'form-horizontal', :autocomplete=>"off", :id => "customer_form"} do |f|
2
+ .control-group
3
+ - if @customer.errors.any?
4
+ #msg-error
5
+ - @customer.errors.full_messages.each do |msg|
6
+ = msg
7
+ %br
8
+ .form-main
9
+ = f.hidden_field :lock_version
10
+ = f.hidden_field :approved_id
11
+ = f.hidden_field :approved_version
12
+ = f.hidden_field :settings_cnt
13
+ .control-group
14
+ = f.label :app_code, "*App Code", :class => 'control-label'
15
+ = f.text_field :app_code, maxlength: 20
16
+ .control-group
17
+ = f.label :customer_code, "*Customer Code", :class => 'control-label'
18
+ = f.text_field :customer_code, maxlength: 20
19
+ .control-group
20
+ = f.label :validate_url, "Validate URL", :class => 'control-label'
21
+ = f.text_field :validate_url, maxlength: 100
22
+ .control-group
23
+ = f.label :notify_url, "Notify URL", :class => 'control-label'
24
+ = f.text_field :notify_url, maxlength: 100
25
+ .control-group
26
+ = f.label :http_username, "HTTP Username", :class => 'control-label'
27
+ = f.text_field :http_username, maxlength: 50
28
+ .control-group
29
+ = f.label :http_password, "HTTP Password", :class => 'control-label'
30
+ = f.password_field :http_password, :value => f.object.http_password, maxlength: 50
31
+ / - if ['edit','update','create'].include?(action_name) && !EcolApp::STD_APP_CODES.include?(@customer.app_code) && @customer.settings_cnt > 0
32
+ / .control-group
33
+ / - (1..@customer.settings_cnt).each do |i|
34
+ / = f.label @customer.send("setting#{i}_name")
35
+ / = f.send("#{@customer["setting#{i}"]["setting#{i}_type"] || 'text'}_field", "setting#{i}_value")
36
+ / = f.hidden_field "setting#{i}_name", value: @customer.send("setting#{i}_name")
37
+ / = f.hidden_field "setting#{i}_type", value: @customer.send("setting#{i}_type")
38
+ / %br
39
+ / - elsif (['edit','update'].include?(action_name) && EcolApp::STD_APP_CODES.include?(@customer.app_code)) || ['new','create'].include?(action_name)
40
+ / .control-group
41
+ / %table.table.datatable
42
+ / %thead
43
+ / %tr
44
+ / %th Setting
45
+ / %th Name
46
+ / %th Type
47
+ / %th Value
48
+ / %tbody
49
+ / - (1..5).each do |i|
50
+ / %tr
51
+ / %td
52
+ / = i
53
+ / %td
54
+ / = f.text_field "setting#{i}_name"
55
+ / %td
56
+ / = f.select "setting#{i}_type", options_for_select(EcolApp::SETTING_TYPES, @customer.send("setting#{i}_type"))
57
+ / %td
58
+ / = f.text_field "setting#{i}_value"
59
+ .form-actions
60
+ - (f.object.new_record? and f.object.app_code.nil?) ? label_name = "Create" : label_name = "Update"
61
+ = f.button "submit" ,:class=>"btn btn-primary", :id => 'submit_customer', :value => label_name + ' Ecol App'
62
+ = link_to :Cancel,'/customers', :name => 'cancel', :class=>"cancel btn"
@@ -0,0 +1,3 @@
1
+ %h1 Editing I-Collect Customer
2
+
3
+ = render 'form'
@@ -0,0 +1,35 @@
1
+ %br
2
+ = link_to 'New I-Collect Customer', new_customer_path
3
+ %br
4
+ %br
5
+ %h1 Listing I-Collect Customers
6
+ %br
7
+ %br
8
+ %table.table.table-bordered.table-striped.table-hover
9
+ .thead
10
+ %th{:style=>'text-align:left; background-color: lightblue;'}
11
+ %th{:style=>'text-align:left; background-color: lightblue;'}
12
+ %th{:style=>'text-align:left; background-color: lightblue;'}
13
+ App Code
14
+ %th{:style=>'text-align:left; background-color: lightblue;'}
15
+ Customer Code
16
+ %th{:style=>'text-align:left; background-color: lightblue;'}
17
+ Validate URL
18
+ %th{:style=>'text-align:left; background-color: lightblue;'}
19
+ Notify URL
20
+
21
+ .tbody
22
+ - @customers.each do |customer|
23
+ %tr
24
+ %td{:style=>'text-align:left;'}
25
+ = link_to 'Show', customer
26
+ %td{:style=>'text-align:left;'}
27
+ = link_to 'Edit', edit_customer_path(customer)
28
+ %td{:style=>'text-align:left;'}
29
+ = customer.app_code
30
+ %td{:style=>'text-align:left;'}
31
+ = customer.customer_code
32
+ %td{:style=>'text-align:left;'}
33
+ = customer.validate_url
34
+ %td{:style=>'text-align:left;'}
35
+ = customer.notify_url
@@ -0,0 +1,3 @@
1
+ %h1 New I-Collect Customer
2
+
3
+ = render 'form'
@@ -0,0 +1,76 @@
1
+ .form-horizontal.show_form
2
+ .form-main-with-color{:style=>'background-color: #F1F2F8;'}
3
+ #form-details
4
+ %h3 I -Collect App Details
5
+ %br
6
+ / %p{:style => 'text-align:left; padding-left:6px; padding-bottom:17px'}
7
+ / - can = can? :edit, @customer
8
+ / %a.btn{:href => "#{!(can) ? '#' : '/customers/' + @customer.id.to_s + '/edit'}", :role => "button", :class => "btn btn-primary #{(can) ? '' : 'disabled'}"} Edit
9
+ / = render 'approve', :@record => @customer
10
+ %table.table.no-border{:style=>"table-layout: fixed; width: 100%;"}
11
+ - if !@customer.nil?
12
+ / %tr
13
+ / %td.label Version
14
+ / %td.value
15
+ / = link_to "#{audit_count(@customer)}", :controller => :customers, :action => :audit_logs, :version_id => audit_count(@customer), :id => @customer.id
16
+ %tr
17
+ %td.label App Code
18
+ %td.value
19
+ = @customer.app_code
20
+ %td#msg-error
21
+ = error_message_for(@customer, :app_code, :prepend_text => "")
22
+ %tr
23
+ %td.label Customer Code
24
+ %td.value
25
+ = @customer.customer_code
26
+ %td#msg-error
27
+ = error_message_for(@customer, :customer_code, :prepend_text => "")
28
+ %tr
29
+ %td.label Validate URL
30
+ %td.value
31
+ = @customer.validate_url
32
+ %td#msg-error
33
+ = error_message_for(@customer, :validate_url, :prepend_text => "")
34
+ %tr
35
+ %td.label Notify URL
36
+ %td.value
37
+ = @customer.notify_url
38
+ %td#msg-error
39
+ = error_message_for(@customer, :notify_url, :prepend_text => "")
40
+ %tr
41
+ %td.label Username
42
+ %td.value
43
+ = @customer.http_username
44
+ %td#msg-error
45
+ = error_message_for(@customer, :http_username, :prepend_text => "")
46
+ %tr
47
+ %td.label E-Collect UDTable Records
48
+ %td.value
49
+ = link_to_unless (@customer.udfs_cnt == 0), @customer.customer_udtables.count, udtables_path(app_code: @customer.app_code)
50
+ %td
51
+ %tr
52
+ %td.label Created At
53
+ %td.value
54
+ = @customer.created_at.try(:strftime, "%d/%m/%Y %I:%M%p")
55
+ %td#msg-error
56
+ = error_message_for(@customer, :created_at, :prepend_text => "")
57
+ %tr
58
+ %td.label Updated At
59
+ %td.value
60
+ = @customer.updated_at.try(:strftime, "%d/%m/%Y %I:%M%p")
61
+ %td#msg-error
62
+ = error_message_for(@customer, :updated_at, :prepend_text => "")
63
+ %tr
64
+ - if @customer.settings_cnt.present? and @customer.settings_cnt > 0
65
+ %table.table.datatable{style: 'width: 50%'}
66
+ %thead
67
+ %tr
68
+ %th Setting Name
69
+ %th Setting Value
70
+ %tbody
71
+ - (1..@customer.settings_cnt).each do |i|
72
+ %tr
73
+ %td
74
+ = @customer.send("setting#{i}_name")
75
+ %td
76
+ = @customer.send("setting#{i}_value")
@@ -0,0 +1,12 @@
1
+ M::Icol::Engine.routes.draw do
2
+ resources :customers, except: :index do
3
+ collection do
4
+ get :index
5
+ put :index
6
+ end
7
+ member do
8
+ get 'audit_logs'
9
+ put 'approve'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,31 @@
1
+ class CreateIcolCustomers < ActiveRecord::Migration
2
+ def change
3
+ create_table :icol_customers, {:sequence_start_value => '1 cache 20 order increment by 1'} do |t|
4
+ t.string :customer_code, limit: 10, null: false, comment: 'the unique code for the customer'
5
+ t.string :app_code, limit: 50, comment: 'the app_code for the customer'
6
+ t.string :notify_url, limit: 100, comment: 'the notify_url for the customer'
7
+ t.string :validate_url, limit: 100, comment: 'the validate_url for the customer'
8
+ t.string :http_username, limit: 100, comment: 'the http_username for the customer'
9
+ t.string :http_password, limit: 255, comment: 'the http_password for the customer'
10
+ t.integer :max_retries_for_notify, comment: 'the maximum no. of retries for notification for the customer'
11
+ t.integer :retry_notify_in_mins, comment: 'the interval in minutes for retrying notification for the customer'
12
+ t.integer :settings_cnt, comment: 'the count of settings for the customer'
13
+ t.string :setting1, comment: 'the setting 1 for the customer'
14
+ t.string :setting2, comment: 'the setting 2 for the customer'
15
+ t.string :setting3, comment: 'the setting 3 for the customer'
16
+ t.string :setting4, comment: 'the setting 4 for the customer'
17
+ t.string :setting5, comment: 'the setting 5 for the customer'
18
+ t.datetime :created_at, null: false, comment: "the timestamp when the record was created"
19
+ t.datetime :updated_at, null: false, comment: "the timestamp when the record was last updated"
20
+ t.string :created_by, limit: 20, comment: "the person who creates the record"
21
+ t.string :updated_by, limit: 20, comment: "the person who updates the record"
22
+ t.integer :lock_version, null: false, default: 0, comment: "the version number of the record, every update increments this by 1"
23
+ t.string :last_action, limit: 1, default: 'C', null: false, comment: "the last action (create, update) that was performed on the record"
24
+ t.string :approval_status, limit: 1, default: 'U', null: false, comment: "the indicator to denote whether this record is pending approval or is approved"
25
+ t.integer :approved_version, comment: "the version number of the record, at the time it was approved"
26
+ t.integer :approved_id, comment: "the id of the record that is being updated"
27
+
28
+ t.index([:customer_code, :approval_status], unique: true, name: 'icol_customers_01')
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,28 @@
1
+ class CreateIcolValidateSteps < ActiveRecord::Migration
2
+ def change
3
+ create_table :icol_validate_steps do |t|
4
+ t.string :step_name, limit: 100, null: false, comment: 'the english name of the step'
5
+ t.string :status_code, limit: 25, null: false, comment: 'the status of this attempt of the step'
6
+
7
+ t.datetime :req_timestamp, null: false, comment: 'the SYSDATE when the request was received'
8
+ t.datetime :rep_timestamp, null: false, comment: 'the SYSDATE when the request was sent'
9
+
10
+ t.datetime :up_req_timestamp, null: false, comment: 'the SYSDATE when the request built by the system was sent'
11
+ t.string :up_host, null: false, limit: 100, comment: 'the up host for this request'
12
+ t.string :up_req_uri, null: false, limit: 100, comment: 'the up request uri for this request'
13
+ t.string :up_req_header, limit: 2000, comment: 'the up request header for this request'
14
+ t.datetime :up_rep_timestamp, null: false, comment: 'the SYSDATE when the reply was received by the system'
15
+ t.string :up_rep_header, limit: 2000, comment: 'the up request header for this request'
16
+
17
+ t.string :fault_code, limit: 50, comment: 'the code that identifies the exception, if an exception occured in the ESB'
18
+ t.string :fault_subcode, limit: 50, comment: 'the error code that the third party will return'
19
+ t.string :fault_reason, limit: 1000, comment: 'the english reason of the exception, if an exception occurred in the ESB'
20
+
21
+ t.text :up_req_bitstream, null: false, comment: 'the full request payload as received from the client'
22
+ t.text :up_rep_bitstream, null: false, comment: 'the full request payload as received from the client'
23
+ t.text :req_bitstream, comment: 'the full request payload as received from the client'
24
+ t.text :rep_bitstream, comment: 'the full reply payload as sent to the client'
25
+ t.text :fault_bitstream, comment: 'the complete exception list/stack trace of an exception that occured in the ESB'
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,10 @@
1
+ class CreateIcolNotifications < ActiveRecord::Migration
2
+ def change
3
+ create_table :icol_notifications do |t|
4
+ t.string :utr, limit: 50, null: false, comment: 'the UTR for this notification request'
5
+ t.string :customer_code, limit: 50, null: false, comment: 'the customer_code for this request'
6
+ t.string :status_code, limit: 50, null: false, comment: 'the status of this transaction'
7
+ t.index([:utr], unique: true, name: "icol_notifications_01")
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,24 @@
1
+ class CreateIcolNotifySteps < ActiveRecord::Migration
2
+ def change
3
+ create_table :icol_notify_steps do |t|
4
+ t.integer :icol_notification_id, null: false, comment: 'the id of the associated icol_notification record'
5
+ t.string :step_name, limit: 100, null: false, comment: 'the english name of the step'
6
+ t.integer :attempt_no, null: false , comment: 'the attempt number of the request, failed requests can be retried'
7
+ t.string :status_code, limit: 25, null: false, comment: 'the status of this attempt of the step'
8
+ t.datetime :req_timestamp, null: false, comment: 'the SYSDATE when the request was sent to the service provider'
9
+ t.string :remote_host, null: false, limit: 100, comment: 'the remiote host for this request'
10
+ t.string :req_uri, null: false, limit: 100, comment: 'the uri for this request'
11
+ t.string :req_header, limit: 255, comment: 'the header which were passed with the request'
12
+ t.datetime :rep_timestamp, null: false, comment: 'the SYSDATE when the reply was sent to the client'
13
+ t.string :rep_header, limit: 255, comment: 'the header which were passed with the reply'
14
+ t.string :fault_code, limit: 50, comment: 'the code that identifies the exception, if an exception occured in the ESB'
15
+ t.string :fault_subcode, limit: 50, comment: 'the error code that the third party will return'
16
+ t.string :fault_reason, limit: 1000, comment: 'the english reason of the exception, if an exception occurred in the ESB'
17
+
18
+ t.text :req_bitstream, comment: 'the full request payload as received from the client'
19
+ t.text :rep_bitstream, comment: 'the full reply payload as sent to the client'
20
+ t.text :fault_bitstream, comment: 'the complete exception list/stack trace of an exception that occured in the ESB'
21
+ t.index([:icol_notification_id, :step_name, :attempt_no], unique: true, name: "icol_notify_steps_01")
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,8 @@
1
+ class CreateIcolPendingNotifications < ActiveRecord::Migration
2
+ def change
3
+ create_table :icol_pending_notifications do |t|
4
+ t.string :app_uuid, null: false, comment: 'the uuid of the app'
5
+ t.datetime :created_at, null: false, comment: 'the timestamp when the record was created'
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ require "m/icol/engine"
2
+
3
+ module M
4
+ module Icol
5
+ end
6
+ end
@@ -0,0 +1,23 @@
1
+ module M
2
+ module Icol
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Icol
5
+
6
+ config.generators do |g|
7
+ g.test_framework :rspec, :fixture => false
8
+ g.fixture_replacement :factory_girl, :dir => 'spec/factories'
9
+ g.template_engine :haml
10
+ g.assets false
11
+ g.helper false
12
+ end
13
+
14
+ initializer :append_migrations do |app|
15
+ unless app.root.to_s.match "#{root}/"
16
+ config.paths['db/migrate'].expanded.each do |expanded_path|
17
+ app.config.paths['db/migrate'] << expanded_path
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ module M
2
+ module Icol
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :icol do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,141 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: m-icol
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - divyajayan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 4.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 4.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: haml-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pundit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: approval2
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: I-Collect
84
+ email:
85
+ - divya.jayan@quantiguous.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - MIT-LICENSE
91
+ - README.rdoc
92
+ - Rakefile
93
+ - app/assets/javascripts/m/icol/application.js
94
+ - app/assets/stylesheets/m/icol/application.css
95
+ - app/controllers/m/icol/application_controller.rb
96
+ - app/controllers/m/icol/customers_controller.rb
97
+ - app/helpers/m/icol/application_helper.rb
98
+ - app/models/m/icol/customer.rb
99
+ - app/policies/m/icol/application_policy.rb
100
+ - app/views/layouts/m/icol/application.html.erb
101
+ - app/views/m/icol/customers/_approve.html.haml
102
+ - app/views/m/icol/customers/_form.html.haml
103
+ - app/views/m/icol/customers/edit.html.haml
104
+ - app/views/m/icol/customers/index.html.haml
105
+ - app/views/m/icol/customers/new.html.haml
106
+ - app/views/m/icol/customers/show.html.haml
107
+ - config/routes.rb
108
+ - db/migrate/20170804113629_create_icol_customers.rb
109
+ - db/migrate/20170807052117_create_icol_validate_steps.rb
110
+ - db/migrate/20170807092815_create_icol_notifications.rb
111
+ - db/migrate/20170807094555_create_icol_notify_steps.rb
112
+ - db/migrate/20170807095935_create_icol_pending_notifications.rb
113
+ - lib/m/icol.rb
114
+ - lib/m/icol/engine.rb
115
+ - lib/m/icol/version.rb
116
+ - lib/tasks/m/icol_tasks.rake
117
+ homepage: https://apibanking.com
118
+ licenses:
119
+ - MIT
120
+ metadata: {}
121
+ post_install_message:
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubyforge_project:
137
+ rubygems_version: 2.4.6
138
+ signing_key:
139
+ specification_version: 4
140
+ summary: I-Collect
141
+ test_files: []