hippo-fw 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +0 -3
  3. data/.nvmrc +1 -2
  4. data/.ruby-version +1 -1
  5. data/Rakefile +1 -1
  6. data/client/hippo/access/login-dialog.jsx +2 -0
  7. data/client/hippo/boot.jsx +12 -0
  8. data/client/hippo/components/asset.jsx +5 -1
  9. data/client/hippo/components/asset.scss +1 -0
  10. data/client/hippo/components/data-list.jsx +6 -4
  11. data/client/hippo/components/data-table.jsx +7 -6
  12. data/client/hippo/components/data-table/header-cell.jsx +2 -0
  13. data/client/hippo/components/date-time.jsx +12 -2
  14. data/client/hippo/components/form/api.js +12 -0
  15. data/client/hippo/components/form/fields.jsx +8 -1
  16. data/client/hippo/components/form/fields/checkbox-wrapper.jsx +2 -0
  17. data/client/hippo/components/form/fields/date-wrapper.jsx +2 -0
  18. data/client/hippo/components/form/fields/form-field.scss +2 -0
  19. data/client/hippo/components/form/fields/label.jsx +2 -0
  20. data/client/hippo/components/form/fields/react-tags.scss +170 -0
  21. data/client/hippo/components/form/fields/select-wrapper.jsx +2 -0
  22. data/client/hippo/components/form/fields/tags-wrapper.jsx +46 -0
  23. data/client/hippo/components/form/fields/text-wrapper.jsx +9 -1
  24. data/client/hippo/components/form/fields/textarea-wrapper.jsx +15 -0
  25. data/client/hippo/components/form/wrapper.jsx +21 -1
  26. data/client/hippo/components/help.jsx +21 -0
  27. data/client/hippo/components/master-detail.jsx +2 -0
  28. data/client/hippo/components/network-activity-overlay.jsx +3 -1
  29. data/client/hippo/components/popout-window.jsx +126 -0
  30. data/client/hippo/components/query-builder.jsx +9 -117
  31. data/client/hippo/components/query-builder/boolean-picker.jsx +28 -0
  32. data/client/hippo/components/query-builder/clause-filter.jsx +58 -0
  33. data/client/hippo/components/query-builder/clause.jsx +98 -0
  34. data/client/hippo/components/query-builder/date-picker.jsx +23 -0
  35. data/client/hippo/components/query-builder/query-builder.scss +7 -0
  36. data/client/hippo/components/record-finder.jsx +2 -0
  37. data/client/hippo/components/record-finder/query-layer.jsx +5 -1
  38. data/client/hippo/components/save-button.jsx +7 -1
  39. data/client/hippo/components/screen.jsx +2 -0
  40. data/client/hippo/components/text-editor.jsx +4 -5
  41. data/client/hippo/components/text-editor/display-modes/Button.jsx +5 -2
  42. data/client/hippo/components/text-editor/display-modes/ToggleEdit.jsx +2 -1
  43. data/client/hippo/components/text-editor/display-modes/ToggleInsert.jsx +2 -1
  44. data/client/hippo/components/text-editor/display-modes/ToggleLayout.jsx +2 -1
  45. data/client/hippo/components/text-editor/display-modes/TogglePreview.jsx +2 -1
  46. data/client/hippo/components/text-editor/display-modes/ToggleResize.jsx +2 -1
  47. data/client/hippo/components/text-editor/display-modes/index.js +7 -7
  48. data/client/hippo/components/text-editor/image-plugin/Component/Display/index.js +4 -2
  49. data/client/hippo/components/text-editor/image-plugin/Component/Form/index.js +2 -0
  50. data/client/hippo/components/text-editor/renderer.jsx +2 -0
  51. data/client/hippo/components/text-editor/text-editor.scss +13 -4
  52. data/client/hippo/components/time-zone-select.jsx +2 -0
  53. data/client/hippo/components/tool-tip.jsx +2 -0
  54. data/client/hippo/extensions/base.js +2 -0
  55. data/client/hippo/extensions/hippo.js +2 -0
  56. data/client/hippo/lib/__mocks__/request-assets.js +1 -2
  57. data/client/hippo/lib/bootstrap.js +2 -0
  58. data/client/hippo/lib/computed-properties.js +24 -0
  59. data/client/hippo/lib/date-range.js +13 -2
  60. data/client/hippo/lib/request-assets.js +3 -2
  61. data/client/hippo/lib/smooth-scroll.js +2 -0
  62. data/client/hippo/lib/util.js +1 -2
  63. data/client/hippo/models/asset.js +2 -0
  64. data/client/hippo/models/base.js +5 -2
  65. data/client/hippo/models/collection.js +2 -0
  66. data/client/hippo/models/config.js +3 -1
  67. data/client/hippo/models/pub_sub.js +2 -0
  68. data/client/hippo/models/pub_sub/channel.js +2 -0
  69. data/client/hippo/models/pub_sub/map.js +2 -0
  70. data/client/hippo/models/query.js +21 -12
  71. data/client/hippo/models/query/array-result.js +52 -16
  72. data/client/hippo/models/query/clause.js +11 -4
  73. data/client/hippo/models/query/field.js +2 -1
  74. data/client/hippo/models/query/info.js +7 -1
  75. data/client/hippo/models/query/operator.js +2 -0
  76. data/client/hippo/models/query/result.js +2 -0
  77. data/client/hippo/models/query/types.js +4 -0
  78. data/client/hippo/models/sync.js +2 -0
  79. data/client/hippo/models/system-setting.js +1 -15
  80. data/client/hippo/models/tenant.js +23 -7
  81. data/client/hippo/react/Root.jsx +2 -0
  82. data/client/hippo/react/component-not-found.jsx +2 -0
  83. data/client/hippo/screens/definition.js +2 -0
  84. data/client/hippo/screens/group.js +2 -0
  85. data/client/hippo/screens/instance.js +5 -1
  86. data/client/hippo/screens/system-settings.jsx +19 -5
  87. data/client/hippo/screens/system-settings/mailer-config.jsx +4 -2
  88. data/client/hippo/screens/system-settings/system-settings.scss +1 -1
  89. data/client/hippo/screens/system-settings/tenant.jsx +4 -2
  90. data/client/hippo/screens/user-management.jsx +2 -0
  91. data/client/hippo/screens/user-management/edit-form.jsx +2 -0
  92. data/client/hippo/testing/screens.js +10 -2
  93. data/client/hippo/user.js +4 -0
  94. data/client/hippo/workspace/index.jsx +3 -1
  95. data/client/hippo/workspace/menu-group.jsx +2 -0
  96. data/client/hippo/workspace/menu-option.jsx +2 -0
  97. data/client/hippo/workspace/menu.jsx +6 -3
  98. data/client/hippo/workspace/navbar.jsx +2 -0
  99. data/client/hippo/workspace/screen.jsx +2 -0
  100. data/client/hippo/workspace/styles.scss +5 -1
  101. data/command-reference-files/initial/.eslintrc.js +0 -3
  102. data/command-reference-files/initial/Gemfile +1 -1
  103. data/config/routes.rb +3 -1
  104. data/db/seed.rb +1 -1
  105. data/hippo-fw.gemspec +2 -2
  106. data/lib/hippo/api/controller_base.rb +2 -1
  107. data/lib/hippo/api/handlers/asset.rb +3 -2
  108. data/lib/hippo/api/handlers/tenant.rb +4 -6
  109. data/lib/hippo/api/helper_methods.rb +5 -7
  110. data/lib/hippo/api/route_set.rb +3 -2
  111. data/lib/hippo/asset.rb +4 -0
  112. data/lib/hippo/command/console.rb +1 -1
  113. data/lib/hippo/concerns/asset_uploader.rb +9 -4
  114. data/lib/hippo/concerns/queries.rb +3 -3
  115. data/lib/hippo/extension.rb +14 -4
  116. data/lib/hippo/extension/definition.rb +5 -1
  117. data/lib/hippo/logger.rb +26 -27
  118. data/lib/hippo/mailer.rb +19 -7
  119. data/lib/hippo/system_settings.rb +10 -4
  120. data/lib/hippo/templates/liquid.rb +1 -0
  121. data/lib/hippo/templates/liquid/pluralize.rb +16 -0
  122. data/lib/hippo/tenant.rb +17 -1
  123. data/lib/hippo/user.rb +10 -9
  124. data/lib/hippo/version.rb +1 -1
  125. data/lib/hippo/webpack.rb +22 -2
  126. data/package-lock.json +5462 -883
  127. data/package.json +9 -11
  128. data/spec/client/access/login-dialog.spec.jsx +2 -2
  129. data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +1 -1
  130. data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +1 -1
  131. data/spec/client/components/master-detail.spec.jsx +2 -1
  132. data/spec/client/components/query-builder.spec.jsx +3 -3
  133. data/spec/client/extension/base.spec.js +2 -0
  134. data/spec/client/models/base.spec.js +5 -3
  135. data/spec/client/models/query.spec.js +18 -6
  136. data/spec/client/models/sync.spec.js +2 -1
  137. data/spec/client/models/system-setting.spec.js +0 -12
  138. data/spec/client/screens/user-management.spec.jsx +1 -2
  139. data/spec/client/test-models.js +10 -0
  140. data/spec/server/api/tenant_change_spec.rb +1 -2
  141. data/spec/server/asset_spec.rb +2 -2
  142. data/templates/js/config-data.js +1 -1
  143. data/templates/spec/factories/model.rb +1 -1
  144. data/views/hippo_root_view.erb +1 -3
  145. metadata +17 -6
  146. data/client/hippo/components/text-editor/display-modes/SaveState.jsx +0 -17
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hippo-fw",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Hippo is a framework for easily writing single page web applications",
5
5
  "main": "client/hippo/index.js",
6
6
  "repository": "https://github.com/argosity/hippo",
@@ -12,7 +12,6 @@
12
12
  "dependencies": {
13
13
  "actioncable": "^5.1.2",
14
14
  "babel-core": "^6.25.0",
15
- "babel-eslint": "^7.2.3",
16
15
  "babel-jest": "^20.0.3",
17
16
  "babel-loader": "^7.1.1",
18
17
  "babel-plugin-lodash": "^3.2.11",
@@ -32,12 +31,11 @@
32
31
  "classnames": "^2.2.5",
33
32
  "compression-webpack-plugin": "^1.0.0",
34
33
  "core-decorators": "^0.19.0",
35
- "create-react-class": "^15.6.0",
36
34
  "css-loader": "^0.28.4",
37
35
  "domtastic": "^0.15.1",
38
36
  "enzyme": "^2.9.1",
39
- "eslint": "^4.2.0",
40
- "eslint-config-argosity": "^1.1.5",
37
+ "eslint": "^4.9.0",
38
+ "eslint-config-argosity": "^1.4.1",
41
39
  "file-loader": "^0.11.2",
42
40
  "flatpickr": "^3.0.7",
43
41
  "flexboxgrid": "^6.3.1",
@@ -54,19 +52,18 @@
54
52
  "lodash": "^4.17.4",
55
53
  "loglevel": "^1.4.1",
56
54
  "mobx": "^3.2.1",
57
- "mobx-decorated-models": "^0.6.5",
58
- "mobx-persist": "^0.3.3",
55
+ "mobx-decorated-models": "^0.7.1",
59
56
  "mobx-react": "^4.2.2",
60
57
  "moment-timezone": "^0.5.13",
61
58
  "node-sass": "^4.5.0",
62
- "ory-editor": "^0.2.12",
59
+ "object-hash": "^1.1.8",
60
+ "ory-editor": "^0.2.25",
63
61
  "pluralize": "^6.0.0",
64
62
  "prop-types": "^15.5.8",
65
63
  "qs": "^6.5.0",
66
64
  "react": "^15.6.1",
67
- "react-addons-shallow-compare": "^15.6.0",
68
65
  "react-addons-test-utils": "^15.6.0",
69
- "react-async-component": "^1.0.0-beta.3",
66
+ "react-async-component": "^1.0.2",
70
67
  "react-braintree-fields": "^0.6.0",
71
68
  "react-dom": "^15.6.1",
72
69
  "react-dropzone": "^3.13.3",
@@ -74,18 +71,19 @@
74
71
  "react-fontawesome": "^1.6.1",
75
72
  "react-hot-loader": "3.0.0-beta.6",
76
73
  "react-input-slider": "^2.0.0",
77
- "react-motion": "^0.5.0",
78
74
  "react-native-storage": "^0.2.2",
79
75
  "react-router": "^4.1.2",
80
76
  "react-router-dom": "^4.1.2",
81
77
  "react-sidebar": "^2.3.0",
82
78
  "react-swipeable-views": "^0.12.8",
79
+ "react-tag-autocomplete": "^5.4.1",
83
80
  "react-tap-event-plugin": "^2.0.1",
84
81
  "react-test-renderer": "^15.6.1",
85
82
  "react-tippy": "^1.0.2",
86
83
  "react-virtualized": "^9.9.0",
87
84
  "resolve-url-loader": "^2.1.0",
88
85
  "sass-loader": "^6.0.6",
86
+ "serializr": "^1.1.13",
89
87
  "sockjs-client": "^1.1.4",
90
88
  "sprintf-js": "^1.0.3",
91
89
  "style-loader": "^0.18.2",
@@ -7,8 +7,8 @@ jest.mock('hippo/models/sync');
7
7
  jest.mock('hippo/config');
8
8
 
9
9
  describe('Login Dialog', () => {
10
- beforeEach(() => (Config.access_token = '0123456789'));
11
- afterEach(() => (Config.access_token = ''));
10
+ beforeEach(() => { Config.access_token = '0123456789'; });
11
+ afterEach(() => { Config.access_token = ''; });
12
12
 
13
13
  it('does not render when user isnt logged in', () => {
14
14
  expect(User.isLoggedIn).toBe(true);
@@ -5,7 +5,7 @@ exports[`Query Builder Component renders and matches snapshot 1`] = `
5
5
  className="query-builder"
6
6
  >
7
7
  <div
8
- className="grommetux-box grommetux-box--direction-row grommetux-box--responsive grommetux-box--pad-between-small"
8
+ className="grommetux-box grommetux-box--direction-row grommetux-box--align-center grommetux-box--responsive grommetux-box--pad-between-small clause"
9
9
  id={undefined}
10
10
  onClick={undefined}
11
11
  role={undefined}
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`RecordFinder Component renders 1`] = `
4
4
  <div
5
- className="form-field record-finder"
5
+ className="form-field text record-finder"
6
6
  >
7
7
  <div
8
8
  className="grommetux-form-field grommetux-form-field--size-medium"
@@ -11,7 +11,8 @@ describe('Master Detail Component', () => {
11
11
  <MasterDetail
12
12
  master={<MasterComp />}
13
13
  detail={<DetailComp />}
14
- />)).toMatchSnapshot();
14
+ />,
15
+ )).toMatchSnapshot();
15
16
  });
16
17
 
17
18
  it('renders and then can add detail', () => {
@@ -28,14 +28,14 @@ describe('Query Builder Component', () => {
28
28
  });
29
29
 
30
30
  it('autoloads query when changed', () => {
31
- query.fetch = jest.fn();
31
+ query.results.fetch = jest.fn();
32
32
  expect(query.autoFetch).toBe(false);
33
33
  const builder = mount(<QueryBuilder query={query} autoFetch />);
34
34
  expect(query.autoFetch).toBe(true);
35
- expect(query.fetch).toHaveBeenCalled();
35
+ expect(query.results.fetch).toHaveBeenCalled();
36
36
  query.clauses[0].value = 'test';
37
37
  jest.runAllTimers();
38
- expect(query.fetch).toHaveBeenCalledTimes(2);
38
+ expect(query.results.fetch).toHaveBeenCalledTimes(2);
39
39
  builder.unmount();
40
40
  expect(query.autoFetch).toBe(false);
41
41
  });
@@ -2,7 +2,9 @@ import { BaseExtension } from 'hippo/extensions/base';
2
2
  import { observable } from 'mobx';
3
3
 
4
4
  class TestExtension extends BaseExtension {
5
+
5
6
  @observable identifier = 'foo-bar-baz';
7
+
6
8
  }
7
9
 
8
10
  describe('Base Extension', () => {
@@ -40,7 +40,9 @@ describe('BaseModel Test', () => {
40
40
 
41
41
  it('is set from sync', () => {
42
42
  const box = new Box({ id: 11, width: 5 });
43
- expect(box.syncData).toEqual({ id: 11, height: 1, depth: 1, width: 5 });
43
+ expect(box.syncData).toEqual({
44
+ id: 11, height: 1, depth: 1, width: 5,
45
+ });
44
46
  const spy = jest.fn();
45
47
  observe(box, 'syncData', spy);
46
48
  box.syncData = { id: 2 };
@@ -67,12 +69,12 @@ describe('BaseModel Test', () => {
67
69
  const box = new Box();
68
70
  box.id = 23;
69
71
  expect(Box.propertyOptions.id.type).toEqual('number');
70
- expect(() => (box.id = 'red')).toThrow('Bad Type');
72
+ expect(() => { box.id = 'red'; }).toThrow('Bad Type');
71
73
  expect(box.id).toEqual(23);
72
74
 
73
75
  const container = new Container();
74
76
  container.id = 'test';
75
- expect(() => (container.id = 42)).toThrow('Bad Type');
77
+ expect(() => { container.id = 42; }).toThrow('Bad Type');
76
78
  expect(container.id).toEqual('test');
77
79
  });
78
80
 
@@ -23,20 +23,20 @@ describe('Model Queries', () => {
23
23
  });
24
24
 
25
25
  it('autoloads query when changed', () => {
26
- query.fetch = jest.fn();
26
+ query.results.fetch = jest.fn();
27
27
  query.autoFetch = true;
28
- expect(query.fetch).toHaveBeenCalled();
28
+ expect(query.results.fetch).toHaveBeenCalled();
29
29
  query.clauses[0].value = 'test value';
30
30
  jest.runAllTimers();
31
- expect(query.fetch).toHaveBeenCalledTimes(2);
31
+ expect(query.results.fetch).toHaveBeenCalledTimes(2);
32
32
  query.clauses[0].value = 'test two value';
33
33
  jest.runAllTimers();
34
- expect(query.fetch).toHaveBeenCalledTimes(3);
34
+ expect(query.results.fetch).toHaveBeenCalledTimes(3);
35
35
 
36
36
  query.autoFetch = false;
37
37
  query.clauses[0].value = 'yet another value';
38
38
  jest.runAllTimers();
39
- expect(query.fetch).toHaveBeenCalledTimes(3);
39
+ expect(query.results.fetch).toHaveBeenCalledTimes(3);
40
40
  });
41
41
 
42
42
  it('calculates fields', () => {
@@ -74,7 +74,7 @@ describe('Model Queries', () => {
74
74
  expect(clause.field.id).toEqual('computed');
75
75
  expect(clause.operator.id).toEqual('like');
76
76
  expect(map(clause.validOperators, 'id')).toEqual(['like', 'eq', 'contains']);
77
- clause.field = query.fields[3];
77
+ clause.field = find(query.fields, { id: 'width' });
78
78
  expect(clause.operator.id).toEqual('eq');
79
79
  expect(map(clause.validOperators, 'id')).toEqual(['eq', 'lt', 'gt']);
80
80
  });
@@ -233,4 +233,16 @@ describe('Model Queries', () => {
233
233
  );
234
234
  });
235
235
  });
236
+
237
+ it('sets valued queries', () => {
238
+ const { fingerprint } = query;
239
+ query.clauses.replace([
240
+ { field: query.fields[0], value: 123 },
241
+ { field: query.fields[1] },
242
+ ]);
243
+ expect(query.info.valuedClauses).toHaveLength(1);
244
+ expect(query.info.valuedClauses[0].value).toEqual(123);
245
+ expect(query.info.valuedClauses[0].field).toEqual(query.fields[0]);
246
+ expect(query.fingerprint).not.toEqual(fingerprint);
247
+ });
236
248
  });
@@ -44,6 +44,7 @@ describe('Network sync', () => {
44
44
  Sync.forModel(box).then(() => expect(box.width).toEqual(12));
45
45
  expect(fetch).lastCalledWith(
46
46
  '/api/test/box/11.json',
47
- { body, headers: { 'Content-Type': 'application/json' }, method: 'PUT' });
47
+ { body, headers: { 'Content-Type': 'application/json' }, method: 'PUT' },
48
+ );
48
49
  });
49
50
  });
@@ -1,6 +1,5 @@
1
1
  import SystemSettings from 'hippo/models/system-setting';
2
2
  import Asset from 'hippo/models/asset';
3
- import Config from 'hippo/config';
4
3
 
5
4
  jest.mock('hippo/config');
6
5
 
@@ -19,15 +18,4 @@ describe('SystemSettings Model', () => {
19
18
  ss.logo = { };
20
19
  expect(ss.logo).toBeInstanceOf(Asset);
21
20
  });
22
-
23
- it('sets Config logo when updated', () => {
24
- const ss = new SystemSettings(TEST_SETTINGS);
25
- ss.logo = TEST_SETTINGS.logo;
26
- ss.logo.file = { mockData: true };
27
- expect(ss.logo.isDirty).toEqual(true);
28
- ss.syncData = { foo: 'bar' };
29
- ss.logo.file = null;
30
- expect(Config.logo).toEqual(ss.logo.file_data);
31
- expect(ss.syncData).toMatchObject({ settings: TEST_SETTINGS.settings });
32
- });
33
21
  });
@@ -19,8 +19,7 @@ describe('User Management Screen', () => {
19
19
  total: 5,
20
20
  success: true,
21
21
  data: map(range(0, 5), i =>
22
- [i, `login-${i}`, `name ${i}`, `email-${i}@test.com`],
23
- ),
22
+ [i, `login-${i}`, `name ${i}`, `email-${i}@test.com`]),
24
23
  });
25
24
  Element.prototype.getBoundingClientRect = jest.fn(() => ({
26
25
  width: 800, height: 1024,
@@ -10,14 +10,17 @@ import ScreenDefinition from 'hippo/screens/definition';
10
10
 
11
11
  @identifiedBy('test/boat')
12
12
  export class Ship extends BaseModel {
13
+
13
14
  @identifier({ type: 'string' }) name;
14
15
 
15
16
  @belongsTo({ model: 'test/container', inverseOf: 'vessel' }) container;
17
+
16
18
  }
17
19
 
18
20
 
19
21
  @identifiedBy('test/model/image')
20
22
  export class TestImage extends BaseModel {
23
+
21
24
  @identifier id;
22
25
  @belongsTo({ inverseOf: 'owner', model: 'hippo/asset' }) asset;
23
26
  @observable syncInProgress = false;
@@ -25,11 +28,13 @@ export class TestImage extends BaseModel {
25
28
  save() {
26
29
  this.syncInProgress = { method: 'POST' };
27
30
  }
31
+
28
32
  }
29
33
 
30
34
 
31
35
  @identifiedBy('test/box')
32
36
  export class Box extends BaseModel {
37
+
33
38
  @session visibleIdentifier;
34
39
 
35
40
  @session({ type: 'string' }) label;
@@ -45,10 +50,12 @@ export class Box extends BaseModel {
45
50
  }
46
51
 
47
52
  @belongsTo container;
53
+
48
54
  }
49
55
 
50
56
  @identifiedBy('test/container')
51
57
  export class Container extends BaseModel {
58
+
52
59
  @identifier({ type: 'string' }) id;
53
60
 
54
61
  @field name;
@@ -67,6 +74,7 @@ export class Container extends BaseModel {
67
74
  @computed get areaInUse() {
68
75
  return this.boxes.reduce((acc, box) => (acc + box.volume), 0);
69
76
  }
77
+
70
78
  }
71
79
 
72
80
  export function getTestScreen(attrs = {}) {
@@ -87,6 +95,8 @@ export function getTestScreen(attrs = {}) {
87
95
  }
88
96
 
89
97
  export class TestExtension extends BaseExtension {
98
+
90
99
  get id() { return 'test'; }
100
+
91
101
  }
92
102
  TestExtension.register();
@@ -8,14 +8,13 @@ describe "Tenant changes", api: true, vcr: VCR_OPTS do
8
8
  let!(:user) { FactoryGirl.create :user, tenant: tenant, role_names: ['administrator'] }
9
9
 
10
10
  it 'sends email when tenant identifier changes' do
11
- post '/api/hippo/tenant.json', {
11
+ put "/api/hippo/tenant/#{tenant.identifier}.json", {
12
12
  'slug' => 'RED'
13
13
  }.to_json, {
14
14
  'HTTP_AUTHORIZATION' => user.jwt_token,
15
15
  'HTTP_ACCEPT' => 'application/json',
16
16
  'SERVER_NAME' => "#{tenant.slug}.example.ua",
17
17
  }
18
-
19
18
  expect(tenant.reload.slug).to eq('red')
20
19
  email = Mail::TestMailer.deliveries.last
21
20
  expect(email).not_to be_nil
@@ -27,12 +27,12 @@ describe Hippo::Asset do
27
27
 
28
28
  expect(@model.save).to eq(true)
29
29
 
30
- expect(@model.asset.file_data.keys).to eq(["original", "medium", "thumbnail"])
30
+ expect(@model.asset.file_data.keys).to eq(["original", "large", "medium", "thumbnail"])
31
31
  expect(
32
32
  @model.asset.file_data['original']['metadata'].without('filename')
33
33
  ).to include(
34
34
  "mime_type" =>"image/png",
35
- "size" => a_value_within(100).of(42200), # different magic versions will be different size
35
+ "size" => a_value_within(100).of(49172), # different magic versions will be different size
36
36
  "width" =>500,
37
37
  "height" =>223
38
38
  )
@@ -7,4 +7,4 @@ import <%= name %> from '<%= ext.client_extension_path %>';
7
7
 
8
8
  <% end %>
9
9
 
10
- Config.update(<%= Hippo::Extensions.client_bootstrap_data.to_json %>);
10
+ Config.update(<%= Hippo::Extensions.static_bootstrap_data.to_json %>);
@@ -1,6 +1,6 @@
1
1
  FactoryGirl.define do
2
2
  factory :<%= file_name %>, class: <%= namespace %>::<%= class_name %> do
3
- tenant { Hippo::Tenant.current }
3
+ tenant { Hippo::Tenant.current }
4
4
 
5
5
  end
6
6
  end
@@ -63,9 +63,7 @@
63
63
  <div class="loading">Loading&#8230;</div>
64
64
  <div id="hippo-root">
65
65
  <script type="text/json" id="bootstrap-data">
66
- <%= Hippo::API.to_json(
67
- Hippo::Extensions.client_bootstrap_data
68
- ) %>
66
+ <%= Hippo::API.to_json(Hippo::Tenant.current.bootstrap_data) %>
69
67
  </script>
70
68
  </div>
71
69
  <%= javascript_tags :app %>
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.7
4
+ version: 0.9.8
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-09-09 00:00:00.000000000 Z
11
+ date: 2017-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -576,14 +576,14 @@ dependencies:
576
576
  requirements:
577
577
  - - "~>"
578
578
  - !ruby/object:Gem::Version
579
- version: 0.3.7
579
+ version: 0.4.1
580
580
  type: :runtime
581
581
  prerelease: false
582
582
  version_requirements: !ruby/object:Gem::Requirement
583
583
  requirements:
584
584
  - - "~>"
585
585
  - !ruby/object:Gem::Version
586
- version: 0.3.7
586
+ version: 0.4.1
587
587
  - !ruby/object:Gem::Dependency
588
588
  name: knitter
589
589
  requirement: !ruby/object:Gem::Requirement
@@ -716,8 +716,11 @@ files:
716
716
  - client/hippo/components/form/fields/date-wrapper.jsx
717
717
  - client/hippo/components/form/fields/form-field.scss
718
718
  - client/hippo/components/form/fields/label.jsx
719
+ - client/hippo/components/form/fields/react-tags.scss
719
720
  - client/hippo/components/form/fields/select-wrapper.jsx
721
+ - client/hippo/components/form/fields/tags-wrapper.jsx
720
722
  - client/hippo/components/form/fields/text-wrapper.jsx
723
+ - client/hippo/components/form/fields/textarea-wrapper.jsx
721
724
  - client/hippo/components/form/validations.js
722
725
  - client/hippo/components/form/wrapper.jsx
723
726
  - client/hippo/components/grid/config.json
@@ -725,6 +728,7 @@ files:
725
728
  - client/hippo/components/grid/index.js
726
729
  - client/hippo/components/grid/row-editor.scss
727
730
  - client/hippo/components/grid/styles.scss
731
+ - client/hippo/components/help.jsx
728
732
  - client/hippo/components/icon.jsx
729
733
  - client/hippo/components/index.js
730
734
  - client/hippo/components/master-detail.jsx
@@ -733,7 +737,13 @@ files:
733
737
  - client/hippo/components/modal/styles.scss
734
738
  - client/hippo/components/network-activity-overlay.jsx
735
739
  - client/hippo/components/network-activity-overlay.scss
740
+ - client/hippo/components/popout-window.jsx
736
741
  - client/hippo/components/query-builder.jsx
742
+ - client/hippo/components/query-builder/boolean-picker.jsx
743
+ - client/hippo/components/query-builder/clause-filter.jsx
744
+ - client/hippo/components/query-builder/clause.jsx
745
+ - client/hippo/components/query-builder/date-picker.jsx
746
+ - client/hippo/components/query-builder/query-builder.scss
737
747
  - client/hippo/components/record-finder.jsx
738
748
  - client/hippo/components/record-finder/config.json
739
749
  - client/hippo/components/record-finder/query-layer.jsx
@@ -745,7 +755,6 @@ files:
745
755
  - client/hippo/components/select-field/styles.scss
746
756
  - client/hippo/components/text-editor.jsx
747
757
  - client/hippo/components/text-editor/display-modes/Button.jsx
748
- - client/hippo/components/text-editor/display-modes/SaveState.jsx
749
758
  - client/hippo/components/text-editor/display-modes/ToggleEdit.jsx
750
759
  - client/hippo/components/text-editor/display-modes/ToggleInsert.jsx
751
760
  - client/hippo/components/text-editor/display-modes/ToggleLayout.jsx
@@ -783,6 +792,7 @@ files:
783
792
  - client/hippo/lib/__mocks__/request-assets.js
784
793
  - client/hippo/lib/all.js
785
794
  - client/hippo/lib/bootstrap.js
795
+ - client/hippo/lib/computed-properties.js
786
796
  - client/hippo/lib/date-range.js
787
797
  - client/hippo/lib/index.js.erb
788
798
  - client/hippo/lib/loader.js
@@ -1048,6 +1058,7 @@ files:
1048
1058
  - lib/hippo/templates/base.rb
1049
1059
  - lib/hippo/templates/latex.rb
1050
1060
  - lib/hippo/templates/liquid.rb
1061
+ - lib/hippo/templates/liquid/pluralize.rb
1051
1062
  - lib/hippo/templates/mail.rb
1052
1063
  - lib/hippo/templates/tenant_change.rb
1053
1064
  - lib/hippo/tenant.rb
@@ -1233,7 +1244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1233
1244
  version: '0'
1234
1245
  requirements: []
1235
1246
  rubyforge_project:
1236
- rubygems_version: 2.6.11
1247
+ rubygems_version: 2.6.13
1237
1248
  signing_key:
1238
1249
  specification_version: 4
1239
1250
  summary: Hippo is a framework for easily writing single page web applications