govuk_content_models 32.3.1 → 33.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: 8e75f59fef5d3caee38b688aa74a69bb943d674b
4
- data.tar.gz: 96342ab89274b94a31aebaea6e138d5fd2f0fc1a
3
+ metadata.gz: ccc127a5ceb4e2937cf46d309811a181857a1134
4
+ data.tar.gz: 17c724516231fbd2aa3267e920efa9d919ceee6f
5
5
  SHA512:
6
- metadata.gz: b29a979a656f7132bf9da29ac5c377eb6c3c85203a0d3f14ff0691a2b796dccb5eed5b43d988dba6efad746d60a17f2b2e16bc27832334ccf290973de3874d40
7
- data.tar.gz: 735e18bb02109cfe6ca0d26fbb93394dabae71ab5504afd8dc46f1703711035f6790ff20c159645f85be6038a8fd18526f6ff86466d2edca7901558cd6f8c487
6
+ metadata.gz: 1bf5e48276ea1b721fd299d266196d55cbf69b4409f4bc888bd51d3c8bd164695018052fc60dd13f22e99907d2d95c867d220d0ab82d2c4c147f3386bc8c3042
7
+ data.tar.gz: dce39a0f4b6c0358f59530e3a4236f007aa6f041f16c60e292f43dafe0e79deef75a39f6738baa3d66a05086e73873862c8ee4ccbca79f2d3f4a65d4f29d02ff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 33.0.0
4
+
5
+ - Changes `save_as_task` to `save_as_task!` [#364](https://github.com/alphagov/govuk_content_models/pull/364)
6
+
3
7
  ## 32.3.1
4
8
 
5
9
  - Update the Artefact FactoryGirl definition
@@ -321,12 +321,12 @@ class Artefact
321
321
  # We should use this method when performing save actions from rake tasks,
322
322
  # message queue consumer or any other performed tasks that have no user associated
323
323
  # as we are still interested to know what triggered the action.
324
- def save_as_task(task_name, options = {})
324
+ def save_as_task!(task_name, options = {})
325
325
  default_action = new_record? ? "create" : "update"
326
326
  action_type = options.delete(:action_type) || default_action
327
327
 
328
328
  record_action(action_type, task_name: task_name)
329
- save(options)
329
+ save!(options)
330
330
  end
331
331
 
332
332
  def record_create_action
@@ -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 = "32.3.1"
3
+ VERSION = "33.0.0"
4
4
  end
@@ -93,7 +93,7 @@ class ArtefactActionTest < ActiveSupport::TestCase
93
93
 
94
94
  test "saving a task should record the task action" do
95
95
  @artefact.description = "Updated automatically"
96
- @artefact.save_as_task('TaggingUpdater')
96
+ @artefact.save_as_task!('TaggingUpdater')
97
97
  @artefact.reload
98
98
 
99
99
  assert_equal 2, @artefact.actions.size
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: 32.3.1
4
+ version: 33.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: 2016-03-03 00:00:00.000000000 Z
11
+ date: 2016-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bson_ext