kaui 0.16.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/app/assets/javascripts/application.js +1 -1
  4. data/app/assets/javascripts/kaui/kaui.js +78 -1
  5. data/app/assets/stylesheets/bootstrap_and_overrides.css.less +5 -0
  6. data/app/assets/stylesheets/kaui/account.less +20 -0
  7. data/app/assets/stylesheets/kaui/audit.less +38 -0
  8. data/app/assets/stylesheets/kaui/common.less +103 -0
  9. data/app/assets/stylesheets/kaui/datatable.less +19 -0
  10. data/app/assets/stylesheets/kaui/kaui.less +3 -1
  11. data/app/assets/stylesheets/kaui/subscription.less +15 -0
  12. data/app/assets/stylesheets/kaui/tags.less +30 -1
  13. data/app/controllers/kaui/account_custom_fields_controller.rb +24 -0
  14. data/app/controllers/kaui/account_tags_controller.rb +21 -0
  15. data/app/controllers/kaui/accounts_controller.rb +43 -16
  16. data/app/controllers/kaui/admin_tenants_controller.rb +152 -11
  17. data/app/controllers/kaui/audit_logs_controller.rb +93 -0
  18. data/app/controllers/kaui/bundles_controller.rb +15 -3
  19. data/app/controllers/kaui/custom_fields_controller.rb +2 -0
  20. data/app/controllers/kaui/engine_controller_util.rb +14 -0
  21. data/app/controllers/kaui/invoice_items_controller.rb +17 -0
  22. data/app/controllers/kaui/invoices_controller.rb +22 -5
  23. data/app/controllers/kaui/payment_methods_controller.rb +10 -9
  24. data/app/controllers/kaui/subscriptions_controller.rb +54 -7
  25. data/app/controllers/kaui/tag_definitions_controller.rb +1 -0
  26. data/app/helpers/kaui/account_helper.rb +28 -0
  27. data/app/helpers/kaui/object_helper.rb +4 -0
  28. data/app/helpers/kaui/permissions_helper.rb +15 -0
  29. data/app/helpers/kaui/plugin_helper.rb +58 -0
  30. data/app/helpers/kaui/subscription_helper.rb +9 -7
  31. data/app/models/kaui/admin_tenant.rb +20 -6
  32. data/app/models/kaui/catalog.rb +4 -4
  33. data/app/models/kaui/tag.rb +1 -1
  34. data/app/models/kaui/tag_definition.rb +1 -1
  35. data/app/views/kaui/account_custom_fields/index.html.erb +35 -0
  36. data/app/views/kaui/account_tags/index.html.erb +35 -0
  37. data/app/views/kaui/accounts/_account_info.html.erb +5 -0
  38. data/app/views/kaui/accounts/_billing_info.html.erb +1 -1
  39. data/app/views/kaui/accounts/_close_account_modal.html.erb +98 -0
  40. data/app/views/kaui/accounts/index.html.erb +0 -7
  41. data/app/views/kaui/accounts/show.html.erb +4 -0
  42. data/app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb +64 -0
  43. data/app/views/kaui/admin_tenants/_form_plugin_config.erb +257 -151
  44. data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +133 -48
  45. data/app/views/kaui/admin_tenants/_show_catalog_xml.erb +3 -2
  46. data/app/views/kaui/admin_tenants/show.html.erb +6 -1
  47. data/app/views/kaui/audit_logs/_show_history_modal.html.erb +177 -0
  48. data/app/views/kaui/audit_logs/index.html.erb +52 -0
  49. data/app/views/kaui/bundle_tags/_form_bar.html.erb +4 -2
  50. data/app/views/kaui/bundles/index.html.erb +21 -14
  51. data/app/views/kaui/chargebacks/_form.html.erb +1 -9
  52. data/app/views/kaui/charges/_form.html.erb +2 -10
  53. data/app/views/kaui/credits/_form.html.erb +1 -9
  54. data/app/views/kaui/custom_fields/_form.html.erb +1 -1
  55. data/app/views/kaui/custom_fields/_list_bar.html.erb +1 -1
  56. data/app/views/kaui/invoices/_invoice_table.html.erb +30 -2
  57. data/app/views/kaui/layouts/kaui_account_navbar.html.erb +7 -0
  58. data/app/views/kaui/layouts/kaui_flash.html.erb +13 -2
  59. data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +11 -11
  60. data/app/views/kaui/payment_methods/_plugin_properties.html.erb +1 -1
  61. data/app/views/kaui/payments/_form.html.erb +1 -9
  62. data/app/views/kaui/refunds/_form.html.erb +4 -6
  63. data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +62 -0
  64. data/app/views/kaui/subscriptions/_form.html.erb +7 -13
  65. data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +50 -11
  66. data/app/views/kaui/subscriptions/new.html.erb +3 -1
  67. data/app/views/kaui/tag_definitions/_form.html.erb +139 -0
  68. data/app/views/kaui/tags/index.html.erb +1 -1
  69. data/app/views/kaui/transactions/_control_plugin_names.html.erb +1 -1
  70. data/config/routes.rb +18 -2
  71. data/db/migrate/20130812155313_devise_create_kaui_users.rb +9 -7
  72. data/db/migrate/20150109214021_create_kaui_tenants.rb +8 -6
  73. data/db/migrate/20150112232813_create_kaui_allowed_users.rb +15 -11
  74. data/lib/kaui/engine.rb +1 -0
  75. data/lib/kaui/version.rb +1 -1
  76. data/test/dummy/config/database.yml +6 -1
  77. data/test/fixtures/SpyCarAdvanced.xml +824 -0
  78. data/test/functional/kaui/account_children_controller_test.rb +1 -1
  79. data/test/functional/kaui/account_custom_fields_controller_test.rb +29 -0
  80. data/test/functional/kaui/account_tags_controller_test.rb +19 -0
  81. data/test/functional/kaui/accounts_controller_test.rb +23 -6
  82. data/test/functional/kaui/admin_controller_test.rb +2 -2
  83. data/test/functional/kaui/admin_tenants_controller_test.rb +76 -5
  84. data/test/functional/kaui/audit_logs_controller_test.rb +71 -0
  85. data/test/functional/kaui/bundles_controller_test.rb +2 -1
  86. data/test/functional/kaui/payments_controller_test.rb +1 -1
  87. data/test/functional/kaui/subscriptions_controller_test.rb +1 -2
  88. data/test/functional/kaui/tag_definitions_controller_test.rb +2 -1
  89. data/test/killbill_test_helper.rb +5 -2
  90. data/test/unit/kaui/admin_tenant_test.rb +100 -0
  91. data/test/unit/kaui/money_helper_test.rb +1 -1
  92. metadata +58 -13
  93. data/app/assets/javascripts/kaui/validation.js +0 -21
  94. data/test/dummy/log/test.log +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-04 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '1.11'
131
+ version: '2.0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '1.11'
138
+ version: '2.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: devise
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +198,14 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '0.1'
201
+ version: '1.0'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '0.1'
208
+ version: '1.0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: jquery-ui-rails
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -276,6 +276,20 @@ dependencies:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
278
  version: '3.2'
279
+ - !ruby/object:Gem::Dependency
280
+ name: mustache-js-rails
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: 0.0.7
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: 0.0.7
279
293
  - !ruby/object:Gem::Dependency
280
294
  name: rails-controller-testing
281
295
  requirement: !ruby/object:Gem::Requirement
@@ -346,6 +360,20 @@ dependencies:
346
360
  - - ">="
347
361
  - !ruby/object:Gem::Version
348
362
  version: '0'
363
+ - !ruby/object:Gem::Dependency
364
+ name: json
365
+ requirement: !ruby/object:Gem::Requirement
366
+ requirements:
367
+ - - ">="
368
+ - !ruby/object:Gem::Version
369
+ version: 1.8.6
370
+ type: :development
371
+ prerelease: false
372
+ version_requirements: !ruby/object:Gem::Requirement
373
+ requirements:
374
+ - - ">="
375
+ - !ruby/object:Gem::Version
376
+ version: 1.8.6
349
377
  - !ruby/object:Gem::Dependency
350
378
  name: listen
351
379
  requirement: !ruby/object:Gem::Requirement
@@ -406,16 +434,16 @@ dependencies:
406
434
  name: mysql2
407
435
  requirement: !ruby/object:Gem::Requirement
408
436
  requirements:
409
- - - ">="
437
+ - - "~>"
410
438
  - !ruby/object:Gem::Version
411
- version: '0'
439
+ version: 0.4.10
412
440
  type: :development
413
441
  prerelease: false
414
442
  version_requirements: !ruby/object:Gem::Requirement
415
443
  requirements:
416
- - - ">="
444
+ - - "~>"
417
445
  - !ruby/object:Gem::Version
418
- version: '0'
446
+ version: 0.4.10
419
447
  - !ruby/object:Gem::Dependency
420
448
  name: pg
421
449
  requirement: !ruby/object:Gem::Requirement
@@ -488,10 +516,10 @@ files:
488
516
  - app/assets/javascripts/application.js
489
517
  - app/assets/javascripts/kaui/bootstrap-tweaks.js
490
518
  - app/assets/javascripts/kaui/kaui.js
491
- - app/assets/javascripts/kaui/validation.js
492
519
  - app/assets/stylesheets/application.css
493
520
  - app/assets/stylesheets/bootstrap_and_overrides.css.less
494
521
  - app/assets/stylesheets/kaui/account.less
522
+ - app/assets/stylesheets/kaui/audit.less
495
523
  - app/assets/stylesheets/kaui/common.less
496
524
  - app/assets/stylesheets/kaui/datatable.less
497
525
  - app/assets/stylesheets/kaui/header.less
@@ -504,6 +532,7 @@ files:
504
532
  - app/assets/stylesheets/kaui/tags.less
505
533
  - app/assets/stylesheets/kaui/timeline.less
506
534
  - app/controllers/kaui/account_children_controller.rb
535
+ - app/controllers/kaui/account_custom_fields_controller.rb
507
536
  - app/controllers/kaui/account_emails_controller.rb
508
537
  - app/controllers/kaui/account_tags_controller.rb
509
538
  - app/controllers/kaui/account_timelines_controller.rb
@@ -511,6 +540,7 @@ files:
511
540
  - app/controllers/kaui/admin_allowed_users_controller.rb
512
541
  - app/controllers/kaui/admin_controller.rb
513
542
  - app/controllers/kaui/admin_tenants_controller.rb
543
+ - app/controllers/kaui/audit_logs_controller.rb
514
544
  - app/controllers/kaui/bundle_tags_controller.rb
515
545
  - app/controllers/kaui/bundles_controller.rb
516
546
  - app/controllers/kaui/chargebacks_controller.rb
@@ -545,6 +575,8 @@ files:
545
575
  - app/helpers/kaui/object_helper.rb
546
576
  - app/helpers/kaui/payment_helper.rb
547
577
  - app/helpers/kaui/payment_method_helper.rb
578
+ - app/helpers/kaui/permissions_helper.rb
579
+ - app/helpers/kaui/plugin_helper.rb
548
580
  - app/helpers/kaui/subscription_helper.rb
549
581
  - app/helpers/kaui/us_states_helper.rb
550
582
  - app/helpers/kaui/us_states_helper.yml
@@ -586,15 +618,18 @@ files:
586
618
  - app/models/kaui/user.rb
587
619
  - app/models/kaui/user_role.rb
588
620
  - app/views/kaui/account_children/index.html.erb
621
+ - app/views/kaui/account_custom_fields/index.html.erb
589
622
  - app/views/kaui/account_emails/_account_emails_table.html.erb
590
623
  - app/views/kaui/account_emails/_form.html.erb
591
624
  - app/views/kaui/account_emails/new.html.erb
592
625
  - app/views/kaui/account_tags/_form.html.erb
593
626
  - app/views/kaui/account_tags/_form_bar.html.erb
594
627
  - app/views/kaui/account_tags/edit.html.erb
628
+ - app/views/kaui/account_tags/index.html.erb
595
629
  - app/views/kaui/account_timelines/show.html.erb
596
630
  - app/views/kaui/accounts/_account_info.html.erb
597
631
  - app/views/kaui/accounts/_billing_info.html.erb
632
+ - app/views/kaui/accounts/_close_account_modal.html.erb
598
633
  - app/views/kaui/accounts/_form.html.erb
599
634
  - app/views/kaui/accounts/_link_parent_modal.html.erb
600
635
  - app/views/kaui/accounts/_parent.html.erb
@@ -610,6 +645,7 @@ files:
610
645
  - app/views/kaui/admin_allowed_users/index.html.erb
611
646
  - app/views/kaui/admin_allowed_users/new.html.erb
612
647
  - app/views/kaui/admin_allowed_users/show.html.erb
648
+ - app/views/kaui/admin_tenants/_add_allowed_user_modal.html.erb
613
649
  - app/views/kaui/admin_tenants/_form.html.erb
614
650
  - app/views/kaui/admin_tenants/_form_catalog_translation.erb
615
651
  - app/views/kaui/admin_tenants/_form_invoice_template.erb
@@ -628,6 +664,8 @@ files:
628
664
  - app/views/kaui/admin_tenants/new_overdue_config.html.erb
629
665
  - app/views/kaui/admin_tenants/new_plan_currency.html.erb
630
666
  - app/views/kaui/admin_tenants/show.html.erb
667
+ - app/views/kaui/audit_logs/_show_history_modal.html.erb
668
+ - app/views/kaui/audit_logs/index.html.erb
631
669
  - app/views/kaui/bundle_tags/_form.html.erb
632
670
  - app/views/kaui/bundle_tags/_form_bar.html.erb
633
671
  - app/views/kaui/bundle_tags/edit.html.erb
@@ -676,6 +714,7 @@ files:
676
714
  - app/views/kaui/role_definitions/new.html.erb
677
715
  - app/views/kaui/sessions/_form.html.erb
678
716
  - app/views/kaui/sessions/new.html.erb
717
+ - app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb
679
718
  - app/views/kaui/subscriptions/_edit_form.html.erb
680
719
  - app/views/kaui/subscriptions/_form.html.erb
681
720
  - app/views/kaui/subscriptions/_subscriptions_table.html.erb
@@ -751,12 +790,12 @@ files:
751
790
  - test/dummy/config/secrets.yml
752
791
  - test/dummy/config/symmetric-encryption.yml
753
792
  - test/dummy/db/schema.rb
754
- - test/dummy/log/test.log
755
793
  - test/dummy/public/404.html
756
794
  - test/dummy/public/422.html
757
795
  - test/dummy/public/500.html
758
796
  - test/dummy/public/favicon.ico
759
797
  - test/dummy/script/rails
798
+ - test/fixtures/SpyCarAdvanced.xml
760
799
  - test/fixtures/catalog-v1.xml
761
800
  - test/fixtures/catalog_translation_fr-v1.properties
762
801
  - test/fixtures/invoice_template-v1.html
@@ -764,6 +803,7 @@ files:
764
803
  - test/fixtures/overdue-v1.xml
765
804
  - test/fixtures/stripe.yml
766
805
  - test/functional/kaui/account_children_controller_test.rb
806
+ - test/functional/kaui/account_custom_fields_controller_test.rb
767
807
  - test/functional/kaui/account_emails_controller_test.rb
768
808
  - test/functional/kaui/account_tags_controller_test.rb
769
809
  - test/functional/kaui/account_timelines_controller_test.rb
@@ -771,6 +811,7 @@ files:
771
811
  - test/functional/kaui/admin_allowed_users_controller_test.rb
772
812
  - test/functional/kaui/admin_controller_test.rb
773
813
  - test/functional/kaui/admin_tenants_controller_test.rb
814
+ - test/functional/kaui/audit_logs_controller_test.rb
774
815
  - test/functional/kaui/bundle_tags_controller_test.rb
775
816
  - test/functional/kaui/bundles_controller_test.rb
776
817
  - test/functional/kaui/chargebacks_controller_test.rb
@@ -804,6 +845,7 @@ files:
804
845
  - test/unit/helpers/kaui/tenants_helper_test.rb
805
846
  - test/unit/kaui/account_email_test.rb
806
847
  - test/unit/kaui/account_test.rb
848
+ - test/unit/kaui/admin_tenant_test.rb
807
849
  - test/unit/kaui/allowed_user_test.rb
808
850
  - test/unit/kaui/base_test.rb
809
851
  - test/unit/kaui/date_helper_test.rb
@@ -846,6 +888,8 @@ test_files:
846
888
  - test/fixtures/invoice_template-v1.html
847
889
  - test/fixtures/overdue-v1.xml
848
890
  - test/fixtures/stripe.yml
891
+ - test/fixtures/SpyCarAdvanced.xml
892
+ - test/unit/kaui/admin_tenant_test.rb
849
893
  - test/unit/kaui/payment_test.rb
850
894
  - test/unit/kaui/base_test.rb
851
895
  - test/unit/kaui/invoice_test.rb
@@ -866,7 +910,6 @@ test_files:
866
910
  - test/integration/kaui/integration_test_helper.rb
867
911
  - test/integration/kaui/navigation_test.rb
868
912
  - test/integration/kaui/date_helper_integration_test.rb
869
- - test/dummy/log/test.log
870
913
  - test/dummy/public/404.html
871
914
  - test/dummy/public/422.html
872
915
  - test/dummy/public/500.html
@@ -928,9 +971,11 @@ test_files:
928
971
  - test/functional/kaui/tags_controller_test.rb
929
972
  - test/functional/kaui/account_tags_controller_test.rb
930
973
  - test/functional/kaui/functional_test_helper_nosetup.rb
974
+ - test/functional/kaui/account_custom_fields_controller_test.rb
931
975
  - test/functional/kaui/invoice_items_controller_test.rb
932
976
  - test/functional/kaui/admin_allowed_users_controller_test.rb
933
977
  - test/functional/kaui/refunds_controller_test.rb
978
+ - test/functional/kaui/audit_logs_controller_test.rb
934
979
  - test/functional/kaui/registrations_controller_test.rb
935
980
  - test/functional/kaui/invoices_controller_test.rb
936
981
  - test/functional/kaui/role_definitions_controller_test.rb
@@ -1,21 +0,0 @@
1
- // Restrict numeric input for a text field
2
- // TODO - consider switching to HTML5's <input type="number" />
3
- function preventNonNumericValues(event) {
4
- // Allow: backspace, delete, tab, escape, and enter
5
- if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 ||
6
- // Allow: Ctrl+A
7
- (event.keyCode == 65 && event.ctrlKey === true) ||
8
- // Allow dot
9
- (event.keyCode == 190) ||
10
- // Allow: home, end, left, right
11
- (event.keyCode >= 35 && event.keyCode <= 39)) {
12
- // let it happen, don't do anything
13
- return;
14
- }
15
- else {
16
- // Ensure that it is a number and stop the keypress
17
- if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
18
- event.preventDefault();
19
- }
20
- }
21
- }
File without changes