jflow 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/console +5 -0
- data/lib/jflow.rb +1 -0
- data/lib/jflow/activity/definition.rb +5 -1
- data/lib/jflow/domain.rb +32 -0
- data/lib/jflow/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 788624cf432f825cb38797c8b1ca9a69c0877f50
|
4
|
+
data.tar.gz: 5a5445c5e36f3e759966d6e0d794985e3fc71164
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3514edb1f0438a673a13943dc4aa78421bfaae707c92adcfba1d5dda6ada72318f9e4ab41c5c8ef528be8f46ee163d177d94d8bffb3e900176af9011cfec0db2
|
7
|
+
data.tar.gz: 39cbc626388bf3bfabf2bf655b316f6852396c6c84c9fc204d7709e7a0dbbb4f74d24e815644cb26ffec7f5915c3fb943d5308d18a5f19ccde5e56e1fa049e45
|
data/bin/console
CHANGED
data/lib/jflow.rb
CHANGED
@@ -54,9 +54,13 @@ module JFlow
|
|
54
54
|
@options[:version]
|
55
55
|
end
|
56
56
|
|
57
|
+
def domain
|
58
|
+
JFlow::Domain.new(options[:domain])
|
59
|
+
end
|
60
|
+
|
57
61
|
def registered?
|
58
62
|
response = JFlow.configuration.swf_client.list_activity_types({
|
59
|
-
domain:
|
63
|
+
domain: domain.domain_name,
|
60
64
|
name: name,
|
61
65
|
registration_status: "REGISTERED"
|
62
66
|
})
|
data/lib/jflow/domain.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module JFlow
|
2
|
+
class Domain
|
3
|
+
|
4
|
+
attr_reader :domain_name
|
5
|
+
|
6
|
+
def initialize(domain_name)
|
7
|
+
@domain_name = domain_name
|
8
|
+
create unless exists?
|
9
|
+
end
|
10
|
+
|
11
|
+
def create
|
12
|
+
JFlow.configuration.logger.debug "Registering domain #{domain_name}"
|
13
|
+
JFlow.configuration.swf_client.register_domain({
|
14
|
+
name: domain_name,
|
15
|
+
description: domain_name,
|
16
|
+
workflow_execution_retention_period_in_days: "90"
|
17
|
+
})
|
18
|
+
end
|
19
|
+
|
20
|
+
def exists?
|
21
|
+
domains = JFlow.configuration.swf_client.list_domains({
|
22
|
+
registration_status: "REGISTERED"
|
23
|
+
})
|
24
|
+
exists = domains.domain_infos
|
25
|
+
.map{|a| a.name}
|
26
|
+
.include?(domain_name)
|
27
|
+
JFlow.configuration.logger.debug "#{domain_name} found: #{exists}"
|
28
|
+
exists
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
data/lib/jflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christophe Verbinnen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/jflow/activity/worker.rb
|
123
123
|
- lib/jflow/cli.rb
|
124
124
|
- lib/jflow/configuration.rb
|
125
|
+
- lib/jflow/domain.rb
|
125
126
|
- lib/jflow/version.rb
|
126
127
|
- lib/jflow/worker_thread.rb
|
127
128
|
homepage: https://github.com/djpate/jflow
|