parliament-grom-decorators 0.6.1 → 0.7.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b4d00b17e37e870eb78571364f2bea58ba45cd5
|
|
4
|
+
data.tar.gz: 31985700c3b0b67a68a0e727c9e61810d4702294
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dafa8894c49b6fcb623a72169857eddf3830f6529673c8e2c214d5524b7dd2ed64d2180bc9e27e94d9b06e481a903c490561decff628b3b12b42abefcd3c4683
|
|
7
|
+
data.tar.gz: 36d4f0d365c3fec08ac0e12589eaf1494943948aa0ce7e28432e86127abff7bfdbb45fa2b09e9cbd884a949ab56d8e875a117354fc081f584fc2484c89581253
|
data/config/locales/en.yml
CHANGED
|
@@ -4,6 +4,8 @@ module Parliament
|
|
|
4
4
|
# Decorator namespace for Grom::Node instances with type: http://id.ukpds.org/schema/FormalBody.
|
|
5
5
|
# rubocop:disable ModuleLength
|
|
6
6
|
module FormalBody
|
|
7
|
+
include Helpers::DateHelper
|
|
8
|
+
|
|
7
9
|
# Checks if Grom::Node has a name.
|
|
8
10
|
#
|
|
9
11
|
# @return [String, String] a string depending on whether or not the Grom::Node has a name.
|
|
@@ -9,7 +9,7 @@ module Parliament
|
|
|
9
9
|
# @example Format a node with an end_date with the date format YYYY-MM-DD
|
|
10
10
|
# "grom_node_instance.date_range('%Y-%m-%d)" #=> "2010-01-01 to 2015-01-01"
|
|
11
11
|
def date_range(date_format: '%-e %b %Y')
|
|
12
|
-
return '
|
|
12
|
+
return I18n.t('date_unavailable') if start_date.nil?
|
|
13
13
|
if end_date
|
|
14
14
|
"#{I18n.l(start_date, format: date_format)} #{I18n.t('to')} #{I18n.l(end_date, format: date_format)}"
|
|
15
15
|
else
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parliament-grom-decorators
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rebecca Appleyard
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-09-
|
|
11
|
+
date: 2017-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
215
215
|
version: '0'
|
|
216
216
|
requirements: []
|
|
217
217
|
rubyforge_project:
|
|
218
|
-
rubygems_version: 2.6.
|
|
218
|
+
rubygems_version: 2.6.8
|
|
219
219
|
signing_key:
|
|
220
220
|
specification_version: 4
|
|
221
221
|
summary: Parliamentary Grom decorator
|