pugin 1.9.3 → 1.9.4

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
  SHA1:
3
- metadata.gz: ebb510cc6d68c860168a5de918b19f6246ee7d71
4
- data.tar.gz: b77732cc776ba2204ba01e13a751024227187ff3
3
+ metadata.gz: 3246715f31f6b86d9d1533066aeae2d2de94ff9c
4
+ data.tar.gz: 973ab9b9f8be37a99242529540d01174054695a6
5
5
  SHA512:
6
- metadata.gz: 65e9598adee17d7a493882a8b949dce6f06290befe460e13b5172362953edfca21aa5f800351f83f1f279d8a7c2a6a5b55612c3a1499dcb6c9d19249b61242e1
7
- data.tar.gz: 006046e981b9abdc12f8b49dd86c8e87bfb7a2102a307ba80959285d990e8a25785944755eaa34f1ed9062ba5a4f8402b91a17a53ec48011bf992cf7a3f32d8b
6
+ metadata.gz: 413363d0a2ae9db72bec03c7eb8da231110fdf287b14257f8b3c93eea51268304fb308271d4503ab5b78778a75ab8b95f18ff1f7858d43529d62ebd8c7ad5da1
7
+ data.tar.gz: d37295264f43a2caa71d43f130399a33529506abc7c3d4484ce530b5f6a341129aed473d5e0c47dd6bcb69d54e00944d5ab58f6dd0909b6b0e9f69b879829dad
@@ -28,7 +28,6 @@
28
28
  = render partial: 'pugin/components/status-cookie'
29
29
  = render partial: 'pugin/components/status', locals: { status: nil } if Pugin::Feature::StatusBanner.enabled?
30
30
  = render 'pugin/components/header'
31
- = render partial: 'pugin/components/navigation-main' if Pugin::Feature::TopNavigation.enabled?
32
31
  %main
33
32
  = yield
34
33
  = render 'pugin/components/footer'
@@ -46,12 +46,6 @@ en:
46
46
  select_letter: "select a letter"
47
47
  showing_results: "Showing results for"
48
48
  all: "all"
49
- navigation-main:
50
- aria_label: "navigation"
51
- item_1: "MPs"
52
- item_2: "Lords"
53
- item_3: "Parties and groups"
54
- item_4: "Constituencies"
55
49
  status-cookie:
56
50
  cookie_content: 'Parliament.uk uses cookies to make the site simpler. %{link}.'
57
51
  about_cookies: 'Find out more about cookies'
@@ -1,7 +1,7 @@
1
1
  require 'pugin/version'
2
2
 
3
3
  module Pugin
4
- ASSET_VERSION = '1.10.2'.freeze
4
+ ASSET_VERSION = '1.10.3'.freeze
5
5
  ASSET_LOCATION_URL = ENV.fetch('ASSET_LOCATION_URL', 'https://static.parliament.uk/pugin')
6
6
  STATIC_ASSET_LOCATION_URL = ENV.fetch('STATIC_ASSET_LOCATION_URL', 'https://s3-eu-west-1.amazonaws.com/web1live.static-assets')
7
7
  STATIC_ASSET_PUBLIC_LOCATION_URL = ENV.fetch('STATIC_ASSET_PUBLIC_LOCATION_URL', 'https://static.parliament.uk/assets-public')
@@ -1,7 +1,6 @@
1
1
  require 'pugin/feature/simple_feature'
2
2
  require 'pugin/feature/status_banner'
3
3
  require 'pugin/feature/global_search'
4
- require 'pugin/feature/top_navigation'
5
4
  require 'pugin/feature/pingdom_feature'
6
5
  require 'pugin/feature/asset_overrides'
7
6
  require 'pugin/feature/bandiera'
@@ -20,14 +20,6 @@ module Pugin
20
20
  Pugin::Feature.disable('GlobalSearch')
21
21
  end
22
22
 
23
- def enable_top_navigation
24
- Pugin::Feature.enable('TopNavigation')
25
- end
26
-
27
- def disable_top_navigation
28
- Pugin::Feature.disable('TopNavigation')
29
- end
30
-
31
23
  def enable_asset_overrides
32
24
  Pugin::Feature.enable('AssetOverrides')
33
25
  end
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '1.9.3'.freeze
2
+ VERSION = '1.9.4'.freeze
3
3
  end
@@ -16,20 +16,12 @@ describe Pugin::Feature::SimpleFeature do
16
16
  it 'only enables that sub class' do
17
17
  expect(Pugin::Feature::SimpleFeature.enabled?).to equal(false)
18
18
 
19
- Pugin::Feature::TopNavigation.enable
20
- expect(Pugin::Feature::TopNavigation.enabled?).to equal(true)
21
19
  expect(Pugin::Feature::SimpleFeature.enabled?).to equal(false)
22
20
 
23
- Pugin::Feature::TopNavigation.disable
24
- expect(Pugin::Feature::TopNavigation.enabled?).to equal(false)
25
-
26
21
  Pugin::Feature::SimpleFeature.enable
27
- expect(Pugin::Feature::TopNavigation.enabled?).to equal(false)
28
22
  expect(Pugin::Feature::SimpleFeature.enabled?).to equal(true)
29
23
 
30
- Pugin::Feature::TopNavigation.enable
31
24
  Pugin::Feature::SimpleFeature.disable
32
- expect(Pugin::Feature::TopNavigation.enabled?).to equal(true)
33
25
  expect(Pugin::Feature::SimpleFeature.enabled?).to equal(false)
34
26
  end
35
27
  end
@@ -48,25 +48,6 @@ describe 'pugin/helpers/controller_helpers.rb' do
48
48
  expect(Pugin::Feature::GlobalSearch.disabled?).to equal(true)
49
49
  end
50
50
  end
51
-
52
- context '#enable_top_navigation' do
53
- it 'enables the top navigation' do
54
- subject.enable_top_navigation
55
- expect(Pugin::Feature::TopNavigation.enabled?).to equal(true)
56
- end
57
- end
58
-
59
- context '#disable_top_navigation' do
60
- before :each do
61
- Pugin::Feature::TopNavigation.enable
62
- end
63
-
64
- it 'disables the top navigation' do
65
- expect(Pugin::Feature::TopNavigation.disabled?).to equal(false)
66
- subject.disable_top_navigation
67
- expect(Pugin::Feature::TopNavigation.disabled?).to equal(true)
68
- end
69
- end
70
51
 
71
52
  context '#reset_bandiera_features' do
72
53
  before :each do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Rayner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-01 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -198,7 +198,6 @@ files:
198
198
  - app/views/pugin/components/_global-search.haml
199
199
  - app/views/pugin/components/_header.haml
200
200
  - app/views/pugin/components/_navigation-letter.haml
201
- - app/views/pugin/components/_navigation-main.haml
202
201
  - app/views/pugin/components/_status-cookie.haml
203
202
  - app/views/pugin/components/_status.haml
204
203
  - app/views/pugin/constituencies/list/_list.html.haml
@@ -238,7 +237,6 @@ files:
238
237
  - lib/pugin/feature/pingdom_feature.rb
239
238
  - lib/pugin/feature/simple_feature.rb
240
239
  - lib/pugin/feature/status_banner.rb
241
- - lib/pugin/feature/top_navigation.rb
242
240
  - lib/pugin/helpers/controller_helpers.rb
243
241
  - lib/pugin/railtie.rb
244
242
  - lib/pugin/version.rb
@@ -301,7 +299,6 @@ files:
301
299
  - spec/lib/pugin/feature/bandiera_spec.rb
302
300
  - spec/lib/pugin/feature/simple_feature_spec.rb
303
301
  - spec/lib/pugin/feature/status_banner_spec.rb
304
- - spec/lib/pugin/feature/top_navigation_spec.rb
305
302
  - spec/lib/pugin/feature_spec.rb
306
303
  - spec/lib/pugin/helpers/controller_helpers_spec.rb
307
304
  - spec/pugin/engine_spec.rb
@@ -312,7 +309,6 @@ files:
312
309
  - spec/views/pugin/components/_footer.html.haml_spec.rb
313
310
  - spec/views/pugin/components/_header.html.haml_spec.rb
314
311
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
315
- - spec/views/pugin/components/_navigation-main.html.haml_spec.rb
316
312
  - spec/views/pugin/components/_status.html.haml_spec.rb
317
313
  - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
318
314
  - spec/views/pugin/elements/_list.html.haml_spec.rb
@@ -403,7 +399,6 @@ test_files:
403
399
  - spec/lib/pugin/feature_spec.rb
404
400
  - spec/lib/pugin/helpers/controller_helpers_spec.rb
405
401
  - spec/lib/pugin/feature/status_banner_spec.rb
406
- - spec/lib/pugin/feature/top_navigation_spec.rb
407
402
  - spec/lib/pugin/feature/simple_feature_spec.rb
408
403
  - spec/lib/pugin/feature/bandiera_spec.rb
409
404
  - spec/lib/pugin/feature/asset_overrides_spec.rb
@@ -415,7 +410,6 @@ test_files:
415
410
  - spec/views/pugin/components/_header.html.haml_spec.rb
416
411
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
417
412
  - spec/views/pugin/components/_footer.html.haml_spec.rb
418
- - spec/views/pugin/components/_navigation-main.html.haml_spec.rb
419
413
  - spec/views/pugin/elements/_list.html.haml_spec.rb
420
414
  - spec/views/pugin/people/list/lord/_lord.html.haml_spec.rb
421
415
  - spec/views/pugin/people/list/member/_member.html.haml_spec.rb
@@ -1,11 +0,0 @@
1
- %nav.navigation--main{aria:{ label: I18n.t('pugin.components.navigation-main.aria_label') } }
2
- .container
3
- %ul
4
- %li
5
- = link_to(I18n.t('pugin.components.navigation-main.item_1'), mps_path)
6
- %li
7
- = link_to(I18n.t('pugin.components.navigation-main.item_2'), house_members_current_a_z_letter_path(Parliament::Utils::Helpers::HousesHelper.lords_id, 'a'))
8
- %li
9
- = link_to(I18n.t('pugin.components.navigation-main.item_4'), find_your_constituency_path)
10
- %li
11
- = link_to(I18n.t('pugin.components.navigation-main.item_3'), house_parties_current_path(Parliament::Utils::Helpers::HousesHelper.commons_id))
@@ -1,6 +0,0 @@
1
- module Pugin
2
- module Feature
3
- class TopNavigation < Pugin::Feature::SimpleFeature
4
- end
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Pugin::Feature::TopNavigation do
4
- it_behaves_like 'a simple pugin feature'
5
- end
@@ -1,32 +0,0 @@
1
- require 'spec_helper'
2
- require 'haml'
3
-
4
- describe 'pugin/components/_navigation-main.html.haml', type: :view do
5
-
6
- before :each do
7
- module Parliament
8
- module Utils
9
- module Helpers
10
- module HousesHelper
11
- end
12
- end
13
- end
14
- end
15
- # Parliament::Utils::Helpers::HousesHelper = Class.new
16
- allow(Parliament::Utils::Helpers::HousesHelper).to receive(:commons_id).and_return('123')
17
- allow(Parliament::Utils::Helpers::HousesHelper).to receive(:lords_id).and_return('456')
18
- allow(view).to receive(:mps_path).and_return("/mps")
19
- allow(view).to receive(:house_members_current_a_z_letter_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.lords_id}/members/current/a-z/a")
20
- allow(view).to receive(:find_your_constituency_path).and_return("/find-your-constituency")
21
- allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
22
- end
23
-
24
- it 'renders correctly' do
25
- render
26
- expect(rendered).to include("<nav aria-label='navigation' class='navigation--main'>")
27
- expect(rendered).to include('<a href="/mps">MPs</a>')
28
- expect(rendered).to include('<a href="houses/456/members/current/a-z/a">Lords</a>')
29
- expect(rendered).to include('<a href="/find-your-constituency">Constituencies</a>')
30
- expect(rendered).to include('<a href="houses/123/parties/current/">Parties and groups</a>')
31
- end
32
- end