|
1 | 1 | FactoryBot.define do
|
2 | 2 | factory :ckan_v26_package, class: CKAN::V26::Package do
|
3 |
| - name "Name" |
4 |
| - title "Title" |
5 |
| - notes "Notes" |
6 |
| - metadata_created "2015-10-06T11:21:26.185852" |
7 |
| - metadata_updated "2018-06-05T12:40:12.239474" |
8 |
| - license_id "uk-ogl" |
9 |
| - geographic_coverage %w[england scotland wales] |
10 |
| - owner_org SecureRandom.uuid |
| 3 | + name { "Name" } |
| 4 | + title { "Title" } |
| 5 | + notes { "Notes" } |
| 6 | + metadata_created { "2015-10-06T11:21:26.185852" } |
| 7 | + metadata_updated { "2018-06-05T12:40:12.239474" } |
| 8 | + license_id { "uk-ogl" } |
| 9 | + geographic_coverage { %w[england scotland wales] } |
| 10 | + owner_org { SecureRandom.uuid } |
11 | 11 |
|
12 |
| - add_attribute("theme-primary", "Environment & Fisheries") |
13 |
| - add_attribute("contact-name", "Mr. Contact") |
14 |
| - add_attribute("contact-email", "[email protected]") |
15 |
| - add_attribute("foi-name", "Mr. FOI") |
16 |
| - add_attribute("foi-email", "[email protected]") |
17 |
| - add_attribute("foi-web", "http://foi.com") |
18 |
| - add_attribute("schema", [{ |
19 |
| - "url" => "https://github.com/datagovuk/schemas/tree/master/organogram", |
20 |
| - "id" => "d3c0b23f-6979-45e4-88ed-d2ab59b005d0", |
21 |
| - "title" => "Organisation structure including senior roles & salaries (org chart / organogram for central government departments and agencies)", |
22 |
| - }]) |
| 12 | + add_attribute("theme-primary") { "Environment & Fisheries" } |
| 13 | + add_attribute("contact-name") { "Mr. Contact" } |
| 14 | + add_attribute("contact-email") { "[email protected]" } |
| 15 | + add_attribute("foi-name") { "Mr. FOI" } |
| 16 | + add_attribute("foi-email") { "[email protected]" } |
| 17 | + add_attribute("foi-web") { "http://foi.com" } |
| 18 | + add_attribute("schema") do |
| 19 | + [{ |
| 20 | + "url" => "https://github.com/datagovuk/schemas/tree/master/organogram", |
| 21 | + "id" => "d3c0b23f-6979-45e4-88ed-d2ab59b005d0", |
| 22 | + "title" => "Organisation structure including senior roles & salaries (org chart / organogram for central government departments and agencies)", |
| 23 | + }] |
| 24 | + end |
23 | 25 |
|
24 | 26 | extras do
|
25 | 27 | [{ "licence" => "Open Government Licence 3.0 (United Kingdom)" }]
|
26 | 28 | end
|
27 | 29 |
|
28 | 30 | trait :inspire do
|
29 |
| - add_attribute("access_constraints", "[\"There are no public access constraints to this data. Use of this data is subject to the licence identified.\"]") |
30 |
| - add_attribute("bbox-east-long", "2.072") |
31 |
| - add_attribute("bbox-north-lat", "55.816") |
32 |
| - add_attribute("bbox-south-lat", "49.943") |
33 |
| - add_attribute("bbox-west-long", "-6.236") |
34 |
| - add_attribute("coupled-resource", "[]") |
35 |
| - add_attribute("dataset-reference-date", "[{\"type\": \"creation\", \"value\": \"2004-01-01\"}, {\"type\": \"revision\", \"value\": \"2018-04-30\"}]") |
36 |
| - add_attribute("frequency-of-update", "quarterly") |
37 |
| - add_attribute("harvest_object_id", SecureRandom.uuid) |
38 |
| - add_attribute("harvest_source_reference", SecureRandom.uuid) |
39 |
| - add_attribute("import_source", "harvest") |
40 |
| - add_attribute("metadata-date", "2018-06-05") |
41 |
| - add_attribute("metadata-language", "eng") |
42 |
| - add_attribute("provider", "") |
43 |
| - add_attribute("resource-type", "dataset") |
44 |
| - add_attribute("responsible-party", "Environment Agency (pointOfContact)") |
45 |
| - add_attribute("spatial", "{\"type\":\"Polygon\",\"coordinates\":[[[2.072, 49.943],[2.072, 55.816], [-6.236, 55.816], [-6.236, 49.943], [2.072, 49.943]]]}") |
46 |
| - add_attribute("spatial-data-service-type", "") |
47 |
| - add_attribute("spatial-reference-system", "http://www.opengis.net/def/crs/EPSG/0/27700") |
48 |
| - add_attribute("guid", SecureRandom.uuid) |
| 31 | + add_attribute("access_constraints") { "[\"There are no public access constraints to this data. Use of this data is subject to the licence identified.\"]" } |
| 32 | + add_attribute("bbox-east-long") { "2.072" } |
| 33 | + add_attribute("bbox-north-lat") { "55.816" } |
| 34 | + add_attribute("bbox-south-lat") { "49.943" } |
| 35 | + add_attribute("bbox-west-long") { "-6.236" } |
| 36 | + add_attribute("coupled-resource") { "[]" } |
| 37 | + add_attribute("dataset-reference-date") { "[{\"type\": \"creation\", \"value\": \"2004-01-01\"}, {\"type\": \"revision\", \"value\": \"2018-04-30\"}]" } |
| 38 | + add_attribute("frequency-of-update") { "quarterly" } |
| 39 | + add_attribute("harvest_object_id") { SecureRandom.uuid } |
| 40 | + add_attribute("harvest_source_reference") { SecureRandom.uuid } |
| 41 | + add_attribute("import_source") { "harvest" } |
| 42 | + add_attribute("metadata-date") { "2018-06-05" } |
| 43 | + add_attribute("metadata-language") { "eng" } |
| 44 | + add_attribute("provider") { "" } |
| 45 | + add_attribute("resource-type") { "dataset" } |
| 46 | + add_attribute("responsible-party") { "Environment Agency (pointOfContact)" } |
| 47 | + add_attribute("spatial") { "{\"type\":\"Polygon\",\"coordinates\":[[[2.072, 49.943],[2.072, 55.816], [-6.236, 55.816], [-6.236, 49.943], [2.072, 49.943]]]}" } |
| 48 | + add_attribute("spatial-data-service-type") { "" } |
| 49 | + add_attribute("spatial-reference-system") { "http://www.opengis.net/def/crs/EPSG/0/27700" } |
| 50 | + add_attribute("guid") { SecureRandom.uuid } |
49 | 51 | end
|
50 | 52 |
|
51 | 53 | trait :harvested do
|
|
0 commit comments