culturecode_stagehand 0.10.1 → 0.10.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.
- checksums.yaml +4 -4
- data/lib/stagehand/staging/checklist.rb +14 -12
- data/lib/stagehand/staging/synchronizer.rb +1 -1
- data/lib/stagehand/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd8d168cfca3a30f6904f1f84fc27d7eec96d5d5
|
4
|
+
data.tar.gz: 4ae03b6e5e13aed6c1d13d85e5dc2fe3470dec26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb78f8ebdb79f4b9441cf79ecf81577428efe58a90cfd664f6f8ed5716c5b2984098fb3575c8d25859c06b728d4c53140ba006a510bec5bfdb65fbd16f81e097
|
7
|
+
data.tar.gz: 18f250b45b7f14dc3437c6121766c1215b8aeaf1b5b84225990732962ce70483621880d04278503cfb2b73d43bb44d2dff7621c12bd02127391dd1f0dcd1b3e1
|
@@ -95,10 +95,9 @@ module Stagehand
|
|
95
95
|
|
96
96
|
public
|
97
97
|
|
98
|
-
def initialize(subject,
|
98
|
+
def initialize(subject, &confirmation_filter)
|
99
99
|
@subject = subject
|
100
100
|
@confirmation_filter = confirmation_filter
|
101
|
-
@preconfirm_subject = preconfirm_subject
|
102
101
|
affected_entries # Init the affected_entries changes can be rolled back without affecting the checklist
|
103
102
|
end
|
104
103
|
|
@@ -146,21 +145,24 @@ module Stagehand
|
|
146
145
|
|
147
146
|
def grouped_required_confirmation_entries
|
148
147
|
cache(:grouped_required_confirmation_entries) do
|
149
|
-
staging_record_start_operation_ids = affected_entries.select do |entry|
|
150
|
-
entry.start_operation? && entry.matches?(@subject)
|
151
|
-
end.collect(&:id)
|
152
|
-
|
153
148
|
entries = affected_entries.dup
|
154
|
-
|
155
|
-
# Don't need to confirm entries that match the checklist subject
|
156
|
-
entries.reject! {|entry| entry.matches?(@subject) } if @preconfirm_subject
|
157
|
-
|
158
|
-
# Don't need to confirm entries that are part of a commits whose subject is the checklist subject
|
159
|
-
entries.reject! {|entry| staging_record_start_operation_ids.include?(entry.commit_id) }
|
149
|
+
subject_entries, subject_records = Array.wrap(@subject).partition {|model| model.is_a?(CommitEntry) }
|
160
150
|
|
161
151
|
# Don't need to confirm entries that were not part of a commit
|
162
152
|
entries.select!(&:commit_id)
|
163
153
|
|
154
|
+
# Don't need to confirm entries that exactly match a subject commit entry
|
155
|
+
entries -= subject_entries
|
156
|
+
|
157
|
+
# Don't need to confirm entries that match the checklist subject records
|
158
|
+
entries.reject! {|entry| entry.matches?(subject_records) }
|
159
|
+
|
160
|
+
# Don't need to confirm entries that are part of a commits whose subject is a checklist subject record
|
161
|
+
staging_record_start_operation_ids = affected_entries.select do |entry|
|
162
|
+
entry.start_operation? && entry.matches?(subject_records)
|
163
|
+
end.collect(&:id)
|
164
|
+
entries.reject! {|entry| staging_record_start_operation_ids.include?(entry.commit_id) }
|
165
|
+
|
164
166
|
entries = self.class.compact_entries(entries)
|
165
167
|
entries = filter_entries(entries)
|
166
168
|
entries = self.class.group_entries(entries)
|
@@ -13,7 +13,7 @@ module Stagehand
|
|
13
13
|
raise SyncBlockRequired unless block_given?
|
14
14
|
|
15
15
|
Database.transaction do
|
16
|
-
checklist = Checklist.new(Commit.capture(subject_record, &block).entries
|
16
|
+
checklist = Checklist.new(Commit.capture(subject_record, &block).entries)
|
17
17
|
sync_checklist(checklist) unless checklist.requires_confirmation?
|
18
18
|
end
|
19
19
|
end
|
data/lib/stagehand/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.2
|
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-
|
12
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.6.7
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Simplify the management of a sandbox database that can sync content to a
|