pugin 1.1.2 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e1de1c2ade9b160907ca841bc484a546361b4a4
4
- data.tar.gz: 980035410a8fc7ba1d423984046a8dd14df75714
3
+ metadata.gz: 971496d5bbc15abad2bc0ac966989fa2989a8c9e
4
+ data.tar.gz: 2169625e1b2fe4f4e027e70a6de30edb122245c0
5
5
  SHA512:
6
- metadata.gz: 0b94f9c82b3fd138014793cc5ea87337cb4472bfba22f819a7f4d02b99d0e46319332cddee76b81c535d2b32af99bf77200476c7ec74a13a0ea2c1f0559f5247
7
- data.tar.gz: 27b493c136cba49f363b0ae0b9efe4f794b44a984866eb4bfef784a3e4c3277248c7f3624fdd289ce88694dcf113812c76344495ac34eda647652d02d582020a
6
+ metadata.gz: 85cd9700373390f58a89cc42ff1591a14557455e33484e57668e365a2991f0220e7d6ce7870d3e31fa8faf2edf962fb10defdea138d8c983d89e7852c6419a2c
7
+ data.tar.gz: f12b6b9231e3ecb84186a19d1280b5a6539272342adcad5a4a84d3ff21d74c747617fed9e9101a999441e3e3fe2946519e607ade2006fe84e70f98ab7220e076
@@ -6,6 +6,7 @@
6
6
  %meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'}
7
7
  %meta{'http-equiv': 'X-UA-Compatible', content: 'IE=edge'}
8
8
  %link{rel: 'shortcut icon', type: 'image/x-icon', href: "#{Pugin::STATIC_ASSET_LOCATION_URL}/favicon.ico"}
9
+ %link{rel: 'search', type: 'application/opensearchdescription+xml', href: opensearch_description_url, title: I18n.t('pugin.layouts.pugin.website_brand')}
9
10
  - if ENV['GTM_KEY']
10
11
  = render partial: 'pugin/javascript/google_tag_manager'
11
12
  - unless Pugin.alternates.empty?
data/lib/pugin/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '1.1.2'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -18,6 +18,7 @@ describe 'pugin/layouts/_layout.html.haml', type: :view do
18
18
  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")
19
19
  allow(view).to receive(:constituencies_current_a_z_letter_path).and_return("constituencies/current/a-z/a")
20
20
  allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
21
+ allow(view).to receive(:opensearch_description_url).and_return("http://localhost:3000/search/opensearch")
21
22
  end
22
23
 
23
24
  it 'renders HAML without errors' do
@@ -25,6 +26,11 @@ describe 'pugin/layouts/_layout.html.haml', type: :view do
25
26
  expect(rendered).to have_title(I18n.t('.pugin.layouts.pugin.website_brand'))
26
27
  end
27
28
 
29
+ it 'renders the OpenSearch auto discovery link tag' do
30
+ render
31
+ expect(rendered).to include("<link href='http://localhost:3000/search/opensearch' rel='search' title='UK Parliament' type='application/opensearchdescription+xml'>")
32
+ end
33
+
28
34
  context 'with Pugin.alternates set' do
29
35
  let(:alternates) do
30
36
  [
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.1.2
4
+ version: 1.2.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-08-23 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails