intranet-core 2.4.4 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c0418e51e51e5ebf7fe67668b94af8e4763bc649bde9774d78ef19b980b5df6
4
- data.tar.gz: cb2ef1ac73c2778e3feb59391071340a3ef3eb81719744884a6c4f41f16311a3
3
+ metadata.gz: d768f3eff39ce79e45930e74577e9d232245f2e475a7ad1e746b9be79f695181
4
+ data.tar.gz: 0540662becbc8df7d0432985b3a560f87a7acd27634811543d0ae5e1d02f87c1
5
5
  SHA512:
6
- metadata.gz: '00688f26ee0d63a7396dc8f81a87a5e9ec014757ef55dac68697ce16db6d17660317ce16e03c3dd8ebcbc663f2264ab7ee971930fea13fc9438e9e942e71eb91'
7
- data.tar.gz: 2c3448eac021eae297cb6450d8c9e6ee8f736270ca5488b2cabdbfc590930cc555c48eb0e57a75b9c1d40a5eeed7ccf6e9cfc95563e5631ec47c1ad669f0c3c0
6
+ metadata.gz: a941c459c619d32896fa340e383f03cf9018fb7283da470e9611f591688704050b4553b9bbf75248592eb548e48a209b8b2be65b91aa1c74225d09d53eb0d3a4
7
+ data.tar.gz: 395367b08e462a97e060165c2e17771f1e365bba3cba0d88514f84138cd36cd15fa01f0fb4a129ba46fefd5d21af73ca4982f1bcb80f39e2e2f95a24b8f1dc96
@@ -6,7 +6,7 @@ module Intranet
6
6
  NAME = 'intranet-core'
7
7
 
8
8
  # The version of the gem, according to semantic versionning.
9
- VERSION = '2.4.4'
9
+ VERSION = '2.4.5'
10
10
 
11
11
  # The URL of the gem homepage.
12
12
  HOMEPAGE_URL = 'https://rubygems.org/gems/intranet-core'
@@ -6,264 +6,300 @@
6
6
  /***************************************** External Fonts *****************************************/
7
7
 
8
8
  @font-face {
9
- font-family: "Source Sans Pro";
10
- font-style: normal;
11
- font-weight: 300;
12
- src: url("fonts/SourceSansPro.woff2") format("woff2");
13
- unicode-range: U+0-FF, U+131, U+152-153, U+2C6, U+2DA, U+2DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
9
+ font-family: "Source Sans Pro";
10
+ font-style: normal;
11
+ font-weight: 300;
12
+ src: url("fonts/SourceSansPro.woff2") format("woff2");
13
+ unicode-range: U+0-FF, U+131, U+152-153, U+2C6, U+2DA, U+2DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
14
14
  }
15
15
 
16
16
  /***************************************** General design *****************************************/
17
17
 
18
18
  body, html {
19
- padding: 0px;
20
- margin: 0px;
21
- height: 100%;
19
+ padding: 0px;
20
+ margin: 0px;
21
+ height: 100%;
22
22
  }
23
23
  body {
24
- background: #f7f8fa;
25
- font-family: "Source Sans Pro", Cantarell, sans-serif;
26
- color: black;
27
- font-size: 1.0rem;
28
- -moz-text-size-adjust: none;
29
- -webkit-text-size-adjust: none;
30
- -ms-text-size-adjust: none;
31
- font-size-adjust: none;
24
+ background: #f7f8fa;
25
+ font-family: "Source Sans Pro", Cantarell, sans-serif;
26
+ color: black;
27
+ font-size: 1.0rem;
28
+ -moz-text-size-adjust: none;
29
+ -webkit-text-size-adjust: none;
30
+ -ms-text-size-adjust: none;
31
+ font-size-adjust: none;
32
+ }
33
+
34
+ h1 {
35
+ font-size: 2.25em;
36
+ text-align: center;
37
+ margin: 1.5em 0px 2em; /* top sides bottom */
38
+ }
39
+
40
+ h2 {
41
+ font-size: 2em;
42
+ text-align: center;
43
+ margin: 1.5em 0px 2em; /* top sides bottom */
44
+ }
45
+
46
+ h3 {
47
+ font-size: 1.3em;
48
+ margin: 3em 0px 1em; /* top sides bottom */
49
+ }
50
+
51
+ h4 {
52
+ font-size: 1.1em;
53
+ margin: 1em 0px 1em;
54
+ }
55
+
56
+ blockquote {
57
+ border-left: 1px solid #d0d0d0;
58
+ padding-left: 1em;
59
+ margin: 2em 0px; /* top/bottom sides */
60
+ }
61
+
62
+ p {
63
+ text-align: justify;
64
+ }
65
+ p.right {
66
+ text-align: right;
67
+ }
68
+
69
+ hr {
70
+ height: 2px;
71
+ border: 0px;
72
+ background: #1e262b;
73
+ margin: 3em 0px /* top/bottom sides */
74
+ }
75
+
76
+ dt {
77
+ font-weight: bold;
78
+ }
79
+ dd {
80
+ margin: 0px 0px 1em 2em; /* top right bottom left */
81
+ }
82
+ dd:last-child {
83
+ margin-bottom: 0px;
32
84
  }
33
85
 
34
86
  a {
35
- color: inherit;
36
- text-decoration: inherit;
37
- cursor: pointer;
87
+ color: #6a81aa;
88
+ text-decoration: inherit;
89
+ cursor: pointer;
38
90
  }
39
91
 
40
92
  /******************************************* Navigation *******************************************/
41
93
 
42
94
  body > header {
43
- position: fixed;
44
- top: 0px;
45
- width: 100%;
46
- margin: auto;
47
- background-color: #1e262b;
48
- color: white;
49
- z-index: 10;
95
+ position: fixed;
96
+ top: 0px;
97
+ width: 100%;
98
+ margin: auto;
99
+ background-color: #1e262b;
100
+ color: white;
101
+ z-index: 10;
50
102
  }
51
103
  body > header h1 {
52
- float: left;
53
- font-size: 2.25em;
54
- font-weight: 500;
55
- margin: 0px;
56
- padding: 5px 20px 8px; /* top sides bottom */
104
+ float: left;
105
+ font-weight: 500;
106
+ margin: 0px;
107
+ padding: 5px 20px 8px; /* top sides bottom */
108
+ }
109
+ body > header a {
110
+ color: inherit;
57
111
  }
58
112
  body > header nav {
59
- float: right;
60
- padding: 0px 20px;
113
+ float: right;
114
+ padding: 0px 20px;
61
115
  }
62
116
  body > header nav ul {
63
- margin: 0px;
64
- padding: 0px;
117
+ margin: 0px;
118
+ padding: 0px;
65
119
  }
66
120
  body > header nav > ul > li {
67
- display: inline-block;
121
+ display: inline-block;
68
122
  }
69
123
  body > header nav > ul > li a {
70
- display: block;
71
- padding: 16px 20px;
72
- margin: 0px;
73
- font-size: 1.25em;
74
- color: rgba(255, 255, 255, 0.7);
124
+ display: block;
125
+ padding: 16px 20px;
126
+ margin: 0px;
127
+ font-size: 1.25em;
128
+ color: rgba(255, 255, 255, 0.7);
75
129
  }
76
130
  body > header nav > ul > li a:hover {
77
- color: rgba(255, 255, 255, 1.0);
131
+ color: rgba(255, 255, 255, 1.0);
78
132
  }
79
133
 
80
134
  /* dropdown menus */
81
135
  body > header nav > ul > li > ul {
82
- display: none;
83
- background-color: #1e262b;
84
- position: absolute;
136
+ display: none;
137
+ background-color: #1e262b;
138
+ position: absolute;
85
139
  }
86
140
  body > header nav > ul > li > ul > li {
87
- display: block;
141
+ display: block;
88
142
  }
89
143
  body > header nav > ul > li > ul > li a {
90
- padding: 8px 20px;
144
+ padding: 8px 20px;
91
145
  }
92
146
  body > header nav > ul > li:hover > ul, body > header nav > ul > li:active > ul {
93
- display: block;
147
+ display: block;
94
148
  }
95
149
 
96
150
  body > header a#openmenu, body > header a#closemenu {
97
- display: none;
151
+ display: none;
98
152
  }
99
153
 
100
154
  /* Mobile devices only */
101
155
  @media only screen and (max-width: 600px), only screen and (max-device-width: 600px) {
102
- body > header a#openmenu {
103
- display: block;
104
- position: absolute;
105
- top: 12%;
106
- left: 20px;
107
- font-size: 2em;
108
- font-weight: bold;
109
- color: white;
110
- }
111
- body > header nav a#closemenu {
112
- display: block;
113
- font-size: 2.5em;
114
- font-weight: bold;
115
- color: white;
116
- text-align: right;
117
- margin-right: 0.5em;
118
- }
119
- body > header h1 {
120
- float: none;
121
- text-align: center;
122
- }
123
- body > header nav {
124
- position: fixed;
125
- top: 0;
126
- left: 0;
127
- height: 100%;
128
- padding: 0;
129
- z-index: 20;
130
- background: inherit;
131
- font-size: 1.25em;
132
- overflow-y: scroll;
133
- width: 0;
134
- max-width: 100%;
135
- }
136
- body > header nav > ul {
137
- height: auto;
138
- }
139
- body > header nav > ul > li {
140
- display: block;
141
- }
142
- body > header nav > ul > li a {
143
- padding: 10px 150px 10px 40px; /* top right bottom left */
144
- }
145
- body > header nav > ul > li > ul {
146
- display: block;
147
- position: static; /* reset absolute positionning */
148
- }
149
- body > header nav > ul > li > ul > li a {
150
- margin: 0px;
151
- padding: 10px 100px 10px 90px; /* top right bottom left */
152
- }
156
+ body > header a#openmenu {
157
+ display: block;
158
+ position: absolute;
159
+ top: 12%;
160
+ left: 20px;
161
+ font-size: 2em;
162
+ font-weight: bold;
163
+ }
164
+ body > header nav a#closemenu {
165
+ display: block;
166
+ font-size: 2.5em;
167
+ font-weight: bold;
168
+ text-align: right;
169
+ margin-right: 0.5em;
170
+ }
171
+ body > header h1 {
172
+ float: none;
173
+ text-align: center;
174
+ }
175
+ body > header nav {
176
+ position: fixed;
177
+ top: 0;
178
+ left: 0;
179
+ height: 100%;
180
+ padding: 0;
181
+ z-index: 20;
182
+ background: inherit;
183
+ font-size: 1.25em;
184
+ overflow-y: scroll;
185
+ width: 0;
186
+ max-width: 100%;
187
+ }
188
+ body > header nav > ul {
189
+ height: auto;
190
+ }
191
+ body > header nav > ul > li {
192
+ display: block;
193
+ }
194
+ body > header nav > ul > li a {
195
+ padding: 10px 150px 10px 40px; /* top right bottom left */
196
+ }
197
+ body > header nav > ul > li > ul {
198
+ display: block;
199
+ position: static; /* reset absolute positionning */
200
+ }
201
+ body > header nav > ul > li > ul > li a {
202
+ margin: 0px;
203
+ padding: 10px 100px 10px 90px; /* top right bottom left */
204
+ }
153
205
  }
154
206
 
155
207
  /* breadcrumb navigation menu */
156
208
  ul.breadcrumb {
157
- list-style: none;
158
- padding: 0px;
159
- font-size: 0.9em;
160
- margin-bottom: 50px;
209
+ list-style: none;
210
+ padding: 0px;
211
+ font-size: 0.9em;
212
+ margin-bottom: 1.5em;
161
213
  }
162
214
  ul.breadcrumb li {
163
- display: inline;
215
+ display: inline;
164
216
  }
165
217
  ul.breadcrumb li+li:before {
166
- padding: 4px;
167
- content: "/\00a0";
168
- }
169
- main a {
170
- color: #748ea3;
218
+ padding: 4px;
219
+ content: "/\00a0";
171
220
  }
172
221
 
173
222
  /* Mobile devices only */
174
223
  @media only screen and (max-width: 600px), only screen and (max-device-width: 600px) {
175
- ul.breadcrumb {
176
- display: none;
177
- }
224
+ ul.breadcrumb {
225
+ display: none;
226
+ }
178
227
  }
179
228
 
180
229
  /****************************************** Main content ******************************************/
181
230
 
182
231
  body > main {
183
- padding: 58px 0px; /* height of the navigation bar */
184
- width: 85%;
185
- max-width: 1366px;
186
- margin: auto;
187
- min-height: calc(100vh - 2*58px - 66px); /* 2*height of nav bar + height of footer */
188
- }
189
-
190
- body > main hr {
191
- height: 2px;
192
- border: 0px;
193
- background: #1e262b;
194
- margin-top: 3em;
195
- margin-bottom: 3em;
232
+ padding: 58px 0px; /* height of the navigation bar */
233
+ width: 85%;
234
+ max-width: 1366px;
235
+ margin: auto;
236
+ min-height: calc(100vh - 2*58px - 66px); /* 2*height of nav bar + height of footer */
196
237
  }
197
238
 
198
239
  /* Mobile devices only */
199
240
  @media only screen and (max-width: 600px), only screen and (max-device-width: 600px) {
200
- body > main section, body > main hr, body > footer p {
201
- width: 90%;
202
- }
203
- }
204
-
205
- body > main section h2 {
206
- font-size: 2em;
207
- text-align: center;
208
- margin: 50px 0px 2em; /* top sides bottom */
209
- }
210
- body > main article h2 {
211
- margin-bottom: 40px;
212
- }
213
- body > main section h3 {
214
- font-size: 1.17em;
215
- margin: 3em 0px 1em; /* top sides bottom */
241
+ body > main section, body > main hr, body > footer p {
242
+ width: 100%;
243
+ margin: auto;
244
+ }
216
245
  }
217
246
 
218
247
  body > main div.loading {
219
- width: 100px;
220
- height: 100px;
221
- margin: auto;
222
- border: 16px solid #eaeaea;
223
- border-radius: 50%;
224
- border-top: 16px solid #a0c5e2;
225
- animation: spin 2s linear infinite;
248
+ width: 100px;
249
+ height: 100px;
250
+ margin: auto;
251
+ border: 16px solid #eaeaea;
252
+ border-radius: 50%;
253
+ border-top: 16px solid #a0c5e2;
254
+ animation: spin 2s linear infinite;
226
255
  }
227
256
  @keyframes spin { /* animation definition */
228
- 0% { transform: rotate(0deg); }
229
- 100% { transform: rotate(360deg); }
257
+ 0% { transform: rotate(0deg); }
258
+ 100% { transform: rotate(360deg); }
230
259
  }
231
260
 
232
261
  /********************************************* Footer *********************************************/
233
262
 
234
263
  body > footer {
235
- background: #1e262b;
236
- text-align: center;
237
- color: white;
238
- padding: 0px;
264
+ background: #1e262b;
265
+ color: white;
266
+ padding: 0px;
239
267
  }
240
268
  body > footer p {
241
- font-size: 0.85em;
242
- padding: 15px 0px; /* top sides */
243
- margin: 0px;
269
+ text-align: center;
270
+ font-size: 0.9em;
271
+ padding: 15px 0px; /* top sides */
272
+ margin: 0px;
273
+ }
274
+ body > footer a {
275
+ color: inherit;
244
276
  }
245
277
  body > footer aside#modal { /* modal box container */
246
- display: none;
247
- position: fixed;
248
- z-index: 1000;
249
- left: 0;
250
- top: 0;
251
- width: 100%;
252
- height: 100%;
253
- overflow: auto;
254
- color: black;
255
- background-color: rgba(0, 0, 0, 0.8);
278
+ display: none;
279
+ position: fixed;
280
+ z-index: 1000;
281
+ left: 0;
282
+ top: 0;
283
+ width: 100%;
284
+ height: 100%;
285
+ overflow: auto;
286
+ color: black;
287
+ background-color: rgba(0, 0, 0, 0.8);
256
288
  }
257
289
  body > footer aside#modal #modal-content { /* modal box */
258
- background-color: #f7f8fa;
259
- margin: auto;
260
- margin-top: 50vh;
261
- transform: translateY(-50%);
262
- padding: 20px 25px 40px; /* top sides bottom */
263
- border: 1px solid #1e262b;
264
- width: 25%;
265
- max-width: 425px;
266
- min-width: 375px;
290
+ background-color: #f7f8fa;
291
+ margin: auto;
292
+ margin-top: 50vh;
293
+ transform: translateY(-50%);
294
+ padding: 20px 25px 40px; /* top sides bottom */
295
+ border: 1px solid #1e262b;
296
+ width: 25%;
297
+ max-width: 425px;
298
+ min-width: 375px;
299
+ }
300
+ body > footer aside#modal #modal-content h2 {
301
+ font-size: 1.6em;
302
+ margin: 1em 0px; /* top/bottom sides */
267
303
  }
268
304
  body > footer aside#modal #modal-content dl {
269
305
  display: grid;
@@ -271,27 +307,23 @@ body > footer aside#modal #modal-content dl {
271
307
  grid-gap: 5px 25px;
272
308
  }
273
309
  body > footer aside#modal #modal-content dl dt {
274
- font-weight: bold;
275
310
  text-align: right;
276
311
  }
277
312
  body > footer aside#modal #modal-content dl dd {
278
313
  text-align: left;
279
- margin-left: 0;
314
+ margin: 0;
280
315
  }
281
316
 
282
317
 
283
318
  /******************************************* Error pages ******************************************/
284
319
 
285
320
  section#error h2 {
286
- color: #ff3333;
321
+ color: #ff3333;
287
322
  }
288
323
  section#error p {
289
- text-align: center;
324
+ text-align: center;
290
325
  }
291
326
  section#error p img {
292
- width: 25%;
293
- margin-bottom: 3em;
294
- }
295
- section#error a {
296
- color: #748ea3;
327
+ width: 25%;
328
+ margin-bottom: 3em;
297
329
  }
@@ -171,7 +171,7 @@ RSpec.describe CoreExtensions::Tree do
171
171
  end
172
172
 
173
173
  describe '#to_s' do
174
- context 'given a 10-nodes Tree' do
174
+ context 'given a Tree' do
175
175
  before do
176
176
  @tree = described_class.new(0.0)
177
177
  @tree.add_child_node('left', 1.0)
@@ -185,27 +185,28 @@ RSpec.describe CoreExtensions::Tree do
185
185
  @tree.child_node('right').add_child_node('right', 3.3)
186
186
  end
187
187
  it 'should return an ASCII representation of the Tree' do
188
- expect(@tree.to_s).to eql(
189
- "VALUE: 0.0\n" \
190
- " * ID: 'left'\n" \
191
- " VALUE: 1.0\n" \
192
- " * ID: 'left'\n" \
193
- " VALUE: 1.1\n" \
194
- " * ID: 'right'\n"\
195
- " VALUE: 1.2\n" \
196
- " * ID: 'middle'\n" \
197
- " VALUE: 2.0\n" \
198
- " * ID: 'middle'\n" \
199
- " VALUE: 2.1\n" \
200
- " * ID: 'right'\n" \
201
- " VALUE: 3.0\n" \
202
- " * ID: 'left'\n" \
203
- " VALUE: 3.1\n" \
204
- " * ID: 'middle'\n" \
205
- " VALUE: 3.2\n" \
206
- " * ID: 'right'\n" \
207
- " VALUE: 3.3\n"
208
- )
188
+ expected_string = <<~END_HEREDOC
189
+ VALUE: 0.0
190
+ * ID: 'left'
191
+ VALUE: 1.0
192
+ * ID: 'left'
193
+ VALUE: 1.1
194
+ * ID: 'right'
195
+ VALUE: 1.2
196
+ * ID: 'middle'
197
+ VALUE: 2.0
198
+ * ID: 'middle'
199
+ VALUE: 2.1
200
+ * ID: 'right'
201
+ VALUE: 3.0
202
+ * ID: 'left'
203
+ VALUE: 3.1
204
+ * ID: 'middle'
205
+ VALUE: 3.2
206
+ * ID: 'right'
207
+ VALUE: 3.3
208
+ END_HEREDOC
209
+ expect(@tree.to_s).to eql(expected_string)
209
210
  end
210
211
  end
211
212
  end
data/spec/spec_helper.rb CHANGED
@@ -41,13 +41,11 @@ RSpec.configure do |config|
41
41
  $LOAD_PATH << File.absolute_path(File.join('..', 'lib'), __dir__)
42
42
 
43
43
  # Load and start SimpleCov to gather code coverage information
44
- unless config.files_to_run.one?
45
- require 'simplecov'
46
- SimpleCov.start do
47
- enable_coverage :branch # measure branches coverage
48
- primary_coverage :branch
49
- minimum_coverage line: 100, branch: 100 # minimal coverage rate to succeed
50
- add_filter 'spec' # exclude 'spec' folder from coverage
51
- end
44
+ require 'simplecov'
45
+ SimpleCov.start do
46
+ enable_coverage :branch # measure branches coverage
47
+ primary_coverage :branch
48
+ minimum_coverage line: 100, branch: 100 # minimal coverage rate to succeed
49
+ add_filter 'spec' # exclude 'spec' folder from coverage
52
50
  end
53
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intranet-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ebling Mis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-05 00:00:00.000000000 Z
11
+ date: 2022-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml