ama_layout 5.7.0 → 5.8.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 +4 -4
- data/app/helpers/ama_layout_path_helper.rb +4 -0
- data/lib/ama_layout/navigation.yml +1 -1
- data/lib/ama_layout/navigation_helper.rb +6 -0
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/navigation_helper_spec.rb +8 -0
- data/spec/ama_layout/navigation_spec.rb +1 -1
- data/spec/helpers/ama_layout_path_helper_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4f2cc7166e0bee061b77582099d5aa6b3e34677
|
4
|
+
data.tar.gz: 78b1055abe0259ce09f0bed145b3cfa46414ff95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d6f5e8bba92eead3002bba147f13c734a2c7f753f20afffd787691ea3c7e20e6e3f236e501a3b729bb10c0c869d98e28e28c6fa011845317aa3df826758a849
|
7
|
+
data.tar.gz: 8ad54d4ad83d6aa8183fee828cadecc7ba79defed16b17f092a6e9aed769b247a6e1c755f7b8ffe69ff9bab2740bba133e1d95ee102951920641d64333a1c882
|
@@ -63,6 +63,10 @@ module AmaLayoutPathHelper
|
|
63
63
|
"#{Rails.configuration.membership_site}/reward_cards"
|
64
64
|
end
|
65
65
|
|
66
|
+
def membership_renew_path
|
67
|
+
"#{Rails.configuration.membership_site}/renews/new"
|
68
|
+
end
|
69
|
+
|
66
70
|
def driveredonline_path
|
67
71
|
Rails.configuration.driveredonline_site
|
68
72
|
end
|
@@ -167,7 +167,7 @@ member-with-outstanding-balance:
|
|
167
167
|
link: "<%= Rails.configuration.gatekeeper_site %>/"
|
168
168
|
icon: "fa-tachometer"
|
169
169
|
- text: "Pay Outstanding Balance"
|
170
|
-
link: "<%= Rails.configuration.
|
170
|
+
link: "<%= Rails.configuration.membership_site %>/renews/new"
|
171
171
|
icon: "fa-credit-card"
|
172
172
|
- text: "Driver Education"
|
173
173
|
link: "<%= Rails.configuration.driveredonline_site %>/"
|
@@ -3,6 +3,8 @@ module AmaLayout
|
|
3
3
|
def navigation
|
4
4
|
return AmaLayout::Navigation.non_member unless member?
|
5
5
|
case
|
6
|
+
when _has_outstanding_balance?
|
7
|
+
AmaLayout::Navigation.member_with_outstanding_balance
|
6
8
|
when _in_renewal_late?
|
7
9
|
AmaLayout::Navigation.member_in_renewal_late
|
8
10
|
when _in_renewal?
|
@@ -21,5 +23,9 @@ module AmaLayout
|
|
21
23
|
def _in_renewal_late?
|
22
24
|
status == "AL"
|
23
25
|
end
|
26
|
+
|
27
|
+
def _has_outstanding_balance?
|
28
|
+
has_outstanding_balance
|
29
|
+
end
|
24
30
|
end
|
25
31
|
end
|
data/lib/ama_layout/version.rb
CHANGED
@@ -51,5 +51,13 @@ describe AmaLayout::NavigationHelper do
|
|
51
51
|
expect(subject.navigation).to eq 'member-in-renewal-late'
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
context 'member with outstanding balance' do
|
56
|
+
subject { FactoryGirl.create(:user, :outstanding_balance) }
|
57
|
+
|
58
|
+
it 'shows member-with-outstanding-balance sidebar menu' do
|
59
|
+
expect(subject.navigation).to eq 'member-with-outstanding-balance'
|
60
|
+
end
|
61
|
+
end
|
54
62
|
end
|
55
63
|
end
|
@@ -147,7 +147,7 @@ describe AmaLayout::Navigation do
|
|
147
147
|
expect(subject.items[0].text).to eq "Account Dashboard"
|
148
148
|
expect(subject.items[0].link).to eq "#{gatekeeper_site}/"
|
149
149
|
expect(subject.items[1].text).to eq "Pay Outstanding Balance"
|
150
|
-
expect(subject.items[1].link).to eq "#{
|
150
|
+
expect(subject.items[1].link).to eq "#{membership_site}/renews/new"
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
@@ -111,6 +111,12 @@ describe AmaLayoutPathHelper do
|
|
111
111
|
end
|
112
112
|
end
|
113
113
|
|
114
|
+
describe "#membership_renew_path" do
|
115
|
+
it "returns the membership renew path" do
|
116
|
+
expect(helper.membership_renew_path).to eq "#{membership_site}/renews/new"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
114
120
|
describe "#driveredonline_path" do
|
115
121
|
it "returns the driveredonile path" do
|
116
122
|
expect(helper.driveredonline_path).to eq "#{driveredonline_site}"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ama_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael van den Beuken
|
@@ -18,7 +18,7 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date: 2017-07-
|
21
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: foundation-rails
|
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
376
|
version: '0'
|
377
377
|
requirements: []
|
378
378
|
rubyforge_project:
|
379
|
-
rubygems_version: 2.6.
|
379
|
+
rubygems_version: 2.6.7
|
380
380
|
signing_key:
|
381
381
|
specification_version: 4
|
382
382
|
summary: ".ama.ab.ca site layouts"
|