mno-enterprise-core 2.0.9 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/mno_enterprise/application_controller.rb +10 -20
  3. data/app/models/mno_enterprise/base_resource.rb +1 -2
  4. data/app/models/mno_enterprise/impac/dashboard.rb +24 -22
  5. data/app/models/mno_enterprise/impac/kpi.rb +1 -1
  6. data/app/models/mno_enterprise/impac/widget.rb +1 -1
  7. data/app/models/mno_enterprise/user.rb +2 -1
  8. data/config/initializers/audit_log.rb +2 -0
  9. data/config/initializers/config.rb +3 -0
  10. data/config/locales/models/app/en.yml +25 -0
  11. data/config/locales/models/app/id.yml +25 -0
  12. data/config/locales/models/app/zh.yml +25 -0
  13. data/config/locales/models/app_instance/en.yml +24 -0
  14. data/config/locales/models/app_instance/id.yml +24 -0
  15. data/config/locales/models/app_instance/zh.yml +24 -0
  16. data/config/locales/models/credit_card/en.yml +23 -0
  17. data/config/locales/models/credit_card/id.yml +23 -0
  18. data/config/locales/models/credit_card/zh.yml +23 -0
  19. data/config/locales/models/deletion_request/en.yml +9 -0
  20. data/config/locales/models/deletion_request/id.yml +9 -0
  21. data/config/locales/models/deletion_request/zh.yml +9 -0
  22. data/config/locales/models/impac/dashboard/en.yml +13 -0
  23. data/config/locales/models/impac/dashboard/id.yml +13 -0
  24. data/config/locales/models/impac/dashboard/zh.yml +13 -0
  25. data/config/locales/models/impac/widget/en.yml +13 -0
  26. data/config/locales/models/impac/widget/id.yml +13 -0
  27. data/config/locales/models/impac/widget/zh.yml +13 -0
  28. data/config/locales/models/invoice/en.yml +9 -0
  29. data/config/locales/models/invoice/id.yml +9 -0
  30. data/config/locales/models/invoice/zh.yml +9 -0
  31. data/config/locales/models/org_invite/en.yml +9 -0
  32. data/config/locales/models/org_invite/id.yml +9 -0
  33. data/config/locales/models/org_invite/zh.yml +9 -0
  34. data/config/locales/models/org_team/en.yml +9 -0
  35. data/config/locales/models/org_team/id.yml +9 -0
  36. data/config/locales/models/org_team/zh.yml +9 -0
  37. data/config/locales/models/organization/en.yml +24 -0
  38. data/config/locales/models/organization/id.yml +24 -0
  39. data/config/locales/models/organization/zh.yml +24 -0
  40. data/config/locales/models/user/en.yml +45 -0
  41. data/config/locales/models/user/id.yml +45 -0
  42. data/config/locales/models/user/zh.yml +44 -0
  43. data/config/locales/templates/components/en.yml +21 -0
  44. data/config/locales/templates/components/id.yml +21 -0
  45. data/config/locales/templates/components/zh.yml +21 -0
  46. data/config/locales/templates/dashboard/en.yml +60 -0
  47. data/config/locales/templates/dashboard/id.yml +50 -0
  48. data/config/locales/templates/dashboard/marketplace/en.yml +16 -0
  49. data/config/locales/templates/dashboard/marketplace/id.yml +14 -0
  50. data/config/locales/templates/dashboard/marketplace/zh.yml +14 -0
  51. data/config/locales/templates/dashboard/organization/en.yml +107 -0
  52. data/config/locales/templates/dashboard/organization/id.yml +103 -0
  53. data/config/locales/templates/dashboard/organization/zh.yml +103 -0
  54. data/config/locales/templates/dashboard/teams/en.yml +48 -0
  55. data/config/locales/templates/dashboard/teams/id.yml +43 -0
  56. data/config/locales/templates/dashboard/teams/zh.yml +43 -0
  57. data/config/locales/templates/dashboard/zh.yml +54 -0
  58. data/config/locales/templates/impac/en.yml +24 -0
  59. data/config/locales/templates/impac/id.yml +24 -0
  60. data/config/locales/templates/impac/modals/en.yml +31 -0
  61. data/config/locales/templates/impac/modals/id.yml +29 -0
  62. data/config/locales/templates/impac/modals/zh.yml +28 -0
  63. data/config/locales/templates/impac/widgets/common/en.yml +9 -0
  64. data/config/locales/templates/impac/widgets/common/id.yml +9 -0
  65. data/config/locales/templates/impac/widgets/common/zh.yml +9 -0
  66. data/config/locales/templates/impac/widgets/en.yml +66 -0
  67. data/config/locales/templates/impac/widgets/id.yml +58 -0
  68. data/config/locales/templates/impac/widgets/settings/en.yml +23 -0
  69. data/config/locales/templates/impac/widgets/settings/id.yml +19 -0
  70. data/config/locales/templates/impac/widgets/settings/zh.yml +19 -0
  71. data/config/locales/templates/impac/widgets/zh.yml +58 -0
  72. data/config/locales/templates/impac/zh.yml +24 -0
  73. data/config/locales/templates/modals/en.yml +9 -0
  74. data/config/locales/templates/modals/id.yml +9 -0
  75. data/config/locales/templates/modals/zh.yml +9 -0
  76. data/config/locales/views/auth/confirmations/en.yml +17 -0
  77. data/config/locales/views/auth/confirmations/id.yml +17 -0
  78. data/config/locales/views/auth/confirmations/zh.yml +17 -0
  79. data/config/locales/views/auth/passwords/en.yml +10 -0
  80. data/config/locales/views/auth/passwords/id.yml +10 -0
  81. data/config/locales/views/auth/passwords/zh.yml +10 -0
  82. data/config/locales/views/auth/registrations/en.yml +9 -0
  83. data/config/locales/views/auth/registrations/id.yml +9 -0
  84. data/config/locales/views/auth/registrations/zh.yml +8 -0
  85. data/config/locales/views/auth/sessions/en.yml +7 -0
  86. data/config/locales/views/auth/sessions/id.yml +7 -0
  87. data/config/locales/views/auth/sessions/zh.yml +7 -0
  88. data/config/locales/views/auth/shared/en.yml +12 -0
  89. data/config/locales/views/auth/shared/id.yml +11 -0
  90. data/config/locales/views/auth/shared/zh.yml +11 -0
  91. data/config/locales/views/auth/unlocks/en.yml +7 -0
  92. data/config/locales/views/auth/unlocks/id.yml +7 -0
  93. data/config/locales/views/auth/unlocks/zh.yml +7 -0
  94. data/config/locales/views/pages/en.yml +19 -0
  95. data/config/locales/views/pages/id.yml +18 -0
  96. data/config/locales/views/pages/zh.yml +18 -0
  97. data/config/locales/views/provision/en.yml +12 -0
  98. data/config/locales/views/provision/id.yml +11 -0
  99. data/config/locales/views/provision/zh.yml +11 -0
  100. data/config/locales/views/webhook/o_auth/en.yml +6 -0
  101. data/config/locales/views/webhook/o_auth/id.yml +6 -0
  102. data/config/locales/views/webhook/o_auth/providers/en.yml +15 -0
  103. data/config/locales/views/webhook/o_auth/providers/id.yml +15 -0
  104. data/config/locales/views/webhook/o_auth/providers/zh.yml +15 -0
  105. data/config/locales/views/webhook/o_auth/zh.yml +6 -0
  106. data/lib/devise/models/remote_authenticatable.rb +1 -1
  107. data/lib/devise_extension.rb +6 -2
  108. data/lib/generators/mno_enterprise/dummy/dummy_generator.rb +7 -0
  109. data/lib/generators/mno_enterprise/dummy/templates/rails/routes.rb +0 -6
  110. data/lib/generators/mno_enterprise/install/install_generator.rb +79 -33
  111. data/lib/generators/mno_enterprise/install/templates/Procfile +1 -1
  112. data/lib/generators/mno_enterprise/install/templates/Procfile.dev +2 -0
  113. data/lib/generators/mno_enterprise/install/templates/config/application.yml +11 -0
  114. data/lib/generators/mno_enterprise/install/templates/config/initializers/mno_enterprise.rb +18 -15
  115. data/lib/generators/mno_enterprise/install/templates/config/settings.yml +7 -0
  116. data/lib/generators/mno_enterprise/install/templates/config/settings/development.yml +6 -0
  117. data/lib/generators/mno_enterprise/install/templates/config/settings/production.yml +6 -0
  118. data/lib/generators/mno_enterprise/install/templates/config/settings/test.yml +6 -0
  119. data/lib/generators/mno_enterprise/install/templates/config/settings/uat.yml +6 -0
  120. data/lib/generators/mno_enterprise/install/templates/stylesheets/{main.less_erb → main.less} +16 -3
  121. data/lib/generators/mno_enterprise/templates/scripts/puma.rb +3 -3
  122. data/lib/her_extension/model/relation.rb +0 -13
  123. data/lib/mno_enterprise/concerns/controllers/auth/confirmations_controller.rb +24 -19
  124. data/lib/mno_enterprise/concerns/controllers/i18n.rb +16 -0
  125. data/lib/mno_enterprise/concerns/models/app_instance.rb +0 -4
  126. data/lib/mno_enterprise/concerns/models/organization.rb +1 -1
  127. data/lib/mno_enterprise/core.rb +20 -7
  128. data/lib/mno_enterprise/engine.rb +19 -0
  129. data/lib/mno_enterprise/testing_support/common_rake.rb +1 -1
  130. data/lib/mno_enterprise/testing_support/factories/impac/kpis.rb +1 -0
  131. data/lib/mno_enterprise/testing_support/factories/org_invite.rb +1 -5
  132. data/lib/mno_enterprise/testing_support/mno_enterprise_api_test_helper.rb +1 -2
  133. data/lib/mno_enterprise/testing_support/shared_contexts/rake_task.rb +21 -0
  134. data/lib/mno_enterprise/version.rb +1 -1
  135. data/lib/tasks/mno_enterprise_tasks.rake +3 -5
  136. data/spec/controllers/mno_enterprise/i18n_spec.rb +42 -0
  137. data/spec/lib/her_extension/model/relation_spec.rb +0 -71
  138. data/spec/lib/mno_enterprise/core_engine_spec.rb +16 -0
  139. data/spec/mno_enterprise_spec.rb +2 -2
  140. data/spec/models/mno_enterprise/base_resource_spec.rb +0 -22
  141. metadata +152 -18
  142. data/lib/her_extension/middleware/mnoe_raise_error.rb +0 -21
  143. data/lib/her_extension/model/associations/belongs_to_association.rb +0 -25
  144. data/spec/controllers/mno_enterprise/application_controller_spec.rb +0 -15
@@ -0,0 +1,42 @@
1
+ require 'rails_helper'
2
+
3
+ module MnoEnterprise
4
+ describe ApplicationController, type: :controller do
5
+ # Anonymous controller
6
+ controller do
7
+ include MnoEnterprise::Concerns::Controllers::I18n
8
+
9
+ def index
10
+ render text: 'Hello World'
11
+ end
12
+ end
13
+
14
+ describe 'I18n' do
15
+ before do
16
+ I18n.available_locales = [:en, :fr]
17
+ I18n.default_locale = :en
18
+ end
19
+
20
+ context 'when a valid locale is provided' do
21
+ it 'sets the provided locale' do
22
+ get :index, locale: :fr
23
+ expect(I18n.locale).to eq(:fr)
24
+ end
25
+ end
26
+
27
+ context 'when an invalid locale is provided' do
28
+ it 'sets the default locale' do
29
+ get :index, locale: :it
30
+ expect(I18n.locale).to eq(:en)
31
+ end
32
+ end
33
+
34
+ context 'when the locale is not provided' do
35
+ it 'sets the default locale' do
36
+ get :index
37
+ expect(I18n.locale).to eq(:en)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -3,76 +3,5 @@ require 'rails_helper'
3
3
  module MnoEnterprise
4
4
  RSpec.describe Her::Model::Relation do
5
5
  pending "add specs for Her::Model::Relation monkey patch: #{__FILE__}"
6
-
7
- before(:all) { Object.const_set('DummyClass', Class.new).send(:include, Her::Model) }
8
- let(:dummy_class) { DummyClass }
9
-
10
- describe '.where' do
11
- it 'adds the filter to params[:filter]' do
12
- rel = Her::Model::Relation.new(dummy_class).where('uid.in' => [1, 2], 'foo' => 'bar')
13
- expect(rel.params[:filter]).to eq('uid.in' => [1, 2], 'foo' => 'bar')
14
- end
15
-
16
- it 'replaces empty array values with nil' do
17
- rel = Her::Model::Relation.new(dummy_class).where('id.in' => [])
18
- expect(rel.params[:filter]).to eq('id.in' => nil)
19
- end
20
- end
21
-
22
- # We mostly test our request expectations
23
- describe '.first_or_create' do
24
- let(:relation) { Her::Model::Relation.new(dummy_class) }
25
- subject { relation.where(foo: 'bar').first_or_create(baz: 'bar') }
26
-
27
- context 'when matching record' do
28
- let(:record) { dummy_class.new(foo: 'bar') }
29
- before do
30
- expect(dummy_class).to receive(:request).with(hash_including(filter: {foo: 'bar'}, _method: :get)).and_return([record])
31
- end
32
-
33
- it 'returns the record' do
34
- expect(subject).to eq(record)
35
- end
36
- end
37
-
38
- context 'when no matching record' do
39
- before do
40
- expect(dummy_class).to receive(:request).with(hash_including(filter: {foo: 'bar'}, _method: :get)).and_return([])
41
- expect(dummy_class).to receive(:request).with(hash_including(foo: 'bar', baz: 'bar', _method: :post)).and_return(dummy_class.new)
42
- end
43
-
44
- it 'creates a new record' do
45
- expect(subject).to eq(dummy_class.new(foo: 'bar', baz: 'bar'))
46
- end
47
- end
48
- end
49
-
50
- # We mostly test our request expectations
51
- describe '.first_or_initialize' do
52
- let(:relation) { Her::Model::Relation.new(dummy_class) }
53
- subject { relation.where(foo: 'bar').first_or_initialize(baz: 'bar') }
54
-
55
- context 'when matching record' do
56
- let(:record) { dummy_class.new(foo: 'bar') }
57
- before do
58
- expect(dummy_class).to receive(:request).with(hash_including(filter: {foo: 'bar'}, _method: :get)).and_return([record])
59
- end
60
-
61
- it 'returns the record' do
62
- expect(subject).to eq(record)
63
- end
64
- end
65
-
66
- context 'when no matching record' do
67
- before do
68
- expect(dummy_class).to receive(:request).with(hash_including(filter: {foo: 'bar'}, _method: :get)).and_return([])
69
- # No POST stub
70
- end
71
-
72
- it 'build a new record' do
73
- expect(subject).to eq(dummy_class.new(foo: 'bar', baz: 'bar'))
74
- end
75
- end
76
- end
77
6
  end
78
7
  end
@@ -0,0 +1,16 @@
1
+ require 'rails_helper'
2
+
3
+ module MnoEnterprise
4
+ describe Engine do
5
+ describe 'cache configuration' do
6
+ it 'enables ActionController caching' do
7
+ expect(ActionController::Base.perform_caching).to be true
8
+ end
9
+
10
+ it 'uses ActiveSupport::Cache::MemoryStore' do
11
+ expect(Rails.cache).to be_a(ActiveSupport::Cache::MemoryStore)
12
+ expect(ActionController::Base.cache_store).to be_a(ActiveSupport::Cache::MemoryStore)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -14,12 +14,12 @@ describe MnoEnterprise do
14
14
  before { MnoEnterprise.configure { |c| c.mno_api_private_host = private_host } }
15
15
 
16
16
  describe 'without private host' do
17
- it { expect(subject).to eq('https://api-enterprise.maestrano.com/v1') }
17
+ it { expect(subject).to eq('https://api-enterprise.maestrano.com/api/mnoe/v1') }
18
18
  end
19
19
 
20
20
  describe 'with private host' do
21
21
  let(:private_host) { 'https://api-hub.account.local' }
22
- it { expect(subject).to eq("#{private_host}/v1") }
22
+ it { expect(subject).to eq("#{private_host}/api/mnoe/v1") }
23
23
  end
24
24
  end
25
25
 
@@ -2,28 +2,6 @@ require 'rails_helper'
2
2
 
3
3
  module MnoEnterprise
4
4
  RSpec.describe BaseResource, type: :model do
5
- describe 'Error Handling' do
6
- class Test < BaseResource; end
7
-
8
- context 'Connection Errors' do
9
- ((502..504).to_a<<407).each do |code|
10
- it "handles #{code} error" do
11
- api_stub_for(get: "/tests/1", code: code)
12
- expect { Test.find(1) }.to raise_error(Faraday::ConnectionFailed)
13
- end
14
- end
15
- end
16
-
17
- context 'Server Errors' do
18
- [401, 500].each do |code|
19
- it "handles #{code} error" do
20
- api_stub_for(get: "/tests/1", code: code)
21
- expect { Test.find(1) }.to raise_error(Faraday::Error::ClientError)
22
- end
23
- end
24
- end
25
- end
26
-
27
5
  describe '#cache_key' do
28
6
  context 'for existing record' do
29
7
  let(:user) { build(:user) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mno-enterprise-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.9
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-05 00:00:00.000000000 Z
12
+ date: 2016-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -237,6 +237,34 @@ dependencies:
237
237
  - - "~>"
238
238
  - !ruby/object:Gem::Version
239
239
  version: '4.0'
240
+ - !ruby/object:Gem::Dependency
241
+ name: figaro
242
+ requirement: !ruby/object:Gem::Requirement
243
+ requirements:
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
247
+ type: :runtime
248
+ prerelease: false
249
+ version_requirements: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ - !ruby/object:Gem::Dependency
255
+ name: config
256
+ requirement: !ruby/object:Gem::Requirement
257
+ requirements:
258
+ - - "~>"
259
+ - !ruby/object:Gem::Version
260
+ version: 1.0.0
261
+ type: :runtime
262
+ prerelease: false
263
+ version_requirements: !ruby/object:Gem::Requirement
264
+ requirements:
265
+ - - "~>"
266
+ - !ruby/object:Gem::Version
267
+ version: 1.0.0
240
268
  description: Core functionnality of MNOE. This handles the core functionnality.
241
269
  email:
242
270
  - developers@maestrano.com
@@ -272,7 +300,104 @@ files:
272
300
  - app/models/mno_enterprise/user.rb
273
301
  - app/pdf/mno_enterprise/invoice_pdf.rb
274
302
  - config/initializers/audit_log.rb
303
+ - config/initializers/config.rb
275
304
  - config/locales/devise.en.yml
305
+ - config/locales/models/app/en.yml
306
+ - config/locales/models/app/id.yml
307
+ - config/locales/models/app/zh.yml
308
+ - config/locales/models/app_instance/en.yml
309
+ - config/locales/models/app_instance/id.yml
310
+ - config/locales/models/app_instance/zh.yml
311
+ - config/locales/models/credit_card/en.yml
312
+ - config/locales/models/credit_card/id.yml
313
+ - config/locales/models/credit_card/zh.yml
314
+ - config/locales/models/deletion_request/en.yml
315
+ - config/locales/models/deletion_request/id.yml
316
+ - config/locales/models/deletion_request/zh.yml
317
+ - config/locales/models/impac/dashboard/en.yml
318
+ - config/locales/models/impac/dashboard/id.yml
319
+ - config/locales/models/impac/dashboard/zh.yml
320
+ - config/locales/models/impac/widget/en.yml
321
+ - config/locales/models/impac/widget/id.yml
322
+ - config/locales/models/impac/widget/zh.yml
323
+ - config/locales/models/invoice/en.yml
324
+ - config/locales/models/invoice/id.yml
325
+ - config/locales/models/invoice/zh.yml
326
+ - config/locales/models/org_invite/en.yml
327
+ - config/locales/models/org_invite/id.yml
328
+ - config/locales/models/org_invite/zh.yml
329
+ - config/locales/models/org_team/en.yml
330
+ - config/locales/models/org_team/id.yml
331
+ - config/locales/models/org_team/zh.yml
332
+ - config/locales/models/organization/en.yml
333
+ - config/locales/models/organization/id.yml
334
+ - config/locales/models/organization/zh.yml
335
+ - config/locales/models/user/en.yml
336
+ - config/locales/models/user/id.yml
337
+ - config/locales/models/user/zh.yml
338
+ - config/locales/templates/components/en.yml
339
+ - config/locales/templates/components/id.yml
340
+ - config/locales/templates/components/zh.yml
341
+ - config/locales/templates/dashboard/en.yml
342
+ - config/locales/templates/dashboard/id.yml
343
+ - config/locales/templates/dashboard/marketplace/en.yml
344
+ - config/locales/templates/dashboard/marketplace/id.yml
345
+ - config/locales/templates/dashboard/marketplace/zh.yml
346
+ - config/locales/templates/dashboard/organization/en.yml
347
+ - config/locales/templates/dashboard/organization/id.yml
348
+ - config/locales/templates/dashboard/organization/zh.yml
349
+ - config/locales/templates/dashboard/teams/en.yml
350
+ - config/locales/templates/dashboard/teams/id.yml
351
+ - config/locales/templates/dashboard/teams/zh.yml
352
+ - config/locales/templates/dashboard/zh.yml
353
+ - config/locales/templates/impac/en.yml
354
+ - config/locales/templates/impac/id.yml
355
+ - config/locales/templates/impac/modals/en.yml
356
+ - config/locales/templates/impac/modals/id.yml
357
+ - config/locales/templates/impac/modals/zh.yml
358
+ - config/locales/templates/impac/widgets/common/en.yml
359
+ - config/locales/templates/impac/widgets/common/id.yml
360
+ - config/locales/templates/impac/widgets/common/zh.yml
361
+ - config/locales/templates/impac/widgets/en.yml
362
+ - config/locales/templates/impac/widgets/id.yml
363
+ - config/locales/templates/impac/widgets/settings/en.yml
364
+ - config/locales/templates/impac/widgets/settings/id.yml
365
+ - config/locales/templates/impac/widgets/settings/zh.yml
366
+ - config/locales/templates/impac/widgets/zh.yml
367
+ - config/locales/templates/impac/zh.yml
368
+ - config/locales/templates/modals/en.yml
369
+ - config/locales/templates/modals/id.yml
370
+ - config/locales/templates/modals/zh.yml
371
+ - config/locales/views/auth/confirmations/en.yml
372
+ - config/locales/views/auth/confirmations/id.yml
373
+ - config/locales/views/auth/confirmations/zh.yml
374
+ - config/locales/views/auth/passwords/en.yml
375
+ - config/locales/views/auth/passwords/id.yml
376
+ - config/locales/views/auth/passwords/zh.yml
377
+ - config/locales/views/auth/registrations/en.yml
378
+ - config/locales/views/auth/registrations/id.yml
379
+ - config/locales/views/auth/registrations/zh.yml
380
+ - config/locales/views/auth/sessions/en.yml
381
+ - config/locales/views/auth/sessions/id.yml
382
+ - config/locales/views/auth/sessions/zh.yml
383
+ - config/locales/views/auth/shared/en.yml
384
+ - config/locales/views/auth/shared/id.yml
385
+ - config/locales/views/auth/shared/zh.yml
386
+ - config/locales/views/auth/unlocks/en.yml
387
+ - config/locales/views/auth/unlocks/id.yml
388
+ - config/locales/views/auth/unlocks/zh.yml
389
+ - config/locales/views/pages/en.yml
390
+ - config/locales/views/pages/id.yml
391
+ - config/locales/views/pages/zh.yml
392
+ - config/locales/views/provision/en.yml
393
+ - config/locales/views/provision/id.yml
394
+ - config/locales/views/provision/zh.yml
395
+ - config/locales/views/webhook/o_auth/en.yml
396
+ - config/locales/views/webhook/o_auth/id.yml
397
+ - config/locales/views/webhook/o_auth/providers/en.yml
398
+ - config/locales/views/webhook/o_auth/providers/id.yml
399
+ - config/locales/views/webhook/o_auth/providers/zh.yml
400
+ - config/locales/views/webhook/o_auth/zh.yml
276
401
  - config/routes.rb
277
402
  - config/styleguide.yml
278
403
  - lib/accountingjs_serializer.rb
@@ -295,10 +420,17 @@ files:
295
420
  - lib/generators/mno_enterprise/dummy/templates/rails/test-env.rb
296
421
  - lib/generators/mno_enterprise/install/install_generator.rb
297
422
  - lib/generators/mno_enterprise/install/templates/Procfile
423
+ - lib/generators/mno_enterprise/install/templates/Procfile.dev
424
+ - lib/generators/mno_enterprise/install/templates/config/application.yml
298
425
  - lib/generators/mno_enterprise/install/templates/config/initializers/mno_enterprise.rb
299
426
  - lib/generators/mno_enterprise/install/templates/config/mno_enterprise_styleguide.yml
427
+ - lib/generators/mno_enterprise/install/templates/config/settings.yml
428
+ - lib/generators/mno_enterprise/install/templates/config/settings/development.yml
429
+ - lib/generators/mno_enterprise/install/templates/config/settings/production.yml
430
+ - lib/generators/mno_enterprise/install/templates/config/settings/test.yml
431
+ - lib/generators/mno_enterprise/install/templates/config/settings/uat.yml
300
432
  - lib/generators/mno_enterprise/install/templates/javascripts/mno_enterprise_extensions.js
301
- - lib/generators/mno_enterprise/install/templates/stylesheets/main.less_erb
433
+ - lib/generators/mno_enterprise/install/templates/stylesheets/main.less
302
434
  - lib/generators/mno_enterprise/install/templates/stylesheets/theme.less_erb
303
435
  - lib/generators/mno_enterprise/install/templates/stylesheets/variables.less
304
436
  - lib/generators/mno_enterprise/install/templates/tasks/sprites.rake
@@ -313,10 +445,8 @@ files:
313
445
  - lib/generators/mno_enterprise/templates/scripts/upstart/app.conf
314
446
  - lib/her_extension/her_orm_adapter.rb
315
447
  - lib/her_extension/middleware/mnoe_api_v1_parse_json.rb
316
- - lib/her_extension/middleware/mnoe_raise_error.rb
317
448
  - lib/her_extension/model/associations/association.rb
318
449
  - lib/her_extension/model/associations/association_proxy.rb
319
- - lib/her_extension/model/associations/belongs_to_association.rb
320
450
  - lib/her_extension/model/associations/has_many_association.rb
321
451
  - lib/her_extension/model/attributes.rb
322
452
  - lib/her_extension/model/orm.rb
@@ -335,6 +465,7 @@ files:
335
465
  - lib/mno_enterprise/concerns/controllers/auth/registrations_controller.rb
336
466
  - lib/mno_enterprise/concerns/controllers/auth/sessions_controller.rb
337
467
  - lib/mno_enterprise/concerns/controllers/auth/unlocks_controller.rb
468
+ - lib/mno_enterprise/concerns/controllers/i18n.rb
338
469
  - lib/mno_enterprise/concerns/models.rb
339
470
  - lib/mno_enterprise/concerns/models/ability.rb
340
471
  - lib/mno_enterprise/concerns/models/app_instance.rb
@@ -365,14 +496,16 @@ files:
365
496
  - lib/mno_enterprise/testing_support/mno_enterprise_api_test_helper.rb
366
497
  - lib/mno_enterprise/testing_support/mnoe_faraday_test_adapter.rb
367
498
  - lib/mno_enterprise/testing_support/organizations_shared_helpers.rb
499
+ - lib/mno_enterprise/testing_support/shared_contexts/rake_task.rb
368
500
  - lib/mno_enterprise/testing_support/user_action_shared.rb
369
501
  - lib/mno_enterprise/version.rb
370
502
  - lib/tasks/mno_enterprise_tasks.rake
371
503
  - spec/controllers/mno_enterprise/angular_csrf_spec.rb
372
- - spec/controllers/mno_enterprise/application_controller_spec.rb
504
+ - spec/controllers/mno_enterprise/i18n_spec.rb
373
505
  - spec/lib/her_extension/her_orm_adapter.rb
374
506
  - spec/lib/her_extension/model/relation_spec.rb
375
507
  - spec/lib/mandrill_client_spec.rb
508
+ - spec/lib/mno_enterprise/core_engine_spec.rb
376
509
  - spec/mno_enterprise_spec.rb
377
510
  - spec/models/mno_enterprise/app_instance_spec.rb
378
511
  - spec/models/mno_enterprise/app_spec.rb
@@ -385,7 +518,7 @@ files:
385
518
  - spec/spec_helper.rb
386
519
  homepage: https://maestrano.com
387
520
  licenses:
388
- - Apache-2.0
521
+ - Maestrano Enterprise License V1
389
522
  metadata: {}
390
523
  post_install_message:
391
524
  rdoc_options: []
@@ -403,23 +536,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
403
536
  version: '0'
404
537
  requirements: []
405
538
  rubyforge_project:
406
- rubygems_version: 2.4.8
539
+ rubygems_version: 2.2.2
407
540
  signing_key:
408
541
  specification_version: 4
409
542
  summary: Maestrano Enterprise - Core functionnality
410
543
  test_files:
411
- - spec/models/mno_enterprise/app_spec.rb
412
- - spec/models/mno_enterprise/organization_spec.rb
544
+ - spec/controllers/mno_enterprise/angular_csrf_spec.rb
545
+ - spec/controllers/mno_enterprise/i18n_spec.rb
546
+ - spec/lib/her_extension/her_orm_adapter.rb
547
+ - spec/lib/her_extension/model/relation_spec.rb
548
+ - spec/lib/mandrill_client_spec.rb
549
+ - spec/lib/mno_enterprise/core_engine_spec.rb
550
+ - spec/mno_enterprise_spec.rb
413
551
  - spec/models/mno_enterprise/app_instance_spec.rb
552
+ - spec/models/mno_enterprise/app_spec.rb
553
+ - spec/models/mno_enterprise/base_resource_spec.rb
414
554
  - spec/models/mno_enterprise/deletion_request_spec.rb
415
555
  - spec/models/mno_enterprise/invoice_spec.rb
556
+ - spec/models/mno_enterprise/organization_spec.rb
416
557
  - spec/models/mno_enterprise/user_spec.rb
417
- - spec/models/mno_enterprise/base_resource_spec.rb
418
- - spec/spec_helper.rb
419
- - spec/lib/her_extension/her_orm_adapter.rb
420
- - spec/lib/her_extension/model/relation_spec.rb
421
- - spec/lib/mandrill_client_spec.rb
422
558
  - spec/rails_helper.rb
423
- - spec/controllers/mno_enterprise/angular_csrf_spec.rb
424
- - spec/controllers/mno_enterprise/application_controller_spec.rb
425
- - spec/mno_enterprise_spec.rb
559
+ - spec/spec_helper.rb
@@ -1,21 +0,0 @@
1
- module Her
2
- module Middleware
3
- # This middleware will raise errors based on the response status
4
- # Same as Faraday::Response::RaiseError, except it will catch specific
5
- # errors codes rather than everything in 400..600
6
- class MnoeRaiseError < Faraday::Response::RaiseError
7
- def on_complete(env)
8
- case env[:status]
9
- when 407
10
- # mimic the behavior that we get with proxy requests with HTTPS
11
- raise Faraday::Error::ConnectionFailed,
12
- %(407 "Proxy Authentication Required ")
13
- when 502..504
14
- raise Faraday::Error::ConnectionFailed, response_values(env)
15
- when 401, 500
16
- raise Faraday::Error::ClientError, response_values(env)
17
- end
18
- end
19
- end
20
- end
21
- end