ama_layout 8.0.2 → 9.0.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/views/ama_layout/_mobile_links.html.erb +22 -0
- data/app/views/ama_layout/_siteheader.html.erb +1 -22
- data/lib/ama_layout/decorators/navigation_decorator.rb +4 -0
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/decorators/navigation_decorator_spec.rb +28 -18
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '05548c0c4d9d43880761679cbfd8f8f1ce52ef1f'
|
4
|
+
data.tar.gz: a1eec1a2d699f9f3ae9d0d972b332ed88daece13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de302c59d56d01e9456ea3e566df7dfca6ab9cf4b74d832cf0f48d5cb71ebdebf4c1defc5511a1027e03275281d5431ee272d9cc79a1d67c1ecc9b392a1f6c35
|
7
|
+
data.tar.gz: 4c2b91ea3e0aa168a30043cd2799632e0726f947d22da484ae3b0ec8cf595159b255c8d15a4c6e7b0949bc7178551b3b5fe087bbdd4f72d56b33f85dae0b59e5
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="off-canvas position-left" id="offCanvasLeft" data-off-canvas>
|
2
|
+
<h2 class="side-nav__header">Online Account</h2>
|
3
|
+
<div class="side-nav__content">
|
4
|
+
<ul class="side-nav__list">
|
5
|
+
<li class="side-nav__item">
|
6
|
+
<%= link_to 'Sign In', "#{Rails.configuration.gatekeeper_site}/login", class: 'side-nav__link' %>
|
7
|
+
</li>
|
8
|
+
<li class="side-nav__item">
|
9
|
+
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>">AMA Website</a>
|
10
|
+
</li>
|
11
|
+
<li class="side-nav__item">
|
12
|
+
<a class="side-nav__link" href="http://amaroadreports.ca/">AMA Road Reports</a>
|
13
|
+
</li>
|
14
|
+
<li class="side-nav__item">
|
15
|
+
<a class="side-nav__link" href="https://albertamotorassociation.zendesk.com/hc/en-us" target="_blank">Help</a>
|
16
|
+
</li>
|
17
|
+
<li class="side-nav__item">
|
18
|
+
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -23,28 +23,7 @@
|
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
</div>
|
26
|
-
|
27
|
-
<h2 class="side-nav__header">Online Account</h2>
|
28
|
-
<div class="side-nav__content">
|
29
|
-
<ul class="side-nav__list">
|
30
|
-
<%= navigation.account_toggle(self) %>
|
31
|
-
<%= render partial: "ama_layout/main_nav_item", collection: navigation.items, as: :nav_item %>
|
32
|
-
<li class="side-nav__item">
|
33
|
-
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>">AMA Website</a>
|
34
|
-
</li>
|
35
|
-
<li class="side-nav__item">
|
36
|
-
<a class="side-nav__link" href="http://amaroadreports.ca/">AMA Road Reports</a>
|
37
|
-
</li>
|
38
|
-
<li class="side-nav__item">
|
39
|
-
<a class="side-nav__link" href="https://albertamotorassociation.zendesk.com/hc/en-us" target="_blank">Help</a>
|
40
|
-
</li>
|
41
|
-
<li class="side-nav__item">
|
42
|
-
<a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
|
43
|
-
</li>
|
44
|
-
<%= navigation.sign_out_link %>
|
45
|
-
</ul>
|
46
|
-
</div>
|
47
|
-
</div>
|
26
|
+
<%= navigation.mobile_links %>
|
48
27
|
<%= navigation.notification_sidebar %>
|
49
28
|
<div class="javascript_errors error_notification" hidden></div>
|
50
29
|
<noscript>
|
data/lib/ama_layout/version.rb
CHANGED
@@ -1,26 +1,18 @@
|
|
1
1
|
describe AmaLayout::NavigationDecorator do
|
2
2
|
let(:navigation) { FactoryGirl.build(:navigation) }
|
3
3
|
let(:navigation_presenter) { navigation.decorate }
|
4
|
-
let(:gatekeeper_site) { "http://auth.waffles.ca" }
|
5
|
-
let(:youraccount_site) { "http://youraccount.waffles.ca" }
|
6
|
-
let(:insurance_site) { "http://insurance.waffles.ca" }
|
7
|
-
let(:membership_site) { "http://membership.waffles.ca" }
|
8
|
-
let(:driveredonline_site) { "http://driveredonline.waffles.ca" }
|
9
|
-
let(:registries_site) { "http://registries.waffles.ca" }
|
10
|
-
let(:automotive_site) { "http://automotive.waffles.ca" }
|
11
|
-
let(:travel_site) { "http://travel.waffles.ca" }
|
12
|
-
let(:travel_login_url) { "http://travel.waffles.ca/MyAccount" }
|
13
4
|
|
14
5
|
before(:each) do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
6
|
+
Rails.configuration.gatekeeper_site = 'http://auth.waffles.ca'
|
7
|
+
Rails.configuration.youraccount_site = 'http://youraccount.waffles.ca'
|
8
|
+
Rails.configuration.insurance_site = 'http://insurance.waffles.ca'
|
9
|
+
Rails.configuration.membership_site = 'http://membership.waffles.ca'
|
10
|
+
Rails.configuration.driveredonline_site = 'http://driveredonline.waffles.ca'
|
11
|
+
Rails.configuration.registries_site = 'http://registries.waffles.ca'
|
12
|
+
Rails.configuration.automotive_site = 'http://automotive.waffles.ca'
|
13
|
+
Rails.configuration.travel_site = 'http://travel.waffles.ca'
|
14
|
+
Rails.configuration.travel_login_url = 'http://travel.waffles.ca/MyAccount'
|
15
|
+
Rails.configuration.amaabca_site = 'http://test.ama.ab.ca/'
|
24
16
|
end
|
25
17
|
|
26
18
|
describe "#display_name_text" do
|
@@ -77,6 +69,24 @@ describe AmaLayout::NavigationDecorator do
|
|
77
69
|
end
|
78
70
|
end
|
79
71
|
|
72
|
+
describe '#mobile_links' do
|
73
|
+
context 'with user' do
|
74
|
+
before(:each) do
|
75
|
+
navigation_presenter.object = OpenStruct.new(user: true)
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'returns nil' do
|
79
|
+
expect(navigation_presenter.mobile_links).to be_nil
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context 'without user' do
|
84
|
+
it 'renders an offcanvas menu' do
|
85
|
+
expect(navigation_presenter.mobile_links).to include('off-canvas')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
80
90
|
describe "#sign_out_link" do
|
81
91
|
context "with user" do
|
82
92
|
it "returns link" do
|
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:
|
4
|
+
version: 9.0.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-10-
|
21
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: foundation-rails
|
@@ -273,6 +273,7 @@ files:
|
|
273
273
|
- app/views/ama_layout/_footer.html.erb
|
274
274
|
- app/views/ama_layout/_main_nav_item.html.erb
|
275
275
|
- app/views/ama_layout/_main_top_nav_item.html.erb
|
276
|
+
- app/views/ama_layout/_mobile_links.html.erb
|
276
277
|
- app/views/ama_layout/_mobile_notification_icon.html.erb
|
277
278
|
- app/views/ama_layout/_notice.html.erb
|
278
279
|
- app/views/ama_layout/_notices.html.erb
|