pugin 0.8.4 → 0.8.5

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: 82d7a433e3cafa8d27a408bda3bfe1017c4fe729
4
- data.tar.gz: 9b981ccb0bc1c07aef21177aeb9b10feb6db1bf4
3
+ metadata.gz: eadf3c6054f9428bcb8f2e0a8659e9d6d9b99b90
4
+ data.tar.gz: 67115adf068391fb641faa9e38e25094309a247c
5
5
  SHA512:
6
- metadata.gz: 11b2646045f3de64232ce1605bb78f9c7b1e4c3508527d22964b87ab4d0932ebadb80b3b767de1b31b2b7e4ccf224675a35c870fd15b262c63b546a40ca78b4d
7
- data.tar.gz: 063aea7fae6a32d42f3c6417599a1a00e47fc4d979cffd29f290850508bdfefa87b36d08cd21e5d2adba461dcdf0ed825e8626dac82becfa3a25b8b87b2979f1
6
+ metadata.gz: 93317babc8acd89546fe4be7541e8c3ec2563854979bf091d9738966084de6ecce2e3fc609a1ce9b0250e96bf8bf4caa97591c0ebf8490ae6c65578f65cdf4f1
7
+ data.tar.gz: cafb31ac9b106ccd0892138edebcdd8194b5968b58956d27ffbad0dc4a1cdd31a5f11bb31e55d5b6236d9cdfa66cff913d6e528541589930d6b81a356e35aa13
@@ -2,7 +2,7 @@
2
2
  .container
3
3
  %ul
4
4
  %li
5
- = link_to(I18n.t('pugin.components.navigation-main.item_1'), house_members_current_a_z_letter_path(HousesHelper.commons_id, 'a'))
5
+ = link_to(I18n.t('pugin.components.navigation-main.item_1'), mps_path)
6
6
  %li
7
7
  = link_to(I18n.t('pugin.components.navigation-main.item_2'), house_members_current_a_z_letter_path(HousesHelper.lords_id, 'a'))
8
8
  %li
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '0.8.4'.freeze
2
+ VERSION = '0.8.5'.freeze
3
3
  end
@@ -0,0 +1,24 @@
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
+ HousesHelper = Class.new
8
+ allow(HousesHelper).to receive(:commons_id).and_return('123')
9
+ allow(HousesHelper).to receive(:lords_id).and_return('456')
10
+ 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")
12
+ 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/")
14
+ end
15
+
16
+ it 'renders correctly' do
17
+ render
18
+ expect(rendered).to include("<nav aria-label='navigation' class='navigation--main'>")
19
+ expect(rendered).to include('<a href="/mps">MPs</a>')
20
+ expect(rendered).to include('<a href="houses/456/members/current/a-z/a">Lords</a>')
21
+ expect(rendered).to include('<a href="constituencies/current/a-z/a">Constituencies</a>')
22
+ expect(rendered).to include('<a href="houses/123/parties/current/">Parties and groups</a>')
23
+ end
24
+ end
@@ -6,11 +6,16 @@ describe 'pugin/layouts/pugin.html.haml', type: :view do
6
6
  let(:person) { double('Grom::Node') }
7
7
 
8
8
  before :each do
9
- HousesHelper = Class.new
10
9
  allow(person).to receive(:name).and_return('Jane Smith')
11
10
  allow(person).to receive(:position).and_return('Minister for Tests')
12
11
  allow(person).to receive(:id).and_return('123')
12
+ HousesHelper = Class.new
13
13
  allow(HousesHelper).to receive(:commons_id).and_return('123')
14
+ allow(HousesHelper).to receive(:lords_id).and_return('456')
15
+ allow(view).to receive(:mps_path).and_return("/mps")
16
+ allow(view).to receive(:house_members_current_a_z_letter_path).and_return("houses/#{HousesHelper.lords_id}/members/current/a-z/a")
17
+ allow(view).to receive(:constituencies_current_a_z_letter_path).and_return("constituencies/current/a-z/a")
18
+ allow(view).to receive(:house_parties_current_path).and_return("houses/#{HousesHelper.commons_id}/parties/current/")
14
19
  end
15
20
 
16
21
  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.8.4
4
+ version: 0.8.5
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-06-21 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -291,6 +291,7 @@ files:
291
291
  - spec/views/pugin/components/_footer.html.haml_spec.rb
292
292
  - spec/views/pugin/components/_header.html.haml_spec.rb
293
293
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
294
+ - spec/views/pugin/components/_navigation-main.html.haml_spec.rb
294
295
  - spec/views/pugin/components/_status.html.haml_spec.rb
295
296
  - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
296
297
  - spec/views/pugin/elements/_list.html.haml_spec.rb
@@ -318,79 +319,80 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
319
  version: '0'
319
320
  requirements: []
320
321
  rubyforge_project:
321
- rubygems_version: 2.6.10
322
+ rubygems_version: 2.6.8
322
323
  signing_key:
323
324
  specification_version: 4
324
325
  summary: Pugin is a component-based pattern design library for UK Parliament microservices.
325
326
  test_files:
326
- - spec/dummy/app/assets/config/manifest.js
327
- - spec/dummy/app/assets/javascripts/application.js
328
- - spec/dummy/app/assets/javascripts/cable.js
329
- - spec/dummy/app/assets/stylesheets/application.css
330
- - spec/dummy/app/channels/application_cable/channel.rb
331
- - spec/dummy/app/channels/application_cable/connection.rb
332
- - spec/dummy/app/controllers/application_controller.rb
333
- - spec/dummy/app/helpers/application_helper.rb
334
- - spec/dummy/app/jobs/application_job.rb
335
- - spec/dummy/app/mailers/application_mailer.rb
336
- - spec/dummy/app/models/application_record.rb
337
- - spec/dummy/app/views/layouts/application.html.erb
338
- - spec/dummy/app/views/layouts/mailer.html.erb
339
- - spec/dummy/app/views/layouts/mailer.text.erb
340
- - spec/dummy/bin/bundle
341
- - spec/dummy/bin/rails
342
- - spec/dummy/bin/rake
343
- - spec/dummy/bin/setup
344
- - spec/dummy/bin/update
345
- - spec/dummy/config/application.rb
327
+ - spec/spec_helper.rb
328
+ - spec/pugin_spec.rb
329
+ - spec/dummy/db/schema.rb
330
+ - spec/dummy/config/spring.rb
346
331
  - spec/dummy/config/boot.rb
347
332
  - spec/dummy/config/cable.yml
333
+ - spec/dummy/config/routes.rb
348
334
  - spec/dummy/config/database.yml
335
+ - spec/dummy/config/puma.rb
336
+ - spec/dummy/config/secrets.yml
337
+ - spec/dummy/config/application.rb
349
338
  - spec/dummy/config/environment.rb
350
- - spec/dummy/config/environments/development.rb
351
- - spec/dummy/config/environments/production.rb
352
- - spec/dummy/config/environments/test.rb
353
- - spec/dummy/config/initializers/application_controller_renderer.rb
339
+ - spec/dummy/config/initializers/session_store.rb
354
340
  - spec/dummy/config/initializers/assets.rb
355
- - spec/dummy/config/initializers/backtrace_silencers.rb
356
341
  - spec/dummy/config/initializers/cookies_serializer.rb
342
+ - spec/dummy/config/initializers/wrap_parameters.rb
343
+ - spec/dummy/config/initializers/mime_types.rb
344
+ - spec/dummy/config/initializers/backtrace_silencers.rb
357
345
  - spec/dummy/config/initializers/filter_parameter_logging.rb
346
+ - spec/dummy/config/initializers/application_controller_renderer.rb
358
347
  - spec/dummy/config/initializers/inflections.rb
359
- - spec/dummy/config/initializers/mime_types.rb
360
348
  - spec/dummy/config/initializers/new_framework_defaults.rb
361
- - spec/dummy/config/initializers/session_store.rb
362
- - spec/dummy/config/initializers/wrap_parameters.rb
349
+ - spec/dummy/config/environments/development.rb
350
+ - spec/dummy/config/environments/production.rb
351
+ - spec/dummy/config/environments/test.rb
363
352
  - spec/dummy/config/locales/en.yml
364
- - spec/dummy/config/puma.rb
365
- - spec/dummy/config/routes.rb
366
- - spec/dummy/config/secrets.yml
367
- - spec/dummy/config/spring.rb
353
+ - spec/dummy/Rakefile
354
+ - spec/dummy/app/helpers/application_helper.rb
355
+ - spec/dummy/app/jobs/application_job.rb
356
+ - spec/dummy/app/assets/javascripts/cable.js
357
+ - spec/dummy/app/assets/javascripts/application.js
358
+ - spec/dummy/app/assets/config/manifest.js
359
+ - spec/dummy/app/assets/stylesheets/application.css
360
+ - spec/dummy/app/models/application_record.rb
361
+ - spec/dummy/app/controllers/application_controller.rb
362
+ - spec/dummy/app/channels/application_cable/channel.rb
363
+ - spec/dummy/app/channels/application_cable/connection.rb
364
+ - spec/dummy/app/mailers/application_mailer.rb
365
+ - spec/dummy/app/views/layouts/mailer.html.erb
366
+ - spec/dummy/app/views/layouts/application.html.erb
367
+ - spec/dummy/app/views/layouts/mailer.text.erb
368
368
  - spec/dummy/config.ru
369
- - spec/dummy/db/schema.rb
370
- - spec/dummy/public/404.html
371
- - spec/dummy/public/422.html
369
+ - spec/dummy/public/favicon.ico
372
370
  - spec/dummy/public/500.html
373
- - spec/dummy/public/apple-touch-icon-precomposed.png
371
+ - spec/dummy/public/404.html
374
372
  - spec/dummy/public/apple-touch-icon.png
375
- - spec/dummy/public/favicon.ico
376
- - spec/dummy/Rakefile
377
- - spec/lib/pugin/feature/bandiera_spec.rb
378
- - spec/lib/pugin/feature/simple_feature_spec.rb
379
- - spec/lib/pugin/feature/status_banner_spec.rb
380
- - spec/lib/pugin/feature/top_navigation_spec.rb
373
+ - spec/dummy/public/apple-touch-icon-precomposed.png
374
+ - spec/dummy/public/422.html
375
+ - spec/dummy/bin/rake
376
+ - spec/dummy/bin/update
377
+ - spec/dummy/bin/setup
378
+ - spec/dummy/bin/bundle
379
+ - spec/dummy/bin/rails
381
380
  - spec/lib/pugin/feature_spec.rb
382
381
  - spec/lib/pugin/helpers/controller_helpers_spec.rb
382
+ - spec/lib/pugin/feature/status_banner_spec.rb
383
+ - spec/lib/pugin/feature/top_navigation_spec.rb
384
+ - spec/lib/pugin/feature/simple_feature_spec.rb
385
+ - spec/lib/pugin/feature/bandiera_spec.rb
383
386
  - spec/pugin/engine_spec.rb
384
- - spec/pugin_spec.rb
385
- - spec/spec_helper.rb
387
+ - spec/views/pugin/layouts/pugin.html.haml_spec.rb
386
388
  - spec/views/pugin/cards/_person-list.html.haml_spec.rb
387
- - spec/views/pugin/components/_footer.html.haml_spec.rb
389
+ - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
390
+ - spec/views/pugin/components/_status.html.haml_spec.rb
388
391
  - spec/views/pugin/components/_header.html.haml_spec.rb
389
392
  - spec/views/pugin/components/_navigation-letter.html.haml_spec.rb
390
- - spec/views/pugin/components/_status.html.haml_spec.rb
391
- - spec/views/pugin/constituencies/list/_list.html.haml_spec.rb
393
+ - spec/views/pugin/components/_footer.html.haml_spec.rb
394
+ - spec/views/pugin/components/_navigation-main.html.haml_spec.rb
392
395
  - spec/views/pugin/elements/_list.html.haml_spec.rb
393
- - spec/views/pugin/layouts/pugin.html.haml_spec.rb
394
396
  - spec/views/pugin/people/list/_list.html.haml
395
397
  - spec/views/pugin/people/list/lord/_lord.html.haml
396
398
  - spec/views/pugin/people/list/member/_member.html.haml