shipit-engine 0.6.0 → 0.6.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 +4 -4
- data/app/models/shipit/commit.rb +2 -2
- data/lib/shipit/version.rb +1 -1
- data/test/dummy/db/schema.rb +2 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/models/commits_test.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 416f3164d3966e3cbaa06be4efd0efba00fcd069
|
4
|
+
data.tar.gz: 84ecb25a5090b84c99f5e94b6916a93648b58c8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 815aa2485d584342806197605d3d1ba2b19453fd353853f3563651d35dfbc127485192075d06ca728c66537f28533f3b2cf102435bba782efd790e99748f4354
|
7
|
+
data.tar.gz: 43d58cab23383c486ee8f1d266ac4d856f6c656ac79d09f7a6397d5c857598a716617c2c5ea6d653d03a90044fbeec8fcd57c189698e7eb002abc88a6860702a
|
data/app/models/shipit/commit.rb
CHANGED
@@ -163,11 +163,11 @@ module Shipit
|
|
163
163
|
end
|
164
164
|
|
165
165
|
def visible_statuses
|
166
|
-
stack.filter_visible_statuses(last_statuses)
|
166
|
+
stack.filter_visible_statuses(last_statuses).presence || [UnknownStatus.new(self)]
|
167
167
|
end
|
168
168
|
|
169
169
|
def meaningful_statuses
|
170
|
-
stack.filter_meaningful_statuses(last_statuses)
|
170
|
+
stack.filter_meaningful_statuses(last_statuses).presence || [UnknownStatus.new(self)]
|
171
171
|
end
|
172
172
|
|
173
173
|
def last_statuses
|
data/lib/shipit/version.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
@@ -161,6 +161,8 @@ ActiveRecord::Schema.define(version: 20160104151833) do
|
|
161
161
|
add_index "tasks", ["rolled_up", "created_at", "status"], name: "index_tasks_on_rolled_up_and_created_at_and_status"
|
162
162
|
add_index "tasks", ["since_commit_id"], name: "index_tasks_on_since_commit_id"
|
163
163
|
add_index "tasks", ["stack_id"], name: "index_tasks_on_stack_id"
|
164
|
+
add_index "tasks", ["type", "stack_id", "parent_id"], name: "index_tasks_by_stack_and_parent"
|
165
|
+
add_index "tasks", ["type", "stack_id", "status"], name: "index_tasks_by_stack_and_status"
|
164
166
|
add_index "tasks", ["until_commit_id"], name: "index_tasks_on_until_commit_id"
|
165
167
|
add_index "tasks", ["user_id"], name: "index_tasks_on_user_id"
|
166
168
|
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/models/commits_test.rb
CHANGED
@@ -248,12 +248,18 @@ module Shipit
|
|
248
248
|
assert_equal 2, shipit_commits(:second).last_statuses.count
|
249
249
|
end
|
250
250
|
|
251
|
-
test "#last_statuses
|
251
|
+
test "#last_statuses returns [UnknownStatus] if the commit has no statuses" do
|
252
252
|
commit = shipit_commits(:second)
|
253
253
|
commit.statuses = []
|
254
254
|
assert_equal UnknownStatus.new(commit), commit.significant_status
|
255
255
|
end
|
256
256
|
|
257
|
+
test "#status returns UnknownStatus if the commit has no status" do
|
258
|
+
commit = shipit_commits(:second)
|
259
|
+
commit.statuses = []
|
260
|
+
assert_equal UnknownStatus.new(commit), commit.status
|
261
|
+
end
|
262
|
+
|
257
263
|
test "#visible_statuses rejects the statuses that are specified in the deploy spec's `ci.hide`" do
|
258
264
|
commit = shipit_commits(:second)
|
259
265
|
assert_equal 2, commit.visible_statuses.count
|