hippo-fw 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/client/hippo/access/subscription-choice-layer.jsx +170 -0
  3. data/client/hippo/access/subscription-choice-layer/cancel-subscription.jsx +111 -0
  4. data/client/hippo/access/subscription-choice-layer/payment-form.jsx +154 -0
  5. data/client/hippo/access/subscription-choice-layer/subscription-choice.scss +29 -0
  6. data/client/hippo/boot.jsx +1 -1
  7. data/client/hippo/components/asset.jsx +1 -1
  8. data/client/hippo/components/asset.scss +1 -0
  9. data/client/hippo/components/data-table.jsx +36 -38
  10. data/client/hippo/components/date-time.jsx +25 -9
  11. data/client/hippo/components/form/api.js +1 -0
  12. data/client/hippo/components/form/fields.jsx +3 -2
  13. data/client/hippo/components/form/fields/checkbox-wrapper.jsx +1 -1
  14. data/client/hippo/components/form/fields/date-wrapper.jsx +1 -1
  15. data/client/hippo/components/form/fields/email-wrapper.jsx +31 -0
  16. data/client/hippo/components/form/fields/form-field.scss +8 -0
  17. data/client/hippo/components/form/fields/label.jsx +5 -7
  18. data/client/hippo/components/form/fields/select-wrapper.jsx +1 -1
  19. data/client/hippo/components/form/fields/tags-wrapper.jsx +1 -1
  20. data/client/hippo/components/form/fields/text-wrapper.jsx +1 -1
  21. data/client/hippo/components/form/fields/textarea-wrapper.jsx +1 -1
  22. data/client/hippo/components/form/wrapper.jsx +1 -1
  23. data/client/hippo/components/grid.js +1 -0
  24. data/client/hippo/components/master-detail.jsx +1 -1
  25. data/client/hippo/components/network-activity-overlay.jsx +6 -6
  26. data/client/hippo/components/payments/field.jsx +64 -0
  27. data/client/hippo/components/payments/field.scss +18 -0
  28. data/client/hippo/components/popout-window.jsx +1 -1
  29. data/client/hippo/components/query-builder.jsx +1 -1
  30. data/client/hippo/components/query-builder/boolean-picker.jsx +1 -1
  31. data/client/hippo/components/query-builder/clause-filter.jsx +2 -2
  32. data/client/hippo/components/query-builder/clause.jsx +16 -10
  33. data/client/hippo/components/query-builder/date-picker.jsx +1 -1
  34. data/client/hippo/components/query-builder/query-builder.scss +23 -2
  35. data/client/hippo/components/record-finder.jsx +5 -2
  36. data/client/hippo/components/record-finder/query-layer.jsx +1 -1
  37. data/client/hippo/components/save-button.jsx +1 -1
  38. data/client/hippo/components/screen.jsx +1 -1
  39. data/client/hippo/components/text-editor.jsx +82 -40
  40. data/client/hippo/components/text-editor/renderer.jsx +15 -35
  41. data/client/hippo/components/text-editor/renderer.scss +15 -0
  42. data/client/hippo/components/text-editor/text-editor.scss +2 -15
  43. data/client/hippo/components/text-editor/upload-adapter.js +66 -0
  44. data/client/hippo/components/time-zone-select.jsx +1 -1
  45. data/client/hippo/components/tool-tip.jsx +9 -14
  46. data/client/hippo/components/toolbar.jsx +16 -0
  47. data/client/hippo/components/warning-notification.jsx +1 -1
  48. data/client/hippo/extensions/base.js +3 -2
  49. data/client/hippo/extensions/index.js +1 -1
  50. data/client/hippo/lib/action_cable.js +8 -0
  51. data/client/hippo/lib/action_cable/cable.js +47 -0
  52. data/client/hippo/lib/action_cable/connection.js +192 -0
  53. data/client/hippo/lib/action_cable/connection_monitor.js +135 -0
  54. data/client/hippo/lib/action_cable/consumer.js +56 -0
  55. data/client/hippo/lib/action_cable/subscription.js +98 -0
  56. data/client/hippo/lib/action_cable/subscriptions.js +129 -0
  57. data/client/hippo/lib/date-range.js +22 -5
  58. data/client/hippo/lib/lazy-getter.js +31 -0
  59. data/client/hippo/lib/util.js +6 -1
  60. data/client/hippo/models/base.js +8 -3
  61. data/client/hippo/models/config.js +7 -2
  62. data/client/hippo/models/date-type.js +14 -0
  63. data/client/hippo/models/decorators.js +5 -5
  64. data/client/hippo/models/pub_sub.js +1 -1
  65. data/client/hippo/models/query/array-result.js +4 -1
  66. data/client/hippo/models/subscription.js +35 -0
  67. data/client/hippo/models/sync.js +1 -1
  68. data/client/hippo/models/tenant.js +14 -1
  69. data/client/hippo/react/component-not-found.jsx +14 -18
  70. data/client/hippo/screens/async-loading.jsx +46 -0
  71. data/client/hippo/screens/definition.js +2 -1
  72. data/client/hippo/screens/preferences.jsx +57 -0
  73. data/client/hippo/screens/system-settings.jsx +4 -6
  74. data/client/hippo/screens/system-settings/mailer-config.jsx +1 -1
  75. data/client/hippo/screens/system-settings/tenant.jsx +57 -4
  76. data/client/hippo/screens/user-management.jsx +2 -2
  77. data/client/hippo/screens/user-management/edit-form.jsx +1 -1
  78. data/client/hippo/styles/global/fancy-header.scss +2 -1
  79. data/client/hippo/styles/global/mixins.scss +14 -1
  80. data/client/hippo/testing/index.js +7 -0
  81. data/client/hippo/user.js +9 -2
  82. data/client/hippo/workspace/index.jsx +29 -8
  83. data/client/hippo/workspace/menu-group.jsx +1 -1
  84. data/client/hippo/workspace/menu-option.jsx +2 -0
  85. data/client/hippo/workspace/menu.jsx +30 -6
  86. data/client/hippo/workspace/screen.jsx +5 -1
  87. data/client/hippo/workspace/styles.scss +22 -3
  88. data/command-reference-files/initial/Gemfile +1 -1
  89. data/config/routes.rb +6 -0
  90. data/config/screens.rb +9 -17
  91. data/db/migrate/20171129024737_create_subscriptions.rb +12 -0
  92. data/fixtures/vcr_cassettes/Tenant_changes/sends_email_when_tenant_identifier_changes.yml +72 -0
  93. data/fixtures/vcr_cassettes/Tenant_isoloation/disallows_using_a_user_s_token_on_incorrect_domain.yml +141 -0
  94. data/fixtures/vcr_cassettes/Tenant_isoloation/isolates_bar_s_tenant_data_from_foo.yml +141 -0
  95. data/fixtures/vcr_cassettes/Tenant_isoloation/isolates_foo_s_tenant_data_from_bar.yml +141 -0
  96. data/hippo-fw.gemspec +4 -3
  97. data/lib/hippo.rb +1 -0
  98. data/lib/hippo/access/roles/basic_user.rb +1 -0
  99. data/lib/hippo/api/authentication_provider.rb +4 -5
  100. data/lib/hippo/api/handlers/asset.rb +9 -4
  101. data/lib/hippo/api/handlers/subscription.rb +39 -0
  102. data/lib/hippo/api/handlers/user_session.rb +0 -1
  103. data/lib/hippo/api/helper_methods.rb +8 -4
  104. data/lib/hippo/api/request_wrapper.rb +12 -1
  105. data/lib/hippo/command/console.rb +3 -3
  106. data/lib/hippo/concerns/asset_uploader.rb +8 -2
  107. data/lib/hippo/concerns/pub_sub.rb +8 -8
  108. data/lib/hippo/configuration.rb +6 -4
  109. data/lib/hippo/extension.rb +3 -2
  110. data/lib/hippo/model.rb +1 -0
  111. data/lib/hippo/models/subscription.rb +7 -0
  112. data/lib/hippo/payments.rb +129 -0
  113. data/lib/hippo/screen.rb +4 -2
  114. data/lib/hippo/screen/definition.rb +4 -0
  115. data/lib/hippo/spec_helper.rb +4 -4
  116. data/lib/hippo/templates/liquid/precision.rb +9 -0
  117. data/lib/hippo/tenant.rb +4 -5
  118. data/lib/hippo/user.rb +5 -5
  119. data/lib/hippo/version.rb +1 -1
  120. data/lib/hippo/webpack.rb +5 -1
  121. data/package-lock.json +437 -881
  122. data/package.json +19 -5
  123. data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +34 -1
  124. data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +1 -0
  125. data/spec/client/models/base.spec.js +7 -0
  126. data/spec/client/models/subscription.spec.js +8 -0
  127. data/spec/client/screens/__snapshots__/preferences.spec.jsx.snap +223 -0
  128. data/spec/client/screens/preferences.spec.jsx +10 -0
  129. data/spec/client/test-models.js +1 -1
  130. data/spec/client/workspace/__snapshots__/menu.spec.jsx.snap +12 -0
  131. data/spec/factories/subscription.rb +6 -0
  132. data/spec/factories/tenant.rb +1 -1
  133. data/spec/factories/user.rb +1 -1
  134. data/spec/server/api/tenant_change_spec.rb +11 -8
  135. data/spec/server/api/tenant_isolation_spec.rb +11 -8
  136. data/spec/server/api/user_sessions_spec.rb +10 -7
  137. data/spec/server/api/user_spec.rb +45 -0
  138. data/spec/server/models/subscription_spec.rb +10 -0
  139. data/spec/server/payment_helpers.rb +13 -0
  140. data/spec/server/print/form_spec.rb +1 -1
  141. data/spec/server/spec_helper.rb +3 -11
  142. data/templates/js/screen-definitions.js +4 -1
  143. data/templates/spec/factories/model.rb +1 -1
  144. data/views/hippo_root_view.erb +5 -5
  145. metadata +84 -25
  146. data/client/hippo/components/grid/config.json +0 -3
  147. data/client/hippo/components/grid/editors.scss +0 -78
  148. data/client/hippo/components/grid/index.js +0 -2
  149. data/client/hippo/components/grid/row-editor.scss +0 -74
  150. data/client/hippo/components/grid/styles.scss +0 -118
  151. data/client/hippo/components/text-editor/display-modes/Button.jsx +0 -20
  152. data/client/hippo/components/text-editor/display-modes/ToggleEdit.jsx +0 -23
  153. data/client/hippo/components/text-editor/display-modes/ToggleInsert.jsx +0 -22
  154. data/client/hippo/components/text-editor/display-modes/ToggleLayout.jsx +0 -22
  155. data/client/hippo/components/text-editor/display-modes/TogglePreview.jsx +0 -22
  156. data/client/hippo/components/text-editor/display-modes/ToggleResize.jsx +0 -22
  157. data/client/hippo/components/text-editor/display-modes/index.css +0 -0
  158. data/client/hippo/components/text-editor/display-modes/index.js +0 -30
  159. data/client/hippo/components/text-editor/image-plugin/Component/Display/index.js +0 -82
  160. data/client/hippo/components/text-editor/image-plugin/Component/Form/index.js +0 -42
  161. data/client/hippo/components/text-editor/image-plugin/Component/index.js +0 -16
  162. data/client/hippo/components/text-editor/image-plugin/Component/index.scss +0 -0
  163. data/client/hippo/components/text-editor/image-plugin/index.js +0 -32
  164. data/client/hippo/components/text-editor/image-plugin/index.scss +0 -25
  165. data/client/hippo/components/toolbar/changes-notification.scss +0 -63
  166. data/client/hippo/components/toolbar/index.js +0 -3
  167. data/client/hippo/components/toolbar/styles.scss +0 -74
@@ -3,19 +3,22 @@ require_relative '../spec_helper'
3
3
 
4
4
  describe "Tenant isoloation", api: true, vcr: VCR_OPTS do
5
5
 
6
- let(:foo) { FactoryGirl.create :tenant, slug: 'foo' }
7
- let(:bar) { FactoryGirl.create :tenant, slug: 'bar' }
6
+ let(:foo) { FactoryBot.create :tenant, slug: 'foo' }
7
+ let(:bar) { FactoryBot.create :tenant, slug: 'bar' }
8
8
 
9
- let!(:foo_user) { FactoryGirl.create :user, tenant: foo }
10
- let!(:bar_user) { FactoryGirl.create :user, tenant: bar }
9
+ let!(:foo_user) { FactoryBot.create :user, tenant: foo }
10
+ let!(:bar_user) { FactoryBot.create :user, tenant: bar }
11
11
 
12
12
  before(:each) {
13
13
  Hippo.logger.level = ::Logger::ERROR
14
14
  }
15
+
16
+ around(:each){ |spec| with_payment_proccessor { spec.run } }
17
+
15
18
  it 'isolates foo’s tenant data from bar' do
16
19
  get '/api/hippo/user.json', {} , {
17
- 'HTTP_AUTHORIZATION' => foo_user.jwt_token,
18
- 'SERVER_NAME' => "#{foo.slug}.example.ua" }
20
+ 'HTTP_AUTHORIZATION' => foo_user.jwt_token,
21
+ 'SERVER_NAME' => "#{foo.slug}.example.ua" }
19
22
  ids = last_response_json['data'].map { |u| u['id'] }
20
23
  expect(ids).to include(foo_user.id)
21
24
  expect(ids).not_to include(bar_user.id)
@@ -23,8 +26,8 @@ describe "Tenant isoloation", api: true, vcr: VCR_OPTS do
23
26
 
24
27
  it 'isolates bar’s tenant data from foo' do
25
28
  get '/api/hippo/user.json', {}, {
26
- 'HTTP_AUTHORIZATION' => bar_user.jwt_token,
27
- 'SERVER_NAME' => "#{bar.slug}.example.ua" }
29
+ 'HTTP_AUTHORIZATION' => bar_user.jwt_token,
30
+ 'SERVER_NAME' => "#{bar.slug}.example.ua" }
28
31
  ids = last_response_json['data'].map { |u| u['id'] }
29
32
  expect(ids).to include(bar_user.id)
30
33
  expect(ids).not_to include(foo_user.id)
@@ -2,14 +2,17 @@ require_relative '../spec_helper'
2
2
 
3
3
  describe "User Login", api: true, vcr: VCR_OPTS do
4
4
 
5
- let!(:user) { FactoryGirl.create :user, login: 'SamTheMan', password: 'password' }
5
+ let!(:user) { FactoryBot.create :user, login: 'SamTheMan', password: 'password' }
6
6
 
7
7
  it 'logs in using case insensitive logins' do
8
- post '/api/hippo/user-session.json', {
9
- 'login' => 'samTheman',
10
- 'password' => 'password'
11
- }.to_json
12
- expect(last_response_json['success']).to eq(true)
13
- expect(last_response_json.dig('data', 'user', 'login')).to eq(user.login)
8
+ with_payment_proccessor do
9
+ post('/api/hippo/user-session.json', {
10
+ 'login' => 'samTheman',
11
+ 'password' => 'password'
12
+ }.to_json,
13
+ {'CONTENT_TYPE' => 'application/json'})
14
+ expect(last_response_json['success']).to eq(true)
15
+ expect(last_response_json.dig('data', 'user', 'login')).to eq(user.login)
16
+ end
14
17
  end
15
18
  end
@@ -0,0 +1,45 @@
1
+ require_relative '../spec_helper'
2
+
3
+ describe "User Create/Update", api: true, vcr: VCR_OPTS do
4
+
5
+ let(:user) {
6
+ FactoryBot.create :user, login: 'SamTheMan', password: 'password', role_names: ['employee']
7
+ }
8
+
9
+ let(:new_user_data) {
10
+ { 'login' => 'bob', 'name' => 'Bob',
11
+ 'email' => 'bob@test.com', 'password' => 'new-password' }
12
+ }
13
+
14
+ it 'can create user when admin' do
15
+ user.update_attributes(role_names: ['administrator'])
16
+ post('/api/hippo/user.json', new_user_data.to_json, {
17
+ 'HTTP_AUTHORIZATION' => user.jwt_token,
18
+ 'CONTENT_TYPE' => 'application/json'
19
+ })
20
+ expect(last_response_json['success']).to eq(true)
21
+ expect(last_response_json.dig('data', 'login')).to eq('bob')
22
+ end
23
+
24
+ it 'fails when user is not admin' do
25
+ Hippo.silence_logs do
26
+ post('/api/hippo/user.json',
27
+ new_user_data.to_json,
28
+ {'HTTP_AUTHORIZATION' => user.jwt_token,
29
+ 'CONTENT_TYPE' => 'application/json'})
30
+ end
31
+ expect(last_response_json['success']).to eq(false)
32
+ expect(last_response_json['message']).to eq('Access Denied')
33
+ end
34
+
35
+ it 'allows user to update own account' do
36
+ put("/api/hippo/user/#{user.id}.json",
37
+ new_user_data.merge('id' => user.id).to_json,
38
+ {'HTTP_AUTHORIZATION' => user.jwt_token,
39
+ 'CONTENT_TYPE' => 'application/json'})
40
+ expect(last_response_json['success']).to eq(true)
41
+ expect(user.reload.login).to eq('SamTheMan')
42
+ expect(user.authenticate('new-password')).not_to eq(false)
43
+ end
44
+
45
+ end
@@ -0,0 +1,10 @@
1
+ require_relative '../spec_helper'
2
+
3
+ describe Hippo::Subscription do
4
+
5
+ it "can be instantiated" do
6
+ model = Hippo::Subscription.new
7
+ expect(model).to be_an(Hippo::Subscription)
8
+ end
9
+
10
+ end
@@ -0,0 +1,13 @@
1
+ module PaymentHelpers
2
+ def with_payment_proccessor
3
+ RSpec::Mocks.with_temporary_scope do
4
+ allow(Hippo::Payments).to receive(:gateway_config).and_return(
5
+ 'merchant_id' => 'dshtky2jcjpr96z3',
6
+ 'public_key' => 'hm7n6vc84jbr962w',
7
+ 'private_key' => '413cb3c8af29b3c3ba340cfb715f4532',
8
+ 'sandbox' => true
9
+ )
10
+ yield
11
+ end
12
+ end
13
+ end
@@ -16,7 +16,7 @@ xdescribe "Printing tempaltes" do
16
16
  end
17
17
 
18
18
  it "can generate a pdf" do
19
- user = FactoryGirl.create(:user)
19
+ user = FactoryBot.create(:user)
20
20
  tmpl = TestPrinter.new(user.id)
21
21
  tmpl.record
22
22
  expect(tmpl.render.length).to be > 1000
@@ -2,8 +2,8 @@ require "hippo/spec_helper"
2
2
  require 'hippo/command'
3
3
  require "temping"
4
4
  require "shrine/storage/memory"
5
-
6
5
  require 'rspec/expectations'
6
+ require_relative 'payment_helpers'
7
7
 
8
8
  require "shrine"
9
9
 
@@ -12,8 +12,9 @@ RSpec.configure do |config|
12
12
  config.after do
13
13
  Temping.teardown
14
14
  end
15
-
15
+ config.include PaymentHelpers
16
16
  end
17
+
17
18
  require 'hippo/db/migrations'
18
19
  ActiveRecord::ConnectionAdapters::PostgreSQL::Table.class_eval do
19
20
  include ::Hippo::DB::Migrations::TableDefinitionHelpers
@@ -63,12 +64,3 @@ module TestingModels
63
64
  Temping.teardown
64
65
  end
65
66
  end
66
-
67
-
68
- # class Hippo::TestCase
69
-
70
- # def fixtures_path
71
- # Pathname.new(__FILE__).dirname.join("..","fixtures").expand_path
72
- # end
73
-
74
- # end
@@ -11,7 +11,10 @@ const Screens = {};
11
11
  Screens['<%= screen.identifier %>'] = <%= screen.to_json %>;
12
12
  Definition.register(
13
13
  Screens['<%= screen.identifier %>'],
14
- asyncComponent({ resolve: () => System.import(<%= "'#{screen.asset_path}'" %>) }),
14
+ asyncComponent({
15
+ screen: <%= screen.to_json %>,
16
+ resolve: () => System.import(<%= "'#{screen.asset_path}'" %>)
17
+ }),
15
18
  );
16
19
  <% end -%>
17
20
 
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :<%= file_name %>, class: <%= namespace %>::<%= class_name %> do
3
3
  tenant { Hippo::Tenant.current }
4
4
 
@@ -10,7 +10,7 @@
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"/>
11
11
  <title><%= Hippo::Extensions.controlling.title %></title>
12
12
  <style>
13
- .loading {
13
+ .hippo-app-loading {
14
14
  position: fixed;
15
15
  z-index: 999;
16
16
  height: 2em;
@@ -27,7 +27,7 @@
27
27
  border: 0;
28
28
  transition: opacity .5s ease-in-out;
29
29
  }
30
- .loading:before {
30
+ .hippo-app-loading:before {
31
31
  content: '';
32
32
  display: block;
33
33
  position: fixed;
@@ -37,7 +37,7 @@
37
37
  height: 100%;
38
38
  background-color: rgba(0,0,0,0.3);
39
39
  }
40
- .loading:after {
40
+ .hippo-app-loading:after {
41
41
  content: '';
42
42
  display: block;
43
43
  font-size: 10px;
@@ -54,13 +54,13 @@
54
54
  0% { transform: rotate(0deg); }
55
55
  100% { transform: rotate(360deg); }
56
56
  }
57
- .loading.complete {
57
+ .hippo-app-loading.complete {
58
58
  opacity: 0;
59
59
  }
60
60
  </style>
61
61
  </head>
62
62
  <body>
63
- <div class="loading">Loading&#8230;</div>
63
+ <div class="hippo-app-loading">Loading&#8230;</div>
64
64
  <div id="hippo-root">
65
65
  <script type="text/json" id="bootstrap-data">
66
66
  <%= Hippo::API.to_json(Hippo::Tenant.current.bootstrap_data) %>
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.8
4
+ version: 0.9.9
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-10-22 00:00:00.000000000 Z
11
+ date: 2017-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -165,7 +165,7 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.2'
167
167
  - !ruby/object:Gem::Dependency
168
- name: factory_girl
168
+ name: factory_bot
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - "~>"
@@ -276,6 +276,20 @@ dependencies:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
278
  version: '2.0'
279
+ - !ruby/object:Gem::Dependency
280
+ name: braintree
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: '2.80'
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: '2.80'
279
293
  - !ruby/object:Gem::Dependency
280
294
  name: rack-cors
281
295
  requirement: !ruby/object:Gem::Requirement
@@ -346,6 +360,34 @@ dependencies:
346
360
  - - "~>"
347
361
  - !ruby/object:Gem::Version
348
362
  version: '0.4'
363
+ - !ruby/object:Gem::Dependency
364
+ name: image_optim
365
+ requirement: !ruby/object:Gem::Requirement
366
+ requirements:
367
+ - - "~>"
368
+ - !ruby/object:Gem::Version
369
+ version: '0.26'
370
+ type: :runtime
371
+ prerelease: false
372
+ version_requirements: !ruby/object:Gem::Requirement
373
+ requirements:
374
+ - - "~>"
375
+ - !ruby/object:Gem::Version
376
+ version: '0.26'
377
+ - !ruby/object:Gem::Dependency
378
+ name: image_optim_pack
379
+ requirement: !ruby/object:Gem::Requirement
380
+ requirements:
381
+ - - ">="
382
+ - !ruby/object:Gem::Version
383
+ version: '0'
384
+ type: :runtime
385
+ prerelease: false
386
+ version_requirements: !ruby/object:Gem::Requirement
387
+ requirements:
388
+ - - ">="
389
+ - !ruby/object:Gem::Version
390
+ version: '0'
349
391
  - !ruby/object:Gem::Dependency
350
392
  name: execjs
351
393
  requirement: !ruby/object:Gem::Requirement
@@ -696,6 +738,10 @@ files:
696
738
  - client/hippo/access/index.js
697
739
  - client/hippo/access/login-dialog.jsx
698
740
  - client/hippo/access/styles.scss
741
+ - client/hippo/access/subscription-choice-layer.jsx
742
+ - client/hippo/access/subscription-choice-layer/cancel-subscription.jsx
743
+ - client/hippo/access/subscription-choice-layer/payment-form.jsx
744
+ - client/hippo/access/subscription-choice-layer/subscription-choice.scss
699
745
  - client/hippo/boot.jsx
700
746
  - client/hippo/components/asset.jsx
701
747
  - client/hippo/components/asset.scss
@@ -714,6 +760,7 @@ files:
714
760
  - client/hippo/components/form/fields.jsx
715
761
  - client/hippo/components/form/fields/checkbox-wrapper.jsx
716
762
  - client/hippo/components/form/fields/date-wrapper.jsx
763
+ - client/hippo/components/form/fields/email-wrapper.jsx
717
764
  - client/hippo/components/form/fields/form-field.scss
718
765
  - client/hippo/components/form/fields/label.jsx
719
766
  - client/hippo/components/form/fields/react-tags.scss
@@ -723,11 +770,7 @@ files:
723
770
  - client/hippo/components/form/fields/textarea-wrapper.jsx
724
771
  - client/hippo/components/form/validations.js
725
772
  - client/hippo/components/form/wrapper.jsx
726
- - client/hippo/components/grid/config.json
727
- - client/hippo/components/grid/editors.scss
728
- - client/hippo/components/grid/index.js
729
- - client/hippo/components/grid/row-editor.scss
730
- - client/hippo/components/grid/styles.scss
773
+ - client/hippo/components/grid.js
731
774
  - client/hippo/components/help.jsx
732
775
  - client/hippo/components/icon.jsx
733
776
  - client/hippo/components/index.js
@@ -737,6 +780,8 @@ files:
737
780
  - client/hippo/components/modal/styles.scss
738
781
  - client/hippo/components/network-activity-overlay.jsx
739
782
  - client/hippo/components/network-activity-overlay.scss
783
+ - client/hippo/components/payments/field.jsx
784
+ - client/hippo/components/payments/field.scss
740
785
  - client/hippo/components/popout-window.jsx
741
786
  - client/hippo/components/query-builder.jsx
742
787
  - client/hippo/components/query-builder/boolean-picker.jsx
@@ -754,28 +799,14 @@ files:
754
799
  - client/hippo/components/select-field/index.js
755
800
  - client/hippo/components/select-field/styles.scss
756
801
  - client/hippo/components/text-editor.jsx
757
- - client/hippo/components/text-editor/display-modes/Button.jsx
758
- - client/hippo/components/text-editor/display-modes/ToggleEdit.jsx
759
- - client/hippo/components/text-editor/display-modes/ToggleInsert.jsx
760
- - client/hippo/components/text-editor/display-modes/ToggleLayout.jsx
761
- - client/hippo/components/text-editor/display-modes/TogglePreview.jsx
762
- - client/hippo/components/text-editor/display-modes/ToggleResize.jsx
763
- - client/hippo/components/text-editor/display-modes/index.css
764
- - client/hippo/components/text-editor/display-modes/index.js
765
- - client/hippo/components/text-editor/image-plugin/Component/Display/index.js
766
- - client/hippo/components/text-editor/image-plugin/Component/Form/index.js
767
- - client/hippo/components/text-editor/image-plugin/Component/index.js
768
- - client/hippo/components/text-editor/image-plugin/Component/index.scss
769
- - client/hippo/components/text-editor/image-plugin/index.js
770
- - client/hippo/components/text-editor/image-plugin/index.scss
771
802
  - client/hippo/components/text-editor/plugins.js
772
803
  - client/hippo/components/text-editor/renderer.jsx
804
+ - client/hippo/components/text-editor/renderer.scss
773
805
  - client/hippo/components/text-editor/text-editor.scss
806
+ - client/hippo/components/text-editor/upload-adapter.js
774
807
  - client/hippo/components/time-zone-select.jsx
775
808
  - client/hippo/components/tool-tip.jsx
776
- - client/hippo/components/toolbar/changes-notification.scss
777
- - client/hippo/components/toolbar/index.js
778
- - client/hippo/components/toolbar/styles.scss
809
+ - client/hippo/components/toolbar.jsx
779
810
  - client/hippo/components/warning-notification.jsx
780
811
  - client/hippo/config.android.js
781
812
  - client/hippo/config.ios.js
@@ -790,11 +821,19 @@ files:
790
821
  - client/hippo/index.scss.erb
791
822
  - client/hippo/lib/__mocks__/loader.js
792
823
  - client/hippo/lib/__mocks__/request-assets.js
824
+ - client/hippo/lib/action_cable.js
825
+ - client/hippo/lib/action_cable/cable.js
826
+ - client/hippo/lib/action_cable/connection.js
827
+ - client/hippo/lib/action_cable/connection_monitor.js
828
+ - client/hippo/lib/action_cable/consumer.js
829
+ - client/hippo/lib/action_cable/subscription.js
830
+ - client/hippo/lib/action_cable/subscriptions.js
793
831
  - client/hippo/lib/all.js
794
832
  - client/hippo/lib/bootstrap.js
795
833
  - client/hippo/lib/computed-properties.js
796
834
  - client/hippo/lib/date-range.js
797
835
  - client/hippo/lib/index.js.erb
836
+ - client/hippo/lib/lazy-getter.js
798
837
  - client/hippo/lib/loader.js
799
838
  - client/hippo/lib/request-assets.js
800
839
  - client/hippo/lib/smooth-scroll.js
@@ -804,6 +843,7 @@ files:
804
843
  - client/hippo/models/base.js
805
844
  - client/hippo/models/collection.js
806
845
  - client/hippo/models/config.js
846
+ - client/hippo/models/date-type.js
807
847
  - client/hippo/models/decorators.js
808
848
  - client/hippo/models/index.js
809
849
  - client/hippo/models/pub_sub.js
@@ -817,6 +857,7 @@ files:
817
857
  - client/hippo/models/query/operator.js
818
858
  - client/hippo/models/query/result.js
819
859
  - client/hippo/models/query/types.js
860
+ - client/hippo/models/subscription.js
820
861
  - client/hippo/models/sync.js
821
862
  - client/hippo/models/system-setting.js
822
863
  - client/hippo/models/tenant.js
@@ -824,11 +865,13 @@ files:
824
865
  - client/hippo/react/component-not-found.jsx
825
866
  - client/hippo/react/index.js
826
867
  - client/hippo/screens/all.js.erb
868
+ - client/hippo/screens/async-loading.jsx
827
869
  - client/hippo/screens/definition.js
828
870
  - client/hippo/screens/group.js
829
871
  - client/hippo/screens/index.js
830
872
  - client/hippo/screens/instance.js
831
873
  - client/hippo/screens/mixins/index.js
874
+ - client/hippo/screens/preferences.jsx
832
875
  - client/hippo/screens/register.js.erb
833
876
  - client/hippo/screens/styles.scss
834
877
  - client/hippo/screens/system-settings.jsx
@@ -939,12 +982,17 @@ files:
939
982
  - db/migrate/20170530120002_create_system_settings.rb
940
983
  - db/migrate/20170530120003_create_assets.rb
941
984
  - db/migrate/20170530120004_create_users.rb
985
+ - db/migrate/20171129024737_create_subscriptions.rb
942
986
  - db/seed.rb
943
987
  - docs/command.md
944
988
  - docs/model.md
945
989
  - docs/react.md
946
990
  - docs/todo-example-part-1.md
947
991
  - docs/welcome.md
992
+ - fixtures/vcr_cassettes/Tenant_changes/sends_email_when_tenant_identifier_changes.yml
993
+ - fixtures/vcr_cassettes/Tenant_isoloation/disallows_using_a_user_s_token_on_incorrect_domain.yml
994
+ - fixtures/vcr_cassettes/Tenant_isoloation/isolates_bar_s_tenant_data_from_foo.yml
995
+ - fixtures/vcr_cassettes/Tenant_isoloation/isolates_foo_s_tenant_data_from_bar.yml
948
996
  - hippo-fw.gemspec
949
997
  - lib/hippo-fw.rb
950
998
  - lib/hippo.rb
@@ -975,6 +1023,7 @@ files:
975
1023
  - lib/hippo/api/generic_controller.rb
976
1024
  - lib/hippo/api/handlers/asset.rb
977
1025
  - lib/hippo/api/handlers/print.rb
1026
+ - lib/hippo/api/handlers/subscription.rb
978
1027
  - lib/hippo/api/handlers/tenant.rb
979
1028
  - lib/hippo/api/handlers/user_session.rb
980
1029
  - lib/hippo/api/helper_methods.rb
@@ -1045,7 +1094,9 @@ files:
1045
1094
  - lib/hippo/logger.rb
1046
1095
  - lib/hippo/mailer.rb
1047
1096
  - lib/hippo/model.rb
1097
+ - lib/hippo/models/subscription.rb
1048
1098
  - lib/hippo/numbers.rb
1099
+ - lib/hippo/payments.rb
1049
1100
  - lib/hippo/rake_tasks.rb
1050
1101
  - lib/hippo/redis.rb
1051
1102
  - lib/hippo/reloadable_sinatra.rb
@@ -1059,6 +1110,7 @@ files:
1059
1110
  - lib/hippo/templates/latex.rb
1060
1111
  - lib/hippo/templates/liquid.rb
1061
1112
  - lib/hippo/templates/liquid/pluralize.rb
1113
+ - lib/hippo/templates/liquid/precision.rb
1062
1114
  - lib/hippo/templates/mail.rb
1063
1115
  - lib/hippo/templates/tenant_change.rb
1064
1116
  - lib/hippo/tenant.rb
@@ -1098,11 +1150,14 @@ files:
1098
1150
  - spec/client/models/pub_sub.spec.js
1099
1151
  - spec/client/models/pub_sub/channel.spec.js
1100
1152
  - spec/client/models/query.spec.js
1153
+ - spec/client/models/subscription.spec.js
1101
1154
  - spec/client/models/sync.spec.js
1102
1155
  - spec/client/models/system-setting.spec.js
1156
+ - spec/client/screens/__snapshots__/preferences.spec.jsx.snap
1103
1157
  - spec/client/screens/definition.spec.js
1104
1158
  - spec/client/screens/group.spec.js
1105
1159
  - spec/client/screens/instance.spec.js
1160
+ - spec/client/screens/preferences.spec.jsx
1106
1161
  - spec/client/screens/system-settings-tenants.spec.jsx
1107
1162
  - spec/client/screens/system-settings.spec.jsx
1108
1163
  - spec/client/screens/user-management.spec.jsx
@@ -1112,6 +1167,7 @@ files:
1112
1167
  - spec/client/user.spec.js
1113
1168
  - spec/client/workspace/__snapshots__/menu.spec.jsx.snap
1114
1169
  - spec/client/workspace/menu.spec.jsx
1170
+ - spec/factories/subscription.rb
1115
1171
  - spec/factories/tenant.rb
1116
1172
  - spec/factories/user.rb
1117
1173
  - spec/fixtures/logo.png
@@ -1145,6 +1201,7 @@ files:
1145
1201
  - spec/server/api/tenant_change_spec.rb
1146
1202
  - spec/server/api/tenant_isolation_spec.rb
1147
1203
  - spec/server/api/user_sessions_spec.rb
1204
+ - spec/server/api/user_spec.rb
1148
1205
  - spec/server/assertions.rb
1149
1206
  - spec/server/asset_spec.rb
1150
1207
  - spec/server/command_spec.rb
@@ -1161,7 +1218,9 @@ files:
1161
1218
  - spec/server/configuration_spec.rb
1162
1219
  - spec/server/job_spec.rb
1163
1220
  - spec/server/mailer_spec.rb
1221
+ - spec/server/models/subscription_spec.rb
1164
1222
  - spec/server/numbers_spec.rb
1223
+ - spec/server/payment_helpers.rb
1165
1224
  - spec/server/print/form_spec.rb
1166
1225
  - spec/server/spec_helper.rb
1167
1226
  - spec/server/strings_spec.rb