kaui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0651238ca5895ad6646d03a02d6aea566789aecf'
4
- data.tar.gz: 5f69d3a6033391e3fe1ee08e6a195a44475c33db
3
+ metadata.gz: 1578ab0cd55f1c59f62e95db3ce5a9fdfe490843
4
+ data.tar.gz: 3b998533f0aa8bb70f4030bebf7a960568a8a7eb
5
5
  SHA512:
6
- metadata.gz: eb800c76bba3c7073b21418059ec15614e3e6ba65c33e61101630d4a8ffaebf289dfe92296fcfbe72dbd87a66cef1fa2442302eaa405402024afbc9b27abd5c9
7
- data.tar.gz: 89cbb200e3eabc97fe3c4475603a1906d83ab0c19baad61926b696a77cf58e7b3e83061fa39edb372bf9205e78caf312232fa72f376d695b636130634e6c3e48
6
+ metadata.gz: 2b9a8496dde5e2919ebf43526692193a2f0c77b0b5d0c876d5c6349c9f6d1bf0032df66d31ed6b754f3f770fd82d6e29975f65ef6cbae1356602847c00299fad
7
+ data.tar.gz: 51c5a965fdd3791f3ae08e26153ad3e2e0319aa825d775f1ecb70c4494b2f45e0598fe86b8f52aeb6780cb55655272d8cb30b3603440ef086a3074d3bd331bc8
@@ -85,7 +85,6 @@ class Kaui::AdminTenantsController < Kaui::EngineController
85
85
  # hack:: replace paypal key with paypal_express, to set configuration and allow the ui to find the right configuration inputs
86
86
  plugin_repository = plugin_repository.inject({}) { |p, (k,v)| p[k.to_s.sub(/\Apaypal/, 'paypal_express').to_sym] = v; p }
87
87
 
88
-
89
88
  fetch_plugin_config = promise { Kaui::AdminTenant::get_oss_plugin_info(plugin_repository) }
90
89
  fetch_tenant_plugin_config = promise { Kaui::AdminTenant::get_tenant_plugin_config(plugin_repository, options) }
91
90
 
@@ -49,7 +49,7 @@ module Kaui
49
49
  next if plugin.version.nil?
50
50
  # do not allow duplicate
51
51
  next if installed_plugins.any? { |p| p[:plugin_name].eql?(plugin.plugin_name) }
52
- plugin_key = Kaui::AdminTenant.rewrite_plugin_key(plugin.plugin_key)
52
+ plugin_key = Kaui::AdminTenant.rewrite_plugin_key(plugin.plugin_key) unless plugin.plugin_key.nil?
53
53
  installed_plugins << {
54
54
  plugin_key: plugin_key,
55
55
  plugin_name: plugin.plugin_name,
@@ -71,4 +71,4 @@ module Kaui
71
71
  return nil
72
72
  end
73
73
  end
74
- end
74
+ end
@@ -38,8 +38,6 @@ class Kaui::AdminTenant < KillBillClient::Model::Tenant
38
38
  end
39
39
 
40
40
  def get_oss_plugin_info(plugin_directory)
41
-
42
-
43
41
  # Serialize the plugin state for the view:
44
42
  # plugin_name#plugin_type:prop1,prop2,prop3;plugin_name#plugin_type:prop1,prop2,prop3;...
45
43
  #
@@ -51,13 +49,11 @@ class Kaui::AdminTenant < KillBillClient::Model::Tenant
51
49
  end
52
50
 
53
51
  def get_tenant_plugin_config(plugin_directory, options)
54
-
55
52
  require 'yaml'
56
53
 
57
54
  raw_tenant_config = KillBillClient::Model::Tenant::search_tenant_config("PLUGIN_CONFIG_", options)
58
55
 
59
56
  tenant_config = raw_tenant_config.inject({}) do |hsh, e|
60
-
61
57
  # Strip prefix '/PLUGIN_CONFIG_'
62
58
  killbill_key = e.key.gsub!(/PLUGIN_CONFIG_/, '')
63
59
 
@@ -139,7 +139,6 @@
139
139
  <% else %>
140
140
  <%= f.hidden_field :is_migrated %>
141
141
  <% end %>
142
- <%= f.hidden_field :is_notified_for_invoices %>
143
142
  <%= f.hidden_field :is_payment_delegated_to_parent %>
144
143
  <%= f.hidden_field :parent_account_id %>
145
144
  <div class="form-group">
@@ -77,7 +77,7 @@
77
77
  {{#start_installed}}<optgroup label="Installed">{{/start_installed}}
78
78
  {{#end_installed}}</optgroup>>{{/end_installed}}
79
79
  <option value="{{plugin_name}}" data-plugin-type="{{plugin_type}}" >
80
- {{plugin_key}}
80
+ {{display_name}}
81
81
  </option>
82
82
  {{/plugin_repository}}
83
83
  </script>
@@ -142,7 +142,7 @@
142
142
  populate_plugin_name_options();
143
143
  function populate_plugin_name_options(){
144
144
  var plugin_repository = JSON.parse($("#plugin_repository").val());
145
- for(var idx = 0, size = plugin_repository.length; idx < size; idx++) {
145
+ for (var idx = 0, size = plugin_repository.length; idx < size; idx++) {
146
146
  if (idx == 0 && plugin_repository[idx].installed) {
147
147
  plugin_repository[idx]['start_installed'] = true;
148
148
  }
@@ -153,6 +153,14 @@
153
153
  }
154
154
  }
155
155
 
156
+ for (var idx = 0, size = plugin_repository.length; idx < size; idx++) {
157
+ if (plugin_repository[idx]['plugin_key']) {
158
+ plugin_repository[idx]['display_name'] = plugin_repository[idx]['plugin_key'];
159
+ } else {
160
+ plugin_repository[idx]['display_name'] = plugin_repository[idx]['plugin_name'];
161
+ }
162
+ }
163
+
156
164
  var template = $("#plugin_name_options_template").html();
157
165
  var options_html = Mustache.render( template , { plugin_repository: plugin_repository});
158
166
  $("#select_plugin_name").html(options_html);
@@ -1,3 +1,3 @@
1
1
  module Kaui
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
@@ -124,7 +124,6 @@ class Kaui::AccountsControllerTest < Kaui::FunctionalTestHelper
124
124
  assert_equal '-06:00', assigns(:account).time_zone
125
125
  assert_equal 'AR', assigns(:account).country
126
126
  assert assigns(:account).is_migrated
127
- assert !assigns(:account).is_notified_for_invoices
128
127
  end
129
128
 
130
129
  test 'should update account' do
@@ -98,7 +98,6 @@ module Kaui
98
98
  account.state = 'Awesome'
99
99
  account.country = 'LalaLand'
100
100
  account.locale = 'fr_FR'
101
- account.is_notified_for_invoices = false
102
101
  account.parent_account_id = parent_account_id
103
102
  account.is_payment_delegated_to_parent = !parent_account_id.nil?
104
103
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails