culturecode_stagehand 0.7.0 → 0.7.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df79b4e0f27dc6044a855f9edaedaa0d8e27a373
4
- data.tar.gz: a174ca6aa6a2345b0b2057ffd083f5c7e7793528
3
+ metadata.gz: 8d275b336114ac293617e2cf4466dc2d7ce98c3e
4
+ data.tar.gz: 7846cb496845f2e46cc79a52e9f123f824e52089
5
5
  SHA512:
6
- metadata.gz: cb6a00233f8c4c281b3d6a5d207cad1621aba58b450084b8850f9ee4173ed7c55568bc6c4b0d1cf65fb26fe3cc82062781cfb216e48e9aef2e25a73b8db56d2e
7
- data.tar.gz: 7a1b8b2450e4870841a7319b6c141793eaac53ce99bd2636c8c1e69a8763b219e0b355d4cb37d55403ae4214b50ca875408081fed8dd2b0ecacc1f9d9cee1e87
6
+ metadata.gz: 1968350dfdabf2ef4fbdb3fd2f42d7d98b4e6f86bdb68a07b066850dc1a67d7de00d07c7c867a00b8ad801c6170d8879e386fbb71dd4d4b9f82d7fd71f1c57a3
7
+ data.tar.gz: 123c82e038abf8453a4a802ae125ee88fdec7d1fd180241b068161a243f86fd8156cc93c05948b0f7874093ec79f5269884ff28e3e47a37ee1cb76b00c5d40c1
@@ -95,9 +95,10 @@ module Stagehand
95
95
 
96
96
  public
97
97
 
98
- def initialize(subject, &confirmation_filter)
98
+ def initialize(subject, preconfirm_subject: true, &confirmation_filter)
99
99
  @subject = subject
100
100
  @confirmation_filter = confirmation_filter
101
+ @preconfirm_subject = preconfirm_subject
101
102
  affected_entries # Init the affected_entries changes can be rolled back without affecting the checklist
102
103
  end
103
104
 
@@ -149,10 +150,10 @@ module Stagehand
149
150
  entry.start_operation? && entry.matches?(@subject)
150
151
  end.collect(&:id)
151
152
 
152
- entries = affected_entries
153
+ entries = affected_entries.dup
153
154
 
154
155
  # Don't need to confirm entries that match the checklist subject
155
- entries.reject! {|entry| entry.matches?(@subject) }
156
+ entries.reject! {|entry| entry.matches?(@subject) } if @preconfirm_subject
156
157
 
157
158
  # Don't need to confirm entries that are part of a commits whose subject is the checklist subject
158
159
  entries.reject! {|entry| staging_record_start_operation_ids.include?(entry.commit_id) }
@@ -12,7 +12,7 @@ module Stagehand
12
12
  raise SyncBlockRequired unless block_given?
13
13
 
14
14
  ActiveRecord::Base.transaction do
15
- checklist = Checklist.new(Commit.capture(&block).entries)
15
+ checklist = Checklist.new(Commit.capture(&block).entries, :preconfirm_subject => false)
16
16
  sync_checklist(checklist) unless checklist.requires_confirmation?
17
17
  end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Stagehand
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: culturecode_stagehand
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-23 00:00:00.000000000 Z
12
+ date: 2016-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails