govuk_content_models 29.0.0 → 29.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 75e08e3144ef51eba2493c273fc127e383d80364
4
+ data.tar.gz: cc5c02fd3d0aef0b5219a6b4d0e38a911326f29a
5
+ SHA512:
6
+ metadata.gz: ee74ac88cfbaa85dc1d9bf879998b7ee3f8a9320f9617427e2f0a119346d3ea257fddbd04c575b154e6a827bbc50eda7b3c51bf2d149ec7cec0580c83e33b51f
7
+ data.tar.gz: 5305758f70dfce47c17a97e04b2b58cdf2d13382eab4e4b090ebabebadff6d073994b7c77cf44c4ae70d8f3dce1239b1e75f4e2e643f2d77295ef6003bf7aed7
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p484
1
+ 2.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 29.0.1
4
+
5
+ - Bugfix: updated_at field on non-archive editions was being updated whenever an Artefact was saved. Now only do so when the slug has changed.
6
+
3
7
  ## 29.0.0
4
8
 
5
9
  - Remove fields from Artefact:
@@ -284,9 +284,11 @@ class Artefact
284
284
  def update_editions
285
285
  case state
286
286
  when 'draft'
287
- Edition.where(:state.nin => ["archived"],
288
- panopticon_id: self.id).each do |edition|
289
- edition.update_slug_from_artefact(self)
287
+ if self.slug_changed?
288
+ Edition.where(:state.nin => ["archived"],
289
+ panopticon_id: self.id).each do |edition|
290
+ edition.update_slug_from_artefact(self)
291
+ end
290
292
  end
291
293
  when 'archived'
292
294
  archive_editions
@@ -34,7 +34,6 @@ Gem::Specification.new do |gem|
34
34
  gem.add_development_dependency "webmock", "1.8.7"
35
35
  gem.add_development_dependency "shoulda-context", "1.0.0"
36
36
  gem.add_development_dependency "timecop", "0.5.9.2"
37
- gem.add_development_dependency "debugger"
38
37
 
39
38
  # The following are added to help bundler resolve dependencies
40
39
  gem.add_development_dependency "rack", "~> 1.4.4"
@@ -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 = "29.0.0"
3
+ VERSION = "29.0.1"
4
4
  end
@@ -330,6 +330,19 @@ class ArtefactTest < ActiveSupport::TestCase
330
330
  assert_equal artefact.slug, edition.slug
331
331
  end
332
332
 
333
+ should "not touch the updated_at field on the editions when the artefact is saved but the slug hasn't changed" do
334
+ artefact = FactoryGirl.create(:draft_artefact)
335
+ edition = FactoryGirl.create(:answer_edition, panopticon_id: artefact.id)
336
+ old_updated_at = 2.days.ago.to_time
337
+ edition.set(:updated_at, old_updated_at)
338
+
339
+ artefact.language = "cy"
340
+ artefact.save!
341
+
342
+ edition.reload
343
+ assert_equal old_updated_at.utc.iso8601, edition.updated_at.utc.iso8601
344
+ end
345
+
333
346
  should "not update the edition's slug when a live artefact is saved" do
334
347
  artefact = FactoryGirl.create(:live_artefact, slug: "something-something-live")
335
348
  edition = FactoryGirl.create(:answer_edition, panopticon_id: artefact.id, slug: "something-else")
metadata CHANGED
@@ -1,132 +1,116 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 29.0.0
5
- prerelease:
4
+ version: 29.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Paul Battley
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-07-21 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bson_ext
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: gds-api-adapters
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: 10.9.0
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: 10.9.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: gds-sso
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 10.0.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: 10.0.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: govspeak
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '3.1'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '3.1'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: mongoid
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: '2.5'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: '2.5'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: plek
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: state_machine
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: database_cleaner
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - '='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - '='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: factory_girl
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - '='
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - '='
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: gem_publisher
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - '='
164
144
  - !ruby/object:Gem::Version
@@ -166,7 +146,6 @@ dependencies:
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - '='
172
151
  - !ruby/object:Gem::Version
@@ -174,7 +153,6 @@ dependencies:
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: mocha
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
157
  - - '='
180
158
  - !ruby/object:Gem::Version
@@ -182,7 +160,6 @@ dependencies:
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
164
  - - '='
188
165
  - !ruby/object:Gem::Version
@@ -190,23 +167,20 @@ dependencies:
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: multi_json
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
- - - ! '>='
171
+ - - ">="
196
172
  - !ruby/object:Gem::Version
197
173
  version: '0'
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
- - - ! '>='
178
+ - - ">="
204
179
  - !ruby/object:Gem::Version
205
180
  version: '0'
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: rake
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
185
  - - '='
212
186
  - !ruby/object:Gem::Version
@@ -214,7 +188,6 @@ dependencies:
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
192
  - - '='
220
193
  - !ruby/object:Gem::Version
@@ -222,7 +195,6 @@ dependencies:
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: webmock
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
199
  - - '='
228
200
  - !ruby/object:Gem::Version
@@ -230,7 +202,6 @@ dependencies:
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
206
  - - '='
236
207
  - !ruby/object:Gem::Version
@@ -238,7 +209,6 @@ dependencies:
238
209
  - !ruby/object:Gem::Dependency
239
210
  name: shoulda-context
240
211
  requirement: !ruby/object:Gem::Requirement
241
- none: false
242
212
  requirements:
243
213
  - - '='
244
214
  - !ruby/object:Gem::Version
@@ -246,7 +216,6 @@ dependencies:
246
216
  type: :development
247
217
  prerelease: false
248
218
  version_requirements: !ruby/object:Gem::Requirement
249
- none: false
250
219
  requirements:
251
220
  - - '='
252
221
  - !ruby/object:Gem::Version
@@ -254,7 +223,6 @@ dependencies:
254
223
  - !ruby/object:Gem::Dependency
255
224
  name: timecop
256
225
  requirement: !ruby/object:Gem::Requirement
257
- none: false
258
226
  requirements:
259
227
  - - '='
260
228
  - !ruby/object:Gem::Version
@@ -262,47 +230,27 @@ dependencies:
262
230
  type: :development
263
231
  prerelease: false
264
232
  version_requirements: !ruby/object:Gem::Requirement
265
- none: false
266
233
  requirements:
267
234
  - - '='
268
235
  - !ruby/object:Gem::Version
269
236
  version: 0.5.9.2
270
- - !ruby/object:Gem::Dependency
271
- name: debugger
272
- requirement: !ruby/object:Gem::Requirement
273
- none: false
274
- requirements:
275
- - - ! '>='
276
- - !ruby/object:Gem::Version
277
- version: '0'
278
- type: :development
279
- prerelease: false
280
- version_requirements: !ruby/object:Gem::Requirement
281
- none: false
282
- requirements:
283
- - - ! '>='
284
- - !ruby/object:Gem::Version
285
- version: '0'
286
237
  - !ruby/object:Gem::Dependency
287
238
  name: rack
288
239
  requirement: !ruby/object:Gem::Requirement
289
- none: false
290
240
  requirements:
291
- - - ~>
241
+ - - "~>"
292
242
  - !ruby/object:Gem::Version
293
243
  version: 1.4.4
294
244
  type: :development
295
245
  prerelease: false
296
246
  version_requirements: !ruby/object:Gem::Requirement
297
- none: false
298
247
  requirements:
299
- - - ~>
248
+ - - "~>"
300
249
  - !ruby/object:Gem::Version
301
250
  version: 1.4.4
302
251
  - !ruby/object:Gem::Dependency
303
252
  name: rails
304
253
  requirement: !ruby/object:Gem::Requirement
305
- none: false
306
254
  requirements:
307
255
  - - '='
308
256
  - !ruby/object:Gem::Version
@@ -310,7 +258,6 @@ dependencies:
310
258
  type: :development
311
259
  prerelease: false
312
260
  version_requirements: !ruby/object:Gem::Requirement
313
- none: false
314
261
  requirements:
315
262
  - - '='
316
263
  - !ruby/object:Gem::Version
@@ -322,9 +269,9 @@ executables: []
322
269
  extensions: []
323
270
  extra_rdoc_files: []
324
271
  files:
325
- - .gitignore
326
- - .ruby-version
327
- - .travis.yml
272
+ - ".gitignore"
273
+ - ".ruby-version"
274
+ - ".travis.yml"
328
275
  - CHANGELOG.md
329
276
  - CONTRIBUTING.md
330
277
  - Gemfile
@@ -465,34 +412,27 @@ files:
465
412
  - test/validators/topic_validator_test.rb
466
413
  homepage: https://github.com/alphagov/govuk_content_models
467
414
  licenses: []
415
+ metadata: {}
468
416
  post_install_message:
469
417
  rdoc_options: []
470
418
  require_paths:
471
419
  - lib
472
420
  - app
473
421
  required_ruby_version: !ruby/object:Gem::Requirement
474
- none: false
475
422
  requirements:
476
- - - ! '>='
423
+ - - ">="
477
424
  - !ruby/object:Gem::Version
478
425
  version: '0'
479
- segments:
480
- - 0
481
- hash: 3770262996979564918
482
426
  required_rubygems_version: !ruby/object:Gem::Requirement
483
- none: false
484
427
  requirements:
485
- - - ! '>='
428
+ - - ">="
486
429
  - !ruby/object:Gem::Version
487
430
  version: '0'
488
- segments:
489
- - 0
490
- hash: 3770262996979564918
491
431
  requirements: []
492
432
  rubyforge_project:
493
- rubygems_version: 1.8.23
433
+ rubygems_version: 2.2.3
494
434
  signing_key:
495
- specification_version: 3
435
+ specification_version: 4
496
436
  summary: Shared models for Panopticon and Publisher, as a Rails Engine
497
437
  test_files:
498
438
  - test/fixtures/contactotron_api_response.json