ama_layout 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/README.md +28 -0
- data/app/assets/images/cc-type-mc.png +0 -0
- data/app/assets/images/cc-type-visa.png +0 -0
- data/app/assets/stylesheets/ama_layout/application.scss +3 -3
- data/app/assets/stylesheets/ama_layout/foundation_and_overrides.scss +3 -3
- data/app/assets/stylesheets/ama_layout/layout/helper-classes.scss +27 -0
- data/app/assets/stylesheets/ama_layout/layout/variables.scss +3 -1
- data/app/assets/stylesheets/ama_layout/layout_components/cart.scss +135 -0
- data/app/assets/stylesheets/ama_layout/layout_components/forms.scss +66 -59
- data/app/assets/stylesheets/ama_layout/layout_components/index.scss +2 -0
- data/app/assets/stylesheets/ama_layout/layout_components/notification.scss +27 -18
- data/app/assets/stylesheets/ama_layout/layout_components/show-hide-content-box.scss +11 -0
- data/lib/ama_layout/navigation.rb +13 -3
- data/lib/ama_layout/version.rb +1 -1
- data/spec/ama_layout/decorators/navigation_decorator_spec.rb +2 -0
- data/spec/ama_layout/fixtures/navigation.yml +5 -0
- data/spec/ama_layout/navigation_spec.rb +22 -0
- metadata +9 -5
- data/spec/internal/db/combustion_test.sqlite +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8eac84ea4bf77cfcc13f31f159c75b00607a7ea
|
4
|
+
data.tar.gz: c7c76ee7a3127c285a418a62e68549b50f3c9b34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5625b5933afb3cd6a703c806d3aeeb778788b587d963b35483a7f31d5a4d41c078a6f5736a1b8ba5356a434d808ef4a5347fe029c6097bd73d025acbc0f42fbe
|
7
|
+
data.tar.gz: 1fb5c2cbce4fb7696641d20c9659565d32ace692be971e0bf269bec9545d7b6c91d3bf831dd1c3568ac09a82910f75119b2d1319ba6b2e799992a1a7f51f5997
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -104,6 +104,34 @@ Custom Navigation yaml file used to set all navigation:
|
|
104
104
|
target: "_blank"
|
105
105
|
|
106
106
|
|
107
|
+
### Custom Navigation
|
108
|
+
|
109
|
+
If you want to use custom navigation in an app using this gem, you can specify the location of the navigation.yml file when exposing navigation in your controller.
|
110
|
+
|
111
|
+
Example:
|
112
|
+
|
113
|
+
Instead of:
|
114
|
+
|
115
|
+
```
|
116
|
+
expose(:navigation) do
|
117
|
+
AmaLayout::Navigation.new(
|
118
|
+
user: current_user, current_url: request.url
|
119
|
+
).decorate
|
120
|
+
end
|
121
|
+
```
|
122
|
+
|
123
|
+
```
|
124
|
+
expose(:navigation) do
|
125
|
+
AmaLayout::Navigation.new(
|
126
|
+
user: current_user, current_url: request.url,
|
127
|
+
nav_file_path: Rails.root.join("config", "ama_layout", "navigation.yml")
|
128
|
+
).decorate
|
129
|
+
end
|
130
|
+
```
|
131
|
+
|
132
|
+
This is useful for soft-launching applications.
|
133
|
+
|
134
|
+
|
107
135
|
### Layout
|
108
136
|
|
109
137
|
The following layout example will give you:
|
Binary file
|
Binary file
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@import "layout/variables";
|
2
|
+
@import "webfonts/ss-symbolicons-block";
|
3
|
+
@import "font-awesome-sprockets";
|
4
|
+
@import "font-awesome";
|
2
5
|
@import "foundation_and_overrides";
|
3
6
|
@import "foundation";
|
4
7
|
@import "layout/index";
|
5
8
|
@import "layout_components/index";
|
6
9
|
@import "old-ie";
|
7
10
|
@import "media_queries/index";
|
8
|
-
@import "webfonts/ss-symbolicons-block";
|
9
|
-
@import "font-awesome-sprockets";
|
10
|
-
@import "font-awesome";
|
@@ -1374,13 +1374,13 @@ $xlarge-breakpoint: em-calc(1920);
|
|
1374
1374
|
|
1375
1375
|
// $has-tip-border-bottom: dotted 1px $iron;
|
1376
1376
|
// $has-tip-font-weight: $font-weight-bold;
|
1377
|
-
|
1377
|
+
$has-tip-font-color: $charcoal;
|
1378
1378
|
// $has-tip-border-bottom-hover: dotted 1px scale-color($primary-color, $lightness: -55%);
|
1379
1379
|
// $has-tip-font-color-hover: $primary-color;
|
1380
1380
|
// $has-tip-cursor-type: help;
|
1381
1381
|
|
1382
1382
|
// $tooltip-padding: rem-calc(12);
|
1383
|
-
|
1383
|
+
$tooltip-bg: $slate;
|
1384
1384
|
// $tooltip-font-size: rem-calc(14);
|
1385
1385
|
// $tooltip-font-weight: $font-weight-normal;
|
1386
1386
|
// $tooltip-font-color: $white;
|
@@ -1483,4 +1483,4 @@ $topbar-divider-border-top: solid 1px darken($brand-blue-light, 5%);
|
|
1483
1483
|
// $include-html-visibility-classes: $include-html-classes;
|
1484
1484
|
// $include-accessibility-classes: true;
|
1485
1485
|
// $include-table-visibility-classes: true;
|
1486
|
-
// $include-legacy-visibility-classes: true;
|
1486
|
+
// $include-legacy-visibility-classes: true;
|
@@ -236,6 +236,10 @@
|
|
236
236
|
background-color: $stone;
|
237
237
|
}
|
238
238
|
|
239
|
+
.light-greybg{
|
240
|
+
background-color: $ash;
|
241
|
+
}
|
242
|
+
|
239
243
|
.insurance-blue-bg{
|
240
244
|
background-color: $brand-blue-insurance;
|
241
245
|
}
|
@@ -252,6 +256,10 @@
|
|
252
256
|
background-color: $brand-green;
|
253
257
|
}
|
254
258
|
|
259
|
+
.notice-orange-bg{
|
260
|
+
background-color: $notice-orange;
|
261
|
+
}
|
262
|
+
|
255
263
|
// On a coloured background, the child links should be white
|
256
264
|
.insurance-blue-bg a,
|
257
265
|
.light-blue-bg a,
|
@@ -413,10 +421,29 @@ button[disabled],
|
|
413
421
|
font-size: 80%;
|
414
422
|
}
|
415
423
|
|
424
|
+
.italic{
|
425
|
+
font-style: italic;
|
426
|
+
}
|
427
|
+
|
428
|
+
.hint{
|
429
|
+
font-size: $base-font-size*0.75;
|
430
|
+
line-height: $base-font-size;
|
431
|
+
color: darken($smoke, 15%);
|
432
|
+
font-style: italic;
|
433
|
+
}
|
434
|
+
|
416
435
|
.green-text{
|
417
436
|
color: $brand-green;
|
418
437
|
}
|
419
438
|
|
439
|
+
.orange-text{
|
440
|
+
color: $notice-orange;
|
441
|
+
}
|
442
|
+
|
443
|
+
.red-text{
|
444
|
+
color: $brand-red;
|
445
|
+
}
|
446
|
+
|
420
447
|
.small-text{
|
421
448
|
font-size: $base-font-size*0.75;
|
422
449
|
}
|
@@ -4,6 +4,7 @@ $white: #ffffff;
|
|
4
4
|
$green: #3fae60;
|
5
5
|
$brand-green: #78be20; //Rewards Green
|
6
6
|
$brand-blue-insurance:#00a3e0;
|
7
|
+
$notice-orange: #e7992b;
|
7
8
|
// Blue tones - ordered from lightest to darkest
|
8
9
|
$sky: #e2f4fc;
|
9
10
|
$ocean: #8cceec;
|
@@ -13,6 +14,7 @@ $brand-blue-dark: #00205b;
|
|
13
14
|
$ash: #f7f7f7;
|
14
15
|
$stone: #eeeeee;
|
15
16
|
$smoke: #cccccc;
|
17
|
+
$stormcloud: #959595;
|
16
18
|
$slate: #838383;
|
17
19
|
$charcoal: #656565;
|
18
20
|
$jet: #323232;
|
@@ -29,4 +31,4 @@ $base-padding: 5px;
|
|
29
31
|
// Borders
|
30
32
|
$base-border: 1px solid $smoke;
|
31
33
|
//Radius
|
32
|
-
$base-radius: 3px;
|
34
|
+
$base-radius: 3px;
|
@@ -0,0 +1,135 @@
|
|
1
|
+
/*Cart*/
|
2
|
+
.summary-cart.active.summary_height{
|
3
|
+
min-height: 300px;
|
4
|
+
}
|
5
|
+
|
6
|
+
.summary-cart{
|
7
|
+
::-webkit-scrollbar{
|
8
|
+
-webkit-appearance: none;
|
9
|
+
width: 7px;
|
10
|
+
}
|
11
|
+
|
12
|
+
::-webkit-scrollbar-thumb{
|
13
|
+
border-radius: 4px;
|
14
|
+
background-color: rgba(0, 0, 0, .5);
|
15
|
+
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
16
|
+
}
|
17
|
+
|
18
|
+
.summary-cart-body{
|
19
|
+
background-color: $stone;
|
20
|
+
padding: $base-padding*2;
|
21
|
+
font-size: $base-font-size*0.875;
|
22
|
+
color: $charcoal;
|
23
|
+
|
24
|
+
ul{
|
25
|
+
list-style: none;
|
26
|
+
margin: 0;
|
27
|
+
|
28
|
+
li{
|
29
|
+
padding: 8px;
|
30
|
+
}
|
31
|
+
|
32
|
+
li:not(:nth-child(1)){
|
33
|
+
border-top: 1px solid $smoke;
|
34
|
+
}
|
35
|
+
|
36
|
+
.summary-flash-notice{
|
37
|
+
color: $white;
|
38
|
+
background: $brand-blue-insurance;
|
39
|
+
|
40
|
+
p,
|
41
|
+
a,
|
42
|
+
a:hover,
|
43
|
+
a:focus{
|
44
|
+
color: $white;
|
45
|
+
}
|
46
|
+
|
47
|
+
&:not(:nth-child(1)){
|
48
|
+
border-top: none;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
.items{
|
54
|
+
overflow-y: scroll;
|
55
|
+
max-height: auto;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
.floating-cart{
|
61
|
+
z-index: 98;
|
62
|
+
}
|
63
|
+
|
64
|
+
.summary-title{
|
65
|
+
background: $brand-green !important;
|
66
|
+
min-height: 62px;
|
67
|
+
}
|
68
|
+
|
69
|
+
.mobile-accordion-navigation{
|
70
|
+
@include accordion-navigation;
|
71
|
+
}
|
72
|
+
|
73
|
+
.accordion-icon{
|
74
|
+
width: 16px;
|
75
|
+
height: 16px;
|
76
|
+
display: block;
|
77
|
+
float: right;
|
78
|
+
color: $white;
|
79
|
+
margin-top: $base-margin;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
.delete-icon{ //same one used in the cart and on info charts it lives outside of cart so it can be used other places
|
84
|
+
margin-top: $base-margin;
|
85
|
+
float: right;
|
86
|
+
|
87
|
+
.fa-times-circle-o{
|
88
|
+
font-size: $base-font-size*2;
|
89
|
+
}
|
90
|
+
|
91
|
+
a{
|
92
|
+
color: $slate;
|
93
|
+
text-decoration: none;
|
94
|
+
|
95
|
+
&:hover,
|
96
|
+
&:focus{
|
97
|
+
color: $charcoal;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
@media screen and (max-width: 64em){
|
103
|
+
.mobile-accordion{
|
104
|
+
@include accordion-container;
|
105
|
+
|
106
|
+
.mobile-accordion-navigation{
|
107
|
+
@include accordion-navigation;
|
108
|
+
}
|
109
|
+
|
110
|
+
.content{
|
111
|
+
@include accordion-content;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
span.item-num{
|
116
|
+
display: inline-block;
|
117
|
+
float: right;
|
118
|
+
width: 30px;
|
119
|
+
height: 30px;
|
120
|
+
border-radius: 60px;
|
121
|
+
text-align: center;
|
122
|
+
line-height: 29px;
|
123
|
+
color: $white;
|
124
|
+
font-weight: bold;
|
125
|
+
margin-right: $base-margin*6;
|
126
|
+
background: lighten($brand-green, 5%);
|
127
|
+
}
|
128
|
+
|
129
|
+
.summary-cart{
|
130
|
+
width: 100%;
|
131
|
+
position: fixed;
|
132
|
+
bottom: 0;
|
133
|
+
left: 0;
|
134
|
+
}
|
135
|
+
}
|
@@ -34,7 +34,6 @@
|
|
34
34
|
/* ------------- Custom Radio Button + Checkbox Styles ------------- */
|
35
35
|
.checkboxes{
|
36
36
|
label{
|
37
|
-
padding: $base-padding*2;
|
38
37
|
width: 100%;
|
39
38
|
}
|
40
39
|
|
@@ -71,6 +70,22 @@ input[type="checkbox"] + label{
|
|
71
70
|
border: $base-border;
|
72
71
|
margin: 0;
|
73
72
|
width: 100%;
|
73
|
+
position: relative;
|
74
|
+
cursor: pointer;
|
75
|
+
padding: 0 $base-padding*2 0 $base-padding*2;
|
76
|
+
|
77
|
+
&:before{
|
78
|
+
content: ' ';
|
79
|
+
display: block;
|
80
|
+
position: absolute;
|
81
|
+
left: 10px;
|
82
|
+
top: 8px;
|
83
|
+
width: 24px;
|
84
|
+
min-width: 24px;
|
85
|
+
height: 24px;
|
86
|
+
background-color: $white;
|
87
|
+
border: $base-border;
|
88
|
+
}
|
74
89
|
|
75
90
|
&:nth-child(2){
|
76
91
|
margin-top: -1px;
|
@@ -82,55 +97,51 @@ input[type="checkbox"] + label{
|
|
82
97
|
}
|
83
98
|
}
|
84
99
|
|
85
|
-
|
86
|
-
input[type="radio"] + label > span:first-of-type,
|
87
|
-
input[type="radio"] + label span:first-of-type{
|
100
|
+
.checkbox-label{
|
88
101
|
display: inline-block;
|
89
|
-
width:
|
90
|
-
|
91
|
-
|
92
|
-
margin:
|
93
|
-
vertical-align: top;
|
94
|
-
cursor: pointer;
|
95
|
-
border-radius: 50%;
|
96
|
-
background-color: $white;
|
97
|
-
border: $base-border;
|
102
|
+
width: 85%;
|
103
|
+
margin-top: 9px;
|
104
|
+
margin-bottom: 9px;
|
105
|
+
margin-left: 32px;
|
98
106
|
}
|
99
107
|
|
100
|
-
input[type="radio"] + label
|
101
|
-
|
102
|
-
margin: 7px $base-margin;
|
108
|
+
input[type="radio"] + label{
|
109
|
+
margin: $base-margin 0;
|
103
110
|
|
104
111
|
&:before{
|
105
|
-
content: ' ';
|
106
112
|
border-radius: 100%;
|
107
|
-
|
113
|
+
}
|
114
|
+
|
115
|
+
&:after{
|
116
|
+
content: ' ';
|
108
117
|
transition: all .5s ease-in-out;
|
109
118
|
}
|
110
119
|
}
|
111
120
|
|
112
|
-
input[type="radio"]:checked + label
|
113
|
-
|
114
|
-
|
115
|
-
border: 2px solid $secondary-color;
|
121
|
+
input[type="radio"]:checked + label{
|
122
|
+
background-color: $sky;
|
123
|
+
border: 1px solid $ocean;
|
116
124
|
|
117
125
|
&:before{
|
118
126
|
content: '';
|
127
|
+
background-color: $white;
|
128
|
+
border: 2px solid $secondary-color;
|
129
|
+
}
|
130
|
+
|
131
|
+
&:after{
|
132
|
+
content: '';
|
133
|
+
position: absolute;
|
119
134
|
display: block;
|
120
|
-
|
135
|
+
top: 16px;
|
136
|
+
left: 18px;
|
137
|
+
background-color: $brand-blue-light;
|
121
138
|
width: 8px;
|
122
139
|
height: 8px;
|
123
|
-
|
124
|
-
-
|
125
|
-
|
126
|
-
|
140
|
+
-moz-transform: scale(2, 2);
|
141
|
+
-webkit-transform: scale(2, 2);
|
142
|
+
transform: scale(2, 2);
|
143
|
+
border-radius: 100%;
|
127
144
|
}
|
128
|
-
}
|
129
|
-
|
130
|
-
input[type="radio"]:checked + label{
|
131
|
-
background-color: $sky;
|
132
|
-
border: 1px solid $ocean;
|
133
|
-
position: relative;
|
134
145
|
|
135
146
|
&>hr{
|
136
147
|
border: solid $ocean;
|
@@ -144,28 +155,15 @@ input[type="radio"]:checked + label{
|
|
144
155
|
}
|
145
156
|
}
|
146
157
|
|
147
|
-
input[type="checkbox"] + label > span:first-of-type{
|
148
|
-
border-radius: 0;
|
149
|
-
max-width: 10%;
|
150
|
-
margin: $base-margin $base-margin*2 $base-margin 0;
|
151
|
-
}
|
152
|
-
|
153
|
-
.checkbox-label{
|
154
|
-
display: inline-block;
|
155
|
-
width: 80%;
|
156
|
-
margin-top: 8px;
|
157
|
-
margin-bottom: 8px;
|
158
|
-
}
|
159
|
-
|
160
158
|
input[type="checkbox"]:checked + label{
|
161
|
-
position: relative;
|
162
159
|
|
163
|
-
&:
|
160
|
+
&:after{
|
164
161
|
content: '';
|
165
162
|
display: block;
|
166
163
|
position: absolute;
|
164
|
+
z-index: 200;
|
167
165
|
left: 14px;
|
168
|
-
top:
|
166
|
+
top: 21px;
|
169
167
|
width: 8px;
|
170
168
|
height: 16px;
|
171
169
|
border-right: 3px solid $white;
|
@@ -179,15 +177,11 @@ input[type="checkbox"]:checked + label{
|
|
179
177
|
animation:checkbox 0.8s;
|
180
178
|
}
|
181
179
|
|
182
|
-
|
180
|
+
&:before{
|
183
181
|
background: $brand-blue-light;
|
184
182
|
}
|
185
183
|
}
|
186
184
|
|
187
|
-
[type="checkbox"]:checked + label:after{
|
188
|
-
margin-left: $base-margin*6;
|
189
|
-
}
|
190
|
-
|
191
185
|
@keyframes checkbox{
|
192
186
|
0%{
|
193
187
|
height: 0;
|
@@ -224,11 +218,24 @@ input[type="checkbox"]:checked + label{
|
|
224
218
|
float: right;
|
225
219
|
}
|
226
220
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
221
|
+
/*-------------- Credit Card images ---------- */
|
222
|
+
.cc-type{
|
223
|
+
width: 38px;
|
224
|
+
height: 19px;
|
225
|
+
display: inline-block;
|
226
|
+
}
|
227
|
+
|
228
|
+
.type-visa{
|
229
|
+
background: url(image-path("cc-type-visa.png")) no-repeat;
|
230
|
+
background-size: contain;
|
231
|
+
background-position: center center;
|
232
|
+
}
|
233
|
+
|
234
|
+
.type-mc,
|
235
|
+
.type-mastercard{
|
236
|
+
background: url(image-path("cc-type-mc.png")) no-repeat;
|
237
|
+
background-size: contain;
|
238
|
+
background-position: center center;
|
232
239
|
}
|
233
240
|
|
234
241
|
/* ------------- Error Messaging ------------- */
|
@@ -9,25 +9,34 @@
|
|
9
9
|
background-color: $brand-red;
|
10
10
|
}
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
//Status error classes
|
13
|
+
.orange-warning-icon{
|
14
|
+
@extend .fa;
|
15
|
+
@extend .fa-exclamation-circle;
|
16
|
+
@extend .orange-text;
|
17
|
+
}
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
.white-warning-icon{
|
20
|
+
@extend .fa;
|
21
|
+
@extend .fa-exclamation-circle;
|
22
|
+
@extend .white-text;
|
23
|
+
}
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
li{
|
29
|
-
padding: 8px;
|
30
|
-
}
|
31
|
-
}
|
25
|
+
.green-active-icon{
|
26
|
+
@extend .fa;
|
27
|
+
@extend .fa-check-circle;
|
28
|
+
@extend .green-text;
|
32
29
|
}
|
33
30
|
|
31
|
+
.white-active-icon{
|
32
|
+
@extend .fa;
|
33
|
+
@extend .fa-check-circle;
|
34
|
+
@extend .white-text;
|
35
|
+
}
|
36
|
+
|
37
|
+
.status-icon{
|
38
|
+
font-size: 2rem !important; //needs important to overwrite the .fa font size
|
39
|
+
text-align: center;
|
40
|
+
margin: 0 auto;
|
41
|
+
display: block;
|
42
|
+
}
|
@@ -3,7 +3,12 @@ module AmaLayout
|
|
3
3
|
include ActiveModel::Model
|
4
4
|
include Draper::Decoratable
|
5
5
|
|
6
|
-
attr_accessor :user, :current_url
|
6
|
+
attr_accessor :user, :current_url, :nav_file_path
|
7
|
+
|
8
|
+
def initialize(args = {})
|
9
|
+
args = defaults.merge args
|
10
|
+
super
|
11
|
+
end
|
7
12
|
|
8
13
|
cattr_accessor :member do
|
9
14
|
"member"
|
@@ -26,8 +31,13 @@ module AmaLayout
|
|
26
31
|
|
27
32
|
private
|
28
33
|
def navigation_items
|
29
|
-
|
30
|
-
|
34
|
+
YAML.load ERB.new(File.read nav_file_path).result
|
35
|
+
end
|
36
|
+
|
37
|
+
def defaults
|
38
|
+
{
|
39
|
+
nav_file_path: File.join(Gem.loaded_specs["ama_layout"].full_gem_path, "lib", "ama_layout", "navigation.yml")
|
40
|
+
}
|
31
41
|
end
|
32
42
|
end
|
33
43
|
end
|
data/lib/ama_layout/version.rb
CHANGED
@@ -6,6 +6,7 @@ describe AmaLayout::NavigationDecorator do
|
|
6
6
|
let(:insurance_site) { "http://insurance.waffles.ca" }
|
7
7
|
let(:membership_site) { "http://membership.waffles.ca" }
|
8
8
|
let(:driveredonline_site) { "http://driveredonline.waffles.ca" }
|
9
|
+
let(:registries_site) { "http://registries.waffles.ca" }
|
9
10
|
|
10
11
|
before(:each) do
|
11
12
|
allow(Rails.configuration).to receive(:gatekeeper_site).and_return(gatekeeper_site)
|
@@ -13,6 +14,7 @@ describe AmaLayout::NavigationDecorator do
|
|
13
14
|
allow(Rails.configuration).to receive(:insurance_site).and_return(insurance_site)
|
14
15
|
allow(Rails.configuration).to receive(:membership_site).and_return(membership_site)
|
15
16
|
allow(Rails.configuration).to receive(:driveredonline_site).and_return(driveredonline_site)
|
17
|
+
allow(Rails.configuration).to receive(:registries_site).and_return(registries_site)
|
16
18
|
end
|
17
19
|
|
18
20
|
describe "#items" do
|
@@ -4,6 +4,7 @@ describe AmaLayout::Navigation do
|
|
4
4
|
let(:insurance_site) { "http://insurance.waffles.ca" }
|
5
5
|
let(:membership_site) { "http://membership.waffles.ca" }
|
6
6
|
let(:driveredonline_site) { "http://driveredonline.waffles.ca" }
|
7
|
+
let(:registries_site) { "http://registries.waffles.ca" }
|
7
8
|
|
8
9
|
before(:each) do
|
9
10
|
allow(Rails.configuration).to receive(:gatekeeper_site).and_return(gatekeeper_site)
|
@@ -11,6 +12,27 @@ describe AmaLayout::Navigation do
|
|
11
12
|
allow(Rails.configuration).to receive(:insurance_site).and_return(insurance_site)
|
12
13
|
allow(Rails.configuration).to receive(:membership_site).and_return(membership_site)
|
13
14
|
allow(Rails.configuration).to receive(:driveredonline_site).and_return(driveredonline_site)
|
15
|
+
allow(Rails.configuration).to receive(:registries_site).and_return(registries_site)
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#nav_file_path" do
|
19
|
+
let(:file_path) { File.join(Gem.loaded_specs["ama_layout"].full_gem_path, "lib", "ama_layout", "navigation.yml") }
|
20
|
+
|
21
|
+
it "defaults to lib/ama_layout/navigation.yml" do
|
22
|
+
expect(subject.nav_file_path).to eq file_path
|
23
|
+
end
|
24
|
+
|
25
|
+
context "overridden file path" do
|
26
|
+
let(:file_path) do
|
27
|
+
File.join(Gem.loaded_specs["ama_layout"].full_gem_path, "spec", "ama_layout", "fixtures", "navigation.yml")
|
28
|
+
end
|
29
|
+
let(:user) { double("user", navigation: AmaLayout::Navigation.member) }
|
30
|
+
let(:subject) { described_class.new(user: user, nav_file_path: file_path) }
|
31
|
+
|
32
|
+
it "uses the overridden file path" do
|
33
|
+
expect(subject.items.first.text).to eq "Fixture"
|
34
|
+
end
|
35
|
+
end
|
14
36
|
end
|
15
37
|
|
16
38
|
describe "#items" 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: 2.
|
4
|
+
version: 2.6.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: 2016-04-
|
21
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: foundation-rails
|
@@ -244,6 +244,8 @@ files:
|
|
244
244
|
- ama_layout.gemspec
|
245
245
|
- app/assets/images/AMA-Logo.svg
|
246
246
|
- app/assets/images/alberta-blur.jpg
|
247
|
+
- app/assets/images/cc-type-mc.png
|
248
|
+
- app/assets/images/cc-type-visa.png
|
247
249
|
- app/assets/images/footer-racetrack-big.png
|
248
250
|
- app/assets/javascripts/ama_layout/ama_layout_namespace.js.coffee
|
249
251
|
- app/assets/javascripts/ama_layout/autocorrect_email.js.coffee
|
@@ -269,11 +271,13 @@ files:
|
|
269
271
|
- app/assets/stylesheets/ama_layout/layout/variables.scss
|
270
272
|
- app/assets/stylesheets/ama_layout/layout_components/accordions.scss
|
271
273
|
- app/assets/stylesheets/ama_layout/layout_components/blue-boxes.scss
|
274
|
+
- app/assets/stylesheets/ama_layout/layout_components/cart.scss
|
272
275
|
- app/assets/stylesheets/ama_layout/layout_components/error-page.scss
|
273
276
|
- app/assets/stylesheets/ama_layout/layout_components/forms.scss
|
274
277
|
- app/assets/stylesheets/ama_layout/layout_components/index.scss
|
275
278
|
- app/assets/stylesheets/ama_layout/layout_components/notification.scss
|
276
279
|
- app/assets/stylesheets/ama_layout/layout_components/responsive-table.scss
|
280
|
+
- app/assets/stylesheets/ama_layout/layout_components/show-hide-content-box.scss
|
277
281
|
- app/assets/stylesheets/ama_layout/layout_components/sidebar.scss
|
278
282
|
- app/assets/stylesheets/ama_layout/layout_components/siteheader.scss
|
279
283
|
- app/assets/stylesheets/ama_layout/layout_components/tab-accordions.scss
|
@@ -323,6 +327,7 @@ files:
|
|
323
327
|
- spec/ama_layout/decorators/moneris_decorator_spec.rb
|
324
328
|
- spec/ama_layout/decorators/navigation_decorator_spec.rb
|
325
329
|
- spec/ama_layout/decorators/navigation_item_decorator_spec.rb
|
330
|
+
- spec/ama_layout/fixtures/navigation.yml
|
326
331
|
- spec/ama_layout/moneris_spec.rb
|
327
332
|
- spec/ama_layout/navigation_item_spec.rb
|
328
333
|
- spec/ama_layout/navigation_spec.rb
|
@@ -334,7 +339,6 @@ files:
|
|
334
339
|
- spec/internal/app/controllers/pages_controller.rb
|
335
340
|
- spec/internal/config/database.yml
|
336
341
|
- spec/internal/config/routes.rb
|
337
|
-
- spec/internal/db/combustion_test.sqlite
|
338
342
|
- spec/internal/db/schema.rb
|
339
343
|
- spec/internal/log/.gitignore
|
340
344
|
- spec/internal/public/favicon.ico
|
@@ -359,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
363
|
version: '0'
|
360
364
|
requirements: []
|
361
365
|
rubyforge_project:
|
362
|
-
rubygems_version: 2.4.5
|
366
|
+
rubygems_version: 2.4.5
|
363
367
|
signing_key:
|
364
368
|
specification_version: 4
|
365
369
|
summary: ".ama.ab.ca site layouts"
|
@@ -368,6 +372,7 @@ test_files:
|
|
368
372
|
- spec/ama_layout/decorators/moneris_decorator_spec.rb
|
369
373
|
- spec/ama_layout/decorators/navigation_decorator_spec.rb
|
370
374
|
- spec/ama_layout/decorators/navigation_item_decorator_spec.rb
|
375
|
+
- spec/ama_layout/fixtures/navigation.yml
|
371
376
|
- spec/ama_layout/moneris_spec.rb
|
372
377
|
- spec/ama_layout/navigation_item_spec.rb
|
373
378
|
- spec/ama_layout/navigation_spec.rb
|
@@ -379,7 +384,6 @@ test_files:
|
|
379
384
|
- spec/internal/app/controllers/pages_controller.rb
|
380
385
|
- spec/internal/config/database.yml
|
381
386
|
- spec/internal/config/routes.rb
|
382
|
-
- spec/internal/db/combustion_test.sqlite
|
383
387
|
- spec/internal/db/schema.rb
|
384
388
|
- spec/internal/log/.gitignore
|
385
389
|
- spec/internal/public/favicon.ico
|
Binary file
|