kaui 0.2.1 → 0.2.2
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.
- data/README.md +3 -0
- data/app/models/kaui/account.rb +2 -2
- data/app/views/kaui/accounts/show.html.erb +2 -2
- data/lib/kaui/version.rb +1 -1
- data/test/test_helper.rb +4 -1
- metadata +3 -6
- data/app/models/kaui/bill_cycle_day.rb +0 -5
- data/test/unit/kaui/bill_cycle_day_test.rb +0 -13
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[](https://travis-ci.org/killbill/killbill-admin-ui)
|
2
|
+
[](https://codeclimate.com/github/killbill/killbill-admin-ui)
|
3
|
+
|
1
4
|
Getting started
|
2
5
|
===============
|
3
6
|
|
data/app/models/kaui/account.rb
CHANGED
@@ -16,7 +16,7 @@ class Kaui::Account < Kaui::Base
|
|
16
16
|
define_attr :balance
|
17
17
|
define_attr :cba
|
18
18
|
define_attr :is_notified_for_invoices
|
19
|
-
|
19
|
+
define_attr :bill_cycle_day
|
20
20
|
|
21
21
|
def initialize(data = {})
|
22
22
|
super(:account_id => data['accountId'],
|
@@ -33,7 +33,7 @@ class Kaui::Account < Kaui::Base
|
|
33
33
|
:state => data['state'],
|
34
34
|
:country => data['country'],
|
35
35
|
:phone => data['phone'],
|
36
|
-
:bill_cycle_day => data['
|
36
|
+
:bill_cycle_day => data['billCycleDayLocal'],
|
37
37
|
:balance => data['accountBalance'],
|
38
38
|
:cba => data['accountCBA'],
|
39
39
|
:is_notified_for_invoices => data['isNotifiedForInvoices'])
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<dd><%= @account.email %> </dd>
|
9
9
|
<dt>Bill cycle day:</dt>
|
10
10
|
<% if @account.bill_cycle_day %>
|
11
|
-
<dd><%= @account.bill_cycle_day
|
11
|
+
<dd><%= @account.bill_cycle_day %> (user timezone)</dd>
|
12
12
|
<% else %>
|
13
13
|
<dd><%=t :unknown_bcd %></dd>
|
14
14
|
<% end %>
|
@@ -107,4 +107,4 @@
|
|
107
107
|
$(document).ready(function() {
|
108
108
|
disableLinks();
|
109
109
|
});
|
110
|
-
<% end %>
|
110
|
+
<% end %>
|
data/lib/kaui/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -10,6 +10,9 @@ Rails.backtrace_cleaner.remove_silencers!
|
|
10
10
|
# Load support files
|
11
11
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
12
12
|
|
13
|
+
# Load helpers
|
14
|
+
Dir["#{File.dirname(__FILE__)}/unit/helpers/kaui/*.rb"].each { |f| require f }
|
15
|
+
|
13
16
|
# Mock killbill-server and serve data from the fixtures
|
14
17
|
module Kaui::KillbillHelper
|
15
18
|
@@fixtures ||= {}
|
@@ -186,4 +189,4 @@ module SecureRandom
|
|
186
189
|
ary[3] = (ary[3] & 0x3fff) | 0x8000
|
187
190
|
"%08x-%04x-%04x-%04x-%04x%08x" % ary
|
188
191
|
end unless respond_to?(:uuid)
|
189
|
-
end
|
192
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -141,7 +141,6 @@ files:
|
|
141
141
|
- app/models/kaui/analytics_sanity.rb
|
142
142
|
- app/models/kaui/audit_log.rb
|
143
143
|
- app/models/kaui/base.rb
|
144
|
-
- app/models/kaui/bill_cycle_day.rb
|
145
144
|
- app/models/kaui/bundle.rb
|
146
145
|
- app/models/kaui/business_account.rb
|
147
146
|
- app/models/kaui/business_field.rb
|
@@ -314,7 +313,6 @@ files:
|
|
314
313
|
- test/unit/helpers/kaui/refunds_helper_test.rb
|
315
314
|
- test/unit/kaui/account_test.rb
|
316
315
|
- test/unit/kaui/base_test.rb
|
317
|
-
- test/unit/kaui/bill_cycle_day_test.rb
|
318
316
|
- test/unit/kaui/date_helper_test.rb
|
319
317
|
- test/unit/kaui/invoice_item_test.rb
|
320
318
|
- test/unit/kaui/invoice_test.rb
|
@@ -346,7 +344,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
346
344
|
version: '0'
|
347
345
|
segments:
|
348
346
|
- 0
|
349
|
-
hash:
|
347
|
+
hash: 451527317018567128
|
350
348
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
351
349
|
none: false
|
352
350
|
requirements:
|
@@ -428,7 +426,6 @@ test_files:
|
|
428
426
|
- test/unit/helpers/kaui/refunds_helper_test.rb
|
429
427
|
- test/unit/kaui/account_test.rb
|
430
428
|
- test/unit/kaui/base_test.rb
|
431
|
-
- test/unit/kaui/bill_cycle_day_test.rb
|
432
429
|
- test/unit/kaui/date_helper_test.rb
|
433
430
|
- test/unit/kaui/invoice_item_test.rb
|
434
431
|
- test/unit/kaui/invoice_test.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::BillCycleDayTest < ActiveSupport::TestCase
|
4
|
-
fixtures :bill_cycle_days
|
5
|
-
|
6
|
-
test "can serialize from json" do
|
7
|
-
as_json = bill_cycle_days(:the_sixth)
|
8
|
-
the_sixth = Kaui::BillCycleDay.new(as_json)
|
9
|
-
|
10
|
-
assert_equal as_json["dayOfMonthUTC"], the_sixth.day_of_month_utc
|
11
|
-
assert_equal as_json["dayOfMonthLocal"], the_sixth.day_of_month_local
|
12
|
-
end
|
13
|
-
end
|