hippo-fw 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +16 -11
  4. data/Rakefile +0 -7
  5. data/bin/hippo +5 -1
  6. data/client/hippo/__mocks__/config.js +2 -3
  7. data/client/hippo/boot.jsx +0 -2
  8. data/client/hippo/components/asset.jsx +1 -1
  9. data/client/hippo/components/form.jsx +8 -4
  10. data/client/hippo/components/form/fields.jsx +28 -14
  11. data/client/hippo/components/form/model.js +65 -20
  12. data/client/hippo/components/form/wrapper.jsx +11 -5
  13. data/client/hippo/components/icon.jsx +1 -1
  14. data/client/hippo/components/master-detail.jsx +66 -0
  15. data/client/hippo/components/master-detail.scss +50 -0
  16. data/client/hippo/components/record-finder.jsx +5 -5
  17. data/client/hippo/components/tool-tip.jsx +20 -0
  18. data/client/hippo/config.js +5 -3
  19. data/client/hippo/extensions/base.js +4 -0
  20. data/client/hippo/lib/smooth-scroll.js +17 -16
  21. data/client/hippo/models/asset.js +8 -10
  22. data/client/hippo/models/collection.js +1 -4
  23. data/client/hippo/models/query/array-result.js +11 -9
  24. data/client/hippo/models/sync.js +3 -3
  25. data/client/hippo/models/tenant.js +29 -0
  26. data/client/hippo/screens/system-settings.jsx +5 -4
  27. data/client/hippo/screens/system-settings/mailer-config.jsx +11 -17
  28. data/client/hippo/screens/system-settings/tenant.jsx +90 -0
  29. data/client/hippo/screens/user-management/edit-form.jsx +15 -25
  30. data/client/hippo/testing/index.js +1 -0
  31. data/client/hippo/workspace/styles.scss +0 -23
  32. data/command-reference-files/initial/.babelrc +10 -8
  33. data/command-reference-files/initial/Gemfile +1 -1
  34. data/{views/index.html → command-reference-files/initial/views/index.erb} +1 -0
  35. data/config/routes.rb +48 -17
  36. data/config/webpack.config.js +7 -12
  37. data/db/migrate/01_create_tenants.rb +13 -0
  38. data/db/migrate/{01_create_system_settings.rb → 02_create_system_settings.rb} +2 -1
  39. data/db/migrate/{02_create_assets.rb → 03_create_assets.rb} +2 -4
  40. data/db/migrate/{20140615031600_create_users.rb → 04_create_users.rb} +4 -2
  41. data/db/seed.rb +10 -1
  42. data/hippo-fw.gemspec +53 -51
  43. data/lib/hippo.rb +7 -1
  44. data/lib/hippo/access.rb +0 -1
  45. data/lib/hippo/access/roles/basic_user.rb +2 -0
  46. data/lib/hippo/api.rb +4 -3
  47. data/lib/hippo/{access → api}/authentication_provider.rb +3 -1
  48. data/lib/hippo/api/controller_base.rb +2 -2
  49. data/lib/hippo/api/handlers/asset.rb +28 -2
  50. data/lib/hippo/api/handlers/tenant.rb +26 -0
  51. data/lib/hippo/api/helper_methods.rb +5 -13
  52. data/lib/hippo/api/request_wrapper.rb +8 -1
  53. data/lib/hippo/api/root.rb +50 -51
  54. data/lib/hippo/api/route_set.rb +101 -0
  55. data/lib/hippo/api/routing.rb +9 -98
  56. data/lib/hippo/api/tenant_domain_router.rb +21 -0
  57. data/lib/hippo/asset.rb +1 -0
  58. data/lib/hippo/command.rb +1 -24
  59. data/lib/hippo/command/app.rb +4 -3
  60. data/lib/hippo/command/console.rb +7 -0
  61. data/lib/hippo/command/generate.rb +0 -5
  62. data/lib/hippo/command/guard.rb +1 -0
  63. data/lib/hippo/command/jest.rb +2 -2
  64. data/lib/hippo/command/server.rb +1 -3
  65. data/lib/hippo/command/webpack.rb +6 -26
  66. data/lib/hippo/configuration.rb +21 -13
  67. data/lib/hippo/db.rb +2 -0
  68. data/lib/hippo/db/migrations.rb +9 -2
  69. data/lib/hippo/extension.rb +49 -14
  70. data/lib/hippo/extension/definition.rb +0 -4
  71. data/lib/hippo/guard_tasks.rb +3 -11
  72. data/lib/hippo/mailer.rb +28 -16
  73. data/lib/hippo/model.rb +10 -0
  74. data/lib/hippo/numbers.rb +1 -1
  75. data/lib/hippo/rake_tasks.rb +7 -1
  76. data/lib/hippo/spec_helper.rb +33 -11
  77. data/lib/hippo/system_settings.rb +1 -0
  78. data/lib/hippo/templates/base.rb +1 -1
  79. data/lib/hippo/templates/mail.rb +26 -0
  80. data/lib/hippo/templates/tenant_change.rb +23 -0
  81. data/lib/hippo/tenant.rb +53 -0
  82. data/lib/hippo/user.rb +12 -6
  83. data/lib/hippo/version.rb +1 -1
  84. data/lib/hippo/webpack.rb +57 -0
  85. data/lib/hippo/{command → webpack}/client_config.rb +7 -21
  86. data/package.json +3 -3
  87. data/spec/client/components/__snapshots__/master-detail.spec.jsx.snap +22 -0
  88. data/spec/client/components/form.spec.jsx +14 -14
  89. data/spec/client/components/master-detail.spec.jsx +24 -0
  90. data/spec/client/components/record-finder.spec.jsx +5 -2
  91. data/spec/client/models/asset.spec.js +2 -13
  92. data/spec/client/models/base.spec.js +1 -11
  93. data/spec/client/models/query.spec.js +2 -4
  94. data/spec/client/models/sync.spec.js +7 -0
  95. data/spec/client/screens/__snapshots__/system-settings.spec.jsx.snap +79 -0
  96. data/spec/client/screens/system-settings-tenants.spec.jsx +18 -0
  97. data/spec/client/workspace/__snapshots__/menu.spec.jsx.snap +29 -313
  98. data/spec/client/workspace/menu.spec.jsx +1 -9
  99. data/spec/factories/tenant.rb +13 -0
  100. data/spec/fixtures/mail/test_email.liquid +1 -0
  101. data/spec/fixtures/{test_printer.tex → test_printer.tex.erb} +0 -0
  102. data/spec/server/api/controller_base_spec.rb +1 -1
  103. data/spec/server/api/tenant_change_spec.rb +24 -0
  104. data/spec/server/api/tenant_isolation_spec.rb +37 -0
  105. data/spec/server/asset_spec.rb +6 -6
  106. data/spec/server/command_spec.rb +0 -5
  107. data/spec/server/mailer_spec.rb +25 -23
  108. data/spec/server/numbers_spec.rb +12 -13
  109. data/spec/server/print/form_spec.rb +2 -1
  110. data/spec/server/strings_spec.rb +13 -13
  111. data/templates/.babelrc +10 -8
  112. data/templates/js/screen-definitions.js +8 -10
  113. data/templates/mail/tenant_change.liquid +13 -0
  114. data/{command-reference-files/initial/views/index.html → views/index.erb} +5 -2
  115. data/yarn.lock +22 -169
  116. metadata +56 -30
  117. data/client/hippo/components/form/field-prop-type.js +0 -16
  118. data/lib/hippo/api/default_routes.rb +0 -38
  119. data/lib/hippo/command/generate_component.rb +0 -28
  120. data/lib/hippo/command/generate_component.usage +0 -11
  121. data/lib/hippo/command/webpack_view.rb +0 -32
  122. data/lib/hippo/multi_server_boot.rb +0 -26
  123. data/lib/hippo/reloadable_view.rb +0 -13
  124. data/templates/client/components/.gitkeep +0 -0
  125. data/templates/client/components/BaseComponent.coffee +0 -9
  126. data/templates/client/components/Component.cjsx +0 -4
  127. data/templates/client/components/template.html +0 -3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hippo-fw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Stitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: scenic
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.4'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.4'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: liquid
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -184,28 +198,28 @@ dependencies:
184
198
  requirements:
185
199
  - - "~>"
186
200
  - !ruby/object:Gem::Version
187
- version: 2.0.0.rc2
201
+ version: 2.0.0
188
202
  type: :runtime
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
206
  - - "~>"
193
207
  - !ruby/object:Gem::Version
194
- version: 2.0.0.rc2
208
+ version: 2.0.0
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: rack-protection
197
211
  requirement: !ruby/object:Gem::Requirement
198
212
  requirements:
199
213
  - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: 2.0.0.rc2
215
+ version: 2.0.0
202
216
  type: :runtime
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - "~>"
207
221
  - !ruby/object:Gem::Version
208
- version: 2.0.0.rc2
222
+ version: 2.0.0
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: rack
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -338,14 +352,14 @@ dependencies:
338
352
  requirements:
339
353
  - - "~>"
340
354
  - !ruby/object:Gem::Version
341
- version: '3.5'
355
+ version: '3.6'
342
356
  type: :runtime
343
357
  prerelease: false
344
358
  version_requirements: !ruby/object:Gem::Requirement
345
359
  requirements:
346
360
  - - "~>"
347
361
  - !ruby/object:Gem::Version
348
- version: '3.5'
362
+ version: '3.6'
349
363
  - !ruby/object:Gem::Dependency
350
364
  name: guard-jest
351
365
  requirement: !ruby/object:Gem::Requirement
@@ -520,14 +534,14 @@ dependencies:
520
534
  requirements:
521
535
  - - "~>"
522
536
  - !ruby/object:Gem::Version
523
- version: '0.2'
537
+ version: 0.3.7
524
538
  type: :runtime
525
539
  prerelease: false
526
540
  version_requirements: !ruby/object:Gem::Requirement
527
541
  requirements:
528
542
  - - "~>"
529
543
  - !ruby/object:Gem::Version
530
- version: '0.2'
544
+ version: 0.3.7
531
545
  - !ruby/object:Gem::Dependency
532
546
  name: knitter
533
547
  requirement: !ruby/object:Gem::Requirement
@@ -653,7 +667,6 @@ files:
653
667
  - client/hippo/components/enabled.js.erb
654
668
  - client/hippo/components/field-validation.js
655
669
  - client/hippo/components/form.jsx
656
- - client/hippo/components/form/field-prop-type.js
657
670
  - client/hippo/components/form/fields.jsx
658
671
  - client/hippo/components/form/fields/checkbox-wrapper.jsx
659
672
  - client/hippo/components/form/fields/date-wrapper.jsx
@@ -670,6 +683,8 @@ files:
670
683
  - client/hippo/components/grid/styles.scss
671
684
  - client/hippo/components/icon.jsx
672
685
  - client/hippo/components/index.js
686
+ - client/hippo/components/master-detail.jsx
687
+ - client/hippo/components/master-detail.scss
673
688
  - client/hippo/components/modal/index.js
674
689
  - client/hippo/components/modal/styles.scss
675
690
  - client/hippo/components/network-activity-overlay.jsx
@@ -717,6 +732,7 @@ files:
717
732
  - client/hippo/components/shared/resize-sensor.scss
718
733
  - client/hippo/components/shared/styles.scss
719
734
  - client/hippo/components/shared/throbber.scss
735
+ - client/hippo/components/tool-tip.jsx
720
736
  - client/hippo/components/toolbar/changes-notification.scss
721
737
  - client/hippo/components/toolbar/index.js
722
738
  - client/hippo/components/toolbar/styles.scss
@@ -758,6 +774,7 @@ files:
758
774
  - client/hippo/models/query/types.js
759
775
  - client/hippo/models/sync.js
760
776
  - client/hippo/models/system-setting.js
777
+ - client/hippo/models/tenant.js
761
778
  - client/hippo/react/DefaultComponentNotFound.jsx
762
779
  - client/hippo/react/Root.jsx
763
780
  - client/hippo/react/index.js
@@ -773,6 +790,7 @@ files:
773
790
  - client/hippo/screens/system-settings.jsx
774
791
  - client/hippo/screens/system-settings/mailer-config.jsx
775
792
  - client/hippo/screens/system-settings/system-settings.scss
793
+ - client/hippo/screens/system-settings/tenant.jsx
776
794
  - client/hippo/screens/user-management.jsx
777
795
  - client/hippo/screens/user-management/edit-form.jsx
778
796
  - client/hippo/screens/user-management/index.scss
@@ -850,11 +868,13 @@ files:
850
868
  - command-reference-files/initial/lib/appy-app/extension.rb
851
869
  - command-reference-files/initial/lib/appy-app/model.rb
852
870
  - command-reference-files/initial/lib/appy-app/version.rb
871
+ - command-reference-files/initial/log/.gitkeep
853
872
  - command-reference-files/initial/package.json
854
873
  - command-reference-files/initial/spec/client/.eslintrc.js
855
874
  - command-reference-files/initial/spec/client/setup.js
856
875
  - command-reference-files/initial/spec/server/spec_helper.rb
857
- - command-reference-files/initial/views/index.html
876
+ - command-reference-files/initial/tmp/.gitkeep
877
+ - command-reference-files/initial/views/index.erb
858
878
  - command-reference-files/model/client/appy-app/models/test_test.js
859
879
  - command-reference-files/model/config/routes.rb
860
880
  - command-reference-files/model/db/migrate/20150218032025_create_test_tests.rb
@@ -876,9 +896,10 @@ files:
876
896
  - config/routes.rb
877
897
  - config/screens.rb
878
898
  - config/webpack.config.js
879
- - db/migrate/01_create_system_settings.rb
880
- - db/migrate/02_create_assets.rb
881
- - db/migrate/20140615031600_create_users.rb
899
+ - db/migrate/01_create_tenants.rb
900
+ - db/migrate/02_create_system_settings.rb
901
+ - db/migrate/03_create_assets.rb
902
+ - db/migrate/04_create_users.rb
882
903
  - db/seed.rb
883
904
  - docs/command.md
884
905
  - docs/model.md
@@ -890,7 +911,6 @@ files:
890
911
  - lib/hippo-fw.rb
891
912
  - lib/hippo.rb
892
913
  - lib/hippo/access.rb
893
- - lib/hippo/access/authentication_provider.rb
894
914
  - lib/hippo/access/config/database.yml
895
915
  - lib/hippo/access/config/routes.rb
896
916
  - lib/hippo/access/locked_fields.rb
@@ -909,21 +929,24 @@ files:
909
929
  - lib/hippo/access/track_modifications.rb
910
930
  - lib/hippo/access/version.rb
911
931
  - lib/hippo/api.rb
932
+ - lib/hippo/api/authentication_provider.rb
912
933
  - lib/hippo/api/cable.rb
913
934
  - lib/hippo/api/controller_base.rb
914
- - lib/hippo/api/default_routes.rb
915
935
  - lib/hippo/api/error_formatter.rb
916
936
  - lib/hippo/api/formatted_reply.rb
917
937
  - lib/hippo/api/generic_controller.rb
918
938
  - lib/hippo/api/handlers/asset.rb
919
939
  - lib/hippo/api/handlers/print.rb
940
+ - lib/hippo/api/handlers/tenant.rb
920
941
  - lib/hippo/api/handlers/user_session.rb
921
942
  - lib/hippo/api/helper_methods.rb
922
943
  - lib/hippo/api/pub_sub.rb
923
944
  - lib/hippo/api/request_wrapper.rb
924
945
  - lib/hippo/api/root.rb
946
+ - lib/hippo/api/route_set.rb
925
947
  - lib/hippo/api/routing.rb
926
948
  - lib/hippo/api/sprockets_extension.rb
949
+ - lib/hippo/api/tenant_domain_router.rb
927
950
  - lib/hippo/api/to_json.rb
928
951
  - lib/hippo/api/updates.rb
929
952
  - lib/hippo/asset.rb
@@ -931,14 +954,11 @@ files:
931
954
  - lib/hippo/cli.rb
932
955
  - lib/hippo/command.rb
933
956
  - lib/hippo/command/app.rb
934
- - lib/hippo/command/client_config.rb
935
957
  - lib/hippo/command/client_model_update.rb
936
958
  - lib/hippo/command/console.rb
937
959
  - lib/hippo/command/db.rb
938
960
  - lib/hippo/command/db.usage
939
961
  - lib/hippo/command/generate.rb
940
- - lib/hippo/command/generate_component.rb
941
- - lib/hippo/command/generate_component.usage
942
962
  - lib/hippo/command/generate_migration.rb
943
963
  - lib/hippo/command/generate_model.rb
944
964
  - lib/hippo/command/generate_model.usage
@@ -956,7 +976,6 @@ files:
956
976
  - lib/hippo/command/update_model.rb
957
977
  - lib/hippo/command/update_model.usage
958
978
  - lib/hippo/command/webpack.rb
959
- - lib/hippo/command/webpack_view.rb
960
979
  - lib/hippo/concerns/all.rb
961
980
  - lib/hippo/concerns/api_path.rb
962
981
  - lib/hippo/concerns/asset_uploader.rb
@@ -987,13 +1006,11 @@ files:
987
1006
  - lib/hippo/logger.rb
988
1007
  - lib/hippo/mailer.rb
989
1008
  - lib/hippo/model.rb
990
- - lib/hippo/multi_server_boot.rb
991
1009
  - lib/hippo/numbers.rb
992
1010
  - lib/hippo/rails_engine.rb
993
1011
  - lib/hippo/rake_tasks.rb
994
1012
  - lib/hippo/redis.rb
995
1013
  - lib/hippo/reloadable_sinatra.rb
996
- - lib/hippo/reloadable_view.rb
997
1014
  - lib/hippo/screen.rb
998
1015
  - lib/hippo/spec_helper.rb
999
1016
  - lib/hippo/strings.rb
@@ -1001,11 +1018,16 @@ files:
1001
1018
  - lib/hippo/templates/base.rb
1002
1019
  - lib/hippo/templates/latex.rb
1003
1020
  - lib/hippo/templates/liquid.rb
1021
+ - lib/hippo/templates/mail.rb
1022
+ - lib/hippo/templates/tenant_change.rb
1023
+ - lib/hippo/tenant.rb
1004
1024
  - lib/hippo/user.rb
1005
1025
  - lib/hippo/validators/all.rb
1006
1026
  - lib/hippo/validators/email.rb
1007
1027
  - lib/hippo/validators/set.rb
1008
1028
  - lib/hippo/version.rb
1029
+ - lib/hippo/webpack.rb
1030
+ - lib/hippo/webpack/client_config.rb
1009
1031
  - lib/hippo/workspace.rb
1010
1032
  - lib/hippo/workspace/config/screens.rb
1011
1033
  - log/.gitkeep
@@ -1013,12 +1035,14 @@ files:
1013
1035
  - spec/client/.eslintrc.js
1014
1036
  - spec/client/access/login-dialog.spec.jsx
1015
1037
  - spec/client/components/__snapshots__/asset.spec.jsx.snap
1038
+ - spec/client/components/__snapshots__/master-detail.spec.jsx.snap
1016
1039
  - spec/client/components/__snapshots__/network-activity-overlay.spec.jsx.snap
1017
1040
  - spec/client/components/__snapshots__/query-builder.spec.jsx.snap
1018
1041
  - spec/client/components/asset.spec.jsx
1019
1042
  - spec/client/components/data-list.spec.jsx
1020
1043
  - spec/client/components/data-table.spec.jsx
1021
1044
  - spec/client/components/form.spec.jsx
1045
+ - spec/client/components/master-detail.spec.jsx
1022
1046
  - spec/client/components/network-activity-overlay.spec.jsx
1023
1047
  - spec/client/components/query-builder.spec.jsx
1024
1048
  - spec/client/components/record-finder.spec.jsx
@@ -1035,6 +1059,7 @@ files:
1035
1059
  - spec/client/screens/definition.spec.js
1036
1060
  - spec/client/screens/group.spec.js
1037
1061
  - spec/client/screens/instance.spec.js
1062
+ - spec/client/screens/system-settings-tenants.spec.jsx
1038
1063
  - spec/client/screens/system-settings.spec.jsx
1039
1064
  - spec/client/screens/tabs.spec.jsx
1040
1065
  - spec/client/screens/user-management.spec.jsx
@@ -1044,10 +1069,12 @@ files:
1044
1069
  - spec/client/user.spec.js
1045
1070
  - spec/client/workspace/__snapshots__/menu.spec.jsx.snap
1046
1071
  - spec/client/workspace/menu.spec.jsx
1072
+ - spec/factories/tenant.rb
1047
1073
  - spec/factories/user.rb
1048
1074
  - spec/fixtures/logo.png
1075
+ - spec/fixtures/mail/test_email.liquid
1049
1076
  - spec/fixtures/system_settings.yml
1050
- - spec/fixtures/test_printer.tex
1077
+ - spec/fixtures/test_printer.tex.erb
1051
1078
  - spec/fixtures/user.yml
1052
1079
  - spec/hippo/components/grid/GridSpec.coffee
1053
1080
  - spec/hippo/components/grid/PopoverEditorSpec.coffee
@@ -1072,6 +1099,8 @@ files:
1072
1099
  - spec/hippo/views/BaseSpec.coffee
1073
1100
  - spec/hippo/views/FormBindingsSpec.coffee
1074
1101
  - spec/server/api/controller_base_spec.rb
1102
+ - spec/server/api/tenant_change_spec.rb
1103
+ - spec/server/api/tenant_isolation_spec.rb
1075
1104
  - spec/server/assertions.rb
1076
1105
  - spec/server/asset_spec.rb
1077
1106
  - spec/server/command_spec.rb
@@ -1100,10 +1129,6 @@ files:
1100
1129
  - templates/Gemfile
1101
1130
  - templates/Guardfile
1102
1131
  - templates/Rakefile
1103
- - templates/client/components/.gitkeep
1104
- - templates/client/components/BaseComponent.coffee
1105
- - templates/client/components/Component.cjsx
1106
- - templates/client/components/template.html
1107
1132
  - templates/client/extension.js
1108
1133
  - templates/client/index.js
1109
1134
  - templates/client/models/base.js
@@ -1130,6 +1155,7 @@ files:
1130
1155
  - templates/lib/namespace/extension.rb
1131
1156
  - templates/lib/namespace/model.rb
1132
1157
  - templates/lib/namespace/version.rb
1158
+ - templates/mail/tenant_change.liquid
1133
1159
  - templates/public/.gitkeep
1134
1160
  - templates/spec/client/components/ComponentSpec.coffee
1135
1161
  - templates/spec/client/models/model.spec.js
@@ -1140,7 +1166,7 @@ files:
1140
1166
  - templates/spec/server/spec_helper.rb
1141
1167
  - test.js
1142
1168
  - views/hippo_root_view.erb
1143
- - views/index.html
1169
+ - views/index.erb
1144
1170
  - yard_ext/all.rb
1145
1171
  - yard_ext/code_identifier_handler.rb
1146
1172
  - yard_ext/concern_meta_methods.rb
@@ -1175,7 +1201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1175
1201
  version: '0'
1176
1202
  requirements: []
1177
1203
  rubyforge_project:
1178
- rubygems_version: 2.6.10
1204
+ rubygems_version: 2.6.11
1179
1205
  signing_key:
1180
1206
  specification_version: 4
1181
1207
  summary: Hippo is a framework for easily writing single page web applications
@@ -1,16 +0,0 @@
1
- import { get } from 'lodash';
2
-
3
- export default function FormFieldPropType(props) {
4
- const fieldName = 'name';
5
- const formPropName = 'formFields';
6
- if (!get(props, `${formPropName}.fields`)) {
7
- return new Error(`Missing form prop ${formPropName}`);
8
- }
9
- if (!props[fieldName]) {
10
- return new Error(`Missing field name identifier prop ${fieldName}`);
11
- }
12
- if (!props[formPropName].fields.get(props[fieldName])) {
13
- return new Error(`Form does not have a field named ${props[fieldName]}`);
14
- }
15
- return null;
16
- }
@@ -1,38 +0,0 @@
1
- require_relative "handlers/asset.rb"
2
-
3
- module Hippo
4
- API.routes.draw do
5
- # WS endpoint must come first
6
- get Hippo.config.api_path + '/ws' do
7
- API::Cable.handle_request(request)
8
- end
9
-
10
- Extensions.each(reversed: true) do | ext |
11
- ext.route(self)
12
- end
13
-
14
- put Hippo.config.api_path + '/hippo/system-settings.json',
15
- &SystemSettings.update_handler
16
-
17
- get Hippo.config.api_path + '/hippo/system-settings.json',
18
- &SystemSettings.get_handler
19
-
20
- post Hippo.config.api_path + Hippo.config.assets_path_prefix,
21
- &API::Handlers::Asset.saver
22
-
23
- get Hippo.config.api_path + Hippo.config.assets_path_prefix + '/*',
24
- &API::Handlers::Asset.getter
25
-
26
- get Hippo.config.api_path + Hippo.config.print_path_prefix + '/:template_id/:model_id.pdf',
27
- &API::Handlers::Print.getter
28
-
29
- post Hippo.config.api_path + '/dev-file-change.json' do
30
- API::PubSub.publish("file-change", data)
31
- "OK"
32
- end
33
-
34
- end
35
-
36
- # API.set_root_view :hippo_root_view
37
-
38
- end
@@ -1,28 +0,0 @@
1
- require_relative 'model_attribute'
2
-
3
- module Hippo
4
- module Command
5
-
6
- class GenerateComponent < NamedCommand
7
- OPTIONS ||= {
8
- namespace: nil,
9
- }
10
- class_options( OPTIONS )
11
- attr_reader :component_class
12
-
13
- def set_variables
14
- super
15
- @component_class = "#{namespace}.Components.#{class_name}"
16
- end
17
-
18
- def create_component
19
- template "client/components/Component.cjsx", "#{client_dir}/components/#{class_name}.cjsx"
20
- template "spec/client/components/ComponentSpec.coffee", \
21
- "#{spec_dir}/components/#{class_name}Spec.coffee"
22
- end
23
-
24
-
25
- end
26
-
27
- end
28
- end
@@ -1,11 +0,0 @@
1
- Stubs out a new Component.
2
-
3
- When executed inside a project called "Blog":
4
-
5
- `hippo generate component comment`
6
-
7
- Hippo will create:
8
- ····················
9
-
10
- * Component: client/components/Comment.coffee
11
- * Spec: spec/<app>/components/CommentSpec.coffee
@@ -1,32 +0,0 @@
1
- require 'erb'
2
- require 'ostruct'
3
-
4
- module Hippo::Command
5
-
6
- class WebpackView
7
-
8
- attr_reader :directory, :erb, :view, :ext
9
-
10
- def initialize(view)
11
- @ext = Hippo::Extensions.controlling
12
- @directory = ext.root_path.join('tmp')
13
- @view = view
14
- @erb = ERB.new(ext.root_path.join('views', view).read)
15
- end
16
-
17
- def write
18
- destination.write erb.result(binding)
19
- end
20
-
21
- def destination
22
- directory.join(view)
23
- end
24
-
25
- def include(partial, locals = {})
26
- subview = ERB.new(ext.root_path.join('views', partial).read)
27
- context = OpenStruct.new(locals).instance_eval { binding }
28
- subview.result(context)
29
- end
30
- end
31
-
32
- end