robopigeon 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/CHANGELOG.md +6 -0
- data/lib/robopigeon.rb +1 -1
- data/lib/robopigeon/jira/client.rb +2 -1
- data/lib/robopigeon/jira/dsl.rb +12 -0
- data/lib/robopigeon/jira/ticket.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e1ccc4296715bb7bd0149e152fdcef8d6eda1ca5bcf20df02b595ce9a1062e
|
4
|
+
data.tar.gz: d55644ed2e656858402b41595c29e7d2b0bdedaed10568c5eb45f969d5a2532b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f16c85664bc1731725440fc54fb1dba9f8899718b55e1064b5694a28cc20ce4b1df4da961ca004abf5fd3f97e801d916f0672df9c87c326e860ad920188c92d
|
7
|
+
data.tar.gz: bba778a3dde275f25af054e94c2c63c7a5ed0f63d44b8fbb3e9eff06cfc7750935f3f7c97856eed49c5422fb650f3b4622b64c379fdfb47c3aa11c1556bb670a
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/CHANGELOG.md
CHANGED
data/lib/robopigeon.rb
CHANGED
@@ -4,9 +4,9 @@ require 'robopigeon/extend'
|
|
4
4
|
require 'robopigeon/git'
|
5
5
|
require 'robopigeon/gitlab'
|
6
6
|
require 'robopigeon/jenkins'
|
7
|
+
require 'robopigeon/slack'
|
7
8
|
require 'robopigeon/jira'
|
8
9
|
require 'robopigeon/markdown'
|
9
|
-
require 'robopigeon/slack'
|
10
10
|
require 'robopigeon/version'
|
11
11
|
|
12
12
|
module RoboPigeon
|
@@ -3,9 +3,10 @@ module RoboPigeon::Jira
|
|
3
3
|
@enabled = true
|
4
4
|
@api_key = ENV['JIRA_TOKEN']
|
5
5
|
@last_created_ticket = File.read('last_created_jira_ticket') if File.exist?('last_created_jira_ticket')
|
6
|
+
@wait_for_state_timeout = 10.minutes
|
6
7
|
|
7
8
|
class << self
|
8
|
-
attr_accessor :api_key, :api_url, :enabled, :last_created_ticket
|
9
|
+
attr_accessor :api_key, :api_url, :enabled, :last_created_ticket, :wait_for_state_timeout
|
9
10
|
def jira_request
|
10
11
|
Faraday.new(url: RoboPigeon::Jira::Client.api_url) do |faraday|
|
11
12
|
faraday.adapter Faraday.default_adapter
|
data/lib/robopigeon/jira/dsl.rb
CHANGED
@@ -35,6 +35,18 @@ module RoboPigeon::Dsl
|
|
35
35
|
def api_url(key)
|
36
36
|
RoboPigeon::Jira::Client.api_url = key
|
37
37
|
end
|
38
|
+
|
39
|
+
RoboPigeon::Documentarian.add_command(
|
40
|
+
'wait_for_state_timeout',
|
41
|
+
block: ['jira'],
|
42
|
+
params: [
|
43
|
+
{ name: 'time', type: 'String', desc: 'how long to wait for a state before you time out', example: '1.hour', default: '10.minutes' }
|
44
|
+
],
|
45
|
+
desc: 'set timeout for how long RoboPigeon will wait for designated state'
|
46
|
+
)
|
47
|
+
def wait_for_state_timeout(time)
|
48
|
+
RoboPigeon::Jira::Client.wait_for_state_timeout = time
|
49
|
+
end
|
38
50
|
end
|
39
51
|
|
40
52
|
class Jira < JiraRoot
|
@@ -147,7 +147,7 @@ module RoboPigeon::Jira
|
|
147
147
|
JSON.parse(get.body)['fields']['status']['name']
|
148
148
|
end
|
149
149
|
|
150
|
-
def wait_for_state!(state, timeout=
|
150
|
+
def wait_for_state!(state, timeout=RoboPigeon::Jira::Client.wait_for_state_timeout, time=Time.now, sleep_time=15)
|
151
151
|
require_ticket
|
152
152
|
waited = (Time.now - time).to_i
|
153
153
|
minutes = waited / 60
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robopigeon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Ives
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab
|