wordjelly-auth 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +35 -0
- data/app/assets/images/auth/activity.jpg +0 -0
- data/app/assets/images/auth/facebook.svg +1 -0
- data/app/assets/images/auth/google_oauth2.svg +1 -0
- data/app/assets/images/auth/js_pic3.jpg +0 -0
- data/app/assets/images/auth/profile.jpg +0 -0
- data/app/assets/javascripts/auth/admin_create_users.js +2 -0
- data/app/assets/javascripts/auth/application.js +20 -0
- data/app/assets/javascripts/auth/auth_dependencies.js +12 -0
- data/app/assets/javascripts/auth/auth_modals_and_navbar.js +218 -0
- data/app/assets/javascripts/auth/clients.js +2 -0
- data/app/assets/javascripts/auth/search.js +2 -0
- data/app/assets/javascripts/auth/shopping/discounts.js +2 -0
- data/app/assets/javascripts/auth/users/profiles.js +188 -0
- data/app/assets/stylesheets/auth/admin_create_users.css +4 -0
- data/app/assets/stylesheets/auth/application.scss +14 -0
- data/app/assets/stylesheets/auth/auth_default_css.scss +13 -0
- data/app/assets/stylesheets/auth/common-styles.scss +579 -0
- data/app/assets/stylesheets/auth/overrides.scss +26 -0
- data/app/assets/stylesheets/auth/search.css +4 -0
- data/app/assets/stylesheets/auth/shopping/discounts.css +4 -0
- data/app/assets/stylesheets/auth/users/profiles.scss +40 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/auth/admin_create_users_controller.rb +89 -0
- data/app/controllers/auth/application_controller.rb +97 -0
- data/app/controllers/auth/clients_controller.rb +105 -0
- data/app/controllers/auth/concerns/activity_controller_concern.rb +32 -0
- data/app/controllers/auth/concerns/devise_concern.rb +193 -0
- data/app/controllers/auth/concerns/omni_concern.rb +310 -0
- data/app/controllers/auth/concerns/otp_concern.rb +251 -0
- data/app/controllers/auth/concerns/shopping/cart_controller_concern.rb +105 -0
- data/app/controllers/auth/concerns/shopping/cart_item_controller_concern.rb +150 -0
- data/app/controllers/auth/concerns/shopping/discount_controller_concern.rb +97 -0
- data/app/controllers/auth/concerns/shopping/pay_u_money_controller_concern.rb +38 -0
- data/app/controllers/auth/concerns/shopping/payment_controller_concern.rb +101 -0
- data/app/controllers/auth/concerns/shopping/product_controller_concern.rb +68 -0
- data/app/controllers/auth/concerns/token_concern.rb +187 -0
- data/app/controllers/auth/confirmations_controller.rb +3 -0
- data/app/controllers/auth/mailgun_controller.rb +8 -0
- data/app/controllers/auth/omniauth_callbacks_controller.rb +6 -0
- data/app/controllers/auth/passwords_controller.rb +4 -0
- data/app/controllers/auth/profiles_controller.rb +156 -0
- data/app/controllers/auth/registrations_controller.rb +99 -0
- data/app/controllers/auth/search_controller.rb +61 -0
- data/app/controllers/auth/sessions_controller.rb +20 -0
- data/app/controllers/auth/shopping/cart_items_controller.rb +14 -0
- data/app/controllers/auth/shopping/carts_controller.rb +13 -0
- data/app/controllers/auth/shopping/discounts_controller.rb +19 -0
- data/app/controllers/auth/shopping/payments_controller.rb +13 -0
- data/app/controllers/auth/shopping/products_controller.rb +17 -0
- data/app/controllers/auth/shopping/shopping_controller.rb +86 -0
- data/app/controllers/auth/unlocks_controller.rb +3 -0
- data/app/controllers/auth/webhooks_controller.rb +3 -0
- data/app/helpers/auth/admin_create_users_helper.rb +2 -0
- data/app/helpers/auth/application_helper.rb +136 -0
- data/app/helpers/auth/clients_helper.rb +4 -0
- data/app/helpers/auth/resource_helper.rb +10 -0
- data/app/helpers/auth/search_helper.rb +2 -0
- data/app/helpers/auth/shopping/cart_items/cart_items_helper.rb +29 -0
- data/app/helpers/auth/shopping/carts/carts_helper.rb +25 -0
- data/app/helpers/auth/shopping/discounts/discounts_helper.rb +39 -0
- data/app/helpers/auth/shopping/payments/pay_u_money_helper.rb +56 -0
- data/app/helpers/auth/shopping/payments/payments_helper.rb +54 -0
- data/app/helpers/auth/shopping/products/products_helper.rb +52 -0
- data/app/helpers/auth/shopping/shopping_helper.rb +3 -0
- data/app/helpers/auth/users/profiles_helper.rb +12 -0
- data/app/jobs/otp_job.rb +92 -0
- data/app/mailers/application_mailer.rb +4 -0
- data/app/mailers/auth/notifier.rb +9 -0
- data/app/models/auth/admin_create_user.rb +3 -0
- data/app/models/auth/client.rb +52 -0
- data/app/models/auth/concerns/activity_concern.rb +112 -0
- data/app/models/auth/concerns/chief_model_concern.rb +73 -0
- data/app/models/auth/concerns/es_concern.rb +21 -0
- data/app/models/auth/concerns/notification_concern.rb +232 -0
- data/app/models/auth/concerns/notification_response_concern.rb +71 -0
- data/app/models/auth/concerns/owner_concern.rb +81 -0
- data/app/models/auth/concerns/shopping/cart_concern.rb +329 -0
- data/app/models/auth/concerns/shopping/cart_item_concern.rb +437 -0
- data/app/models/auth/concerns/shopping/discount_concern.rb +482 -0
- data/app/models/auth/concerns/shopping/discount_flow.txt +11 -0
- data/app/models/auth/concerns/shopping/pay_u_money_concern.rb +184 -0
- data/app/models/auth/concerns/shopping/payment_concern.rb +613 -0
- data/app/models/auth/concerns/shopping/product_concern.rb +102 -0
- data/app/models/auth/concerns/sms_otp_concern.rb +68 -0
- data/app/models/auth/concerns/user_concern.rb +788 -0
- data/app/models/auth/identity.rb +23 -0
- data/app/models/auth/shopping/cart.rb +3 -0
- data/app/models/auth/shopping/cart_item.rb +6 -0
- data/app/models/auth/shopping/cart_item_payment_result.rb +7 -0
- data/app/models/auth/shopping/discount.rb +4 -0
- data/app/models/auth/shopping/payment.rb +5 -0
- data/app/models/auth/shopping/product.rb +5 -0
- data/app/models/auth/user.rb +3 -0
- data/app/views/auth/admin_create_users/_admin_actions.html.erb +46 -0
- data/app/views/auth/admin_create_users/_form.html.erb +19 -0
- data/app/views/auth/admin_create_users/edit.html.erb +6 -0
- data/app/views/auth/admin_create_users/index.html.erb +25 -0
- data/app/views/auth/admin_create_users/new.html.erb +5 -0
- data/app/views/auth/admin_create_users/show.html.erb +8 -0
- data/app/views/auth/clients/_form.html.erb +41 -0
- data/app/views/auth/clients/edit.html.erb +6 -0
- data/app/views/auth/clients/index.html.erb +33 -0
- data/app/views/auth/clients/new.html.erb +5 -0
- data/app/views/auth/clients/show.html.erb +21 -0
- data/app/views/auth/confirmations/_enter_otp.html.erb +27 -0
- data/app/views/auth/confirmations/_get_otp_status.html.erb +25 -0
- data/app/views/auth/confirmations/_new_otp_input.js.erb +11 -0
- data/app/views/auth/confirmations/_resend_otp.js.erb +8 -0
- data/app/views/auth/confirmations/_resend_sms_otp.html.erb +18 -0
- data/app/views/auth/confirmations/_verify_otp.js.erb +64 -0
- data/app/views/auth/confirmations/create.js.erb +8 -0
- data/app/views/auth/confirmations/enter_otp.html.erb +7 -0
- data/app/views/auth/confirmations/get_otp_status.html.erb +3 -0
- data/app/views/auth/confirmations/new.html.erb +1 -0
- data/app/views/auth/confirmations/new.js.erb +16 -0
- data/app/views/auth/confirmations/otp_status_result.html.erb +20 -0
- data/app/views/auth/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/auth/mailer/password_change.html.erb +3 -0
- data/app/views/auth/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/auth/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/auth/modals/_ajax_error_modal.html.erb +3 -0
- data/app/views/auth/modals/_ajax_error_modal_content.html.erb +0 -0
- data/app/views/auth/modals/_edit_account_content.html.erb +68 -0
- data/app/views/auth/modals/_edit_account_success_content.html.erb +5 -0
- data/app/views/auth/modals/_error_notification.html.erb +8 -0
- data/app/views/auth/modals/_forgot_password_content.html.erb +18 -0
- data/app/views/auth/modals/_forgot_password_success_content.html.erb +8 -0
- data/app/views/auth/modals/_login_default_content.html.erb +3 -0
- data/app/views/auth/modals/_login_forms.html.erb +13 -0
- data/app/views/auth/modals/_login_navigation_options.html.erb +12 -0
- data/app/views/auth/modals/_new_otp_input.html.erb +28 -0
- data/app/views/auth/modals/_oauth_and_submit.html.erb +21 -0
- data/app/views/auth/modals/_recaptcha_tags.html.erb +4 -0
- data/app/views/auth/modals/_resend_confirmation_content.html.erb +17 -0
- data/app/views/auth/modals/_resend_confirmation_success_content.html.erb +8 -0
- data/app/views/auth/modals/_resend_otp.html.erb +23 -0
- data/app/views/auth/modals/_resource_errors.js.erb +24 -0
- data/app/views/auth/modals/_sign_in_inputs.html.erb +10 -0
- data/app/views/auth/modals/_sign_in_needed_modal.html.erb +3 -0
- data/app/views/auth/modals/_sign_in_success_content.html.erb +5 -0
- data/app/views/auth/modals/_sign_up_inputs.html.erb +9 -0
- data/app/views/auth/modals/_sign_up_success_content.html.erb +1 -0
- data/app/views/auth/modals/_sign_up_success_inactive_content.html.erb +2 -0
- data/app/views/auth/modals/_unlock_content.html.erb +17 -0
- data/app/views/auth/modals/_verify_otp.html.erb +1 -0
- data/app/views/auth/modals/base_modal/_base.html.erb +25 -0
- data/app/views/auth/modals/login.js.erb +120 -0
- data/app/views/auth/modals/unlock_success_content.html.erb +8 -0
- data/app/views/auth/notifier/_email.html.erb +3 -0
- data/app/views/auth/notifier/notification.html.erb +2 -0
- data/app/views/auth/notifier/notification.text.erb +1 -0
- data/app/views/auth/omniauth_callbacks/failure.html.erb +4 -0
- data/app/views/auth/passwords/create.js.erb +12 -0
- data/app/views/auth/passwords/edit.html.erb +25 -0
- data/app/views/auth/passwords/new.html.erb +16 -0
- data/app/views/auth/passwords/new.js.erb +19 -0
- data/app/views/auth/profiles/_proxy_resource.html.erb +5 -0
- data/app/views/auth/profiles/set_proxy_resource.js.erb +1 -0
- data/app/views/auth/profiles/show.html.erb +8 -0
- data/app/views/auth/registrations/create.js.erb +40 -0
- data/app/views/auth/registrations/edit.html.erb +2 -0
- data/app/views/auth/registrations/edit.js.erb +5 -0
- data/app/views/auth/registrations/new.html.erb +33 -0
- data/app/views/auth/registrations/update.js.erb +47 -0
- data/app/views/auth/search/_search_bar.html.erb +11 -0
- data/app/views/auth/search/_search_result.html.erb +7 -0
- data/app/views/auth/search/_search_results.html.erb +4 -0
- data/app/views/auth/search/authenticated_user_search.js.erb +45 -0
- data/app/views/auth/search/authenticated_user_search.json +7 -0
- data/app/views/auth/sessions/create.js.erb +5 -0
- data/app/views/auth/sessions/new.html.erb +4 -0
- data/app/views/auth/sessions/new.js.erb +20 -0
- data/app/views/auth/shared/_devise_error_messages.html.erb +9 -0
- data/app/views/auth/shared/_links.html.erb +25 -0
- data/app/views/auth/shared/_object_errors.html.erb +12 -0
- data/app/views/auth/shared/_proxy_resource.html.erb +18 -0
- data/app/views/auth/shopping/cart_items/_form.html.erb +34 -0
- data/app/views/auth/shopping/cart_items/_show_cart_items_collection.html.erb +31 -0
- data/app/views/auth/shopping/cart_items/create_multiple.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/create_multiple.json.erb +9 -0
- data/app/views/auth/shopping/cart_items/edit.html.erb +6 -0
- data/app/views/auth/shopping/cart_items/index.html.erb +52 -0
- data/app/views/auth/shopping/cart_items/new.html.erb +5 -0
- data/app/views/auth/shopping/cart_items/show.html.erb +13 -0
- data/app/views/auth/shopping/carts/_form.html.erb +35 -0
- data/app/views/auth/shopping/carts/_payment_links.html.erb +27 -0
- data/app/views/auth/shopping/carts/_remove_cart_item.html.erb +11 -0
- data/app/views/auth/shopping/carts/_show_cart_balance_info.html.erb +35 -0
- data/app/views/auth/shopping/carts/edit.html.erb +6 -0
- data/app/views/auth/shopping/carts/index.html.erb +43 -0
- data/app/views/auth/shopping/carts/new.html.erb +5 -0
- data/app/views/auth/shopping/carts/show.html.erb +46 -0
- data/app/views/auth/shopping/discounts/_form.html.erb +18 -0
- data/app/views/auth/shopping/discounts/_form_for_create_multiple_cart_items.html.erb +17 -0
- data/app/views/auth/shopping/discounts/_show_pending_discount_request.html.erb +17 -0
- data/app/views/auth/shopping/discounts/destroy.html.erb +2 -0
- data/app/views/auth/shopping/discounts/edit.html.erb +29 -0
- data/app/views/auth/shopping/discounts/index.html.erb +40 -0
- data/app/views/auth/shopping/discounts/new.html.erb +1 -0
- data/app/views/auth/shopping/discounts/show.html.erb +18 -0
- data/app/views/auth/shopping/discounts/update.html.erb +2 -0
- data/app/views/auth/shopping/payments/_approve_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_cash_card_cheque.html.erb +24 -0
- data/app/views/auth/shopping/payments/_create_discount_coupon.html.erb +5 -0
- data/app/views/auth/shopping/payments/_form.html.erb +19 -0
- data/app/views/auth/shopping/payments/_gateway.html.erb +21 -0
- data/app/views/auth/shopping/payments/_proceed_to_gateway_or_verify_payment.html.erb +18 -0
- data/app/views/auth/shopping/payments/_refresh_payment.html.erb +7 -0
- data/app/views/auth/shopping/payments/_refund.html.erb +10 -0
- data/app/views/auth/shopping/payments/_show_payment_receipt.html.erb +12 -0
- data/app/views/auth/shopping/payments/edit.html.erb +6 -0
- data/app/views/auth/shopping/payments/index.html.erb +43 -0
- data/app/views/auth/shopping/payments/new.html.erb +13 -0
- data/app/views/auth/shopping/payments/show.html.erb +36 -0
- data/app/views/auth/shopping/products/_form.html.erb +27 -0
- data/app/views/auth/shopping/products/edit.html.erb +6 -0
- data/app/views/auth/shopping/products/index.html.erb +48 -0
- data/app/views/auth/shopping/products/index.json.erb +7 -0
- data/app/views/auth/shopping/products/new.html.erb +5 -0
- data/app/views/auth/shopping/products/show.html.erb +12 -0
- data/app/views/auth/shopping/products/show.json.erb +1 -0
- data/app/views/auth/unlocks/create.js.erb +12 -0
- data/app/views/auth/unlocks/new.html.erb +14 -0
- data/app/views/auth/unlocks/new.js.erb +17 -0
- data/app/views/auth/users/_search_result.html.erb +8 -0
- data/app/views/auth/users/profiles/_user_data.html.erb +4 -0
- data/app/views/auth/users/profiles/show.html.erb +54 -0
- data/app/views/layouts/auth/_modals.html.erb +2 -0
- data/app/views/layouts/auth/application.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_navbar.html.erb +49 -0
- data/app/views/layouts/auth/navbar/_personalization.html.erb +17 -0
- data/app/views/layouts/auth/navbar/_progress_spinner.html.erb +11 -0
- data/app/views/layouts/mailer.html.erb +5 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/initializers/active_model.rb +36 -0
- data/config/initializers/devise.rb +623 -0
- data/config/initializers/json.rb +10 -0
- data/config/initializers/omniauth.rb +447 -0
- data/config/initializers/redis.rb +2 -0
- data/config/initializers/redis.yml +14 -0
- data/config/locales/devise.en.yml +63 -0
- data/config/routes.rb +1 -0
- data/lib/assets/javascripts/data.js +126 -0
- data/lib/assets/javascripts/jquery.calendario.js +394 -0
- data/lib/assets/javascripts/jquery.tagcloud.js +92 -0
- data/lib/assets/javascripts/leanModal.js +236 -0
- data/lib/assets/javascripts/main.js +668 -0
- data/lib/assets/javascripts/modernizr.custom.63321.js +4 -0
- data/lib/assets/javascripts/payumoney.js +9 -0
- data/lib/assets/javascripts/search.js +36 -0
- data/lib/assets/javascripts/spinner.js +77 -0
- data/lib/assets/javascripts/trianglify.min.js +2 -0
- data/lib/assets/javascripts/you_need_to_sign_in.js.erb +478 -0
- data/lib/assets/stylesheets/calendar.css +111 -0
- data/lib/assets/stylesheets/calendar_modifications.scss +276 -0
- data/lib/auth.rb +32 -0
- data/lib/auth/custom_failure.rb +3 -0
- data/lib/auth/engine.rb +231 -0
- data/lib/auth/job_exception_handler.rb +7 -0
- data/lib/auth/mailgun.rb +28 -0
- data/lib/auth/notify.rb +8 -0
- data/lib/auth/omniauth/path.rb +104 -0
- data/lib/auth/partials.rb +12 -0
- data/lib/auth/rails/routes.rb +169 -0
- data/lib/auth/search/main.rb +97 -0
- data/lib/auth/sidekiq_up.rb +16 -0
- data/lib/auth/two_factor_otp.rb +202 -0
- data/lib/auth/url_shortener.rb +29 -0
- data/lib/auth/version.rb +3 -0
- data/lib/tasks/auth_tasks.rake +4 -0
- metadata +863 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
.fc-calendar-container {
|
2
|
+
position: relative;
|
3
|
+
height:400px;
|
4
|
+
width: 400px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.fc-calendar {
|
8
|
+
width: 100%;
|
9
|
+
height: 100%;
|
10
|
+
}
|
11
|
+
|
12
|
+
.fc-calendar .fc-head {
|
13
|
+
height: 30px;
|
14
|
+
line-height: 30px;
|
15
|
+
background: #ccc;
|
16
|
+
color: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
.fc-calendar .fc-body {
|
20
|
+
position: relative;
|
21
|
+
width: 100%;
|
22
|
+
height: 100%;
|
23
|
+
height: -moz-calc(100% - 30px);
|
24
|
+
height: -webkit-calc(100% - 30px);
|
25
|
+
height: calc(100% - 30px);
|
26
|
+
border: 1px solid #ddd;
|
27
|
+
}
|
28
|
+
|
29
|
+
.fc-calendar .fc-row {
|
30
|
+
width: 100%;
|
31
|
+
border-bottom: 1px solid #ddd;
|
32
|
+
}
|
33
|
+
|
34
|
+
.fc-four-rows .fc-row {
|
35
|
+
height: 25%;
|
36
|
+
}
|
37
|
+
|
38
|
+
.fc-five-rows .fc-row {
|
39
|
+
height: 20%;
|
40
|
+
}
|
41
|
+
|
42
|
+
.fc-six-rows .fc-row {
|
43
|
+
height: 16.66%;
|
44
|
+
height: -moz-calc(100%/6);
|
45
|
+
height: -webkit-calc(100%/6);
|
46
|
+
height: calc(100%/6);
|
47
|
+
}
|
48
|
+
|
49
|
+
.fc-calendar .fc-row > div,
|
50
|
+
.fc-calendar .fc-head > div {
|
51
|
+
float: left;
|
52
|
+
height: 100%;
|
53
|
+
width: 14.28%; /* 100% / 7 */
|
54
|
+
width: -moz-calc(100%/7);
|
55
|
+
width: -webkit-calc(100%/7);
|
56
|
+
width: calc(100%/7);
|
57
|
+
position: relative;
|
58
|
+
}
|
59
|
+
|
60
|
+
/* IE 9 is rounding up the calc it seems */
|
61
|
+
.ie9 .fc-calendar .fc-row > div,
|
62
|
+
.ie9 .fc-calendar .fc-head > div {
|
63
|
+
width: 14.2%;
|
64
|
+
}
|
65
|
+
|
66
|
+
.fc-calendar .fc-row > div {
|
67
|
+
border-right: 1px solid #ddd;
|
68
|
+
/* padding: 4px; */
|
69
|
+
overflow: hidden;
|
70
|
+
position: relative;
|
71
|
+
}
|
72
|
+
|
73
|
+
.fc-calendar .fc-head > div {
|
74
|
+
text-align: center;
|
75
|
+
}
|
76
|
+
|
77
|
+
.fc-calendar .fc-row > div > span.fc-date {
|
78
|
+
position: absolute;
|
79
|
+
width: 30px;
|
80
|
+
height: 20px;
|
81
|
+
font-size: 20px;
|
82
|
+
line-height: 20px;
|
83
|
+
font-weight: 700;
|
84
|
+
color: #ddd;
|
85
|
+
text-shadow: 0 -1px 0 rgba(255,255,255,0.8);
|
86
|
+
bottom: 5px;
|
87
|
+
right: 5px;
|
88
|
+
text-align: right;
|
89
|
+
}
|
90
|
+
|
91
|
+
.fc-calendar .fc-row > div > span.fc-weekday {
|
92
|
+
padding-left: 5px;
|
93
|
+
display: none;
|
94
|
+
}
|
95
|
+
|
96
|
+
.fc-calendar .fc-row > div.fc-today {
|
97
|
+
background: #fff4c3;
|
98
|
+
}
|
99
|
+
|
100
|
+
.fc-calendar .fc-row > div.fc-out {
|
101
|
+
opacity: 0.6;
|
102
|
+
}
|
103
|
+
|
104
|
+
.fc-calendar .fc-row > div:last-child,
|
105
|
+
.fc-calendar .fc-head > div:last-child {
|
106
|
+
border-right: none;
|
107
|
+
}
|
108
|
+
|
109
|
+
.fc-calendar .fc-row:last-child {
|
110
|
+
border-bottom: none;
|
111
|
+
}
|
@@ -0,0 +1,276 @@
|
|
1
|
+
/* Custom calendar elements */
|
2
|
+
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css);
|
3
|
+
|
4
|
+
$calendar_primary: #009688;
|
5
|
+
$calendar_today_color: #004d40;
|
6
|
+
|
7
|
+
.custom-calendar-wrap {
|
8
|
+
position: relative;
|
9
|
+
overflow: hidden;
|
10
|
+
}
|
11
|
+
|
12
|
+
.custom-inner {
|
13
|
+
background: #fff;
|
14
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
15
|
+
}
|
16
|
+
|
17
|
+
.custom-month {
|
18
|
+
margin-bottom:0.5rem !important;
|
19
|
+
}
|
20
|
+
|
21
|
+
.custom-year{
|
22
|
+
margin-top:0px !important;
|
23
|
+
}
|
24
|
+
|
25
|
+
.custom-inner:before,
|
26
|
+
.custom-inner:after {
|
27
|
+
content: '';
|
28
|
+
width: 99%;
|
29
|
+
height: 50%;
|
30
|
+
position: absolute;
|
31
|
+
background: #f6f6f6;
|
32
|
+
bottom: -4px;
|
33
|
+
left: 0.5%;
|
34
|
+
z-index: -1;
|
35
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
36
|
+
}
|
37
|
+
|
38
|
+
.custom-inner:after {
|
39
|
+
content: '';
|
40
|
+
width: 98%;
|
41
|
+
bottom: -7px;
|
42
|
+
left: 1%;
|
43
|
+
z-index: -2;
|
44
|
+
}
|
45
|
+
|
46
|
+
.custom-header {
|
47
|
+
background: #fff;
|
48
|
+
padding: 5px 10px 10px 20px;
|
49
|
+
height: 70px;
|
50
|
+
position: relative;
|
51
|
+
border-top: 5px solid $calendar_primary;
|
52
|
+
border-bottom: 1px solid #ddd;
|
53
|
+
}
|
54
|
+
|
55
|
+
.custom-header h2,
|
56
|
+
.custom-header h3 {
|
57
|
+
text-align: center;
|
58
|
+
text-transform: uppercase;
|
59
|
+
}
|
60
|
+
|
61
|
+
.custom-header h2 {
|
62
|
+
color: #495468;
|
63
|
+
font-weight: 300;
|
64
|
+
font-size: 18px;
|
65
|
+
margin-top: 10px;
|
66
|
+
}
|
67
|
+
|
68
|
+
.custom-header h3 {
|
69
|
+
font-size: 10px;
|
70
|
+
font-weight: 700;
|
71
|
+
color: #b7bbc2;
|
72
|
+
}
|
73
|
+
|
74
|
+
.custom-header div span {
|
75
|
+
position: absolute;
|
76
|
+
top: 17px;
|
77
|
+
width: 30px;
|
78
|
+
height: 30px;
|
79
|
+
color: transparent;
|
80
|
+
cursor: pointer;
|
81
|
+
margin: 0 1px;
|
82
|
+
font-size: 20px;
|
83
|
+
line-height: 30px;
|
84
|
+
-webkit-touch-callout: none;
|
85
|
+
-webkit-user-select: none;
|
86
|
+
-khtml-user-select: none;
|
87
|
+
-moz-user-select: none;
|
88
|
+
-ms-user-select: none;
|
89
|
+
user-select: none;
|
90
|
+
}
|
91
|
+
|
92
|
+
.custom-header div span:first-child {
|
93
|
+
left: 5px;
|
94
|
+
}
|
95
|
+
|
96
|
+
.custom-header div span:last-child {
|
97
|
+
right: 5px;
|
98
|
+
}
|
99
|
+
|
100
|
+
//font-family: 'fontawesome-selected';
|
101
|
+
.custom-header div span:before {
|
102
|
+
color: $calendar_primary;
|
103
|
+
position: absolute;
|
104
|
+
text-align: center;
|
105
|
+
width: 100%;
|
106
|
+
}
|
107
|
+
|
108
|
+
.custom-header div span.custom-prev:before {
|
109
|
+
content: '\25c2';
|
110
|
+
}
|
111
|
+
|
112
|
+
.custom-header div span.custom-next:before {
|
113
|
+
content: '\25b8';
|
114
|
+
}
|
115
|
+
|
116
|
+
.custom-header div span:hover:before {
|
117
|
+
color: #495468;
|
118
|
+
}
|
119
|
+
|
120
|
+
.custom-content-reveal {
|
121
|
+
background: #f6f6f6;
|
122
|
+
background: rgba(246, 246, 246, 0.9);
|
123
|
+
width: 100%;
|
124
|
+
height: 100%;
|
125
|
+
position: absolute;
|
126
|
+
z-index: 100;
|
127
|
+
top: 100%;
|
128
|
+
left: 0px;
|
129
|
+
text-align: center;
|
130
|
+
-webkit-transition: all 0.6s ease-in-out;
|
131
|
+
-moz-transition: all 0.6s ease-in-out;
|
132
|
+
-o-transition: all 0.6s ease-in-out;
|
133
|
+
-ms-transition: all 0.6s ease-in-out;
|
134
|
+
transition: all 0.6s ease-in-out;
|
135
|
+
}
|
136
|
+
|
137
|
+
.custom-content-reveal span.custom-content-close {
|
138
|
+
position: absolute;
|
139
|
+
top: 15px;
|
140
|
+
right: 10px;
|
141
|
+
width: 20px;
|
142
|
+
height: 20px;
|
143
|
+
text-align: center;
|
144
|
+
background: #ef4f69;
|
145
|
+
box-shadow: 0 1px 1px rgba(0,0,0,0.1);
|
146
|
+
cursor: pointer;
|
147
|
+
line-height: 13px;
|
148
|
+
padding: 0;
|
149
|
+
}
|
150
|
+
|
151
|
+
.custom-content-reveal span.custom-content-close:after {
|
152
|
+
content: 'x';
|
153
|
+
font-size: 18px;
|
154
|
+
color: #fff;
|
155
|
+
}
|
156
|
+
|
157
|
+
.custom-content-reveal a,
|
158
|
+
.custom-content-reveal span {
|
159
|
+
font-size: 22px;
|
160
|
+
padding: 10px 30px;
|
161
|
+
display: block;
|
162
|
+
}
|
163
|
+
|
164
|
+
.custom-content-reveal h4 {
|
165
|
+
text-transform: uppercase;
|
166
|
+
font-size: 13px;
|
167
|
+
font-weight: 300;
|
168
|
+
letter-spacing: 3px;
|
169
|
+
color: #777;
|
170
|
+
padding: 20px;
|
171
|
+
background: #fff;
|
172
|
+
border-bottom: 1px solid #ddd;
|
173
|
+
border-top: 5px solid #ef4f69;
|
174
|
+
box-shadow: 0 1px rgba(255,255,255,0.9);
|
175
|
+
margin-bottom: 30px;
|
176
|
+
}
|
177
|
+
|
178
|
+
.custom-content-reveal span {
|
179
|
+
color: #888;
|
180
|
+
}
|
181
|
+
|
182
|
+
.custom-content-reveal a {
|
183
|
+
color: #ef4f69;
|
184
|
+
}
|
185
|
+
|
186
|
+
.custom-content-reveal a:hover {
|
187
|
+
color: #333;
|
188
|
+
}
|
189
|
+
|
190
|
+
/* Modifications */
|
191
|
+
|
192
|
+
.fc-calendar-container {
|
193
|
+
min-height:400px;
|
194
|
+
width: auto;
|
195
|
+
padding: 40px;
|
196
|
+
background: #f6f6f6;
|
197
|
+
box-shadow: inset 0 1px rgba(255,255,255,0.8);
|
198
|
+
}
|
199
|
+
|
200
|
+
.fc-calendar .fc-head {
|
201
|
+
background: transparent;
|
202
|
+
color: $calendar_primary;
|
203
|
+
font-weight: bold;
|
204
|
+
text-transform: uppercase;
|
205
|
+
font-size: 12px;
|
206
|
+
}
|
207
|
+
|
208
|
+
.fc-calendar .fc-row > div {
|
209
|
+
background: #fff;
|
210
|
+
cursor: pointer;
|
211
|
+
}
|
212
|
+
|
213
|
+
.fc-calendar .fc-row > div:empty {
|
214
|
+
background: transparent;
|
215
|
+
}
|
216
|
+
|
217
|
+
.fc-calendar .fc-row > div > span.fc-date {
|
218
|
+
top: 50%;
|
219
|
+
left: 50%;
|
220
|
+
text-align: center;
|
221
|
+
margin: -10px 0 0 -15px;
|
222
|
+
color: #686a6e;
|
223
|
+
font-weight: 400;
|
224
|
+
pointer-events: none;
|
225
|
+
}
|
226
|
+
|
227
|
+
.fc-calendar .fc-row > div.fc-today {
|
228
|
+
background: white;
|
229
|
+
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.1);
|
230
|
+
}
|
231
|
+
|
232
|
+
.fc-calendar .fc-row > div.fc-today > span.fc-date {
|
233
|
+
color: $calendar_today_color;
|
234
|
+
font-weight: 600;
|
235
|
+
text-shadow: 0 1px 1px rgba(0,0,0,0.1);
|
236
|
+
}
|
237
|
+
|
238
|
+
.fc-calendar .fc-row > div.fc-content:after {
|
239
|
+
content: '\00B7';
|
240
|
+
text-align: center;
|
241
|
+
width: 20px;
|
242
|
+
margin-left: -10px;
|
243
|
+
position: absolute;
|
244
|
+
color: #DDD;
|
245
|
+
font-size: 70px;
|
246
|
+
line-height: 20px;
|
247
|
+
left: 50%;
|
248
|
+
bottom: 3px;
|
249
|
+
}
|
250
|
+
|
251
|
+
.fc-calendar .fc-row > div.fc-today.fc-content:after {
|
252
|
+
color: #b02c42;
|
253
|
+
}
|
254
|
+
|
255
|
+
.fc-calendar .fc-row > div.fc-content:hover:after{
|
256
|
+
color: #ef4f69;
|
257
|
+
}
|
258
|
+
|
259
|
+
.fc-calendar .fc-row > div.fc-today.fc-content:hover:after{
|
260
|
+
color: #fff;
|
261
|
+
}
|
262
|
+
|
263
|
+
.fc-calendar .fc-row > div > div a,
|
264
|
+
.fc-calendar .fc-row > div > div span {
|
265
|
+
display: none;
|
266
|
+
font-size: 22px;
|
267
|
+
}
|
268
|
+
|
269
|
+
@media screen and (max-width: 400px) {
|
270
|
+
.fc-calendar-container {
|
271
|
+
height: 300px;
|
272
|
+
}
|
273
|
+
.fc-calendar .fc-row > div > span.fc-date {
|
274
|
+
font-size: 15px;
|
275
|
+
}
|
276
|
+
}
|
data/lib/auth.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
##here we have to add the external dependencies.
|
2
|
+
require "auth/engine"
|
3
|
+
require 'omniauth'
|
4
|
+
require 'omniauth-google-oauth2'
|
5
|
+
require 'omniauth-facebook'
|
6
|
+
require "devise"
|
7
|
+
require "mongoid"
|
8
|
+
require "typhoeus"
|
9
|
+
require "typhoeus/adapters/faraday"
|
10
|
+
require "elasticsearch"
|
11
|
+
require "mongoid-elasticsearch"
|
12
|
+
require "simple_token_authentication"
|
13
|
+
require "thin"
|
14
|
+
require "mongoid_versioned_atomic"
|
15
|
+
require "jquery-rails"
|
16
|
+
require "turbolinks"
|
17
|
+
require "underscore-rails"
|
18
|
+
require "materialize-sass"
|
19
|
+
require "valid_url"
|
20
|
+
require "recaptcha/rails"
|
21
|
+
require "momentjs-rails"
|
22
|
+
require "redis"
|
23
|
+
require "active_job"
|
24
|
+
require "kaminari/mongoid"
|
25
|
+
require "kaminari/actionview"
|
26
|
+
require "mailgun-ruby"
|
27
|
+
require "googl"
|
28
|
+
require "aws-sdk"
|
29
|
+
require "payuindia"
|
30
|
+
|
31
|
+
module Auth
|
32
|
+
end
|
data/lib/auth/engine.rb
ADDED
@@ -0,0 +1,231 @@
|
|
1
|
+
##here add the internal lib files or anything else that is going to be
|
2
|
+
##needed throughout the app, that was defined or created inside the app itself.
|
3
|
+
require "auth/omniauth/path"
|
4
|
+
require "auth/partials"
|
5
|
+
require "auth/rails/routes"
|
6
|
+
require "auth/two_factor_otp"
|
7
|
+
require "auth/mailgun"
|
8
|
+
require "auth/job_exception_handler"
|
9
|
+
require "auth/url_shortener"
|
10
|
+
require "auth/notify"
|
11
|
+
require "auth/search/main"
|
12
|
+
#require "auth/sidekiq_up"
|
13
|
+
|
14
|
+
module Auth
|
15
|
+
class Engine < ::Rails::Engine
|
16
|
+
#isolate_namespace Auth
|
17
|
+
config.generators do |g|
|
18
|
+
g.test_framework :rspec
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
class << self
|
27
|
+
attr_accessor :configuration
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.configure
|
31
|
+
self.configuration ||= Configuration.new
|
32
|
+
yield(configuration)
|
33
|
+
|
34
|
+
self.configuration.auth_resources.keys.each do |res|
|
35
|
+
##a skip option must be present on each auth resource.
|
36
|
+
if self.configuration.auth_resources[res][:skip].nil?
|
37
|
+
self.configuration.auth_resources[res][:skip] = []
|
38
|
+
end
|
39
|
+
|
40
|
+
##a token_auth_options hash must be present on the
|
41
|
+
##configuration for each resource..
|
42
|
+
if self.configuration.auth_resources[res]["token_auth_options"].nil?
|
43
|
+
self.configuration.auth_resources[res]["token_auth_options"] =
|
44
|
+
{
|
45
|
+
fallback: :exception
|
46
|
+
#,
|
47
|
+
#if: lambda { |controller| controller.request.format.json? }
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
51
|
+
##
|
52
|
+
end
|
53
|
+
|
54
|
+
class Configuration
|
55
|
+
attr_accessor :enable_token_auth
|
56
|
+
attr_accessor :oauth_credentials
|
57
|
+
attr_accessor :mount_path
|
58
|
+
attr_accessor :auth_resources
|
59
|
+
attr_accessor :enable_sign_in_modals
|
60
|
+
attr_accessor :prevent_oauth_merger
|
61
|
+
attr_accessor :recaptcha
|
62
|
+
attr_accessor :redis_config_file_location
|
63
|
+
attr_accessor :third_party_api_keys
|
64
|
+
attr_accessor :stub_otp_api_calls
|
65
|
+
attr_accessor :simulate_invalid_otp
|
66
|
+
attr_accessor :otp_controller
|
67
|
+
attr_accessor :cart_item_controller
|
68
|
+
attr_accessor :cart_item_class
|
69
|
+
attr_accessor :cart_controller
|
70
|
+
attr_accessor :cart_class
|
71
|
+
attr_accessor :product_class
|
72
|
+
attr_accessor :product_controller
|
73
|
+
attr_accessor :payment_class
|
74
|
+
attr_accessor :discount_class
|
75
|
+
attr_accessor :discount_controller
|
76
|
+
attr_accessor :notification_class
|
77
|
+
attr_accessor :payment_controller
|
78
|
+
attr_accessor :payment_gateway_info
|
79
|
+
attr_accessor :token_regeneration_time
|
80
|
+
attr_accessor :user_class
|
81
|
+
attr_accessor :do_redirect
|
82
|
+
attr_accessor :brand_name
|
83
|
+
attr_accessor :notification_response_class
|
84
|
+
## the class used in the user_concern, to send emails.
|
85
|
+
## should inherit from Auth::Notifier.
|
86
|
+
## the class used to send the notification
|
87
|
+
attr_accessor :mailer_class
|
88
|
+
|
89
|
+
## the queue adapter for the delayed jobs
|
90
|
+
## @used in OtpJob
|
91
|
+
attr_accessor :queue_adapter
|
92
|
+
|
93
|
+
attr_accessor :navbar
|
94
|
+
|
95
|
+
## used in lib/auth/omniauth.rb
|
96
|
+
## inside Google_OAuth2.class_eval
|
97
|
+
attr_accessor :host_name
|
98
|
+
|
99
|
+
|
100
|
+
## whether to use es or not.
|
101
|
+
attr_accessor :use_es
|
102
|
+
|
103
|
+
def initialize
|
104
|
+
|
105
|
+
|
106
|
+
##############################################################
|
107
|
+
##
|
108
|
+
## CSS BASED OPTIONS.
|
109
|
+
##
|
110
|
+
##############################################################
|
111
|
+
|
112
|
+
## whether there should be modals for sign-in / sign-up
|
113
|
+
## ensure to include the css and js files as mentioned in the readme.
|
114
|
+
@enable_sign_in_modals = false
|
115
|
+
|
116
|
+
## this is shown on the left hand side of the navbar.
|
117
|
+
@brand_name = "Your App Name"
|
118
|
+
|
119
|
+
## whether there should be a navbar as shown in the image in the readme.
|
120
|
+
@navbar = false
|
121
|
+
|
122
|
+
#############################################################
|
123
|
+
##
|
124
|
+
## AUTHENTICATION OPTIONS.
|
125
|
+
##
|
126
|
+
#############################################################
|
127
|
+
|
128
|
+
## whether token authentication should be enabled
|
129
|
+
@enable_token_auth = true
|
130
|
+
|
131
|
+
##the regeneration time of the auth_token,
|
132
|
+
##after the following mentioned time, the token is useless
|
133
|
+
@token_regeneration_time = 1.day
|
134
|
+
|
135
|
+
## the oauth provider details, an empty hash will disable oauth authentication
|
136
|
+
@oauth_credentials = {}
|
137
|
+
|
138
|
+
## which models the engine should use for authentication
|
139
|
+
@auth_resources = {}
|
140
|
+
|
141
|
+
## whether recaptcha should be enabled or not.
|
142
|
+
## false by default.
|
143
|
+
## if set to true, will produce errors all over the place in case you forget to provide a recaptcha key and secret in the configuration file!
|
144
|
+
@recaptcha = false
|
145
|
+
|
146
|
+
|
147
|
+
## if set to true, wil prevent merging of oauth accounts if they share the same email id.
|
148
|
+
## by default is false.
|
149
|
+
@prevent_oauth_merger = false
|
150
|
+
|
151
|
+
##############################################################
|
152
|
+
##
|
153
|
+
## ENGINE BASED OPTIONS.
|
154
|
+
##
|
155
|
+
##############################################################
|
156
|
+
@mount_path = "/authenticate"
|
157
|
+
@redis_config_file_location = nil
|
158
|
+
@third_party_api_keys = {}
|
159
|
+
##whether to redirect to redirect urls if provided in the
|
160
|
+
##request.
|
161
|
+
@do_redirect = true
|
162
|
+
@host_name = nil
|
163
|
+
## for the user.
|
164
|
+
@user_class = nil
|
165
|
+
|
166
|
+
###############################################################
|
167
|
+
##
|
168
|
+
## OPTIONS FOR TESTS
|
169
|
+
##
|
170
|
+
###############################################################
|
171
|
+
@stub_otp_api_calls = false
|
172
|
+
@simulate_invalid_otp = false
|
173
|
+
|
174
|
+
###############################################################
|
175
|
+
##
|
176
|
+
## OPTIONS FOR OTP
|
177
|
+
##
|
178
|
+
###############################################################
|
179
|
+
@otp_controller = nil
|
180
|
+
|
181
|
+
|
182
|
+
###############################################################
|
183
|
+
##
|
184
|
+
## OPTIONS FOR SHOPPING MODULE
|
185
|
+
##
|
186
|
+
###############################################################
|
187
|
+
@cart_item_controller = nil
|
188
|
+
@cart_item_class = nil
|
189
|
+
@cart_controller = nil
|
190
|
+
@cart_class = nil
|
191
|
+
@payment_controller = nil
|
192
|
+
@payment_class = nil
|
193
|
+
@payment_gateway_info = {}
|
194
|
+
@product_class = nil
|
195
|
+
@product_controller = nil
|
196
|
+
@discount_class = nil
|
197
|
+
@discount_controller = nil
|
198
|
+
|
199
|
+
###############################################################
|
200
|
+
##
|
201
|
+
## OPTIONS FOR MAILER AND NOTIFICATIONS
|
202
|
+
##
|
203
|
+
###############################################################
|
204
|
+
@mailer_class = nil
|
205
|
+
@notification_class = nil
|
206
|
+
@notification_response_class = nil
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
###############################################################
|
212
|
+
##
|
213
|
+
## OPTIONS FOR THE BACKGROUND JOB USED BY THE ENGINE.
|
214
|
+
##
|
215
|
+
###############################################################
|
216
|
+
@queue_adapter = "shoryuken"
|
217
|
+
|
218
|
+
|
219
|
+
####################################################
|
220
|
+
##
|
221
|
+
##
|
222
|
+
## elasticsearch options.
|
223
|
+
##
|
224
|
+
###################################################
|
225
|
+
@use_es = true
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
|
231
|
+
end
|