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
@@ -15,11 +15,13 @@ import SaveButton from '../components/save-button';
15
15
  import ScreenInstance from '../screens/instance';
16
16
  import Extensions from '../extensions';
17
17
  import MailerConfig from './system-settings/mailer-config';
18
+ import Config from '../config';
18
19
  import TenantSettings from './system-settings/tenant';
19
20
  import './system-settings/system-settings.scss';
20
21
 
21
22
  @observer
22
23
  export default class SystemSettings extends React.PureComponent {
24
+
23
25
  @observable settings = new Settings();
24
26
  extensionPanelRefs = new Map();
25
27
 
@@ -53,9 +55,20 @@ export default class SystemSettings extends React.PureComponent {
53
55
 
54
56
  @action.bound
55
57
  onSave() {
56
- this.extensionPanelRefs.forEach(panel => invoke(panel, 'onSave'));
57
- this.tenantSettings.onSave();
58
- this.settings.save();
58
+ const saves = [];
59
+ ['logo', 'print_logo'].forEach((attr) => {
60
+ if (this.settings[attr] && this.settings[attr].isDirty) {
61
+ saves.push(this.settings[attr].save());
62
+ }
63
+ });
64
+ Promise.all(saves).then(() => {
65
+ if (saves.length) {
66
+ Config.logo = this.settings.logo.file_data;
67
+ }
68
+ this.extensionPanelRefs.forEach(panel => invoke(panel, 'onSave'));
69
+ this.tenantSettings.onSave();
70
+ this.settings.save();
71
+ });
59
72
  }
60
73
 
61
74
  @action.bound
@@ -77,10 +90,10 @@ export default class SystemSettings extends React.PureComponent {
77
90
  <TenantSettings ref={this.setTenantRef} />
78
91
  <Heading tag="h3">Images</Heading>
79
92
  <Row>
80
- <Col sm={4} xs={12}>
93
+ <Col sm={6} xs={12}>
81
94
  <Asset model={this.settings} name="logo" />
82
95
  </Col>
83
- <Col sm={4} xs={12}>
96
+ <Col sm={6} xs={12}>
84
97
  <Asset model={this.settings} name="print_logo" />
85
98
  </Col>
86
99
  </Row>
@@ -92,4 +105,5 @@ export default class SystemSettings extends React.PureComponent {
92
105
  </Screen>
93
106
  );
94
107
  }
108
+
95
109
  }
@@ -8,6 +8,7 @@ import { Form, Field, FormState, nonBlank, validEmail } from 'hippo/components/
8
8
 
9
9
  @observer
10
10
  export default class MailerConfig extends React.PureComponent {
11
+
11
12
  formState = new FormState()
12
13
 
13
14
  @action.bound
@@ -32,11 +33,12 @@ export default class MailerConfig extends React.PureComponent {
32
33
  <Heading tag="h3">Email settings</Heading>
33
34
  <Form state={this.formState}>
34
35
  <Row className="section">
35
- <Field md={4} xs={6} name="from_email" label="From Email" validate={validEmail} />
36
- <Field md={4} xs={6} name="from_name" label="From Name" validate={nonBlank} />
36
+ <Field xs={6} name="from_email" label="From Email" validate={validEmail} />
37
+ <Field xs={6} name="from_name" label="From Name" validate={nonBlank} />
37
38
  </Row>
38
39
  </Form>
39
40
  </div>
40
41
  );
41
42
  }
43
+
42
44
  }
@@ -4,5 +4,5 @@
4
4
  margin-top: 1rem;
5
5
  }
6
6
 
7
-
7
+ padding-bottom: 200px;
8
8
  }
@@ -34,6 +34,7 @@ function TenantSlugChange({ oldSlug }) {
34
34
 
35
35
  @observer
36
36
  export default class TenantConfig extends React.PureComponent {
37
+
37
38
  formState = new FormState()
38
39
 
39
40
  @observable slugChangedFrom;
@@ -74,14 +75,15 @@ export default class TenantConfig extends React.PureComponent {
74
75
  <Heading tag="h3">Account</Heading>
75
76
  <Row>
76
77
  <Field
77
- md={4} xs={6} name="slug"
78
+ xs={6} name="slug"
78
79
  label="Identifier"
79
80
  validate={nonBlank}
80
81
  />
81
- <Field md={4} xs={6} name="name" validate={nonBlank} />
82
+ <Field xs={6} name="name" validate={nonBlank} />
82
83
  </Row>
83
84
  {this.renderIdChangeWarning()}
84
85
  </Form>
85
86
  );
86
87
  }
88
+
87
89
  }
@@ -15,6 +15,7 @@ import Editor from './user-management/edit-form';
15
15
 
16
16
  @observer
17
17
  export default class UserManagement extends React.PureComponent {
18
+
18
19
  @observable editingId;
19
20
 
20
21
  static contextTypes = {
@@ -63,4 +64,5 @@ export default class UserManagement extends React.PureComponent {
63
64
  </Screen>
64
65
  );
65
66
  }
67
+
66
68
  }
@@ -15,6 +15,7 @@ import { Form, Field, FormState, nonBlank, validEmail, booleanValue } from '../.
15
15
 
16
16
  @observer
17
17
  export default class EditForm extends React.PureComponent {
18
+
18
19
  static propTypes = {
19
20
  query: PropTypes.instanceOf(Query).isRequired,
20
21
  rowIndex: PropTypes.number.isRequired,
@@ -82,4 +83,5 @@ export default class EditForm extends React.PureComponent {
82
83
  </Form>
83
84
  );
84
85
  }
86
+
85
87
  }
@@ -1,6 +1,7 @@
1
1
  /* global jest */
2
2
 
3
3
  import React from 'react';
4
+ import PropTypes from 'prop-types';
4
5
  import SnapShot from 'react-test-renderer';
5
6
 
6
7
  import Screens from 'hippo/screens';
@@ -14,6 +15,7 @@ export function getScreenInstance(screenId) {
14
15
 
15
16
 
16
17
  class TestRouter {
18
+
17
19
  constructor() {
18
20
  Object.assign(this, {
19
21
  isActive: jest.fn(),
@@ -26,6 +28,7 @@ class TestRouter {
26
28
  }),
27
29
  });
28
30
  }
31
+
29
32
  }
30
33
 
31
34
  function makeContext() {
@@ -36,28 +39,33 @@ function makeContext() {
36
39
 
37
40
  function childContextTypes() {
38
41
  return {
39
- router: React.PropTypes.object,
42
+ router: PropTypes.object,
40
43
  };
41
44
  }
42
45
 
43
46
  export class Context {
47
+
44
48
  constructor() {
45
49
  this.childContextTypes = childContextTypes();
46
50
  this.context = makeContext();
47
51
  }
52
+
48
53
  }
49
54
 
50
55
  export function Snapshot(el) {
51
56
  class Wrapper extends React.Component {
57
+
52
58
  static childContextTypes = childContextTypes();
53
59
 
54
60
  getChildContext() {
55
- return this._childContext || (this._childContext = makeContext());
61
+ if (!this._childContext) { this._childContext = makeContext(); }
62
+ return this._childContext;
56
63
  }
57
64
 
58
65
  render() {
59
66
  return el;
60
67
  }
68
+
61
69
  }
62
70
  const snapshot = SnapShot.create(React.createElement(Wrapper, {}, el));
63
71
  return snapshot.toJSON();
@@ -10,6 +10,7 @@ import Config from './config';
10
10
 
11
11
  @identifiedBy('hippo/user-session')
12
12
  class Session extends BaseModel {
13
+
13
14
  @identifier id;
14
15
  @field login;
15
16
  @field password;
@@ -21,12 +22,14 @@ class Session extends BaseModel {
21
22
  get syncData() {
22
23
  return this.serialize();
23
24
  }
25
+
24
26
  }
25
27
 
26
28
  const ADMIN = 'administrator';
27
29
 
28
30
  @identifiedBy('hippo/user')
29
31
  export class UserModel extends BaseModel {
32
+
30
33
  @identifier({ type: 'number' }) id;
31
34
  @field login;
32
35
  @field name;
@@ -83,6 +86,7 @@ export class UserModel extends BaseModel {
83
86
  toJSON() {
84
87
  return merge(this.serialize(), { is_admin: this.is_admin });
85
88
  }
89
+
86
90
  }
87
91
 
88
92
  const current_user = new UserModel();
@@ -35,6 +35,7 @@ function NoMatch({ match: { path } }) {
35
35
 
36
36
  @observer
37
37
  class Workspace extends React.Component {
38
+
38
39
  @observable sidebarOpen = true;
39
40
  @observable sidebarDocked = false;
40
41
 
@@ -69,7 +70,7 @@ class Workspace extends React.Component {
69
70
  <App centered={false}>
70
71
  <LoginDialog />
71
72
  <Sidebar
72
- styles={{ sidebar: { zIndex: 5 } }}
73
+ styles={{ sidebar: { zIndex: 60 }, overlay: { zIndex: 59 } }}
73
74
  sidebar={<Menu
74
75
  isOpen={this.sidebarOpen}
75
76
  isDocked={this.sidebarDocked}
@@ -94,6 +95,7 @@ class Workspace extends React.Component {
94
95
  </App>
95
96
  );
96
97
  }
98
+
97
99
  }
98
100
 
99
101
  export default function WorkspaceRoot() {
@@ -11,6 +11,7 @@ import Icon from '../components/icon';
11
11
 
12
12
  @observer
13
13
  export default class Group extends React.PureComponent {
14
+
14
15
  static propTypes = {
15
16
  group: PropTypes.shape({
16
17
  active: PropTypes.bool.isRequired,
@@ -33,4 +34,5 @@ export default class Group extends React.PureComponent {
33
34
  </Menu>
34
35
  );
35
36
  }
37
+
36
38
  }
@@ -7,6 +7,7 @@ import Icon from '../components/icon';
7
7
 
8
8
  @observer
9
9
  export default class MenuOption extends React.Component {
10
+
10
11
  static propTypes = {
11
12
  screen: PropTypes.shape({
12
13
  title: PropTypes.string.isRequired,
@@ -33,4 +34,5 @@ export default class MenuOption extends React.Component {
33
34
  </Anchor>
34
35
  );
35
36
  }
37
+
36
38
  }
@@ -4,7 +4,6 @@ import { action } from 'mobx';
4
4
  import { isEmpty, get } from 'lodash';
5
5
  import PropTypes from 'prop-types';
6
6
  import Box from 'grommet/components/Box';
7
- import Sidebar from 'grommet/components/Sidebar';
8
7
  import Button from 'grommet/components/Button';
9
8
  import CloseIcon from 'grommet/components/icons/base/Close';
10
9
  import Header from 'grommet/components/Header';
@@ -20,6 +19,7 @@ import Asset from '../models/asset';
20
19
 
21
20
  @observer
22
21
  class Logout extends React.PureComponent {
22
+
23
23
  static contextTypes = {
24
24
  router: PropTypes.object,
25
25
  }
@@ -43,6 +43,7 @@ class Logout extends React.PureComponent {
43
43
  </Menu>
44
44
  );
45
45
  }
46
+
46
47
  }
47
48
 
48
49
  const Logo = observer(() => {
@@ -59,6 +60,7 @@ const Logo = observer(() => {
59
60
 
60
61
  @observer
61
62
  export default class WorkspaceMenu extends React.PureComponent {
63
+
62
64
  renderUnGrouped() {
63
65
  if (!User.isLoggedIn || isEmpty(Screens.unGrouped)) { return null; }
64
66
  return (
@@ -77,7 +79,7 @@ export default class WorkspaceMenu extends React.PureComponent {
77
79
 
78
80
  render() {
79
81
  return (
80
- <Sidebar
82
+ <Box
81
83
  full size="small" separator="right"
82
84
  colorIndex="brand"
83
85
  className="screen-selection-menu"
@@ -89,7 +91,8 @@ export default class WorkspaceMenu extends React.PureComponent {
89
91
  {Screens.activeGroups.map(g => <Group key={g.id} group={g} />)}
90
92
  {this.renderUnGrouped()}
91
93
  <Logout />
92
- </Sidebar>
94
+ </Box>
93
95
  );
94
96
  }
97
+
95
98
  }
@@ -13,6 +13,7 @@ function Logo() {
13
13
  }
14
14
 
15
15
  export default class Navbar extends React.Component {
16
+
16
17
  static contextTypes = {
17
18
  uistate: PropTypes.object.isRequired,
18
19
  }
@@ -42,4 +43,5 @@ export default class Navbar extends React.Component {
42
43
  </div>
43
44
  );
44
45
  }
46
+
45
47
  }
@@ -15,6 +15,7 @@ ScreenView.displayName = 'ScreenView';
15
15
 
16
16
  @observer
17
17
  export default class Screen extends React.Component {
18
+
18
19
  static propTypes = {
19
20
  match: PropTypes.shape({
20
21
  params: PropTypes.shape({
@@ -46,4 +47,5 @@ export default class Screen extends React.Component {
46
47
 
47
48
  );
48
49
  }
50
+
49
51
  }
@@ -6,7 +6,10 @@
6
6
  flex-direction: column;
7
7
  padding: 0.5rem;
8
8
  display: none;
9
+
10
+
9
11
  min-height: min-content; min-height: -moz-min-content; min-height: -webkit-min-content;
12
+
10
13
  &.is-active {
11
14
  display: flex;
12
15
  }
@@ -30,11 +33,12 @@
30
33
  }
31
34
 
32
35
  .screen-selection-menu {
36
+ min-width: 250px;
33
37
  .grommetux-anchor > .icon {
34
38
  margin-right: 0.5rem;
35
39
  }
36
40
  }
37
41
 
38
42
  .screens-wrapper {
39
- overflow: hidden;
43
+ overflow: auto
40
44
  }
@@ -1,7 +1,4 @@
1
1
  module.exports = {
2
2
  "extends": "argosity",
3
3
  "parser": "babel-eslint",
4
- rules: {
5
- 'no-underscore-dangle': 0,
6
- },
7
4
  };
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  # For development while Hippo is evolving track master branch
4
4
  gem "hippo-fw", git: "https://github.com/argosity/hippo", branch: 'master'
5
5
 
6
- # gem "hippo", '0.9.6'
6
+ # gem "hippo", '0.9.7'
7
7
 
8
8
  gem "rake"
9
9
  gem 'puma'
@@ -25,7 +25,9 @@ module Hippo::API
25
25
  end
26
26
 
27
27
  resources Hippo::User
28
- resources Hippo::Tenant, controller: Hippo::API::Handlers::Tenant
28
+ resources Hippo::Tenant,
29
+ controller: Hippo::API::Handlers::Tenant,
30
+ cors: '*', public: true
29
31
  end
30
32
 
31
33
  routes.draw do
data/db/seed.rb CHANGED
@@ -3,7 +3,7 @@ system.perform do
3
3
  Hippo::User.seed_admin_account
4
4
  end
5
5
 
6
- testing = Hippo::Tenant.find_or_create_by(slug: 'test', name: 'testing tenant', email: 'test@test.com')
6
+ testing = Hippo::Tenant.find_or_create_by(slug: 'dev', name: 'dev testing tenant', email: 'test@test.com')
7
7
 
8
8
  testing.perform do
9
9
  Hippo::User.seed_admin_account
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.license = "MIT"
19
19
 
20
20
  spec.files = `git ls-files`.split($/)
21
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ spec.executables = ['hippo']
22
22
  spec.test_files = spec.files.grep(%r{^test/})
23
23
  spec.require_paths = ["lib"]
24
24
 
@@ -72,7 +72,7 @@ Gem::Specification.new do |spec|
72
72
  spec.add_dependency "require_all", "~> 1.3"
73
73
  spec.add_dependency "resque", "~> 1.27"
74
74
  spec.add_dependency "sanitize", "~> 3.0"
75
- spec.add_dependency "webpack_driver", "~> 0.3.7"
75
+ spec.add_dependency "webpack_driver", "~> 0.4.1"
76
76
  spec.add_dependency "knitter", "~> 0.2.2"
77
77
 
78
78
  spec.add_dependency "thor", "~> 0.19"
@@ -132,7 +132,7 @@ module Hippo
132
132
 
133
133
  # Should the result include the total number of available records
134
134
  def should_include_total_count?
135
- requested_limit && params[:s] && !params[:id]
135
+ requested_limit && params[:id].blank?
136
136
  end
137
137
 
138
138
  # Extract options that are suitable for use in 'as_json'
@@ -291,6 +291,7 @@ module Hippo
291
291
  when 'lt' then field.lt(value)
292
292
  when 'in' then field.in(Range.new(*value))
293
293
  when 'gt' then field.gt(value)
294
+ when 'between' then field.between(Range.new(*value.split('...')))
294
295
  else
295
296
  value =~ /%/ ? field.matches(value) : field.eq(value)
296
297
  end