capistrano-ghostinspector 1.0.1 → 1.0.2

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: 0012d848b2edbf80f24d3a0d4eaa6bf2918960fa
4
- data.tar.gz: b786fee9b29ebc08c257646ed81fea0eb8d4facb
3
+ metadata.gz: 32290a147bf4b2de15d74abb58783326ae8005c2
4
+ data.tar.gz: c9bbd7509b562b40655b529f06777f982c2feedf
5
5
  SHA512:
6
- metadata.gz: 70515401b100faeb544a0941a7163603cbf4108f3b915676acf1a373a9aca62e9c427bc7fbb764e12797051da69101b7016e9841cc81a1b365319a5d7d55b46c
7
- data.tar.gz: 7c8ad68d2dcd2b7b930e6dc3d2d566435cacab1644ea3a32840db1fd938030ca45577e2437ac9a9741d003bfeff430c0d94b28bd04408e6c158a4b7611bb1990
6
+ metadata.gz: 048734a77639b441b24151c2a6bc6bf5eb21238b1e1ad41e1d8745e33511231ffdb98f1d32785f9f8462211ba2686f74e9b314a3bde29f446291a97ad2299bdf
7
+ data.tar.gz: 5957011a83a16f72d30fbc81b36bfef5186d1782c1b6f0d9d79bd0223fadc684b0c0989394b07aa16cde99c6c7960937f8bbe8d791861192239cd48dcaf6fec5
data/README.md CHANGED
@@ -82,13 +82,13 @@ You can obtain your API key, suite ID and test ID from your Ghost Inspector cons
82
82
 
83
83
  Add as many suites or tests as you like, the name you give your test isn't important but you should make it easy to remember when executing the test.
84
84
 
85
- By default the ghost inspector execution is enabled, you can disabled this for all stages by setting `gi_enabled: false` in the `YAML` file. Alternatively you can change this on a per stage basis by setting the appropriate variable
85
+ By default the ghost inspector execution is enabled, you can disable this for all stages by setting `gi_enabled: false` in the `YAML` file. Alternatively you can change this on a per stage basis by setting the appropriate variable
86
86
  ```ruby
87
87
  set :gi_enabled, false
88
88
  ```
89
89
  This ensures that Ghost Inspector is not automatically run when accidentally triggered via the command line.
90
90
 
91
- By default the `rollback` feature is enabled, you can disabled this for all stages by setting `rollback: false` in the `YAML` file. Alternatively you can change this on a per stage basis by setting the appropriate variable
91
+ By default the `rollback` feature is enabled, you can disable this for all stages by setting `rollback: false` in the `YAML` file. Alternatively you can change this on a per stage basis by setting the appropriate variable
92
92
  ```ruby
93
93
  set :rollback, false
94
94
  ```
@@ -124,6 +124,10 @@ Google Analytics uses Custom Dimensions as outlined in the [Google Measurement P
124
124
  git commit -am "GHOST-123 Add new item to the gem"
125
125
  ```
126
126
 
127
+ ## Waiting for results
128
+
129
+ When both `ga_enabled` and `rollback` are set to false then the tests are executed but the results are not returned and taken in to account.
130
+
127
131
  ## Usage
128
132
 
129
133
  Run a particular test when deploying to staging -
@@ -86,7 +86,11 @@ module Capistrano
86
86
  set :data, giApi.executeApi("suites", suite)
87
87
 
88
88
  data[1]["data"].each do |test|
89
- items = { :passing => test["passing"], :results => test, :type => "suites"}
89
+ items = {
90
+ :passing => giApi.shouldWaitForResults() ? true : test["passing"],
91
+ :results => test,
92
+ :type => "suites"
93
+ }
90
94
  @collection << items
91
95
  end
92
96
 
@@ -192,4 +196,4 @@ end
192
196
 
193
197
  if Capistrano::Configuration.instance
194
198
  Capistrano::Ghostinspector.load_into(Capistrano::Configuration.instance)
195
- end
199
+ end
@@ -43,13 +43,17 @@ module Capistrano
43
43
 
44
44
  end
45
45
 
46
+ def shouldWaitForResults()
47
+ return @rollback == false && @ga_enabled == false;
48
+ end
49
+
46
50
  private
47
51
 
48
52
  def includeResults()
49
53
 
50
54
  # Determine if we should get results to
51
55
  # check for any failed tests
52
- if (@rollback == false && @ga_enabled == false)
56
+ if (shouldWaitForResults())
53
57
  immediate = "&immediate=1"
54
58
  else
55
59
  immediate = ""
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Ghostinspector
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ghostinspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Richardson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.4.5
138
+ rubygems_version: 2.4.8
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Ghost Inspector - Capistrano