ama_layout 10.2.0 → 11.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +44 -0
  3. data/Dangerfile +19 -0
  4. data/README.md +2 -2
  5. data/ama_layout.gemspec +2 -2
  6. data/app/assets/javascripts/ama_layout/desktop/foundation-custom.js +1 -0
  7. data/app/assets/javascripts/ama_layout/mailcheck/email_suggestion.coffee +1 -0
  8. data/app/helpers/ama_layout_breadcrumb_helper.rb +7 -1
  9. data/app/helpers/ama_layout_content_helper.rb +28 -17
  10. data/app/helpers/ama_layout_partial_helper.rb +11 -0
  11. data/app/views/ama_layout/agent/_siteheader.html.erb +1 -1
  12. data/app/views/ama_layout/{_alert.html.erb → v2/_alert.html.erb} +0 -0
  13. data/app/views/ama_layout/{_applogo.html.erb → v2/_applogo.html.erb} +0 -0
  14. data/app/views/ama_layout/{_breadcrumbs.html.erb → v2/_breadcrumbs.html.erb} +0 -0
  15. data/app/views/ama_layout/{_custom_nav_links.html.erb → v2/_custom_nav_links.html.erb} +0 -0
  16. data/app/views/ama_layout/{_custom_sidebar.html.erb → v2/_custom_sidebar.html.erb} +0 -0
  17. data/app/views/ama_layout/v2/_font.html.erb +1 -0
  18. data/app/views/ama_layout/v2/_font_awesome_pro_kit.html.erb +3 -0
  19. data/app/views/ama_layout/{_footer.html.erb → v2/_footer.html.erb} +9 -9
  20. data/app/views/ama_layout/{_main_nav_item.html.erb → v2/_main_nav_item.html.erb} +0 -0
  21. data/app/views/ama_layout/{_main_top_nav_item.html.erb → v2/_main_top_nav_item.html.erb} +0 -0
  22. data/app/views/ama_layout/{_member_links.html.erb → v2/_member_links.html.erb} +0 -0
  23. data/app/views/ama_layout/{_mobile_links.html.erb → v2/_mobile_links.html.erb} +2 -2
  24. data/app/views/ama_layout/{_mobile_notification_icon.html.erb → v2/_mobile_notification_icon.html.erb} +0 -0
  25. data/app/views/ama_layout/{_notice.html.erb → v2/_notice.html.erb} +0 -0
  26. data/app/views/ama_layout/{_notices.html.erb → v2/_notices.html.erb} +0 -0
  27. data/app/views/ama_layout/{_notification.html.erb → v2/_notification.html.erb} +0 -0
  28. data/app/views/ama_layout/{_notification_icon.html.erb → v2/_notification_icon.html.erb} +0 -0
  29. data/app/views/ama_layout/{_notification_sidebar.html.erb → v2/_notification_sidebar.html.erb} +1 -1
  30. data/app/views/ama_layout/{_sidebar.html.erb → v2/_sidebar.html.erb} +0 -0
  31. data/app/views/ama_layout/{_sign_out_link.html.erb → v2/_sign_out_link.html.erb} +0 -0
  32. data/app/views/ama_layout/{_siteheader.html.erb → v2/_siteheader.html.erb} +2 -2
  33. data/app/views/ama_layout/{_sub_nav.html.erb → v2/_sub_nav.html.erb} +0 -0
  34. data/app/views/ama_layout/{_sub_nav_item.html.erb → v2/_sub_nav_item.html.erb} +0 -0
  35. data/app/views/ama_layout/{_success.html.erb → v2/_success.html.erb} +0 -0
  36. data/app/views/ama_layout/{_top_nav.html.erb → v2/_top_nav.html.erb} +0 -0
  37. data/app/views/ama_layout/{_top_sub_nav.html.erb → v2/_top_sub_nav.html.erb} +0 -0
  38. data/app/views/ama_layout/{_top_sub_nav_item.html.erb → v2/_top_sub_nav_item.html.erb} +0 -0
  39. data/app/views/ama_layout/v3/_alert.html.erb +5 -0
  40. data/app/views/ama_layout/v3/_applogo.html.erb +3 -0
  41. data/app/views/ama_layout/v3/_breadcrumbs.html.erb +3 -0
  42. data/app/views/ama_layout/v3/_custom_nav_links.html.erb +0 -0
  43. data/app/views/ama_layout/v3/_custom_sidebar.html.erb +1 -0
  44. data/app/views/ama_layout/v3/_font.html.erb +2 -0
  45. data/app/views/ama_layout/v3/_font_awesome_pro_kit.html.erb +3 -0
  46. data/app/views/ama_layout/v3/_footer.html.erb +69 -0
  47. data/app/views/ama_layout/v3/_main_nav_item.html.erb +6 -0
  48. data/app/views/ama_layout/v3/_main_top_nav_item.html.erb +4 -0
  49. data/app/views/ama_layout/v3/_member_links.html.erb +6 -0
  50. data/app/views/ama_layout/v3/_mobile_links.html.erb +19 -0
  51. data/app/views/ama_layout/v3/_mobile_notification_icon.html.erb +4 -0
  52. data/app/views/ama_layout/v3/_notice.html.erb +5 -0
  53. data/app/views/ama_layout/v3/_notices.html.erb +3 -0
  54. data/app/views/ama_layout/v3/_notification.html.erb +10 -0
  55. data/app/views/ama_layout/v3/_notification_icon.html.erb +6 -0
  56. data/app/views/ama_layout/v3/_notification_sidebar.html.erb +22 -0
  57. data/app/views/ama_layout/v3/_sidebar.html.erb +8 -0
  58. data/app/views/ama_layout/v3/_sign_out_link.html.erb +3 -0
  59. data/app/views/ama_layout/v3/_siteheader.html.erb +37 -0
  60. data/app/views/ama_layout/v3/_sub_nav.html.erb +3 -0
  61. data/app/views/ama_layout/v3/_sub_nav_item.html.erb +3 -0
  62. data/app/views/ama_layout/v3/_success.html.erb +5 -0
  63. data/app/views/ama_layout/v3/_top_nav.html.erb +16 -0
  64. data/app/views/ama_layout/v3/_top_sub_nav.html.erb +3 -0
  65. data/app/views/ama_layout/v3/_top_sub_nav_item.html.erb +3 -0
  66. data/config.ru +1 -1
  67. data/lib/ama_layout/ama_layout_view.rb +6 -0
  68. data/lib/ama_layout/decorators/agent/navigation_decorator.rb +5 -3
  69. data/lib/ama_layout/decorators/navigation_decorator.rb +8 -8
  70. data/lib/ama_layout/draper_replacement.rb +6 -0
  71. data/lib/ama_layout/moneris.rb +10 -1
  72. data/lib/ama_layout/moneris/{textbox.txt → v2/textbox.txt} +0 -0
  73. data/lib/ama_layout/moneris/v3/textbox.txt +62 -0
  74. data/lib/ama_layout/notification_set.rb +2 -1
  75. data/lib/ama_layout/notifications/redis_store.rb +2 -2
  76. data/lib/ama_layout/version.rb +1 -1
  77. data/spec/ama_layout/decorators/moneris_decorator_spec.rb +10 -7
  78. data/spec/ama_layout/moneris_spec.rb +22 -3
  79. data/spec/ama_layout/notification_set_spec.rb +0 -6
  80. data/spec/ama_layout/notifications/redis_store_spec.rb +0 -14
  81. data/spec/helpers/ama_layout_content_helper_spec.rb +64 -62
  82. data/spec/spec_helper.rb +3 -1
  83. metadata +74 -36
  84. data/.travis.yml +0 -6
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AmaLayout
4
- VERSION = '10.2.0'
4
+ VERSION = '11.4.0'
5
5
  end
@@ -14,7 +14,7 @@ describe AmaLayout::MonerisDecorator, type: :decorator do
14
14
  expect(moneris_presenter.textbox).to include "-webkit-user-select: text;"
15
15
  expect(moneris_presenter.textbox).to include "-webkit-writing-mode: horizontal-tb;"
16
16
  expect(moneris_presenter.textbox).to include "background-color: rgb(255, 255, 255);"
17
- expect(moneris_presenter.textbox).to include "border-bottom-color: rgb(229, 229, 229);"
17
+ expect(moneris_presenter.textbox).to include "border-bottom-color: rgb(160, 160, 161);"
18
18
  expect(moneris_presenter.textbox).to include "border-bottom-style: solid;"
19
19
  expect(moneris_presenter.textbox).to include "border-bottom-width: 2px;"
20
20
  expect(moneris_presenter.textbox).to include "border-image-outset: 0px;"
@@ -22,13 +22,13 @@ describe AmaLayout::MonerisDecorator, type: :decorator do
22
22
  expect(moneris_presenter.textbox).to include "border-image-slice: 100%;"
23
23
  expect(moneris_presenter.textbox).to include "border-image-source: none;"
24
24
  expect(moneris_presenter.textbox).to include "border-image-width: 1;"
25
- expect(moneris_presenter.textbox).to include "border-left-color: rgb(229, 229, 229);"
25
+ expect(moneris_presenter.textbox).to include "border-left-color: rgb(160, 160, 161)"
26
26
  expect(moneris_presenter.textbox).to include "border-left-style: solid;"
27
27
  expect(moneris_presenter.textbox).to include "border-left-width: 2px;"
28
- expect(moneris_presenter.textbox).to include "border-right-color: rgb(229, 229, 229);"
28
+ expect(moneris_presenter.textbox).to include "border-right-color: rgb(160, 160, 161)"
29
29
  expect(moneris_presenter.textbox).to include "border-right-style: solid;"
30
30
  expect(moneris_presenter.textbox).to include "border-right-width: 2px;"
31
- expect(moneris_presenter.textbox).to include "border-top-color: rgb(229, 229, 229);"
31
+ expect(moneris_presenter.textbox).to include "border-top-color: rgb(160, 160, 161)"
32
32
  expect(moneris_presenter.textbox).to include "border-top-style: solid;"
33
33
  expect(moneris_presenter.textbox).to include "border-top-width: 2px;"
34
34
  expect(moneris_presenter.textbox).to include "box-shadow: none;"
@@ -36,16 +36,19 @@ describe AmaLayout::MonerisDecorator, type: :decorator do
36
36
  expect(moneris_presenter.textbox).to include "color: rgba(0, 0, 0, 0.74902);"
37
37
  expect(moneris_presenter.textbox).to include "cursor: auto;"
38
38
  expect(moneris_presenter.textbox).to include "display: block;"
39
- expect(moneris_presenter.textbox).to include "font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;font-size: 14px;"
40
- expect(moneris_presenter.textbox).to include "font-style: normal;font-variant: normal;"
39
+ expect(moneris_presenter.textbox).to include "font-family: 'Open Sans', Helvetica, Roboto, Arial, sans-serif;"
40
+ expect(moneris_presenter.textbox).to include "font-size: 18px;"
41
+ expect(moneris_presenter.textbox).to include "font-style: normal;"
42
+ expect(moneris_presenter.textbox).to include "font-variant: normal;"
41
43
  expect(moneris_presenter.textbox).to include "font-weight: normal;"
42
- expect(moneris_presenter.textbox).to include "height: 44px;"
44
+ expect(moneris_presenter.textbox).to include "height: 63px !important;"
43
45
  expect(moneris_presenter.textbox).to include "letter-spacing: normal;"
44
46
  expect(moneris_presenter.textbox).to include "line-height: normal;"
45
47
  expect(moneris_presenter.textbox).to include "margin-bottom: 0px;"
46
48
  expect(moneris_presenter.textbox).to include "margin-left: 0px;"
47
49
  expect(moneris_presenter.textbox).to include "margin-right: 0px;"
48
50
  expect(moneris_presenter.textbox).to include "margin-top: 0px;"
51
+ expect(moneris_presenter.textbox).to include "outline-color: rgb(36, 108, 169);"
49
52
  expect(moneris_presenter.textbox).to include "padding-bottom: 8px;"
50
53
  expect(moneris_presenter.textbox).to include "padding-left: 8px;"
51
54
  expect(moneris_presenter.textbox).to include "padding-right: 8px;"
@@ -1,8 +1,27 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe AmaLayout::Moneris do
4
+ describe '#textbox_style_file' do
5
+ around(:each) do |example|
6
+ current_version = Rails.configuration.stylesheet_resolver.version
7
+ Rails.configuration.stylesheet_resolver.version = version
8
+ example.run
9
+ Rails.configuration.stylesheet_resolver.version = current_version
10
+ end
11
+ context 'v2' do
12
+ let(:version) { 'v2' }
13
+
14
+ it 'returns the correct file path' do
15
+ expect(subject.textbox_style_file).to include("lib/ama_layout/moneris/#{version}/textbox.txt")
16
+ end
17
+ end
18
+
19
+ context 'v3' do
20
+ let(:version) { 'v3' }
2
21
 
3
- describe "#textbox_style_file" do
4
- it "return file path" do
5
- expect(subject.textbox_style_file).to include "lib/ama_layout/moneris/textbox.txt"
22
+ it 'returns the correct file path' do
23
+ expect(subject.textbox_style_file).to include("lib/ama_layout/moneris/#{version}/textbox.txt")
24
+ end
6
25
  end
7
26
  end
8
27
  end
@@ -207,12 +207,6 @@ describe AmaLayout::NotificationSet do
207
207
  expect(subject.destroy!).to be_empty
208
208
  end
209
209
  end
210
-
211
- context 'when data is not removed' do
212
- it 'returns false' do
213
- expect(subject.destroy!).to be false
214
- end
215
- end
216
210
  end
217
211
 
218
212
  describe '#find' do
@@ -43,10 +43,6 @@ describe AmaLayout::Notifications::RedisStore do
43
43
  subject.set('test', 'value')
44
44
  expect(subject.get('test')).to eq('value')
45
45
  end
46
-
47
- it 'returns true' do
48
- expect(subject.set('test', 'value')).to be true
49
- end
50
46
  end
51
47
 
52
48
  describe '#delete' do
@@ -55,21 +51,11 @@ describe AmaLayout::Notifications::RedisStore do
55
51
  subject.set('key', 'value')
56
52
  end
57
53
 
58
- it 'returns true' do
59
- expect(subject.delete('key')).to be true
60
- end
61
-
62
54
  it 'deletes the key' do
63
55
  subject.delete('key')
64
56
  expect(subject.get('key')).to be nil
65
57
  end
66
58
  end
67
-
68
- context 'when a value is not deleted' do
69
- it 'returns false' do
70
- expect(subject.delete('key')).to be false
71
- end
72
- end
73
59
  end
74
60
 
75
61
  describe '#transaction' do
@@ -1,159 +1,161 @@
1
+ # frozen_string_literal: true
2
+
1
3
  describe AmaLayoutContentHelper do
2
- let(:greeting) { "DJ Funky Fresh" }
3
- let(:site_name) { "Waffle Emporium" }
4
- let(:site_domain) { "http://waffleemporium.ca" }
4
+ let(:greeting) { 'DJ Funky Fresh' }
5
+ let(:site_name) { 'Waffle Emporium' }
6
+ let(:site_domain) { 'http://waffleemporium.ca' }
5
7
  let(:site_url) { "#{site_domain}/wafflesauce" }
6
8
  let(:nav_item) { FactoryBot.build(:navigation_item) }
7
9
 
8
- describe "#greeting" do
9
- it "returns the greeting set in the domain cookie" do
10
+ describe '#greeting' do
11
+ it 'returns the greeting set in the domain cookie' do
10
12
  helper.request.cookies[:logged_in_meta] = greeting
11
13
  expect(helper.greeting).to eq greeting
12
14
  end
13
15
  end
14
16
 
15
- describe "#utm_source" do
16
- it "returns the downcased character-only representation of the site name" do
17
+ describe '#utm_source' do
18
+ it 'returns the downcased character-only representation of the site name' do
17
19
  allow(Rails.configuration).to receive(:site_name).and_return(site_name)
18
- expect(helper.utm_source).to eq site_name.downcase.gsub(/\W/, "")
20
+ expect(helper.utm_source).to eq site_name.downcase.gsub(/\W/, '')
19
21
  end
20
22
  end
21
23
 
22
- describe "#active_section" do
23
- it "returns active if request include the path" do
24
+ describe '#active_section' do
25
+ it 'returns active if request include the path' do
24
26
  allow_any_instance_of(ActionController::TestRequest).to receive(:fullpath).and_return("#{site_domain}/gotica")
25
- expect(helper.active_section(nav_item)).to eq "activepage"
27
+ expect(helper.active_section(nav_item)).to eq 'activepage'
26
28
  end
27
29
 
28
- it "returns nil if request does not include the path" do
30
+ it 'returns nil if request does not include the path' do
29
31
  expect(helper.active_section(nav_item)).to eq nil
30
32
  end
31
33
  end
32
34
 
33
- describe "#active_page" do
35
+ describe '#active_page' do
34
36
  before(:each) do
35
37
  allow(helper.request).to receive(:fullpath).and_return(site_url)
36
38
  end
37
39
 
38
- it "returns active if the given path matches the request path" do
39
- expect(helper.active_page(site_url)).to eq "activepage"
40
+ it 'returns active if the given path matches the request path' do
41
+ expect(helper.active_page(site_url)).to eq 'activepage'
40
42
  end
41
43
 
42
- it "returns nothing if the given patch does not match the request path" do
43
- expect(helper.active_page("http://waffleemporium.ca/ecuaselffaw")).to be_nil
44
+ it 'returns nothing if the given patch does not match the request path' do
45
+ expect(helper.active_page('http://waffleemporium.ca/ecuaselffaw')).to be_nil
44
46
  end
45
47
  end
46
48
 
47
- describe "#active_domain" do
49
+ describe '#active_domain' do
48
50
  before(:each) do
49
51
  allow(helper.request).to receive(:url).and_return(site_url)
50
52
  end
51
53
 
52
- it "returns active if the request domain matches the given domain" do
53
- expect(helper.active_domain(site_domain)).to eq "active"
54
+ it 'returns active if the request domain matches the given domain' do
55
+ expect(helper.active_domain(site_domain)).to eq 'active'
54
56
  end
55
57
 
56
- it "returns nothing if the request domain does not match the given domain" do
57
- expect(helper.active_domain("http://pancakeemporium.ca")).to be_nil
58
+ it 'returns nothing if the request domain does not match the given domain' do
59
+ expect(helper.active_domain('http://pancakeemporium.ca')).to be_nil
58
60
  end
59
61
  end
60
62
 
61
- describe "#renew_or_join_path" do
62
- it "returns nothing if the visitor is logged in" do
63
- expect(helper.renew_or_join_path(true)).to eq ""
63
+ describe '#renew_or_join_path' do
64
+ it 'returns nothing if the visitor is logged in' do
65
+ expect(helper.renew_or_join_path(true)).to eq ''
64
66
  end
65
67
 
66
- it "returns the join link if the visitor is not logged in" do
67
- expect(helper.renew_or_join_path(false)).to include "Become a Member"
68
+ it 'returns the join link if the visitor is not logged in' do
69
+ expect(helper.renew_or_join_path(false)).to include 'Become a Member'
68
70
  end
69
71
  end
70
72
 
71
- describe "#gift_or_pricing_path" do
72
- it "returns nothing if the visitor is logged in" do
73
- expect(helper.gift_or_pricing_path(true)).to eq ""
73
+ describe '#gift_or_pricing_path' do
74
+ it 'returns nothing if the visitor is logged in' do
75
+ expect(helper.gift_or_pricing_path(true)).to eq ''
74
76
  end
75
77
 
76
- it "returns the gift link if the visitor is not logged in" do
77
- expect(helper.gift_or_pricing_path(false)).to include "Gift Membership"
78
+ it 'returns the gift link if the visitor is not logged in' do
79
+ expect(helper.gift_or_pricing_path(false)).to include 'Gift Membership'
78
80
  end
79
81
  end
80
82
 
81
- describe "#dropdown_menu" do
83
+ describe '#dropdown_menu' do
82
84
  let(:render_args) do
83
- { partial: "ama_layout/dropdown_menu", locals: { logged_in: true, greeting: greeting } }
85
+ { partial: 'ama_layout/v3/dropdown_menu', locals: { logged_in: true, greeting: greeting } }
84
86
  end
85
87
 
86
- it "renders the dropdown menu if the visitor is logged in" do
88
+ it 'renders the dropdown menu if the visitor is logged in' do
87
89
  expect(helper).to receive(:render).with(render_args)
88
90
  helper.dropdown_menu(true, greeting)
89
91
  end
90
92
 
91
- it "does not render the dropdown menu if the visitor is not logged in" do
92
- expect(helper.dropdown_menu(false, greeting)).to eq ""
93
+ it 'does not render the dropdown menu if the visitor is not logged in' do
94
+ expect(helper.dropdown_menu(false, greeting)).to eq ''
93
95
  end
94
96
  end
95
97
 
96
- describe "#tablet_menu" do
98
+ describe '#tablet_menu' do
97
99
  let(:render_args) do
98
- { partial: "ama_layout/tablet_menu", locals: { logged_in: true, greeting: greeting } }
100
+ { partial: 'ama_layout/v3/tablet_menu', locals: { logged_in: true, greeting: greeting } }
99
101
  end
100
102
 
101
- it "renders the tablet menu if the visitor is logged in" do
103
+ it 'renders the tablet menu if the visitor is logged in' do
102
104
  expect(helper).to receive(:render).with(render_args)
103
105
  helper.tablet_menu(true, greeting)
104
106
  end
105
107
 
106
- it "does not render the tablet menu if the visitor is not logged in" do
107
- expect(helper.tablet_menu(false, greeting)).to eq ""
108
+ it 'does not render the tablet menu if the visitor is not logged in' do
109
+ expect(helper.tablet_menu(false, greeting)).to eq ''
108
110
  end
109
111
  end
110
112
 
111
- describe "#tablet_signout" do
112
- it "renders a signout link if the visitor is logged in" do
113
- expect(helper).to receive(:render).with("ama_layout/tablet_signout")
113
+ describe '#tablet_signout' do
114
+ it 'renders a signout link if the visitor is logged in' do
115
+ expect(helper).to receive(:render).with('ama_layout/v3/tablet_signout')
114
116
  helper.tablet_signout(true)
115
117
  end
116
118
 
117
- it "does not render the tablet menu if the visitor is not logged in" do
118
- expect(helper.tablet_signout(false)).to eq ""
119
+ it 'does not render the tablet menu if the visitor is not logged in' do
120
+ expect(helper.tablet_signout(false)).to eq ''
119
121
  end
120
122
  end
121
123
 
122
- describe "#notice" do
123
- let(:message) { "This is a notice." }
124
+ describe '#notice' do
125
+ let(:message) { 'This is a notice.' }
124
126
 
125
- it "renders the notice partial if a notice is present" do
126
- expect(helper).to receive(:render).with partial: "ama_layout/notice", locals: { message: message }
127
+ it 'renders the notice partial if a notice is present' do
128
+ expect(helper).to receive(:render).with partial: 'ama_layout/v3/notice', locals: { message: message }
127
129
  helper.notice(message)
128
130
  end
129
131
 
130
- it "does not render the notice partial if a notice is not present" do
132
+ it 'does not render the notice partial if a notice is not present' do
131
133
  expect(helper.notice(nil)).to be_nil
132
134
  end
133
135
  end
134
136
 
135
- describe "#alert" do
136
- let(:message) { "This is an alert." }
137
+ describe '#alert' do
138
+ let(:message) { 'This is an alert.' }
137
139
 
138
- it "renders the alert partial if a alert is present" do
139
- expect(helper).to receive(:render).with partial: "ama_layout/alert", locals: { message: message }
140
+ it 'renders the alert partial if a alert is present' do
141
+ expect(helper).to receive(:render).with partial: 'ama_layout/v3/alert', locals: { message: message }
140
142
  helper.alert(message)
141
143
  end
142
144
 
143
- it "does not render the alert partial if a alert is not present" do
145
+ it 'does not render the alert partial if a alert is not present' do
144
146
  expect(helper.notice(nil)).to be_nil
145
147
  end
146
148
  end
147
149
 
148
- describe "#success_message" do
149
- let(:message) { "This is a success message" }
150
+ describe '#success_message' do
151
+ let(:message) { 'This is a success message' }
150
152
 
151
- it "renders the success partial if a success message is present" do
152
- expect(helper).to receive(:render).with partial: "ama_layout/success", locals: { message: message }
153
+ it 'renders the success partial if a success message is present' do
154
+ expect(helper).to receive(:render).with partial: 'ama_layout/v3/success', locals: { message: message }
153
155
  helper.success_message(message)
154
156
  end
155
157
 
156
- it "does not render the success partial if the success message is not present" do
158
+ it 'does not render the success partial if the success message is not present' do
157
159
  expect(helper.success_message(nil)).to be_nil
158
160
  end
159
161
  end
data/spec/spec_helper.rb CHANGED
@@ -8,7 +8,9 @@ require 'timecop'
8
8
 
9
9
  ENV['RAILS_ENV'] = 'test'
10
10
 
11
- Combustion.initialize! :all
11
+ Combustion.initialize!(:all) do
12
+ config.stylesheet_resolver = OpenStruct.new(version: 'v3')
13
+ end
12
14
 
13
15
  Dir['./spec/support/**/*.rb'].sort.each { |file| require file }
14
16
 
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: 10.2.0
4
+ version: 11.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darko Dosenovic
@@ -10,10 +10,10 @@ authors:
10
10
  - Michael van den Beuken
11
11
  - Sinead Errity
12
12
  - Zoie Carnegie
13
- autorequire:
13
+ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2020-02-06 00:00:00.000000000 Z
16
+ date: 2021-03-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: breadcrumbs_on_rails
@@ -64,6 +64,9 @@ dependencies:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '4.2'
67
+ - - "<"
68
+ - !ruby/object:Gem::Version
69
+ version: '6.1'
67
70
  type: :runtime
68
71
  prerelease: false
69
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,6 +74,9 @@ dependencies:
71
74
  - - ">="
72
75
  - !ruby/object:Gem::Version
73
76
  version: '4.2'
77
+ - - "<"
78
+ - !ruby/object:Gem::Version
79
+ version: '6.1'
74
80
  - !ruby/object:Gem::Dependency
75
81
  name: redis-rails
76
82
  requirement: !ruby/object:Gem::Requirement
@@ -89,16 +95,16 @@ dependencies:
89
95
  name: bundler
90
96
  requirement: !ruby/object:Gem::Requirement
91
97
  requirements:
92
- - - "~>"
98
+ - - ">="
93
99
  - !ruby/object:Gem::Version
94
- version: 1.17.3
100
+ version: '0'
95
101
  type: :development
96
102
  prerelease: false
97
103
  version_requirements: !ruby/object:Gem::Requirement
98
104
  requirements:
99
- - - "~>"
105
+ - - ">="
100
106
  - !ruby/object:Gem::Version
101
- version: 1.17.3
107
+ version: '0'
102
108
  - !ruby/object:Gem::Dependency
103
109
  name: combustion
104
110
  requirement: !ruby/object:Gem::Requirement
@@ -223,11 +229,12 @@ executables: []
223
229
  extensions: []
224
230
  extra_rdoc_files: []
225
231
  files:
232
+ - ".github/workflows/ci.yml"
226
233
  - ".gitignore"
227
234
  - ".rspec"
228
235
  - ".ruby-version"
229
236
  - ".simplecov"
230
- - ".travis.yml"
237
+ - Dangerfile
231
238
  - Gemfile
232
239
  - LICENSE.txt
233
240
  - PULL_REQUEST_TEMPLATE.md
@@ -256,35 +263,65 @@ files:
256
263
  - app/controllers/ama_layout/api/v1/notifications_controller.rb
257
264
  - app/helpers/ama_layout_breadcrumb_helper.rb
258
265
  - app/helpers/ama_layout_content_helper.rb
266
+ - app/helpers/ama_layout_partial_helper.rb
259
267
  - app/helpers/ama_layout_path_helper.rb
260
- - app/views/ama_layout/_alert.html.erb
261
- - app/views/ama_layout/_applogo.html.erb
262
- - app/views/ama_layout/_breadcrumbs.html.erb
263
- - app/views/ama_layout/_custom_nav_links.html.erb
264
- - app/views/ama_layout/_custom_sidebar.html.erb
265
- - app/views/ama_layout/_footer.html.erb
266
- - app/views/ama_layout/_main_nav_item.html.erb
267
- - app/views/ama_layout/_main_top_nav_item.html.erb
268
- - app/views/ama_layout/_member_links.html.erb
269
- - app/views/ama_layout/_mobile_links.html.erb
270
- - app/views/ama_layout/_mobile_notification_icon.html.erb
271
- - app/views/ama_layout/_notice.html.erb
272
- - app/views/ama_layout/_notices.html.erb
273
- - app/views/ama_layout/_notification.html.erb
274
- - app/views/ama_layout/_notification_icon.html.erb
275
- - app/views/ama_layout/_notification_sidebar.html.erb
276
- - app/views/ama_layout/_sidebar.html.erb
277
- - app/views/ama_layout/_sign_out_link.html.erb
278
- - app/views/ama_layout/_siteheader.html.erb
279
- - app/views/ama_layout/_sub_nav.html.erb
280
- - app/views/ama_layout/_sub_nav_item.html.erb
281
- - app/views/ama_layout/_success.html.erb
282
- - app/views/ama_layout/_top_nav.html.erb
283
- - app/views/ama_layout/_top_sub_nav.html.erb
284
- - app/views/ama_layout/_top_sub_nav_item.html.erb
285
268
  - app/views/ama_layout/agent/_sidebar.html.erb
286
269
  - app/views/ama_layout/agent/_siteheader.html.erb
287
270
  - app/views/ama_layout/agent/_top_nav.html.erb
271
+ - app/views/ama_layout/v2/_alert.html.erb
272
+ - app/views/ama_layout/v2/_applogo.html.erb
273
+ - app/views/ama_layout/v2/_breadcrumbs.html.erb
274
+ - app/views/ama_layout/v2/_custom_nav_links.html.erb
275
+ - app/views/ama_layout/v2/_custom_sidebar.html.erb
276
+ - app/views/ama_layout/v2/_font.html.erb
277
+ - app/views/ama_layout/v2/_font_awesome_pro_kit.html.erb
278
+ - app/views/ama_layout/v2/_footer.html.erb
279
+ - app/views/ama_layout/v2/_main_nav_item.html.erb
280
+ - app/views/ama_layout/v2/_main_top_nav_item.html.erb
281
+ - app/views/ama_layout/v2/_member_links.html.erb
282
+ - app/views/ama_layout/v2/_mobile_links.html.erb
283
+ - app/views/ama_layout/v2/_mobile_notification_icon.html.erb
284
+ - app/views/ama_layout/v2/_notice.html.erb
285
+ - app/views/ama_layout/v2/_notices.html.erb
286
+ - app/views/ama_layout/v2/_notification.html.erb
287
+ - app/views/ama_layout/v2/_notification_icon.html.erb
288
+ - app/views/ama_layout/v2/_notification_sidebar.html.erb
289
+ - app/views/ama_layout/v2/_sidebar.html.erb
290
+ - app/views/ama_layout/v2/_sign_out_link.html.erb
291
+ - app/views/ama_layout/v2/_siteheader.html.erb
292
+ - app/views/ama_layout/v2/_sub_nav.html.erb
293
+ - app/views/ama_layout/v2/_sub_nav_item.html.erb
294
+ - app/views/ama_layout/v2/_success.html.erb
295
+ - app/views/ama_layout/v2/_top_nav.html.erb
296
+ - app/views/ama_layout/v2/_top_sub_nav.html.erb
297
+ - app/views/ama_layout/v2/_top_sub_nav_item.html.erb
298
+ - app/views/ama_layout/v3/_alert.html.erb
299
+ - app/views/ama_layout/v3/_applogo.html.erb
300
+ - app/views/ama_layout/v3/_breadcrumbs.html.erb
301
+ - app/views/ama_layout/v3/_custom_nav_links.html.erb
302
+ - app/views/ama_layout/v3/_custom_sidebar.html.erb
303
+ - app/views/ama_layout/v3/_font.html.erb
304
+ - app/views/ama_layout/v3/_font_awesome_pro_kit.html.erb
305
+ - app/views/ama_layout/v3/_footer.html.erb
306
+ - app/views/ama_layout/v3/_main_nav_item.html.erb
307
+ - app/views/ama_layout/v3/_main_top_nav_item.html.erb
308
+ - app/views/ama_layout/v3/_member_links.html.erb
309
+ - app/views/ama_layout/v3/_mobile_links.html.erb
310
+ - app/views/ama_layout/v3/_mobile_notification_icon.html.erb
311
+ - app/views/ama_layout/v3/_notice.html.erb
312
+ - app/views/ama_layout/v3/_notices.html.erb
313
+ - app/views/ama_layout/v3/_notification.html.erb
314
+ - app/views/ama_layout/v3/_notification_icon.html.erb
315
+ - app/views/ama_layout/v3/_notification_sidebar.html.erb
316
+ - app/views/ama_layout/v3/_sidebar.html.erb
317
+ - app/views/ama_layout/v3/_sign_out_link.html.erb
318
+ - app/views/ama_layout/v3/_siteheader.html.erb
319
+ - app/views/ama_layout/v3/_sub_nav.html.erb
320
+ - app/views/ama_layout/v3/_sub_nav_item.html.erb
321
+ - app/views/ama_layout/v3/_success.html.erb
322
+ - app/views/ama_layout/v3/_top_nav.html.erb
323
+ - app/views/ama_layout/v3/_top_sub_nav.html.erb
324
+ - app/views/ama_layout/v3/_top_sub_nav_item.html.erb
288
325
  - app/views/application/_account_toggle.html.erb
289
326
  - config.ru
290
327
  - config/routes.rb
@@ -301,7 +338,8 @@ files:
301
338
  - lib/ama_layout/decorators/notification_decorator.rb
302
339
  - lib/ama_layout/draper_replacement.rb
303
340
  - lib/ama_layout/moneris.rb
304
- - lib/ama_layout/moneris/textbox.txt
341
+ - lib/ama_layout/moneris/v2/textbox.txt
342
+ - lib/ama_layout/moneris/v3/textbox.txt
305
343
  - lib/ama_layout/navigation.rb
306
344
  - lib/ama_layout/navigation.yml
307
345
  - lib/ama_layout/navigation_helper.rb
@@ -358,7 +396,7 @@ homepage: https://github.com/amaabca/ama_layout
358
396
  licenses:
359
397
  - MIT
360
398
  metadata: {}
361
- post_install_message:
399
+ post_install_message:
362
400
  rdoc_options: []
363
401
  require_paths:
364
402
  - lib
@@ -374,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
374
412
  version: '0'
375
413
  requirements: []
376
414
  rubygems_version: 3.1.2
377
- signing_key:
415
+ signing_key:
378
416
  specification_version: 4
379
417
  summary: ".ama.ab.ca site layouts"
380
418
  test_files: