govuk_content_models 46.0.1 → 47.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
  SHA1:
3
- metadata.gz: 6c78e4b54d48bc42b2fb15058a318fd4f9ce976e
4
- data.tar.gz: cf6127e13a47ed70d18812b4b185443dd958a48c
3
+ metadata.gz: d3e6fa5d98ece1b2d76abca5d5744ac30e6f92c3
4
+ data.tar.gz: 20a6d76d5536733dd30f40c576290f58099a457b
5
5
  SHA512:
6
- metadata.gz: 868c68445cc5da65e909d76730de8e4dfc0f5c205e0a65314c23b569430a704ad577034dafbb5f0a1e3f29a84e28a35d304d7ac48c0d44dd4c64628c79894e1b
7
- data.tar.gz: b3fdbbe31b2d407f73f050acdc345c722d1a87cc7268c8991da839f2a9834fbccdf630247334346396536557cc127b7dbe8c80a370807e4f6bab7562814bee75
6
+ metadata.gz: 94250d4c61d7f14fb4c1d007db14cea428fbec244ab8276fe826f7263556882522dd36374ae29c670645e2c4b0f29aec8559afea597a235f2c6172f11f2a03bd
7
+ data.tar.gz: 5dde3b32422e2cc1ffd360698bd61b442f04a9f8ddd055610ec2c0676cd53c721d8b2fcd5957921335f297e216709fe83686a0413f7d9cab9129810b27e45ab7
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 47.0.0
4
+
5
+ - Deprecate `User.collection_name` to specify the user database table - instead, use the `USER_COLLECTION_NAME` environment variable directly.
6
+
3
7
  ## 46.0.1
4
8
 
5
9
  - Downgrade mongoid to 6.1.0 due to a bug caused by 6.1.1 in `SimpleSmartAnswerEdition`.
@@ -8,10 +8,12 @@ class User
8
8
  include Mongoid::Timestamps
9
9
  include GDS::SSO::User
10
10
 
11
- # Let an app configure the collection name to use, e.g. set a constant in an
12
- # initializer
13
- def self.collection_name
14
- defined?(USER_COLLECTION_NAME) ? USER_COLLECTION_NAME : "users"
11
+ # Let an app configure the symbolized collection name to use,
12
+ # e.g. set a constant in an initializer.
13
+ if defined?(USER_COLLECTION_NAME)
14
+ store_in collection: USER_COLLECTION_NAME.to_sym
15
+ else
16
+ store_in collection: :users
15
17
  end
16
18
 
17
19
  field "name", type: String
@@ -1,4 +1,4 @@
1
1
  module GovukContentModels
2
2
  # Changing this causes Jenkins to tag and release the gem into the wild
3
- VERSION = "46.0.1"
3
+ VERSION = "47.0.0"
4
4
  end
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: 46.0.1
4
+ version: 47.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: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bson_ext