shipit-engine 0.6.0 → 0.6.1

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: eec3ad56957753526c730d8e7aaa24eceb08aafb
4
- data.tar.gz: f02335b4c8b8d8dea3ddadc8de5c4351339a289f
3
+ metadata.gz: 416f3164d3966e3cbaa06be4efd0efba00fcd069
4
+ data.tar.gz: 84ecb25a5090b84c99f5e94b6916a93648b58c8c
5
5
  SHA512:
6
- metadata.gz: 34f44b9cc7315992879ae69fe283fe76a8f250f5244376fd7cd5ef49688fba8ba3234b91aa0304349ace86fbdd15d8bc0bbce3cc1fcdf7d608459ce958c48d86
7
- data.tar.gz: 7f4116a87a98201a0be003d3baeaa38dba7fb3d3a0cc131bb7ccf974daec70c16da76b3959f1ee238255d4b2dc057cfff610bb6cc51a24e345a12c78426169e2
6
+ metadata.gz: 815aa2485d584342806197605d3d1ba2b19453fd353853f3563651d35dfbc127485192075d06ca728c66537f28533f3b2cf102435bba782efd790e99748f4354
7
+ data.tar.gz: 43d58cab23383c486ee8f1d266ac4d856f6c656ac79d09f7a6397d5c857598a716617c2c5ea6d653d03a90044fbeec8fcd57c189698e7eb002abc88a6860702a
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Shipit
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
@@ -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
 
Binary file
@@ -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 return [UnknownStatus] if the commit has no statuses" do
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipit-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier