govuk_admin_template 6.11.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbf704da073f6b443b231fcfd09348f988dcda95c8225d6fd57b75c1dbbb7002
4
- data.tar.gz: f07dd6f6e383338c4892cb35ec1d0f4d7ad7f1d0704e1c820e7280fd4938ba0e
3
+ metadata.gz: 88240b664824a3bb40acc1af0d550844a390ff74b3d2e355cd0166dbc466f4fc
4
+ data.tar.gz: 5cf398d87526758abbe9d08617e8162b1d02777aac1dc56fa959e93ba45b0ed9
5
5
  SHA512:
6
- metadata.gz: f856727a5238a52a9f978f1237c222f5761c5a61121aa293b914b9155e1b69c22bc9d8770bbb020639efdeeb0a76a6c76d6580b46853f85d9fab3084ab9b5045
7
- data.tar.gz: d1a1bbe49feaddd032561f6e1bd8fef94cb217853e776d4c5a3de0e5c06719a41337b44973374d568f1535f77a6f9a3068e2e9409bf587d28d94a460e9ec57f8
6
+ metadata.gz: cb8cd31f5fb440dff78205032a4b5a5cc6d561080752f368ecc93ac0ec75158b62cbb0c6cc64491c60e5cb4e2a135438774aef5c766aaad54a50f99a07411a5e
7
+ data.tar.gz: e0c474dce0bcaf642c4e3a8a1d81dca7f1c3f4724a8ee3b8ae85ddc51fd738d4ea99cb3c5a27837bc5b0c41e363d6b252824370ee08e23caf017fac42c84593c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 7.0.0
2
+
3
+ * Default styling behaviour determined by GOVUK_ENVIRONMENT env var
4
+
1
5
  # 6.11.0
2
6
 
3
7
  * Drop support for Ruby 3.0
@@ -1,3 +1,3 @@
1
1
  module GovukAdminTemplate
2
- VERSION = "6.11.0".freeze
2
+ VERSION = "7.0.0".freeze
3
3
  end
@@ -8,18 +8,10 @@ module GovukAdminTemplate
8
8
  mattr_accessor :environment_style, :environment_label
9
9
 
10
10
  def self.environment_style
11
- @@environment_style || default_environment_style
11
+ @environment_style ||= ENV["GOVUK_ENVIRONMENT"] == "production" ? "production" : "preview"
12
12
  end
13
13
 
14
14
  def self.environment_label
15
- @@environment_label || environment_style.try(:titleize)
16
- end
17
-
18
- # In development we can't consistently set an environment
19
- # variable, so use a default based on Rails.env
20
- def self.default_environment_style
21
- if Rails.env.development?
22
- "development"
23
- end
15
+ @environment_label ||= ENV.fetch("GOVUK_ENVIRONMENT", "development").titleize
24
16
  end
25
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_admin_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.11.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-04 00:00:00.000000000 Z
11
+ date: 2024-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-sass
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: climate_control
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rspec-rails
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +114,14 @@ dependencies:
100
114
  requirements:
101
115
  - - '='
102
116
  - !ruby/object:Gem::Version
103
- version: 4.17.1
117
+ version: 4.18.0
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - '='
109
123
  - !ruby/object:Gem::Version
110
- version: 4.17.1
124
+ version: 4.18.0
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: sassc-rails
113
127
  requirement: !ruby/object:Gem::Requirement