ndr_ui 3.1.0 → 3.2.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: 3584658f79ff90044cc3e87c60a194ca964d7c59fb257784d90db46b3f7f87c1
4
- data.tar.gz: 607c2995d427226512cbce4eddb889f809edaa11fb6707656bf25b9484921571
3
+ metadata.gz: 948171552053d8201249a7ad4d0b1aff5743a844c01339dfac66f7458307e03f
4
+ data.tar.gz: 27d8fa3cc83c56584f3c5a2caf786216143794b3632d867f1cb8fd25412b76fc
5
5
  SHA512:
6
- metadata.gz: 5bf345b17539ac9d694ba9bb1ffc8a02b4e87effda793384be7e02f672d28fda2ef158d5c1857b8298488a43a46f08be873352972148a04596d11d8e7e980b81
7
- data.tar.gz: 338e557549e9cd6dd5c0d249ff36e316b892830a2662371d557a2b824b8be65f1992b80d2e272d6db16b642a88e2fd7788ae3c50d26ea5e3e576688ea0382fd6
6
+ metadata.gz: d3c9dd26dc4dec27e06208b20f8c606466dd0fff4570e32874b76fd44a9a9b65eba252449f66aeb322f0cb6f00584dd4b7650f8780897b157c2c809a95131c7f
7
+ data.tar.gz: 32d327a35c5656866922cdcf7c0f2a9badcfa47ca53f5a064b85eed5f507ec6c3b76ae1a247072cea612dcc5c2695480130d4ad27a7ffa2cb511e368c13eaaa0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # NdrUi [![Build Status](https://travis-ci.org/PublicHealthEngland/ndr_ui.svg)](https://travis-ci.org/PublicHealthEngland/ndr_ui) [![Gem Version](https://badge.fury.io/rb/ndr_ui.svg)](https://badge.fury.io/rb/ndr_ui) [![Documentation](https://img.shields.io/badge/ndr_ui-docs-blue.svg)](https://www.rubydoc.info/gems/ndr_ui)
1
+ # NdrUi [![Build Status](https://github.com/publichealthengland/ndr_ui/workflows/Test/badge.svg)](https://github.com/publichealthengland/ndr_ui/actions?query=workflow%3Atest) [![Gem Version](https://badge.fury.io/rb/ndr_ui.svg)](https://rubygems.org/gems/ndr_ui) [![Documentation](https://img.shields.io/badge/ndr_ui-docs-blue.svg)](https://www.rubydoc.info/gems/ndr_ui)
2
2
 
3
3
  This is the Public Health England (PHE) National Disease Registration (NDR) User Interface rubygem,
4
4
  providing a set of core features:
@@ -13,7 +13,17 @@ module NdrUi
13
13
  # See the source code for ActionView::Helpers::Tags::Label for more.
14
14
  #
15
15
  # QUESTION: Parameterise the tooltip so we're not just bound to a question_tooltip ?
16
- def label(method, text = nil, **options, &block)
16
+ def label(method, content_or_options = nil, options = nil, &block)
17
+ options ||= {}
18
+
19
+ content_is_options = content_or_options.is_a?(Hash)
20
+ if content_is_options
21
+ options.merge! content_or_options
22
+ text = nil
23
+ else
24
+ text = content_or_options
25
+ end
26
+
17
27
  tooltip_text = options.delete(:tooltip)
18
28
 
19
29
  super(method, text, options) do |builder|
@@ -3,7 +3,7 @@ module NdrUi
3
3
  module CssHelper
4
4
  # This method merges the specified css_classes into the options hash
5
5
  def css_class_options_merge(options, css_classes = [], &block)
6
- options.symbolize_keys!
6
+ options = options.symbolize_keys
7
7
  css_classes += options[:class].split(' ') if options.include?(:class)
8
8
  yield(css_classes) if block_given?
9
9
  options[:class] = css_classes.join(' ') unless css_classes.empty?
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This stores the current version of the NdrUi gem. Use semantic versioning http://semver.org
4
4
  module NdrUi
5
- VERSION = '3.1.0'.freeze
5
+ VERSION = '3.2.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NDR Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-04 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -31,19 +31,19 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '7.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: sass
34
+ name: sprockets
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '4.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '0'
46
+ version: '4.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bootstrap-sass
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: 5.4.5
123
+ version: 5.10.2
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 5.4.5
130
+ version: 5.10.2
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: simplecov
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -156,6 +156,20 @@ dependencies:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
158
  version: 1.1.0
159
+ - !ruby/object:Gem::Dependency
160
+ name: puma
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
159
173
  description: Provides Rails applications with additional support for the Twitter Bootstrap
160
174
  UI framework
161
175
  email: []
@@ -361,14 +375,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
361
375
  requirements:
362
376
  - - ">="
363
377
  - !ruby/object:Gem::Version
364
- version: 2.4.0
378
+ version: 2.6.0
365
379
  required_rubygems_version: !ruby/object:Gem::Requirement
366
380
  requirements:
367
381
  - - ">="
368
382
  - !ruby/object:Gem::Version
369
383
  version: '0'
370
384
  requirements: []
371
- rubygems_version: 3.0.3
385
+ rubygems_version: 3.1.6
372
386
  signing_key:
373
387
  specification_version: 4
374
388
  summary: NDR UI Rails Engine