ama_layout 11.2.0 → 11.5.1

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: be475124a8106fe62f2b86a83bff16976e9f0833d06c6e919794ec43f45ffdca
4
- data.tar.gz: 4871ba936e915a8152f25a785eeb12a1f69e1d1521d6aa5c7af6037383ebdeef
3
+ metadata.gz: 20619d683b9ab2f2fc03bd815dadf32b2cb8348762bde70084104215ca28fb5a
4
+ data.tar.gz: 433011e1f213103f7f513e08a2b23770582c1c28781d21fe1981f4a90232fa42
5
5
  SHA512:
6
- metadata.gz: 1d3762084d76ecc3647cc40fc0c516596067647b99f6dfb939edaa25c99abb40ffa680e69109b12401178b39dfbf5da29c0530153aca5c3f676ce56c4806b207
7
- data.tar.gz: f3249c93b5d27bb95e61e0d3b2a21a62b727c2ef7cf224e0b99d6b63e5db0b19da8ca1daad608e3f7fa6316eb34fa098a8733a3cc6b4a1fe686633106cf68faf
6
+ metadata.gz: bff60455e24a61418ed48611279d1d0c509854028b162bcd17dc2d935fd7e63485c707f4bd4eb6c27a2648c7c6a4bc4165fad5d3c4af676c4815a770c53ad8ff
7
+ data.tar.gz: 31063fc86bafbcbaab01e39b2acc2928ca1b48ad0ca4745cf701c333ff7ae4249c49543a4e7b02dc9980859793a9e4d3ae4c48506ea5bd53d64cf6ed670377ec
@@ -21,13 +21,12 @@ jobs:
21
21
  uses: actions/setup-node@v1
22
22
  with:
23
23
  node-version: '10.13.0'
24
- - name: Set up Ruby 2.5
24
+ - name: Set up Ruby
25
25
  uses: ruby/setup-ruby@v1
26
26
  with:
27
- ruby-version: '2.5.1'
28
- bundler: '1.17.3'
27
+ ruby-version: 2.7
29
28
  - name: Install Bundler
30
- run: gem install bundler -v '~> 1.17.3'
29
+ run: gem install bundler
31
30
  - name: Install Danger
32
31
  run: gem install danger -v 7.0.1
33
32
  - name: Execute Danger
@@ -38,8 +37,8 @@ jobs:
38
37
  run: sudo apt-get install libsqlite3-dev
39
38
  - name: Install Ruby Dependencies
40
39
  run: |
41
- bundle _1.17.3_ --version
42
- bundle _1.17.3_ config set path 'vendor/bundle'
43
- bundle _1.17.3_ install --jobs 4 --retry 3
40
+ bundle --version
41
+ bundle config set path 'vendor/bundle'
42
+ bundle install --jobs 4 --retry 3
44
43
  - name: Run Tests
45
- run: bundle _1.17.3_ exec rake
44
+ run: bundle exec rake
data/README.md CHANGED
@@ -98,9 +98,9 @@ Custom Navigation yaml file used to set all navigation:
98
98
  "Renew":
99
99
  link: "<%= Rails.configuration.youraccount_site %>/renew"
100
100
  "Help":
101
- link: "<%= Rails.configuration.youraccount_site %>/help"
101
+ link: "<%= Rails.configuration.amaabca_site %>/help"
102
102
  "Contact Us":
103
- link: "<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information"
103
+ link: "<%= Rails.configuration.amaabca_site %>/contact"
104
104
  target: "_blank"
105
105
 
106
106
 
data/ama_layout.gemspec CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency 'breadcrumbs_on_rails', '>= 3'
37
37
  spec.add_dependency 'browser', '~> 2.0'
38
38
  spec.add_dependency 'foundation-rails', '<= 6.4.3.0'
39
- spec.add_dependency 'rails', '>= 4.2'
39
+ spec.add_dependency 'rails', '>= 4.2', '< 6.1'
40
40
  spec.add_dependency 'redis-rails'
41
41
  spec.add_development_dependency 'bundler'
42
42
  spec.add_development_dependency 'combustion'
@@ -49,24 +49,37 @@ class AMALayout.EmailSuggestion
49
49
 
50
50
  setupEvents: ->
51
51
  $('[type="email"]').on 'blur', (e) =>
52
+ return if $(e.originalEvent.target).data('skip-email-suggestion')
52
53
  $(e.originalEvent.target).mailcheck
53
54
  domains: @domains
54
55
  secondLevelDomains: @secondLevelDomains
55
56
  suggested: (element, suggestion) =>
57
+ event = @buildEvent()
56
58
  text = @suggestionMarkup suggestion.address, suggestion.domain
57
59
  if !$('.email_hint').length
58
- $("<div class='email_hint'>#{text}</div>").insertAfter(element).fadeIn 150
60
+ $("<div class='email_hint'>#{text}</div>").insertAfter(element).show()
59
61
  else
60
62
  $('.email_hint').html text
61
- empty: (element) ->
63
+ window.dispatchEvent(event)
64
+ empty: (element) =>
65
+ event = @buildEvent()
62
66
  $('.email_hint').html ''
67
+ window.dispatchEvent(event)
63
68
 
64
69
  $(document).on 'click', '.email_hint .suggestion a.email_domain', (e) =>
65
70
  @trackUsage()
71
+ event = @buildEvent()
66
72
  email_hint = $(e.originalEvent.target).parents('.email_hint')
67
73
  email = $(email_hint).prevAll('input[type=email]:last')
68
74
  $(email).val $('.suggestion').first().text()
69
75
  $('.email_hint').remove()
76
+ window.dispatchEvent(event)
77
+
78
+ buildEvent: () ->
79
+ if typeof(Event) is 'function'
80
+ new Event('mailcheck')
81
+ else
82
+ document.createEvent('Event').initEvent('mailcheck', true, true)
70
83
 
71
84
  suggestionMarkup: (address, domain) ->
72
85
  "Did you mean " +
@@ -10,7 +10,7 @@
10
10
  <div class="top-bar-right">
11
11
  <ul class="menu" data-responsive-menu="drilldown medium-dropdown">
12
12
  <li>
13
- <a href="<%= Rails.configuration.amaabca_site %>/knowledge-base/articles" target="_blank">Help</a>
13
+ <a href="<%= Rails.configuration.amaabca_site %>/help" target="_blank">Help</a>
14
14
  </li>
15
15
  <%= navigation.top_nav %>
16
16
  </ul>
@@ -0,0 +1,3 @@
1
+ <!-- Font Awesome Pro Kit -->
2
+ <script src="https://kit.fontawesome.com/9e8388a4d5.js" crossorigin="anonymous"></script>
3
+ <!-- End Font Awesome Pro Kit -->
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
  <ul class="link-list">
8
8
  <li class="link-list__item">
9
- <%= link_to "About AMA", "https://ama.ab.ca/about-ama/", class: "link-list__link--white" %>
9
+ <%= link_to "About AMA", "#{Rails.configuration.amaabca_site}/about", class: "link-list__link--white" %>
10
10
  </li>
11
11
  <li class="link-list__item">
12
12
  <%= link_to "Careers", "http://careers.ama.ab.ca/", class: "link-list__link--white" %>
@@ -22,13 +22,13 @@
22
22
  </div>
23
23
  <ul class="link-list">
24
24
  <li class="link-list__item">
25
- <%= link_to "Contact Us", "https://ama.ab.ca/about-ama/contact-us/", class: "link-list__link--white" %>
25
+ <%= link_to "Contact Us", "#{Rails.configuration.amaabca_site}/contact", class: "link-list__link--white" %>
26
26
  </li>
27
27
  <li class="link-list__item">
28
- <%= link_to "Locations", "https://ama.ab.ca/centre-locations-hours/", class: "link-list__link--white" %>
28
+ <%= link_to "Locations", "#{Rails.configuration.amaabca_site}/centres", class: "link-list__link--white" %>
29
29
  </li>
30
30
  <li class="link-list__item">
31
- <%= link_to "Social Media", "https://ama.ab.ca/about-ama/social-media/", class: "link-list__link--white" %>
31
+ <%= link_to "Social Media", "#{Rails.configuration.amaabca_site}/contact", class: "link-list__link--white" %>
32
32
  </li>
33
33
  </ul>
34
34
  </div>
@@ -38,16 +38,16 @@
38
38
  </div>
39
39
  <ul class="link-list">
40
40
  <li class="link-list__item">
41
- <%= link_to "Blog", "https://ama.ab.ca/blog/", class: "link-list__link--white" %>
41
+ <%= link_to "Blog", "#{Rails.configuration.amaabca_site}/help", class: "link-list__link--white" %>
42
42
  </li>
43
43
  <li class="link-list__item">
44
- <%= link_to "Knowledge Base", "https://ama.ab.ca/knowledge-base/", class: "link-list__link--white" %>
44
+ <%= link_to "Knowledge Base", "#{Rails.configuration.amaabca_site}/help", class: "link-list__link--white" %>
45
45
  </li>
46
46
  <li class="link-list__item">
47
47
  <%= link_to "Email Newsletters", "https://youraccount.ama.ab.ca/subscriptions", class: "link-list__link--white" %>
48
48
  </li>
49
49
  <li class="link-list__item">
50
- <%= link_to "Site Map", "https://ama.ab.ca/about-ama/site-map/", class: "link-list__link--white" %>
50
+ <%= link_to "Site Map", "#{Rails.configuration.amaabca_site}/sitemap", class: "link-list__link--white" %>
51
51
  </li>
52
52
  </ul>
53
53
  </div>
@@ -57,10 +57,10 @@
57
57
  </div>
58
58
  <ul class="link-list">
59
59
  <li class="link-list__item">
60
- <%= link_to "Privacy Policy", "https://ama.ab.ca/about-ama/privacy-policy/", class: "link-list__link--white" %>
60
+ <%= link_to "Privacy Policy", "#{Rails.configuration.amaabca_site}/privacy-policy", class: "link-list__link--white" %>
61
61
  </li>
62
62
  <li class="link-list__item">
63
- <%= link_to "Terms & Conditions", "https://ama.ab.ca/about-ama/terms-conditions/", class: "link-list__link--white" %>
63
+ <%= link_to "Terms & Conditions", "#{Rails.configuration.amaabca_site}/terms-conditions", class: "link-list__link--white" %>
64
64
  </li>
65
65
  </ul>
66
66
  </div>
@@ -12,10 +12,10 @@
12
12
  <a class="side-nav__link" href="http://amaroadreports.ca/">AMA Road Reports</a>
13
13
  </li>
14
14
  <li class="side-nav__item">
15
- <a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/knowledge-base/articles" target="_blank">Help</a>
15
+ <a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/help" target="_blank">Help</a>
16
16
  </li>
17
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>
18
+ <a class="side-nav__link" href="<%= Rails.configuration.amaabca_site %>/contact">Contact Us</a>
19
19
  </li>
20
20
  </ul>
21
21
  </div>
@@ -12,10 +12,10 @@
12
12
  <ul class="menu" data-responsive-menu="drilldown medium-dropdown">
13
13
  <%= navigation.notification_icon %>
14
14
  <li>
15
- <a href="<%= Rails.configuration.amaabca_site %>/knowledge-base/articles" target="_blank">Help</a>
15
+ <a href="<%= Rails.configuration.amaabca_site %>/help" target="_blank">Help</a>
16
16
  </li>
17
17
  <li>
18
- <a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
18
+ <a href="<%= Rails.configuration.amaabca_site %>/contact">Contact Us</a>
19
19
  </li>
20
20
  <%= navigation.account_toggle(self) %>
21
21
  <%= navigation.top_nav %>
@@ -0,0 +1,3 @@
1
+ <!-- Font Awesome Pro Kit -->
2
+ <script src="https://kit.fontawesome.com/9e8388a4d5.js" crossorigin="anonymous"></script>
3
+ <!-- End Font Awesome Pro Kit -->
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
  <ul class="link-list">
8
8
  <li class="link-list__item">
9
- <%= link_to "About AMA", "https://ama.ab.ca/about-ama/", class: "link-list__link--white" %>
9
+ <%= link_to "About AMA", "#{Rails.configuration.amaabca_site}/about", class: "link-list__link--white" %>
10
10
  </li>
11
11
  <li class="link-list__item">
12
12
  <%= link_to "Careers", "http://careers.ama.ab.ca/", class: "link-list__link--white" %>
@@ -22,13 +22,13 @@
22
22
  </div>
23
23
  <ul class="link-list">
24
24
  <li class="link-list__item">
25
- <%= link_to "Contact Us", "https://ama.ab.ca/about-ama/contact-us/", class: "link-list__link--white" %>
25
+ <%= link_to "Contact Us", "#{Rails.configuration.amaabca_site}/contact", class: "link-list__link--white" %>
26
26
  </li>
27
27
  <li class="link-list__item">
28
- <%= link_to "Locations", "https://ama.ab.ca/centre-locations-hours/", class: "link-list__link--white" %>
28
+ <%= link_to "Locations", "#{Rails.configuration.amaabca_site}/centres", class: "link-list__link--white" %>
29
29
  </li>
30
30
  <li class="link-list__item">
31
- <%= link_to "Social Media", "https://ama.ab.ca/about-ama/social-media/", class: "link-list__link--white" %>
31
+ <%= link_to "Social Media", "#{Rails.configuration.amaabca_site}/contact", class: "link-list__link--white" %>
32
32
  </li>
33
33
  </ul>
34
34
  </div>
@@ -38,16 +38,16 @@
38
38
  </div>
39
39
  <ul class="link-list">
40
40
  <li class="link-list__item">
41
- <%= link_to "Blog", "https://ama.ab.ca/blog/", class: "link-list__link--white" %>
41
+ <%= link_to "Blog", "#{Rails.configuration.amaabca_site}/help", class: "link-list__link--white" %>
42
42
  </li>
43
43
  <li class="link-list__item">
44
- <%= link_to "Knowledge Base", "https://ama.ab.ca/knowledge-base/", class: "link-list__link--white" %>
44
+ <%= link_to "Knowledge Base", "#{Rails.configuration.amaabca_site}/help", class: "link-list__link--white" %>
45
45
  </li>
46
46
  <li class="link-list__item">
47
47
  <%= link_to "Email Newsletters", "https://youraccount.ama.ab.ca/subscriptions", class: "link-list__link--white" %>
48
48
  </li>
49
49
  <li class="link-list__item">
50
- <%= link_to "Site Map", "https://ama.ab.ca/about-ama/site-map/", class: "link-list__link--white" %>
50
+ <%= link_to "Site Map", "#{Rails.configuration.amaabca_site}/sitemap/", class: "link-list__link--white" %>
51
51
  </li>
52
52
  </ul>
53
53
  </div>
@@ -57,10 +57,10 @@
57
57
  </div>
58
58
  <ul class="link-list">
59
59
  <li class="link-list__item">
60
- <%= link_to "Privacy Policy", "https://ama.ab.ca/about-ama/privacy-policy/", class: "link-list__link--white" %>
60
+ <%= link_to "Privacy Policy", "#{Rails.configuration.amaabca_site}/privacy-policy", class: "link-list__link--white" %>
61
61
  </li>
62
62
  <li class="link-list__item">
63
- <%= link_to "Terms & Conditions", "https://ama.ab.ca/about-ama/terms-conditions/", class: "link-list__link--white" %>
63
+ <%= link_to "Terms & Conditions", "#{Rails.configuration.amaabca_site}/terms-conditions", class: "link-list__link--white" %>
64
64
  </li>
65
65
  </ul>
66
66
  </div>
@@ -10,10 +10,10 @@
10
10
  <%= link_to 'AMA Road Reports', 'https://roadreports.ama.ab.ca', class: 'm-side-nav__link' %>
11
11
  </li>
12
12
  <li class="m-side-nav__item">
13
- <%= link_to 'Help', "#{Rails.configuration.amaabca_site}/knowledge-base/articles", class: 'm-side-nav__link' %>
13
+ <%= link_to 'Help', "#{Rails.configuration.amaabca_site}/help", class: 'm-side-nav__link' %>
14
14
  </li>
15
15
  <li class="m-side-nav__item">
16
- <%= link_to 'Contact Us', "#{Rails.configuration.amaabca_site}/membership/contact-us--centre-locations-hours-and-contact-information", class: 'm-side-nav__link' %>
16
+ <%= link_to 'Contact Us', "#{Rails.configuration.amaabca_site}/contact", class: 'm-side-nav__link' %>
17
17
  </li>
18
18
  </ul>
19
19
  </div>
@@ -12,10 +12,10 @@
12
12
  <ul class="menu" data-responsive-menu="drilldown medium-dropdown">
13
13
  <%= navigation.notification_icon %>
14
14
  <li>
15
- <a href="<%= Rails.configuration.amaabca_site %>/knowledge-base/articles" target="_blank">Help</a>
15
+ <a href="<%= Rails.configuration.amaabca_site %>/help" target="_blank">Help</a>
16
16
  </li>
17
17
  <li>
18
- <a href="<%= Rails.configuration.amaabca_site %>/membership/contact-us--centre-locations-hours-and-contact-information">Contact Us</a>
18
+ <a href="<%= Rails.configuration.amaabca_site %>/contact">Contact Us</a>
19
19
  </li>
20
20
  <%= navigation.account_toggle(self) %>
21
21
  <%= navigation.top_nav %>
@@ -48,7 +48,8 @@ module AmaLayout
48
48
  end
49
49
 
50
50
  def destroy!
51
- data_store.delete(key) && reload!
51
+ data_store.delete(key)
52
+ reload!
52
53
  end
53
54
 
54
55
  def delete(*digests)
@@ -21,11 +21,11 @@ module AmaLayout
21
21
  end
22
22
 
23
23
  def set(key, value, opts = {})
24
- base.write(key, value, opts) == 'OK'
24
+ base.write(key, value, opts)
25
25
  end
26
26
 
27
27
  def delete(key, opts = {})
28
- base.delete(key, opts) == 1
28
+ base.delete(key, opts)
29
29
  end
30
30
 
31
31
  def transaction
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AmaLayout
4
- VERSION = '11.2.0'
4
+ VERSION = '11.5.1'
5
5
  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
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: 11.2.0
4
+ version: 11.5.1
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-08-17 00:00:00.000000000 Z
16
+ date: 2021-04-19 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
@@ -268,6 +274,7 @@ files:
268
274
  - app/views/ama_layout/v2/_custom_nav_links.html.erb
269
275
  - app/views/ama_layout/v2/_custom_sidebar.html.erb
270
276
  - app/views/ama_layout/v2/_font.html.erb
277
+ - app/views/ama_layout/v2/_font_awesome_pro_kit.html.erb
271
278
  - app/views/ama_layout/v2/_footer.html.erb
272
279
  - app/views/ama_layout/v2/_main_nav_item.html.erb
273
280
  - app/views/ama_layout/v2/_main_top_nav_item.html.erb
@@ -294,6 +301,7 @@ files:
294
301
  - app/views/ama_layout/v3/_custom_nav_links.html.erb
295
302
  - app/views/ama_layout/v3/_custom_sidebar.html.erb
296
303
  - app/views/ama_layout/v3/_font.html.erb
304
+ - app/views/ama_layout/v3/_font_awesome_pro_kit.html.erb
297
305
  - app/views/ama_layout/v3/_footer.html.erb
298
306
  - app/views/ama_layout/v3/_main_nav_item.html.erb
299
307
  - app/views/ama_layout/v3/_main_top_nav_item.html.erb
@@ -388,7 +396,7 @@ homepage: https://github.com/amaabca/ama_layout
388
396
  licenses:
389
397
  - MIT
390
398
  metadata: {}
391
- post_install_message:
399
+ post_install_message:
392
400
  rdoc_options: []
393
401
  require_paths:
394
402
  - lib
@@ -403,8 +411,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
403
411
  - !ruby/object:Gem::Version
404
412
  version: '0'
405
413
  requirements: []
406
- rubygems_version: 3.1.4
407
- signing_key:
414
+ rubygems_version: 3.1.2
415
+ signing_key:
408
416
  specification_version: 4
409
417
  summary: ".ama.ab.ca site layouts"
410
418
  test_files: