kaui 4.0.8 → 4.0.9

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
  SHA256:
3
- metadata.gz: b2c56656e3f87a1f9ec78f971f9fad26c7b91c774ca073325dae08f5b8a047cb
4
- data.tar.gz: a1bb18736365bcbd1178dc061de7bb49af25fd354260f51889aa86cfa50615dc
3
+ metadata.gz: 68f193d330400858d2b943a2b2e4e356366ebd03fa1099d1279612c40c1f7666
4
+ data.tar.gz: 61d17f6e690ca34e6ef8972ba185cf589a0deca6c22159409c040147146d8955
5
5
  SHA512:
6
- metadata.gz: 4c4fd476791af712ce1be6f3f92e1152b13884f422511f58cedd52a15958428ea78c4ab3b7184555cb938d1d17faaf0673d7e55df8863bc0b6762230b95d3cc5
7
- data.tar.gz: bc90a81429952f5d1db664f9e8531e6a18aa5096814bc0008e16f37282fd89c015e2a614e81857ec09cb65f2b6a0366311e65e9960fae106028e404781d125b3
6
+ metadata.gz: 040f78a63f17a79983d6382eb1547636cdc1274309f72f96ff8fa737a950427940121c7a711c05e2d3a96a752f1cf6bca720c6371625452d371e190aebeecc69
7
+ data.tar.gz: 0d54dce07e8dbed25c0e997018d3b9fef5184387003775d6f1b88f6891eec414837e6e0ac6848c2d66b4b3620a5d44b6c03dcf65fbdafa9eed36774a209978c3
@@ -157,8 +157,8 @@ module Kaui
157
157
  return {} if all_invoices.nil? || all_invoices.empty?
158
158
 
159
159
  # Convert into Kaui::Invoice to benefit from additional methods xxx_to_money
160
- @invoices_by_id = all_invoices.each_with_object({}) do |invoice, hsh|
161
- hsh[invoice.invoice_id] = Kaui::Invoice.build_from_raw_invoice(invoice)
160
+ @invoices_by_id = all_invoices.to_h do |invoice|
161
+ [invoice.invoice_id, Kaui::Invoice.build_from_raw_invoice(invoice)]
162
162
  end
163
163
  end
164
164
  end
@@ -477,7 +477,7 @@ module Kaui
477
477
  # convert result to a full hash since dynamic attributes of a class are ignored when converting to json
478
478
  result.each do |data|
479
479
  plans = data[:plans].map do |plan|
480
- plan.instance_variables.each_with_object({}) { |var, hash_plan| hash_plan[var.to_s.delete('@')] = plan.instance_variable_get(var) }
480
+ plan.instance_variables.to_h { |var| [var.to_s.delete('@'), plan.instance_variable_get(var)] }
481
481
  end
482
482
 
483
483
  catalog << { version_date: data[:version_date],
@@ -46,9 +46,8 @@ module Kaui
46
46
  @available_tags = wait(fetch_available_tags)
47
47
  @available_subscription_tags = wait(fetch_available_subscription_tags)
48
48
 
49
- # TODO: This doesn't take into account catalog versions
50
- catalogs = Kaui::Catalog.get_account_catalog_json(@account.account_id, nil, cached_options_for_klient) || []
51
- @catalog = catalogs[-1]
49
+ # Don't load the full catalog to avoid memory issues
50
+ @catalog = nil
52
51
 
53
52
  @subscription = {}
54
53
  @bundles.each do |bundle|
@@ -106,8 +106,8 @@ module Kaui
106
106
  class << simple_plan
107
107
  attr_accessor :prices, :final_phase_duration
108
108
  end
109
- simple_plan.prices = plan.phases[-1].prices.each_with_object({}) do |e, r|
110
- r[e.currency] = e.value
109
+ simple_plan.prices = plan.phases[-1].prices.to_h do |e|
110
+ [e.currency, e.value]
111
111
  end
112
112
 
113
113
  simple_plan.plan_id = plan.name
@@ -3,6 +3,7 @@
3
3
  require 'killbill_client'
4
4
 
5
5
  # Hack for Zeitwerk
6
+ # rubocop:disable Style/OneClassPerFile
6
7
  module Kaui
7
8
  module KillbillAuthenticatable; end
8
9
  end
@@ -41,3 +42,4 @@ module Devise
41
42
  end
42
43
  end
43
44
  end
45
+ # rubocop:enable Style/OneClassPerFile
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Hack for Zeitwerk
4
+ # rubocop:disable Style/OneClassPerFile
4
5
  module Kaui
5
6
  module KillbillRegisterable; end
6
7
  end
@@ -12,3 +13,4 @@ module Devise
12
13
  end
13
14
  end
14
15
  end
16
+ # rubocop:enable Style/OneClassPerFile
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  <span>
36
36
  <%= render "kaui/components/button/button", {
37
- label: "Create User",
37
+ label: "Allow Tenant Access",
38
38
  icon: "kaui/plus.svg",
39
39
  variant: "outline-secondary d-inline-flex align-items-center gap-1",
40
40
  type: "button",
@@ -48,7 +48,7 @@
48
48
 
49
49
  <div class="fw-semibold text-muted mb-2">Other search queries</div>
50
50
  <div class="d-flex flex-wrap gap-2">
51
- <% %w[custom\ field: subscription: tag:].each do |term| %>
51
+ <% %w[bundle: custom\ field: subscription: tag:].each do |term| %>
52
52
  <span class="badge text-dark border border-secondary rounded-3 px-3 py-2 custom-hover"><%= term %></span>
53
53
  <% end %>
54
54
  </div>
@@ -59,7 +59,7 @@
59
59
  <div class="form-group d-flex pb-3">
60
60
  <%= label_tag :amount, 'Amount', :class => 'col-sm-3 control-label' %>
61
61
  <div class="col-sm-9 d-flex currency-group">
62
- <%= number_field_tag :amount, @payment.purchased_amount, :id => 'refund_amount', :class => 'form-control' %>
62
+ <%= number_field_tag :amount, @payment.purchased_amount, :id => 'refund_amount', :class => 'form-control', :step => 'any' %>
63
63
  <div class="currency"><%= @invoice.currency %></div>
64
64
  </div>
65
65
  </div>
data/lib/kaui/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kaui
4
- VERSION = '4.0.8'
4
+ VERSION = '4.0.9'
5
5
  end
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: 4.0.8
4
+ version: 4.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-26 00:00:00.000000000 Z
11
+ date: 2026-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack