govuk_content_models 30.0.0 → 31.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: ace1431a4755075f7fc7d6a9ec4ec9edf0db97cb
4
- data.tar.gz: b4744764d54f9a8eff22384617d8c700b4e8caea
3
+ metadata.gz: f180214b4c41e4eeeca68831ad6ba2ca55f1ef7f
4
+ data.tar.gz: c3620788cedec2c668987ae8d8b563e527e080e3
5
5
  SHA512:
6
- metadata.gz: 1be2224113f915f7df753dd478728911cddd4439a008457b2d99d63da82d28999acae2e4420c6ceee4df3321cef3eb2dcafc29da8fd6887b45ab4c464c814b4a
7
- data.tar.gz: a55c774b064aca486549a103d45111ac4a6d581148ec2c6ab30dc77f26129413c4d7b8b4fe7b0768eeac0557b765a2f8bce0a787afba817399edf363e36c2c88
6
+ metadata.gz: acf06907c1430d183ac52ae67cc858f67d68cab01f6963a406683fbcd8738c15595016aed443495e3310b0068f4eaea003214a4a2bfc48fc94950c7f0398eb54
7
+ data.tar.gz: 4b276c0907a6b77a0f0201c7e2e27d4e4c852a3e611f09f46d07e284a8f294270caab42e98745a54dd06159cc2ffc2d96b653f914cd926fc4136a9c37aa64349
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 31.0.0
4
+
5
+ - `Edition.find_or_create_from_panopticon_data` no longer takes a third
6
+ parameter.
7
+
3
8
  ## 30.0.0
4
9
 
5
10
  - Add:
@@ -224,8 +224,7 @@ class Edition
224
224
  new_edition
225
225
  end
226
226
 
227
- def self.find_or_create_from_panopticon_data(panopticon_id,
228
- importing_user, api_credentials)
227
+ def self.find_or_create_from_panopticon_data(panopticon_id, importing_user)
229
228
  existing_publication = Edition.where(panopticon_id: panopticon_id)
230
229
  .order_by([:version_number, :desc]).first
231
230
  return existing_publication if existing_publication
@@ -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 = "30.0.0"
3
+ VERSION = "31.0.0"
4
4
  end
@@ -393,7 +393,7 @@ class ArtefactTest < ActiveSupport::TestCase
393
393
  )
394
394
 
395
395
  user1 = FactoryGirl.create(:user)
396
- edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user1, {})
396
+ edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user1)
397
397
  edition.state = "published"
398
398
  edition.save!
399
399
 
@@ -414,7 +414,7 @@ class ArtefactTest < ActiveSupport::TestCase
414
414
  owning_app: "publisher",
415
415
  )
416
416
  user1 = FactoryGirl.create(:user)
417
- edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user1, {})
417
+ edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user1)
418
418
 
419
419
  refute artefact.any_editions_published?
420
420
 
@@ -451,7 +451,7 @@ class EditionTest < ActiveSupport::TestCase
451
451
  a = Artefact.find(artefact.id)
452
452
  user = User.create
453
453
 
454
- publication = Edition.find_or_create_from_panopticon_data(artefact.id, user, {})
454
+ publication = Edition.find_or_create_from_panopticon_data(artefact.id, user)
455
455
 
456
456
  assert_kind_of AnswerEdition, publication
457
457
  assert_equal artefact.name, publication.title
@@ -530,7 +530,7 @@ class EditionTest < ActiveSupport::TestCase
530
530
 
531
531
  test "deleting a newer draft of a published edition removes sibling information" do
532
532
  user1 = FactoryGirl.create(:user)
533
- edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1, {})
533
+ edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1)
534
534
  edition.update_attribute(:state, "published")
535
535
  second_edition = edition.build_clone
536
536
  second_edition.save!
@@ -546,7 +546,7 @@ class EditionTest < ActiveSupport::TestCase
546
546
 
547
547
  test "the latest edition should remove sibling_in_progress details if it is present" do
548
548
  user1 = FactoryGirl.create(:user)
549
- edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1, {})
549
+ edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1)
550
550
  edition.update_attribute(:state, "published")
551
551
 
552
552
  # simulate a document having a newer edition destroyed (previous behaviour).
@@ -561,7 +561,7 @@ class EditionTest < ActiveSupport::TestCase
561
561
  FactoryGirl.create(:live_tag, tag_id: "test-section", title: "Test section", tag_type: "section")
562
562
 
563
563
  user1 = FactoryGirl.create(:user)
564
- edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1, {})
564
+ edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1)
565
565
 
566
566
  assert_difference "Artefact.count", -1 do
567
567
  edition.destroy
@@ -572,7 +572,7 @@ class EditionTest < ActiveSupport::TestCase
572
572
 
573
573
  FactoryGirl.create(:live_tag, tag_id: "test-section", title: "Test section", tag_type: "section")
574
574
  user1 = FactoryGirl.create(:user)
575
- edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1, {})
575
+ edition = AnswerEdition.find_or_create_from_panopticon_data(@artefact.id, user1)
576
576
  edition.update_attribute(:state, "published")
577
577
 
578
578
  edition.reload
@@ -905,7 +905,7 @@ class EditionTest < ActiveSupport::TestCase
905
905
  owning_app: "publisher",
906
906
  )
907
907
 
908
- edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user, {})
908
+ edition = AnswerEdition.find_or_create_from_panopticon_data(artefact.id, user)
909
909
 
910
910
  assert_equal user.name, edition.creator
911
911
  end
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: 30.0.0
4
+ version: 31.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Battley