govuk_content_models 35.0.1 → 36.0.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 +4 -4
- data/CHANGELOG.md +8 -0
- data/app/models/local_authority.rb +0 -4
- data/lib/govuk_content_models/test_helpers/factories.rb +1 -8
- data/lib/govuk_content_models/test_helpers/local_services.rb +1 -1
- data/lib/govuk_content_models/version.rb +1 -1
- data/test/models/local_authority_test.rb +0 -8
- 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: 78511b72b76121386601a27a3406e48cdbdb12ee
|
|
4
|
+
data.tar.gz: 8b6f3505b3570a4e9015c752ef6b31eaaa3d9917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc472a37b621228b0d1dc12a61a429a38d8ffab42af3d682afbc100a83c32dfeaad62a887cebb5776ecb5cd5d515a196e9efc614544e23f38f581a11a65c7446
|
|
7
|
+
data.tar.gz: 7cfe6d0c2585856f333686db8bf9d1a9055752fdd01f381aae4a19647d7218a61b9932145ac32aeb505614ca8acf73a4c404e8e28b96183fc2a196f6cad1833b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 36.0.0
|
|
4
|
+
|
|
5
|
+
- Remove fields from LocalAuthority
|
|
6
|
+
- `contact_address`
|
|
7
|
+
- `contact_url`
|
|
8
|
+
- `contact_phone`
|
|
9
|
+
- `contact_email`
|
|
10
|
+
|
|
3
11
|
## 35.0.1
|
|
4
12
|
|
|
5
13
|
- Handle saving changes to promotion toggles correctly for existing documents [#381](https://github.com/alphagov/govuk_content_models/pull/381)
|
|
@@ -11,10 +11,6 @@ class LocalAuthority
|
|
|
11
11
|
field :snac, type: String
|
|
12
12
|
field :local_directgov_id, type: Integer
|
|
13
13
|
field :tier, type: String
|
|
14
|
-
field :contact_address, type: Array
|
|
15
|
-
field :contact_url, type: String
|
|
16
|
-
field :contact_phone, type: String
|
|
17
|
-
field :contact_email, type: String
|
|
18
14
|
field :homepage_url, type: String
|
|
19
15
|
|
|
20
16
|
validates_uniqueness_of :snac
|
|
@@ -48,7 +48,7 @@ FactoryGirl.define do
|
|
|
48
48
|
sequence(:slug) { |n| "slug-#{n}" }
|
|
49
49
|
kind Artefact::FORMATS.first
|
|
50
50
|
owning_app 'publisher'
|
|
51
|
-
content_id { SecureRandom.uuid }
|
|
51
|
+
content_id { SecureRandom.uuid }
|
|
52
52
|
|
|
53
53
|
trait :whitehall do
|
|
54
54
|
sequence(:slug) {|n| "government/slug--#{n}"}
|
|
@@ -216,13 +216,6 @@ FactoryGirl.define do
|
|
|
216
216
|
tier "county"
|
|
217
217
|
end
|
|
218
218
|
|
|
219
|
-
factory :local_authority_with_contact, parent: :local_authority do
|
|
220
|
-
contact_address ["line one", "line two", "line three"]
|
|
221
|
-
contact_url "http://www.magic.com/contact"
|
|
222
|
-
contact_phone "0206778654"
|
|
223
|
-
contact_email "contact@local.authority.gov.uk"
|
|
224
|
-
end
|
|
225
|
-
|
|
226
219
|
factory :local_interaction do
|
|
227
220
|
association :local_authority
|
|
228
221
|
url "http://some.council.gov/do.html"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module LocalServicesHelper
|
|
2
2
|
def make_authority(tier, options)
|
|
3
|
-
authority = FactoryGirl.create(:
|
|
3
|
+
authority = FactoryGirl.create(:local_authority,
|
|
4
4
|
snac: options[:snac], tier: tier)
|
|
5
5
|
add_service_interaction(authority, options[:lgsl]) if options[:lgsl]
|
|
6
6
|
authority
|
|
@@ -13,20 +13,12 @@ describe LocalAuthority do
|
|
|
13
13
|
snac: "AA00",
|
|
14
14
|
local_directgov_id: 1,
|
|
15
15
|
tier: "county",
|
|
16
|
-
contact_address: ["Line one", "line two", "line three"],
|
|
17
|
-
contact_url: "http://example.gov/contact",
|
|
18
|
-
contact_phone: "0000000000",
|
|
19
|
-
contact_email: "contact@example.gov",
|
|
20
16
|
homepage_url: 'http://example.gov/')
|
|
21
17
|
authority = LocalAuthority.first
|
|
22
18
|
assert_equal "Example", authority.name
|
|
23
19
|
assert_equal "AA00", authority.snac
|
|
24
20
|
assert_equal 1, authority.local_directgov_id
|
|
25
21
|
assert_equal "county", authority.tier
|
|
26
|
-
assert_equal ["Line one", "line two", "line three"], authority.contact_address
|
|
27
|
-
assert_equal "http://example.gov/contact", authority.contact_url
|
|
28
|
-
assert_equal "0000000000", authority.contact_phone
|
|
29
|
-
assert_equal "contact@example.gov", authority.contact_email
|
|
30
22
|
assert_equal "http://example.gov/", authority.homepage_url
|
|
31
23
|
end
|
|
32
24
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_content_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 36.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Battley
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bson_ext
|