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 +4 -4
- data/config/locales/en.yml +8 -0
- data/lib/pugin.rb +1 -1
- data/lib/pugin/version.rb +1 -1
- data/spec/views/pugin/people/list/member/_member.html.haml_spec.rb +21 -4
- 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: a4003605171e28623ed5871a47b138d3d0ddbfbe
|
4
|
+
data.tar.gz: 95f814695e3e164f29453af7379742739d582ac4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f32b8fdd83990f9eac4390791ca1af75a2cb8fa5103b4a5d04ed84f1691da6a89f4f53b89e7678ef325951cc19c9825ac1b457cfb69add4a8ba12988e3e013
|
7
|
+
data.tar.gz: 307e139d4dbeec6103c7cbaf0969309af12649a653bdbe90812de4e3f4cdc1679a9bb1f84c7ecaf59b59a7db2fba4b9e3b8679f5ade33a398a8917b3bd7d690d
|
data/config/locales/en.yml
CHANGED
@@ -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.
|
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
@@ -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,
|
86
|
-
allow(parliament_mp_seat_incumbency).to receive(:end_date).and_return(DateTime.new(
|
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
|
107
|
-
-
|
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.
|
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-
|
11
|
+
date: 2018-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|