pugin 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/pugin/components/_footer.haml +2 -4
- data/app/views/pugin/layouts/_layout.html.haml +1 -1
- data/lib/pugin/feature/bandiera.rb +7 -1
- data/lib/pugin/version.rb +1 -1
- data/spec/lib/pugin/feature/bandiera_spec.rb +2 -1
- data/spec/views/pugin/components/_footer.html.haml_spec.rb +8 -7
- data/spec/views/pugin/layouts/_layout.html.haml_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a5b6e369134c7091a88ca167a361d95facaddbc
|
|
4
|
+
data.tar.gz: 5c74be1364544a07ce711166f134d6c0cfd30c34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a6eb720e7916fde7a28becdcb9f59d3dfb6c5b1b51ad7891b3ecc03c6f244f5f7275c9c85565f89f0cf6941f43b01845dcb5d1ab087858d516da2bda399d233
|
|
7
|
+
data.tar.gz: a52bdbb2717ad7871e49f0622348654c6bed6a83a8f12035429f1a8078990345c038d8050c32d89fed9c3f35104bb0949ceb8fccf0376221ad7315431f01ecd4
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
.container
|
|
3
3
|
%h2.logo= I18n.t('pugin.components.footer.uk_parliament')
|
|
4
4
|
%ul.list
|
|
5
|
-
%li
|
|
6
|
-
|
|
7
|
-
%li
|
|
8
|
-
%a{:href => 'http://beta.parliament.uk/meta/cookie-policy'}= I18n.t('pugin.components.footer.cookie_policy')
|
|
5
|
+
%li= link_to( I18n.t('pugin.components.footer.current_website'), root_path() )
|
|
6
|
+
%li= link_to( I18n.t('pugin.components.footer.cookie_policy'), meta_cookie_policy_path() )
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
%link{rel: 'alternate', type: alternate[:type], href: alternate[:href]}
|
|
18
18
|
%body
|
|
19
19
|
= render partial: 'pugin/javascript/has_js'
|
|
20
|
-
= render partial: 'pugin/components/status-cookie'
|
|
21
20
|
- if ENV['GTM_KEY']
|
|
22
21
|
= render partial: 'pugin/javascript/google_tag_manager_noscript'
|
|
23
22
|
= render partial: 'pugin/elements/skip-content'
|
|
23
|
+
= render partial: 'pugin/components/status-cookie'
|
|
24
24
|
= render partial: 'pugin/components/status', locals: { status: nil } if Pugin::Feature::StatusBanner.enabled?
|
|
25
25
|
= render 'pugin/components/header'
|
|
26
26
|
= render partial: 'pugin/components/navigation-main' if Pugin::Feature::TopNavigation.enabled?
|
|
@@ -32,6 +32,12 @@ module Pugin
|
|
|
32
32
|
|
|
33
33
|
@features.fetch('show-committees', false)
|
|
34
34
|
end
|
|
35
|
+
def show_government_roles?
|
|
36
|
+
get_features
|
|
37
|
+
|
|
38
|
+
@features.fetch('show-government-roles', false)
|
|
39
|
+
end
|
|
40
|
+
|
|
35
41
|
|
|
36
42
|
|
|
37
43
|
# Reset cached features
|
|
@@ -47,5 +53,5 @@ module Pugin
|
|
|
47
53
|
end
|
|
48
54
|
end
|
|
49
55
|
end
|
|
50
|
-
end
|
|
56
|
+
end
|
|
51
57
|
end
|
data/lib/pugin/version.rb
CHANGED
|
@@ -9,7 +9,8 @@ describe 'The bandiera client feature set' do
|
|
|
9
9
|
'show-election': :election?,
|
|
10
10
|
'show-post-election': :post_election?,
|
|
11
11
|
'show-list-images': :show_list_images?,
|
|
12
|
-
'show-committees': :show_committees
|
|
12
|
+
'show-committees': :show_committees?,
|
|
13
|
+
'show-government-roles': :show_government_roles?
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
method_hash.each do |flag_name, method_name|
|
|
@@ -3,20 +3,21 @@ require 'haml'
|
|
|
3
3
|
|
|
4
4
|
describe 'pugin/components/_footer.html.haml', type: :view do
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
before do
|
|
7
|
+
allow(view).to receive(:root_path).and_return("/")
|
|
8
|
+
allow(view).to receive(:meta_cookie_policy_path).and_return("/meta/cookie-policy")
|
|
9
|
+
|
|
7
10
|
render
|
|
11
|
+
end
|
|
8
12
|
|
|
13
|
+
it 'renders as expected' do
|
|
9
14
|
expect(response).to eq(<<DATA
|
|
10
15
|
<footer>
|
|
11
16
|
<div class='container'>
|
|
12
17
|
<h2 class='logo'>UK Parliament</h2>
|
|
13
18
|
<ul class='list'>
|
|
14
|
-
<li>
|
|
15
|
-
<a href=
|
|
16
|
-
</li>
|
|
17
|
-
<li>
|
|
18
|
-
<a href='http://beta.parliament.uk/meta/cookie-policy'>Cookie Policy</a>
|
|
19
|
-
</li>
|
|
19
|
+
<li><a href="/">Current Parliament.uk website</a></li>
|
|
20
|
+
<li><a href="/meta/cookie-policy">Cookie Policy</a></li>
|
|
20
21
|
</ul>
|
|
21
22
|
</div>
|
|
22
23
|
</footer>
|
|
@@ -20,6 +20,7 @@ describe 'pugin/layouts/_layout.html.haml', type: :view do
|
|
|
20
20
|
allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
|
|
21
21
|
allow(view).to receive(:find_your_constituency_path).and_return("/find-your-constituency")
|
|
22
22
|
allow(view).to receive(:opensearch_description_url).and_return("http://localhost:3000/search/opensearch")
|
|
23
|
+
allow(view).to receive(:root_path).and_return("/")
|
|
23
24
|
allow(view).to receive(:meta_cookie_policy_path).and_return("/meta/cookie-policy")
|
|
24
25
|
end
|
|
25
26
|
|
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.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Rayner
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-10-
|
|
11
|
+
date: 2017-10-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|