govuk_content_models 15.1.1 → 15.1.2

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 15.1.2
2
+ * Use string-based keys rather than symbols when manipulating
3
+ tuple hashes for tags on an artefact.
4
+
1
5
  ## 15.1.1
2
6
  * Allow archiving of siblings with validation errors
3
7
 
@@ -63,10 +63,10 @@ module Taggable
63
63
 
64
64
  Tag.validate_tag_ids(tag_ids, tag_type)
65
65
 
66
- current_tags = attributes['tags'].reject {|t| t[:tag_type] == tag_type }
66
+ current_tags = attributes['tags'].reject {|t| t['tag_type'] == tag_type }
67
67
 
68
68
  self.tags = current_tags + tag_ids.map {|tag_id|
69
- {tag_id: tag_id, tag_type: tag_type}
69
+ {'tag_id' => tag_id, 'tag_type' => tag_type}
70
70
  }
71
71
  end
72
72
 
@@ -77,7 +77,7 @@ module Taggable
77
77
  def set_primary_tag_of_type(tag_type, tag_id)
78
78
  Tag.validate_tag_ids([tag_id], tag_type)
79
79
 
80
- tag_tuple = {tag_id: tag_id, tag_type: tag_type}
80
+ tag_tuple = {'tag_id' => tag_id, 'tag_type' => tag_type}
81
81
 
82
82
  current_tags = attributes['tags'].dup
83
83
  current_tags.delete(tag_tuple)
@@ -90,7 +90,7 @@ module Taggable
90
90
  end
91
91
 
92
92
  def tags=(new_tag_tuples)
93
- self.tag_ids = new_tag_tuples.map {|tuple| tuple[:tag_id] }
93
+ self.tag_ids = new_tag_tuples.map {|tuple| tuple['tag_id'] }
94
94
  super(new_tag_tuples)
95
95
  end
96
96
 
@@ -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 = "15.1.1"
3
+ VERSION = "15.1.2"
4
4
  end
@@ -47,10 +47,10 @@ class ArtefactTagTest < ActiveSupport::TestCase
47
47
  a.keywords = ['bacon']
48
48
 
49
49
  expected_tags = [
50
- { tag_id: "crime", tag_type: "section" },
51
- { tag_id: "crime/the-police", tag_type: "section" },
52
- { tag_id: "businesslink", tag_type: "legacy_source" },
53
- { tag_id: "bacon", tag_type: "keyword" },
50
+ { "tag_id" => "crime", "tag_type" => "section" },
51
+ { "tag_id" => "crime/the-police", "tag_type" => "section" },
52
+ { "tag_id" => "businesslink", "tag_type" => "legacy_source" },
53
+ { "tag_id" => "bacon", "tag_type" => "keyword" },
54
54
  ]
55
55
  assert_equal ["crime", "crime/the-police", "businesslink", "bacon"], a.tag_ids
56
56
  assert_equal expected_tags, a.attributes["tags"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.1.1
4
+ version: 15.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-15 00:00:00.000000000 Z
12
+ date: 2014-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bson_ext
@@ -466,7 +466,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
466
466
  version: '0'
467
467
  segments:
468
468
  - 0
469
- hash: -4160553769298563389
469
+ hash: -641385530309798652
470
470
  required_rubygems_version: !ruby/object:Gem::Requirement
471
471
  none: false
472
472
  requirements:
@@ -475,7 +475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
475
475
  version: '0'
476
476
  segments:
477
477
  - 0
478
- hash: -4160553769298563389
478
+ hash: -641385530309798652
479
479
  requirements: []
480
480
  rubyforge_project:
481
481
  rubygems_version: 1.8.23