metadata_presenter 2.19.5 → 2.20.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
  SHA256:
3
- metadata.gz: f0d20b5161033659492619628a0c1f26c1a69926193dbea87353a1b3a2a0a984
4
- data.tar.gz: 15940e4f5bbf2656108d89a589535635d31bd2f8f813855b628ee67e4ef9ddf1
3
+ metadata.gz: 4d37f521b151efebea9c3e73254a6ca349499a19e5bf0428c64e8a76f612dff9
4
+ data.tar.gz: 6cfdaa83747659decd5e3d2f9819845bb986a5e8717f0477429e89ab6222144b
5
5
  SHA512:
6
- metadata.gz: 9b3db24698b1637328ba375d2676c903331cab7fcdc1789faeedc4b626b41f685f2a50225ea48f04c378d72be288928322eb24cccff816085dd66784c1d6377b
7
- data.tar.gz: 47f23df2526d20da3066044b4224faee03113375c4654bce63154935b50e8df94cd588196b841a034641f591447577da8d9246dbbf2a1cd6ddb46f5c4fabba18
6
+ metadata.gz: 847ffda48c7f1c52419f47b8a37154d53f3b4ec977f3abaf4a3c2d6ae1c193eac558b9225220f9281959518921d6da8e41a122e6fb16501c8e35f2ad2a38a035
7
+ data.tar.gz: 42abc6cde28dc7ea3256e03caba1fcb5ba1f38799fd2be44a1477db6f93bc3eb02288fe0bd61ea3ae48aa9a6d9f6faddd7a9550ae78442628918f2621d47a17b
data/README.md CHANGED
@@ -97,6 +97,9 @@ The `autocomplete_items` takes the components on a page and retrieves any items
97
97
 
98
98
  `save_and_return_enabled?` method checks whether save and return is enabled in the Runner or Editor app. In the Runner save and return is enabled when the `ENV['SAVE_AND_RETURN']` environment variable is present. In the Editor, save and return enabled can be ascertained by checking the `ServiceConfiguration` table.
99
99
 
100
+ `service_slug_config` method checks whether the user has configured their own service URL. In the Editor this will be a `SERVICE_SLUG` row in the `ServiceConfiguration` table. In the Runner, it will be the `ENV['SERVICE_SLUG']` config.
101
+ If it does not exist, we use the current method of parameterizing the `service_name`.
102
+
100
103
  ## Generate documentation
101
104
 
102
105
  Run `rake doc` and open the doc/index.html
@@ -38,6 +38,8 @@ class MetadataPresenter::Service < MetadataPresenter::Metadata
38
38
  end
39
39
 
40
40
  def service_slug
41
+ return service_slug_config if service_slug_config.present?
42
+
41
43
  service_name.gsub(/['’]/, '').parameterize
42
44
  end
43
45
 
@@ -1,3 +1,3 @@
1
1
  module MetadataPresenter
2
- VERSION = '2.19.5'.freeze
2
+ VERSION = '2.20.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metadata_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.5
4
+ version: 2.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoJ Forms