dronejob 1.2.7 → 1.2.8

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: 3a053063871d054184346aa3ea1acbb3c6f92dca
4
- data.tar.gz: c5a3c8fb448ba5a0053535c77b1f80cfdc4c0673
3
+ metadata.gz: edfd8ac0ec0f3c42437f261312181343d0d9bdfd
4
+ data.tar.gz: 3fdd973138c87d530f10c6152132af735677b2a9
5
5
  SHA512:
6
- metadata.gz: 04dd42e28b428bb1262c457987ebcae4b23ba1b4b182b1b590ff3ae7cb301e2732dfadfb51314c3369604cd17108968d278ce7f3c5a2d3b30bb4326547cfd2f4
7
- data.tar.gz: 8549ea35cf607779092d917024f3a354ed342e2c2fa7039900969eb1f3910f6865bd486107426bfa9d3f02594f2c610a6f6775dc60d4f34a06cc97c956908156
6
+ metadata.gz: b13c19f1ed12513f7e098f23dcbf2c12891c4bf54a225cb7f62289cca66f64b9baecf66e84af77f2afb11e5fb699a28248cdf8a322eb936e3795520a0a45a300
7
+ data.tar.gz: bab1f5e66d09f420738278acd32dd3208727122cc7a5400fb5241d47c6919d1cad1930882d50925dde1d6be1691203c2a55a3a386db5cb840b9b826e54f354fa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dronejob (1.2.7)
4
+ dronejob (1.2.8)
5
5
  actionpack (>= 4.0)
6
6
  activejob (~> 4.2)
7
7
  bundler (>= 1.3.0, < 2.0)
@@ -68,7 +68,7 @@ GEM
68
68
  retriable (~> 2.0)
69
69
  google-cloud-core (0.21.1)
70
70
  googleauth (~> 0.5.1)
71
- google-cloud-storage (0.21.0)
71
+ google-cloud-storage (0.23.0)
72
72
  digest-crc (~> 0.4)
73
73
  google-api-client (~> 0.9.11)
74
74
  google-cloud-core (~> 0.21.0)
@@ -82,7 +82,7 @@ GEM
82
82
  signet (~> 0.7)
83
83
  haml (4.0.7)
84
84
  tilt
85
- httpclient (2.8.2.4)
85
+ httpclient (2.8.3)
86
86
  hurley (0.2)
87
87
  i18n (0.7.0)
88
88
  json (1.8.3)
@@ -34,7 +34,7 @@ module Dronejob
34
34
  run_callbacks :phase do
35
35
  if completed_phase?(phase) and !@phase_config[:always_run]
36
36
  info("already completed")
37
- elsif skip_phase?(phase)
37
+ elsif skip_phase?(phase, phase_config)
38
38
  info("skipping...")
39
39
  else
40
40
  info("running phase #{phase}")
@@ -72,7 +72,16 @@ module Dronejob
72
72
  end
73
73
  end
74
74
 
75
- def skip_phase?(phase)
75
+ def skip_phase?(phase, phase_config)
76
+ if phase_config[:if]
77
+ if phase_config[:if].class == String or phase_config[:if].class == Symbol
78
+ return true unless param(phase_config[:if])
79
+ elsif phase_config[:if].class == Array
80
+ return true unless phase_config[:if].all?{|p| param(p) === true}
81
+ elsif phase_config[:if].class == Proc
82
+ return true unless instance_eval(&phase_config[:if])
83
+ end
84
+ end
76
85
  param(:skip) and param(:skip).include?(phase.to_s)
77
86
  end
78
87
 
@@ -1,3 +1,3 @@
1
1
  module Dronejob
2
- VERSION = "1.2.7"
2
+ VERSION = "1.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dronejob
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-04 00:00:00.000000000 Z
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler