pugin 0.9.0 → 1.0.0.pre

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: 3db68c37f4262bf6e04956cd1c23e47ac91b2387
4
- data.tar.gz: 848d39e9671fe898ee99d799ddd54732143ec720
3
+ metadata.gz: 4656f871ceac89f289e1db2e5843dee529908aff
4
+ data.tar.gz: e3732c1459fc3b26f515788076dbfb90ba888399
5
5
  SHA512:
6
- metadata.gz: 685144adb0ae12ada1cadf6c6affbcd4a01cb0a97e2710938e9fd1874787de99a3cec6331cd80b27bf82f7e3cdbc709c16ee63a444a0cc6a1be462485dda76ff
7
- data.tar.gz: 73a6089c5a412bee168455595bd912ab9a3179f4323a635043b844bbcfec924aaaf848ea464928688f37d1408287712163409ac4363dd29e96ba33e18fc62163
6
+ metadata.gz: bceb54541cd46b40b04dc82de1e42bad7a01dc62f8eb8e3f378dbdfed1f3fbf5903186fa606b36d600fc0cf5a43d30c10710d96bd4ff32fc973b545af82502e1
7
+ data.tar.gz: 6882e1da22fd9510fbd98903ea283dd3f821a2515c1b7b4036e91ccfc4c9dee30c2c8c9f0cd37d8bef6d2419558ff11c6bb4819f0c55f2067eea4e5ac2091756
@@ -4,8 +4,8 @@
4
4
  %li
5
5
  = link_to(I18n.t('pugin.components.navigation-main.item_1'), mps_path)
6
6
  %li
7
- = link_to(I18n.t('pugin.components.navigation-main.item_2'), house_members_current_a_z_letter_path(HousesHelper.lords_id, 'a'))
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
8
  %li
9
9
  = link_to(I18n.t('pugin.components.navigation-main.item_4'), constituencies_current_a_z_letter_path('a'))
10
10
  %li
11
- = link_to(I18n.t('pugin.components.navigation-main.item_3'), house_parties_current_path(HousesHelper.commons_id))
11
+ = link_to(I18n.t('pugin.components.navigation-main.item_3'), house_parties_current_path(Parliament::Utils::Helpers::HousesHelper.commons_id))
data/lib/pugin/railtie.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'pugin/view_helpers'
2
2
  module Pugin
3
3
  class Railtie < Rails::Railtie
4
- initializer 'pugin.view_helpers' do
4
+ initializer 'pugin.view_helpers' do
5
5
  ActionView::Base.send(:include, ViewHelpers)
6
6
  end
7
7
  end
8
- end
8
+ end
data/lib/pugin/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '0.9.0'.freeze
2
+ VERSION = '1.0.0.pre'.freeze
3
3
  end
@@ -3,14 +3,22 @@ require 'haml'
3
3
 
4
4
  describe 'pugin/components/_navigation-main.html.haml', type: :view do
5
5
 
6
- before :each do
7
- HousesHelper = Class.new
8
- allow(HousesHelper).to receive(:commons_id).and_return('123')
9
- allow(HousesHelper).to receive(:lords_id).and_return('456')
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')
10
18
  allow(view).to receive(:mps_path).and_return("/mps")
11
- allow(view).to receive(:house_members_current_a_z_letter_path).and_return("houses/#{HousesHelper.lords_id}/members/current/a-z/a")
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")
12
20
  allow(view).to receive(:constituencies_current_a_z_letter_path).and_return("constituencies/current/a-z/a")
13
- allow(view).to receive(:house_parties_current_path).and_return("houses/#{HousesHelper.commons_id}/parties/current/")
21
+ allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
14
22
  end
15
23
 
16
24
  it 'renders correctly' do
@@ -3,13 +3,21 @@ require 'haml'
3
3
 
4
4
  describe 'pugin/layouts/_layout.html.haml', type: :view do
5
5
  before :each do
6
- HousesHelper = Class.new
7
- allow(HousesHelper).to receive(:commons_id).and_return('123')
8
- allow(HousesHelper).to receive(:lords_id).and_return('456')
6
+ module Parliament
7
+ module Utils
8
+ module Helpers
9
+ module HousesHelper
10
+ end
11
+ end
12
+ end
13
+ end
14
+ # Parliament::Utils::Helpers::HousesHelper = Class.new
15
+ allow(Parliament::Utils::Helpers::HousesHelper).to receive(:commons_id).and_return('123')
16
+ allow(Parliament::Utils::Helpers::HousesHelper).to receive(:lords_id).and_return('456')
9
17
  allow(view).to receive(:mps_path).and_return("/mps")
10
- allow(view).to receive(:house_members_current_a_z_letter_path).and_return("houses/#{HousesHelper.lords_id}/members/current/a-z/a")
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")
11
19
  allow(view).to receive(:constituencies_current_a_z_letter_path).and_return("constituencies/current/a-z/a")
12
- allow(view).to receive(:house_parties_current_path).and_return("houses/#{HousesHelper.commons_id}/parties/current/")
20
+ allow(view).to receive(:house_parties_current_path).and_return("houses/#{Parliament::Utils::Helpers::HousesHelper.commons_id}/parties/current/")
13
21
  end
14
22
 
15
23
  it 'renders HAML without errors' 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: 0.9.0
4
+ version: 1.0.0.pre
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-07-25 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -315,9 +315,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
315
315
  version: '0'
316
316
  required_rubygems_version: !ruby/object:Gem::Requirement
317
317
  requirements:
318
- - - ">="
318
+ - - ">"
319
319
  - !ruby/object:Gem::Version
320
- version: '0'
320
+ version: 1.3.1
321
321
  requirements: []
322
322
  rubyforge_project:
323
323
  rubygems_version: 2.6.8