disco_app 0.16.0 → 0.16.1.pre.sidekiq.pre.6.pre.release
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/.DS_Store +0 -0
- data/app/clients/disco_app/graphql_client.rb +85 -0
- data/app/controllers/disco_app/flow/actions_controller.rb +7 -0
- data/app/controllers/disco_app/flow/concerns/actions_controller.rb +47 -0
- data/app/jobs/disco_app/flow/process_action_job.rb +11 -0
- data/app/jobs/disco_app/flow/process_trigger_job.rb +11 -0
- data/app/jobs/disco_app/shop_job.rb +8 -9
- data/app/models/disco_app/concerns/shop.rb +4 -5
- data/app/models/disco_app/flow/action.rb +7 -0
- data/app/models/disco_app/flow/concerns/action.rb +24 -0
- data/app/models/disco_app/flow/concerns/trigger.rb +24 -0
- data/app/models/disco_app/flow/trigger.rb +7 -0
- data/app/services/disco_app/flow/create_action.rb +35 -0
- data/app/services/disco_app/flow/create_trigger.rb +34 -0
- data/app/services/disco_app/flow/process_action.rb +50 -0
- data/app/services/disco_app/flow/process_trigger.rb +52 -0
- data/config/routes.rb +7 -1
- data/db/migrate/20181229100327_create_flow_actions_and_triggers.rb +32 -0
- data/lib/.DS_Store +0 -0
- data/lib/disco_app/configuration.rb +4 -0
- data/lib/disco_app/version.rb +1 -1
- data/lib/generators/disco_app/disco_app_generator.rb +2 -2
- data/lib/generators/disco_app/templates/config/appsignal.yml +12 -0
- data/lib/generators/disco_app/templates/root/.env +3 -0
- data/test/dummy/db/schema.rb +39 -11
- data/test/dummy/log/test.log +0 -0
- data/test/services/disco_app/flow/create_action_test.rb +51 -0
- data/test/services/disco_app/flow/create_trigger_test.rb +56 -0
- data/test/services/disco_app/flow/process_action_test.rb +68 -0
- data/test/services/disco_app/flow/process_trigger_test.rb +61 -0
- data/test/vcr/flow_trigger_invalid_title.yml +35 -0
- data/test/vcr/flow_trigger_valid.yml +38 -0
- metadata +188 -133
- data/app/clients/disco_app/rollbar_client.rb +0 -53
- data/app/clients/disco_app/rollbar_client_error.rb +0 -2
- data/lib/generators/disco_app/templates/initializers/rollbar.rb +0 -21
- data/lib/tasks/rollbar.rake +0 -24
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: disco_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.1.pre.sidekiq.pre.6.pre.release
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Ballard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -134,14 +134,14 @@ dependencies:
|
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
137
|
+
version: '6.0'
|
138
138
|
type: :runtime
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
144
|
+
version: '6.0'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: pg
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -325,19 +325,19 @@ dependencies:
|
|
325
325
|
- !ruby/object:Gem::Version
|
326
326
|
version: '1.7'
|
327
327
|
- !ruby/object:Gem::Dependency
|
328
|
-
name:
|
328
|
+
name: appsignal
|
329
329
|
requirement: !ruby/object:Gem::Requirement
|
330
330
|
requirements:
|
331
331
|
- - "~>"
|
332
332
|
- !ruby/object:Gem::Version
|
333
|
-
version: '2.
|
333
|
+
version: '2.7'
|
334
334
|
type: :runtime
|
335
335
|
prerelease: false
|
336
336
|
version_requirements: !ruby/object:Gem::Requirement
|
337
337
|
requirements:
|
338
338
|
- - "~>"
|
339
339
|
- !ruby/object:Gem::Version
|
340
|
-
version: '2.
|
340
|
+
version: '2.7'
|
341
341
|
- !ruby/object:Gem::Dependency
|
342
342
|
name: oj
|
343
343
|
requirement: !ruby/object:Gem::Requirement
|
@@ -394,6 +394,34 @@ dependencies:
|
|
394
394
|
- - "~>"
|
395
395
|
- !ruby/object:Gem::Version
|
396
396
|
version: '1.0'
|
397
|
+
- !ruby/object:Gem::Dependency
|
398
|
+
name: interactor
|
399
|
+
requirement: !ruby/object:Gem::Requirement
|
400
|
+
requirements:
|
401
|
+
- - ">="
|
402
|
+
- !ruby/object:Gem::Version
|
403
|
+
version: '0'
|
404
|
+
type: :runtime
|
405
|
+
prerelease: false
|
406
|
+
version_requirements: !ruby/object:Gem::Requirement
|
407
|
+
requirements:
|
408
|
+
- - ">="
|
409
|
+
- !ruby/object:Gem::Version
|
410
|
+
version: '0'
|
411
|
+
- !ruby/object:Gem::Dependency
|
412
|
+
name: interactor-rails
|
413
|
+
requirement: !ruby/object:Gem::Requirement
|
414
|
+
requirements:
|
415
|
+
- - ">="
|
416
|
+
- !ruby/object:Gem::Version
|
417
|
+
version: '0'
|
418
|
+
type: :runtime
|
419
|
+
prerelease: false
|
420
|
+
version_requirements: !ruby/object:Gem::Requirement
|
421
|
+
requirements:
|
422
|
+
- - ">="
|
423
|
+
- !ruby/object:Gem::Version
|
424
|
+
version: '0'
|
397
425
|
- !ruby/object:Gem::Dependency
|
398
426
|
name: dotenv-rails
|
399
427
|
requirement: !ruby/object:Gem::Requirement
|
@@ -486,6 +514,7 @@ extensions: []
|
|
486
514
|
extra_rdoc_files: []
|
487
515
|
files:
|
488
516
|
- Rakefile
|
517
|
+
- app/.DS_Store
|
489
518
|
- app/assets/components/disco_app/buttons/model-destroy-button.es6.jsx
|
490
519
|
- app/assets/components/disco_app/forms/model-form.es6.jsx
|
491
520
|
- app/assets/components/embedded_app/bar.es6.jsx
|
@@ -564,8 +593,7 @@ files:
|
|
564
593
|
- app/assets/stylesheets/disco_app/ui-kit/_ui-type.scss
|
565
594
|
- app/clients/disco_app/api_client.rb
|
566
595
|
- app/clients/disco_app/disco_api_error.rb
|
567
|
-
- app/clients/disco_app/
|
568
|
-
- app/clients/disco_app/rollbar_client_error.rb
|
596
|
+
- app/clients/disco_app/graphql_client.rb
|
569
597
|
- app/controllers/disco_app/admin/app_settings_controller.rb
|
570
598
|
- app/controllers/disco_app/admin/application_controller.rb
|
571
599
|
- app/controllers/disco_app/admin/concerns/app_settings_controller.rb
|
@@ -585,6 +613,8 @@ files:
|
|
585
613
|
- app/controllers/disco_app/concerns/carrier_request_controller.rb
|
586
614
|
- app/controllers/disco_app/concerns/user_authenticated_controller.rb
|
587
615
|
- app/controllers/disco_app/concerns/webhooks_controller.rb
|
616
|
+
- app/controllers/disco_app/flow/actions_controller.rb
|
617
|
+
- app/controllers/disco_app/flow/concerns/actions_controller.rb
|
588
618
|
- app/controllers/disco_app/frame_controller.rb
|
589
619
|
- app/controllers/disco_app/install_controller.rb
|
590
620
|
- app/controllers/disco_app/subscriptions_controller.rb
|
@@ -604,6 +634,8 @@ files:
|
|
604
634
|
- app/jobs/disco_app/concerns/synchronise_resources_job.rb
|
605
635
|
- app/jobs/disco_app/concerns/synchronise_users_job.rb
|
606
636
|
- app/jobs/disco_app/concerns/synchronise_webhooks_job.rb
|
637
|
+
- app/jobs/disco_app/flow/process_action_job.rb
|
638
|
+
- app/jobs/disco_app/flow/process_trigger_job.rb
|
607
639
|
- app/jobs/disco_app/render_asset_group_job.rb
|
608
640
|
- app/jobs/disco_app/send_subscription_job.rb
|
609
641
|
- app/jobs/disco_app/shop_job.rb
|
@@ -628,6 +660,10 @@ files:
|
|
628
660
|
- app/models/disco_app/concerns/synchronises.rb
|
629
661
|
- app/models/disco_app/concerns/taggable.rb
|
630
662
|
- app/models/disco_app/concerns/user.rb
|
663
|
+
- app/models/disco_app/flow/action.rb
|
664
|
+
- app/models/disco_app/flow/concerns/action.rb
|
665
|
+
- app/models/disco_app/flow/concerns/trigger.rb
|
666
|
+
- app/models/disco_app/flow/trigger.rb
|
631
667
|
- app/models/disco_app/plan.rb
|
632
668
|
- app/models/disco_app/plan_code.rb
|
633
669
|
- app/models/disco_app/recurring_application_charge.rb
|
@@ -640,6 +676,10 @@ files:
|
|
640
676
|
- app/resources/disco_app/admin/resources/shop_resource.rb
|
641
677
|
- app/services/disco_app/carrier_request_service.rb
|
642
678
|
- app/services/disco_app/charges_service.rb
|
679
|
+
- app/services/disco_app/flow/create_action.rb
|
680
|
+
- app/services/disco_app/flow/create_trigger.rb
|
681
|
+
- app/services/disco_app/flow/process_action.rb
|
682
|
+
- app/services/disco_app/flow/process_trigger.rb
|
643
683
|
- app/services/disco_app/partner_app_service.rb
|
644
684
|
- app/services/disco_app/proxy_service.rb
|
645
685
|
- app/services/disco_app/request_validation_service.rb
|
@@ -681,6 +721,8 @@ files:
|
|
681
721
|
- db/migrate/20170315062629_add_sources_to_shop_subscriptions.rb
|
682
722
|
- db/migrate/20170327214540_create_disco_app_users.rb
|
683
723
|
- db/migrate/20170606160751_fix_disco_app_users_index.rb
|
724
|
+
- db/migrate/20181229100327_create_flow_actions_and_triggers.rb
|
725
|
+
- lib/.DS_Store
|
684
726
|
- lib/disco_app.rb
|
685
727
|
- lib/disco_app/configuration.rb
|
686
728
|
- lib/disco_app/constants.rb
|
@@ -694,6 +736,7 @@ files:
|
|
694
736
|
- lib/generators/disco_app/templates/assets/javascripts/application.js
|
695
737
|
- lib/generators/disco_app/templates/assets/javascripts/components.js
|
696
738
|
- lib/generators/disco_app/templates/assets/stylesheets/application.scss
|
739
|
+
- lib/generators/disco_app/templates/config/appsignal.yml
|
697
740
|
- lib/generators/disco_app/templates/config/cable.yml.tt
|
698
741
|
- lib/generators/disco_app/templates/config/database.yml.tt
|
699
742
|
- lib/generators/disco_app/templates/config/environments/staging.rb
|
@@ -701,7 +744,6 @@ files:
|
|
701
744
|
- lib/generators/disco_app/templates/config/puma.rb
|
702
745
|
- lib/generators/disco_app/templates/controllers/home_controller.rb
|
703
746
|
- lib/generators/disco_app/templates/initializers/disco_app.rb
|
704
|
-
- lib/generators/disco_app/templates/initializers/rollbar.rb
|
705
747
|
- lib/generators/disco_app/templates/initializers/session_store.rb
|
706
748
|
- lib/generators/disco_app/templates/initializers/shopify_app.rb
|
707
749
|
- lib/generators/disco_app/templates/initializers/shopify_session_repository.rb
|
@@ -721,7 +763,6 @@ files:
|
|
721
763
|
- lib/tasks/carrier_service.rake
|
722
764
|
- lib/tasks/database.rake
|
723
765
|
- lib/tasks/partner_app.rake
|
724
|
-
- lib/tasks/rollbar.rake
|
725
766
|
- lib/tasks/sessions.rake
|
726
767
|
- lib/tasks/shops.rake
|
727
768
|
- lib/tasks/start.rake
|
@@ -797,6 +838,7 @@ files:
|
|
797
838
|
- test/dummy/db/migrate/20160530160739_create_asset_models.rb
|
798
839
|
- test/dummy/db/migrate/20161105054746_create_carts.rb
|
799
840
|
- test/dummy/db/schema.rb
|
841
|
+
- test/dummy/log/test.log
|
800
842
|
- test/dummy/public/404.html
|
801
843
|
- test/dummy/public/422.html
|
802
844
|
- test/dummy/public/500.html
|
@@ -879,10 +921,16 @@ files:
|
|
879
921
|
- test/models/disco_app/shop_test.rb
|
880
922
|
- test/models/disco_app/subscription_test.rb
|
881
923
|
- test/services/disco_app/charges_service_test.rb
|
924
|
+
- test/services/disco_app/flow/create_action_test.rb
|
925
|
+
- test/services/disco_app/flow/create_trigger_test.rb
|
926
|
+
- test/services/disco_app/flow/process_action_test.rb
|
927
|
+
- test/services/disco_app/flow/process_trigger_test.rb
|
882
928
|
- test/services/disco_app/subscription_service_test.rb
|
883
929
|
- test/support/test_file_fixtures.rb
|
884
930
|
- test/support/test_shopify_api.rb
|
885
931
|
- test/test_helper.rb
|
932
|
+
- test/vcr/flow_trigger_invalid_title.yml
|
933
|
+
- test/vcr/flow_trigger_valid.yml
|
886
934
|
- test/vcr/webhook_failure.yml
|
887
935
|
homepage: https://github.com/discolabs/disco_app/
|
888
936
|
licenses:
|
@@ -899,170 +947,177 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
899
947
|
version: '0'
|
900
948
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
901
949
|
requirements:
|
902
|
-
- - "
|
950
|
+
- - ">"
|
903
951
|
- !ruby/object:Gem::Version
|
904
|
-
version:
|
952
|
+
version: 1.3.1
|
905
953
|
requirements: []
|
906
954
|
rubyforge_project:
|
907
|
-
rubygems_version: 2.7.
|
955
|
+
rubygems_version: 2.7.3
|
908
956
|
signing_key:
|
909
957
|
specification_version: 4
|
910
958
|
summary: Rails engine for Shopify applications.
|
911
959
|
test_files:
|
912
|
-
- test/
|
913
|
-
- test/dummy/
|
914
|
-
- test/dummy/
|
915
|
-
- test/dummy/
|
916
|
-
- test/dummy/
|
917
|
-
- test/dummy/
|
918
|
-
- test/dummy/
|
919
|
-
- test/dummy/bin/bundle
|
920
|
-
- test/dummy/Rakefile
|
921
|
-
- test/dummy/config.ru
|
922
|
-
- test/dummy/app/assets/stylesheets/application.scss
|
923
|
-
- test/dummy/app/assets/javascripts/application.js
|
924
|
-
- test/dummy/app/jobs/products_create_job.rb
|
925
|
-
- test/dummy/app/jobs/products_update_job.rb
|
960
|
+
- test/clients/disco_app/api_client_test.rb
|
961
|
+
- test/dummy/app/models/disco_app/shop.rb
|
962
|
+
- test/dummy/app/models/product.rb
|
963
|
+
- test/dummy/app/models/js_configuration.rb
|
964
|
+
- test/dummy/app/models/widget_configuration.rb
|
965
|
+
- test/dummy/app/models/application_record.rb
|
966
|
+
- test/dummy/app/models/cart.rb
|
926
967
|
- test/dummy/app/jobs/disco_app/app_installed_job.rb
|
927
968
|
- test/dummy/app/jobs/disco_app/app_uninstalled_job.rb
|
928
|
-
- test/dummy/app/jobs/application_job.rb
|
929
969
|
- test/dummy/app/jobs/products_delete_job.rb
|
970
|
+
- test/dummy/app/jobs/products_update_job.rb
|
971
|
+
- test/dummy/app/jobs/products_create_job.rb
|
930
972
|
- test/dummy/app/jobs/carts_update_job.rb
|
931
|
-
- test/dummy/app/
|
932
|
-
- test/dummy/app/controllers/
|
973
|
+
- test/dummy/app/jobs/application_job.rb
|
974
|
+
- test/dummy/app/controllers/application_controller.rb
|
933
975
|
- test/dummy/app/controllers/carrier_request_controller.rb
|
976
|
+
- test/dummy/app/controllers/disco_app/admin/shops_controller.rb
|
934
977
|
- test/dummy/app/controllers/proxy_controller.rb
|
935
|
-
- test/dummy/app/controllers/
|
936
|
-
- test/dummy/app/helpers/application_helper.rb
|
937
|
-
- test/dummy/app/models/disco_app/shop.rb
|
938
|
-
- test/dummy/app/models/product.rb
|
939
|
-
- test/dummy/app/models/widget_configuration.rb
|
940
|
-
- test/dummy/app/models/js_configuration.rb
|
941
|
-
- test/dummy/app/models/application_record.rb
|
942
|
-
- test/dummy/app/models/cart.rb
|
943
|
-
- test/dummy/app/views/assets/script_tag.js.erb
|
944
|
-
- test/dummy/app/views/assets/widget.scss.erb
|
945
|
-
- test/dummy/app/views/assets/test.js.erb
|
946
|
-
- test/dummy/app/views/assets/widget.js.erb
|
978
|
+
- test/dummy/app/controllers/home_controller.rb
|
947
979
|
- test/dummy/app/views/snippets/widget.liquid.erb
|
948
980
|
- test/dummy/app/views/home/index.html.erb
|
949
|
-
- test/dummy/
|
950
|
-
- test/dummy/
|
951
|
-
- test/dummy/
|
952
|
-
- test/dummy/
|
953
|
-
- test/dummy/
|
954
|
-
- test/dummy/
|
955
|
-
- test/dummy/
|
956
|
-
- test/dummy/
|
957
|
-
- test/dummy/
|
958
|
-
- test/dummy/
|
959
|
-
- test/dummy/
|
960
|
-
- test/dummy/config/initializers/disco_app.rb
|
961
|
-
- test/dummy/config/initializers/shopify_app.rb
|
962
|
-
- test/dummy/config/initializers/shopify_session_repository.rb
|
963
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
964
|
-
- test/dummy/config/initializers/omniauth.rb
|
965
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
981
|
+
- test/dummy/app/views/assets/widget.scss.erb
|
982
|
+
- test/dummy/app/views/assets/widget.js.erb
|
983
|
+
- test/dummy/app/views/assets/test.js.erb
|
984
|
+
- test/dummy/app/views/assets/script_tag.js.erb
|
985
|
+
- test/dummy/app/assets/javascripts/application.js
|
986
|
+
- test/dummy/app/assets/stylesheets/application.scss
|
987
|
+
- test/dummy/app/helpers/application_helper.rb
|
988
|
+
- test/dummy/bin/rake
|
989
|
+
- test/dummy/bin/setup
|
990
|
+
- test/dummy/bin/bundle
|
991
|
+
- test/dummy/bin/rails
|
966
992
|
- test/dummy/config/secrets.yml
|
967
993
|
- test/dummy/config/routes.rb
|
968
|
-
- test/dummy/config/
|
994
|
+
- test/dummy/config/locales/en.yml
|
969
995
|
- test/dummy/config/environments/production.rb
|
970
|
-
- test/dummy/config/environments/test.rb
|
971
|
-
- test/dummy/config/environments/development.rb
|
972
996
|
- test/dummy/config/environments/staging.rb
|
997
|
+
- test/dummy/config/environments/development.rb
|
998
|
+
- test/dummy/config/environments/test.rb
|
973
999
|
- test/dummy/config/environment.rb
|
974
|
-
- test/dummy/config/boot.rb
|
975
|
-
- test/dummy/config/database.yml
|
976
1000
|
- test/dummy/config/application.rb
|
1001
|
+
- test/dummy/config/database.yml
|
1002
|
+
- test/dummy/config/database.codeship.yml
|
1003
|
+
- test/dummy/config/boot.rb
|
1004
|
+
- test/dummy/config/initializers/shopify_app.rb
|
1005
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
1006
|
+
- test/dummy/config/initializers/mime_types.rb
|
1007
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
1008
|
+
- test/dummy/config/initializers/shopify_session_repository.rb
|
1009
|
+
- test/dummy/config/initializers/session_store.rb
|
1010
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
1011
|
+
- test/dummy/config/initializers/assets.rb
|
1012
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
1013
|
+
- test/dummy/config/initializers/disco_app.rb
|
1014
|
+
- test/dummy/config/initializers/omniauth.rb
|
1015
|
+
- test/dummy/config/initializers/inflections.rb
|
1016
|
+
- test/dummy/config.ru
|
1017
|
+
- test/dummy/Rakefile
|
1018
|
+
- test/dummy/public/favicon.ico
|
1019
|
+
- test/dummy/public/422.html
|
1020
|
+
- test/dummy/public/500.html
|
1021
|
+
- test/dummy/public/404.html
|
1022
|
+
- test/dummy/db/schema.rb
|
1023
|
+
- test/dummy/db/migrate/20161105054746_create_carts.rb
|
1024
|
+
- test/dummy/db/migrate/20160530160739_create_asset_models.rb
|
1025
|
+
- test/dummy/db/migrate/20160307182229_create_products.rb
|
1026
|
+
- test/dummy/log/test.log
|
1027
|
+
- test/integration/synchronises_test.rb
|
1028
|
+
- test/models/disco_app/session_test.rb
|
1029
|
+
- test/models/disco_app/renders_assets_test.rb
|
1030
|
+
- test/models/disco_app/has_metafields_test.rb
|
1031
|
+
- test/models/disco_app/plan_test.rb
|
1032
|
+
- test/models/disco_app/shop_test.rb
|
1033
|
+
- test/models/disco_app/can_be_liquified_test.rb
|
1034
|
+
- test/models/disco_app/subscription_test.rb
|
1035
|
+
- test/disco_app_test.rb
|
1036
|
+
- test/vcr/flow_trigger_valid.yml
|
1037
|
+
- test/vcr/webhook_failure.yml
|
1038
|
+
- test/vcr/flow_trigger_invalid_title.yml
|
1039
|
+
- test/support/test_shopify_api.rb
|
1040
|
+
- test/support/test_file_fixtures.rb
|
1041
|
+
- test/fixtures/products.yml
|
1042
|
+
- test/fixtures/disco_app/application_charges.yml
|
1043
|
+
- test/fixtures/disco_app/shops.yml
|
1044
|
+
- test/fixtures/disco_app/plan_codes.yml
|
1045
|
+
- test/fixtures/disco_app/subscriptions.yml
|
1046
|
+
- test/fixtures/disco_app/sources.yml
|
1047
|
+
- test/fixtures/disco_app/recurring_application_charges.yml
|
1048
|
+
- test/fixtures/disco_app/plans.yml
|
1049
|
+
- test/fixtures/widget_configurations.yml
|
977
1050
|
- test/fixtures/liquid/model.liquid
|
978
|
-
- test/fixtures/api/subscriptions/valid_request.json
|
979
|
-
- test/fixtures/api/widget_store/users.json
|
980
1051
|
- test/fixtures/api/widget_store/carrier_services.json
|
981
|
-
- test/fixtures/api/widget_store/
|
982
|
-
- test/fixtures/api/widget_store/assets/create_widget_js_response.json
|
983
|
-
- test/fixtures/api/widget_store/assets/create_test_js_request.json
|
984
|
-
- test/fixtures/api/widget_store/assets/update_script_tag_request.json
|
985
|
-
- test/fixtures/api/widget_store/assets/create_script_tag_response.json
|
986
|
-
- test/fixtures/api/widget_store/assets/create_script_tag_js_response.json
|
987
|
-
- test/fixtures/api/widget_store/assets/create_widget_scss_request.json
|
988
|
-
- test/fixtures/api/widget_store/assets/update_script_tag_response.json
|
989
|
-
- test/fixtures/api/widget_store/assets/create_widget_liquid_request.json
|
990
|
-
- test/fixtures/api/widget_store/assets/create_script_tag_js_request.json
|
991
|
-
- test/fixtures/api/widget_store/assets/create_script_tag_request.json
|
992
|
-
- test/fixtures/api/widget_store/assets/get_script_tags_preexisting_response.json
|
993
|
-
- test/fixtures/api/widget_store/assets/create_widget_scss_response.json
|
994
|
-
- test/fixtures/api/widget_store/assets/create_widget_liquid_response.json
|
995
|
-
- test/fixtures/api/widget_store/assets/get_script_tags_preexisting_request.json
|
996
|
-
- test/fixtures/api/widget_store/assets/get_script_tags_empty_response.json
|
997
|
-
- test/fixtures/api/widget_store/assets/get_script_tags_empty_request.json
|
998
|
-
- test/fixtures/api/widget_store/assets/create_widget_js_request.json
|
1052
|
+
- test/fixtures/api/widget_store/webhooks.json
|
999
1053
|
- test/fixtures/api/widget_store/products/write_metafields_single_namespace_response.json
|
1000
|
-
- test/fixtures/api/widget_store/products/write_metafields_multiple_namespaces_request.json
|
1001
1054
|
- test/fixtures/api/widget_store/products/write_metafields_multiple_namespaces_response.json
|
1002
1055
|
- test/fixtures/api/widget_store/products/write_metafields_single_namespace_request.json
|
1003
|
-
- test/fixtures/api/widget_store/
|
1004
|
-
- test/fixtures/api/widget_store/charges/
|
1005
|
-
- test/fixtures/api/widget_store/charges/
|
1006
|
-
- test/fixtures/api/widget_store/charges/activate_application_charge_response.json
|
1007
|
-
- test/fixtures/api/widget_store/charges/create_application_charge_request.json
|
1008
|
-
- test/fixtures/api/widget_store/charges/create_recurring_application_charge_response.json
|
1009
|
-
- test/fixtures/api/widget_store/charges/get_pending_recurring_application_charge_response.json
|
1010
|
-
- test/fixtures/api/widget_store/charges/get_declined_recurring_application_charge_response.json
|
1056
|
+
- test/fixtures/api/widget_store/products/write_metafields_multiple_namespaces_request.json
|
1057
|
+
- test/fixtures/api/widget_store/charges/activate_recurring_application_charge_request.json
|
1058
|
+
- test/fixtures/api/widget_store/charges/activate_application_charge_request.json
|
1011
1059
|
- test/fixtures/api/widget_store/charges/get_pending_application_charge_response.json
|
1012
1060
|
- test/fixtures/api/widget_store/charges/activate_recurring_application_charge_response.json
|
1013
|
-
- test/fixtures/api/widget_store/charges/
|
1014
|
-
- test/fixtures/api/widget_store/charges/
|
1015
|
-
- test/fixtures/api/widget_store/charges/
|
1061
|
+
- test/fixtures/api/widget_store/charges/create_application_charge_request.json
|
1062
|
+
- test/fixtures/api/widget_store/charges/create_application_charge_response.json
|
1063
|
+
- test/fixtures/api/widget_store/charges/activate_application_charge_response.json
|
1016
1064
|
- test/fixtures/api/widget_store/charges/create_recurring_application_charge_request.json
|
1017
1065
|
- test/fixtures/api/widget_store/charges/get_declined_application_charge_response.json
|
1066
|
+
- test/fixtures/api/widget_store/charges/get_declined_recurring_application_charge_response.json
|
1067
|
+
- test/fixtures/api/widget_store/charges/get_pending_recurring_application_charge_response.json
|
1068
|
+
- test/fixtures/api/widget_store/charges/get_accepted_recurring_application_charge_response.json
|
1018
1069
|
- test/fixtures/api/widget_store/charges/create_second_recurring_application_charge_request.json
|
1019
|
-
- test/fixtures/api/widget_store/charges/
|
1020
|
-
- test/fixtures/api/widget_store/
|
1070
|
+
- test/fixtures/api/widget_store/charges/create_second_recurring_application_charge_response.json
|
1071
|
+
- test/fixtures/api/widget_store/charges/get_accepted_application_charge_response.json
|
1072
|
+
- test/fixtures/api/widget_store/charges/create_recurring_application_charge_response.json
|
1073
|
+
- test/fixtures/api/widget_store/users.json
|
1021
1074
|
- test/fixtures/api/widget_store/shop.json
|
1022
|
-
- test/fixtures/
|
1023
|
-
- test/fixtures/assets/
|
1024
|
-
- test/fixtures/
|
1025
|
-
- test/fixtures/
|
1026
|
-
- test/fixtures/
|
1027
|
-
- test/fixtures/
|
1028
|
-
- test/fixtures/
|
1029
|
-
- test/fixtures/
|
1030
|
-
- test/fixtures/
|
1031
|
-
- test/fixtures/
|
1032
|
-
- test/fixtures/
|
1033
|
-
- test/fixtures/
|
1075
|
+
- test/fixtures/api/widget_store/carrier_services_create.json
|
1076
|
+
- test/fixtures/api/widget_store/assets/create_widget_liquid_request.json
|
1077
|
+
- test/fixtures/api/widget_store/assets/create_test_js_response.json
|
1078
|
+
- test/fixtures/api/widget_store/assets/create_widget_js_request.json
|
1079
|
+
- test/fixtures/api/widget_store/assets/update_script_tag_response.json
|
1080
|
+
- test/fixtures/api/widget_store/assets/create_script_tag_js_response.json
|
1081
|
+
- test/fixtures/api/widget_store/assets/create_script_tag_response.json
|
1082
|
+
- test/fixtures/api/widget_store/assets/create_widget_scss_request.json
|
1083
|
+
- test/fixtures/api/widget_store/assets/get_script_tags_preexisting_response.json
|
1084
|
+
- test/fixtures/api/widget_store/assets/create_widget_liquid_response.json
|
1085
|
+
- test/fixtures/api/widget_store/assets/get_script_tags_preexisting_request.json
|
1086
|
+
- test/fixtures/api/widget_store/assets/create_widget_scss_response.json
|
1087
|
+
- test/fixtures/api/widget_store/assets/create_script_tag_request.json
|
1088
|
+
- test/fixtures/api/widget_store/assets/create_widget_js_response.json
|
1089
|
+
- test/fixtures/api/widget_store/assets/get_script_tags_empty_request.json
|
1090
|
+
- test/fixtures/api/widget_store/assets/update_script_tag_request.json
|
1091
|
+
- test/fixtures/api/widget_store/assets/create_script_tag_js_request.json
|
1092
|
+
- test/fixtures/api/widget_store/assets/create_test_js_request.json
|
1093
|
+
- test/fixtures/api/widget_store/assets/get_script_tags_empty_response.json
|
1094
|
+
- test/fixtures/api/subscriptions/valid_request.json
|
1095
|
+
- test/fixtures/webhooks/product_deleted.json
|
1034
1096
|
- test/fixtures/webhooks/cart_updated.json
|
1035
|
-
- test/fixtures/webhooks/app_uninstalled.json
|
1036
1097
|
- test/fixtures/webhooks/product_updated.json
|
1037
1098
|
- test/fixtures/webhooks/product_created.json
|
1038
|
-
- test/fixtures/webhooks/
|
1039
|
-
- test/fixtures/
|
1040
|
-
- test/
|
1041
|
-
- test/
|
1099
|
+
- test/fixtures/webhooks/app_uninstalled.json
|
1100
|
+
- test/fixtures/assets/test.js
|
1101
|
+
- test/fixtures/assets/test.min.js
|
1102
|
+
- test/fixtures/carts.yml
|
1103
|
+
- test/fixtures/js_configurations.yml
|
1042
1104
|
- test/test_helper.rb
|
1043
|
-
- test/
|
1105
|
+
- test/jobs/disco_app/synchronise_users_job_test.rb
|
1106
|
+
- test/jobs/disco_app/synchronise_webhooks_job_test.rb
|
1044
1107
|
- test/jobs/disco_app/app_uninstalled_job_test.rb
|
1045
1108
|
- test/jobs/disco_app/synchronise_carrier_service_job_test.rb
|
1046
|
-
- test/jobs/disco_app/synchronise_users_job_test.rb
|
1047
1109
|
- test/jobs/disco_app/send_subscription_job_test.rb
|
1048
|
-
- test/jobs/disco_app/synchronise_webhooks_job_test.rb
|
1049
1110
|
- test/jobs/disco_app/app_installed_job_test.rb
|
1050
|
-
- test/
|
1111
|
+
- test/controllers/proxy_controller_test.rb
|
1051
1112
|
- test/controllers/disco_app/install_controller_test.rb
|
1052
|
-
- test/controllers/disco_app/
|
1113
|
+
- test/controllers/disco_app/charges_controller_test.rb
|
1053
1114
|
- test/controllers/disco_app/admin/shops_controller_test.rb
|
1054
1115
|
- test/controllers/disco_app/subscriptions_controller_test.rb
|
1055
|
-
- test/controllers/disco_app/
|
1056
|
-
- test/controllers/proxy_controller_test.rb
|
1116
|
+
- test/controllers/disco_app/webhooks_controller_test.rb
|
1057
1117
|
- test/controllers/home_controller_test.rb
|
1058
|
-
- test/integration/synchronises_test.rb
|
1059
|
-
- test/clients/disco_app/api_client_test.rb
|
1060
|
-
- test/models/disco_app/plan_test.rb
|
1061
|
-
- test/models/disco_app/has_metafields_test.rb
|
1062
|
-
- test/models/disco_app/shop_test.rb
|
1063
|
-
- test/models/disco_app/session_test.rb
|
1064
|
-
- test/models/disco_app/subscription_test.rb
|
1065
|
-
- test/models/disco_app/can_be_liquified_test.rb
|
1066
|
-
- test/models/disco_app/renders_assets_test.rb
|
1067
|
-
- test/services/disco_app/charges_service_test.rb
|
1068
1118
|
- test/services/disco_app/subscription_service_test.rb
|
1119
|
+
- test/services/disco_app/charges_service_test.rb
|
1120
|
+
- test/services/disco_app/flow/process_trigger_test.rb
|
1121
|
+
- test/services/disco_app/flow/process_action_test.rb
|
1122
|
+
- test/services/disco_app/flow/create_trigger_test.rb
|
1123
|
+
- test/services/disco_app/flow/create_action_test.rb
|
@@ -1,53 +0,0 @@
|
|
1
|
-
require 'rest-client'
|
2
|
-
|
3
|
-
class DiscoApp::RollbarClient
|
4
|
-
|
5
|
-
API_URL = 'https://api.rollbar.com/api/1'
|
6
|
-
CREATE_PROJECT_ENDPOINT = '/projects'
|
7
|
-
ACCESS_TOKEN_ENDPOINT = '/project'
|
8
|
-
ACCESS_TOKEN_SCOPE = 'post_server_item'
|
9
|
-
|
10
|
-
def initialize(params)
|
11
|
-
@write_access_token = params[:write_account_access_token]
|
12
|
-
@read_access_token = params[:read_account_access_token]
|
13
|
-
end
|
14
|
-
|
15
|
-
# Create project on Rollbar, returns it new post server side access token
|
16
|
-
def create_project(name)
|
17
|
-
begin
|
18
|
-
response = RestClient::Request.execute(
|
19
|
-
method: :post,
|
20
|
-
headers: { content_type: :json },
|
21
|
-
url: create_api_url,
|
22
|
-
payload: { name: name.parameterize }.to_json
|
23
|
-
)
|
24
|
-
request_access_token(ActiveSupport::JSON.decode(response).dig('result', 'id'))
|
25
|
-
rescue RestClient::BadRequest => e
|
26
|
-
raise RollbarClientError.new(e.message)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
def request_access_token(project_id)
|
33
|
-
begin
|
34
|
-
response = RestClient.get(access_tokens_api_url(project_id))
|
35
|
-
# Only return post_server_item server side access token
|
36
|
-
post_server_access_token(ActiveSupport::JSON.decode(response)['result'])
|
37
|
-
rescue RestClient::BadRequest => e
|
38
|
-
raise RollbarClientError.new(e.message)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def create_api_url
|
43
|
-
API_URL + CREATE_PROJECT_ENDPOINT + "?access_token=#{@write_access_token}"
|
44
|
-
end
|
45
|
-
|
46
|
-
def access_tokens_api_url(project_id)
|
47
|
-
API_URL + ACCESS_TOKEN_ENDPOINT + "/#{project_id}/access_tokens?access_token=#{@read_access_token}"
|
48
|
-
end
|
49
|
-
|
50
|
-
def post_server_access_token(results)
|
51
|
-
results.select { |x| x['name'] == ACCESS_TOKEN_SCOPE }.first['access_token']
|
52
|
-
end
|
53
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
Rollbar.configure do |config|
|
2
|
-
# Fetch the access token from the environment.
|
3
|
-
config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
|
4
|
-
|
5
|
-
# Only use Rollbar in production when there's a token configured.
|
6
|
-
config.enabled = false unless config.access_token && Rails.env.production?
|
7
|
-
|
8
|
-
# Enable delayed reporting (using Sidekiq)
|
9
|
-
config.use_sidekiq
|
10
|
-
|
11
|
-
# Enable "Person" feature of Rollbar in the context of a "Shop"
|
12
|
-
config.person_method = 'current_shop'
|
13
|
-
config.person_username_method = 'shopify_domain'
|
14
|
-
|
15
|
-
# Add custom handlers.
|
16
|
-
config.before_process << proc do |options|
|
17
|
-
if options[:exception].is_a?(ActiveResource::ClientError) && options[:exception].message.include?('Too Many Requests')
|
18
|
-
raise Rollbar::Ignore
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/tasks/rollbar.rake
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
namespace :generate do
|
4
|
-
desc "Create Rollbar project for current shopify app, and return the ROLLBAR API TOKEN"
|
5
|
-
task rollbar_project: :environment do
|
6
|
-
begin
|
7
|
-
config_path = File.join(ENV['HOME'], '.disco_app.yml')
|
8
|
-
config = YAML.load_file(config_path)
|
9
|
-
rescue StandardError
|
10
|
-
abort("Could not load configuration file from #{config_path}, aborting.")
|
11
|
-
end
|
12
|
-
|
13
|
-
params = {
|
14
|
-
write_account_access_token: config['params']['ROLLBAR_ACCOUNT_ACCESS_TOKEN_WRITE'].to_s,
|
15
|
-
read_account_access_token: config['params']['ROLLBAR_ACCOUNT_ACCESS_TOKEN_READ'].to_s
|
16
|
-
}
|
17
|
-
|
18
|
-
project_access_token = DiscoApp::RollbarClient.new(params).create_project(ENV['APP_NAME'].blank? ? ENV['SHOPIFY_APP_NAME'] : ENV['APP_NAME'])
|
19
|
-
puts '#' * 80
|
20
|
-
puts 'New Rollbar project successfully created!'
|
21
|
-
puts "ROLLBAR_ACCESS_TOKEN = #{project_access_token}"
|
22
|
-
puts '#' * 80
|
23
|
-
end
|
24
|
-
end
|