ntswf 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ntswf/base.rb +11 -5
  2. metadata +6 -6
data/lib/ntswf/base.rb CHANGED
@@ -5,7 +5,8 @@ require 'securerandom'
5
5
  module Ntswf
6
6
  module Base
7
7
  # @param config [Hash] A configuration with the following keys:
8
- # @option config [String] :access_key_id AWS credential
8
+ # @option config [String] :access_key_id
9
+ # AWS credential (deprecated, should use swf option)
9
10
  # @option config [Hash] :activity_task_lists
10
11
  # The task list names for activities as hash (see also *:unit*)
11
12
  # @option config [String] :decision_task_list The task list name for decisions
@@ -19,7 +20,10 @@ module Ntswf
19
20
  # A path receiving the current PID for looping methods. Causes exit, if
20
21
  # overwritten by another process. See {Worker#in_subprocess}
21
22
  # @option config [Numeric] :subprocess_retries (0) see {Worker#in_subprocess}
22
- # @option config [String] :secret_access_key AWS credential
23
+ # @option config [String] :secret_access_key
24
+ # AWS credential (deprecated, should use swf option)
25
+ # @option config [AWS::SimpleWorkflow] :swf
26
+ # AWS simple workflow object (created e.g. with AWS::SimpleWorkflow.new)
23
27
  # @option config [String] :task_list_suffix_file
24
28
  # Development option.
25
29
  # A random ID is stored at the given path, and appended to all task list names.
@@ -43,8 +47,10 @@ module Ntswf
43
47
 
44
48
  # @return [AWS::SimpleWorkflow]
45
49
  def swf
46
- @swf ||= AWS::SimpleWorkflow.new(access_key_id: @config.access_key_id,
47
- secret_access_key: @config.secret_access_key, use_ssl: true)
50
+ @swf ||= (@config.swf || AWS::SimpleWorkflow.new({
51
+ access_key_id: @config.access_key_id,
52
+ secret_access_key: @config.secret_access_key,
53
+ }))
48
54
  end
49
55
 
50
56
  def workflow_name
@@ -155,4 +161,4 @@ module Ntswf
155
161
  @suffix ||= File.read(file)
156
162
  end
157
163
  end
158
- end
164
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ntswf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-12 00:00:00.000000000 Z
12
+ date: 2014-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
@@ -32,17 +32,17 @@ dependencies:
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
- - - ! '>='
35
+ - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: '2.14'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
- - - ! '>='
43
+ - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '0'
45
+ version: '2.14'
46
46
  description: A layer around AWS SWF
47
47
  email: info@infopark.de
48
48
  executables: []