pugin 1.8.0 → 1.8.2

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: a131a610b391cf0318d30878f84519ee02c6c7ee
4
- data.tar.gz: cc47f2e8f9304a5b117652e8040f28f142b37ad3
3
+ metadata.gz: a4003605171e28623ed5871a47b138d3d0ddbfbe
4
+ data.tar.gz: 95f814695e3e164f29453af7379742739d582ac4
5
5
  SHA512:
6
- metadata.gz: 0b96572f136176a7c1fcb10224710090e2b26ab43eb343685d9baba67799e9bc4920b8cc14cb59e5330f853f400760321078748bc34c41dfd1f4eca66646023b
7
- data.tar.gz: 9844ae13b44f52b3d2f9c10ff18e3101eb4c91bdd0e7effe995015426ea9cc5e1a9a80de878b60c0e30a4e7c85f72c52075fe48b7b91c6da8279188dded8a6dc
6
+ metadata.gz: 02f32b8fdd83990f9eac4390791ca1af75a2cb8fa5103b4a5d04ed84f1691da6a89f4f53b89e7678ef325951cc19c9825ac1b457cfb69add4a8ba12988e3e013
7
+ data.tar.gz: 307e139d4dbeec6103c7cbaf0969309af12649a653bdbe90812de4e3f4cdc1679a9bb1f84c7ecaf59b59a7db2fba4b9e3b8679f5ade33a398a8917b3bd7d690d
@@ -1,9 +1,17 @@
1
1
  en:
2
2
  #global people translations
3
3
  house_of_lords: 'House of Lords'
4
+ date:
5
+ day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
6
+ abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
7
+
8
+ # Don't forget the nil at the beginning; there's no such thing as a 0th month
9
+ month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
10
+ abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
4
11
  time:
5
12
  formats:
6
13
  year_only: "%Y"
14
+ default: '%-d %b %Y'
7
15
  pugin:
8
16
  hints:
9
17
  beta: 'beta'
data/lib/pugin.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'pugin/version'
2
2
 
3
3
  module Pugin
4
- ASSET_VERSION = '1.9.1'.freeze
4
+ ASSET_VERSION = '1.9.0'.freeze
5
5
  ASSET_LOCATION_URL = ENV.fetch('ASSET_LOCATION_URL', 'https://s3-eu-west-1.amazonaws.com/web1live.pugin-website')
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://s3-eu-west-1.amazonaws.com/web1live.static-assets-public')
data/lib/pugin/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pugin
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.8.2'.freeze
3
3
  end
@@ -82,8 +82,8 @@ describe 'pugin/people/list/member/_member.html.haml', type: :view do
82
82
  allow(parliament_mp_constituency).to receive(:name).and_return('constituency1')
83
83
 
84
84
  allow(parliament_mp_seat_incumbency).to receive(:current?).and_return(false)
85
- allow(parliament_mp_seat_incumbency).to receive(:start_date).and_return(DateTime.new(2017,2,3,4,5,6))
86
- allow(parliament_mp_seat_incumbency).to receive(:end_date).and_return(DateTime.new(2017,2,3,4,5,6))
85
+ allow(parliament_mp_seat_incumbency).to receive(:start_date).and_return(DateTime.new(2017,2,3,4,0,0))
86
+ allow(parliament_mp_seat_incumbency).to receive(:end_date).and_return(DateTime.new(2018,3,16,3,0,0))
87
87
  allow(parliament_mp_seat_incumbency).to receive(:constituency).and_return(parliament_mp_constituency)
88
88
 
89
89
  allow(parliament_mp_party).to receive(:name).and_return('Green Party')
@@ -103,10 +103,27 @@ describe 'pugin/people/list/member/_member.html.haml', type: :view do
103
103
  render partial: "pugin/people/list/list", collection: @people, as: "people".to_sym
104
104
  expect(response).to include("<a href='/people/123'>parliamentmp1</a>")
105
105
  expect(response).to include("<p>
106
- constituency1 from Fri, 03 Feb 2017 04:05:06 +0000
107
- - Fri, 03 Feb 2017 04:05:06 +0000
106
+ constituency1 from 3 Feb 2017
107
+ - 16 Mar 2018
108
108
  </p>")
109
109
  expect(response).to include("<p>Green Party</p>")
110
110
  end
111
+
112
+ context 'current' do
113
+ before :each do
114
+ allow(@people.first.current_seat_incumbency).to receive(:end_date).and_return(nil)
115
+ end
116
+
117
+ it "renders the parliament MP data" do
118
+ render partial: "pugin/people/list/list", collection: @people, as: "people".to_sym
119
+ expect(response).to include("<a href='/people/123'>parliamentmp1</a>")
120
+ expect(response).to include("<p>
121
+ constituency1 from 3 Feb 2017
122
+ to present
123
+ </p>")
124
+ expect(response).to include("<p>Green Party</p>")
125
+ end
126
+
127
+ end
111
128
  end
112
129
  end
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.8.0
4
+ version: 1.8.2
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-05-09 00:00:00.000000000 Z
11
+ date: 2018-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails