dpl-lambda 1.9.1.travis.2711.5 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/dpl/provider/lambda.rb +10 -2
  3. metadata +9 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 16e014844d30f9968b70c1953c51146173a38c5055907937f805c84dd162a28d
4
- data.tar.gz: 66e8e3f4439d2a8c2f6ec4c3b7aabff08dbe693a5c182aad5abfb04168cd9261
2
+ SHA1:
3
+ metadata.gz: b14962dda824c1152494441b2ca7c08ff118aeb8
4
+ data.tar.gz: e39264a2006d81fbe721ba61bc268651a773f852
5
5
  SHA512:
6
- metadata.gz: 61c06841075007ea68dee7c5a0d972bd7fa38ef16ef85352a40004bc83abb39194c991d3ba2f12e1704f196ddf00cd4e77d1737cb5ee4559883db97e2a05e296
7
- data.tar.gz: 3da2518724cb4563decb79b727dbf54029eff5dc0c932960d306be80361061e53a16ae31ad3167e5128947161d017a2f84b9fa106840438f28377187f9698f6f
6
+ metadata.gz: 52a5574442908a20f748346fec7dc408e947ffc9e70833319e69eddabe84899fbfc774bf1b1ae5e1831dcdd5a749122735c2ca847c5923b6e5b1a17b26178b46
7
+ data.tar.gz: 643c8513ec47ef67402a65bc310e0606e91dd74d31de3f9deee2c863d380ff3af91f6b053a593657355d1838dabe01bf27ed2c59bcd1122e2d12b766f32e41f2
@@ -11,10 +11,18 @@ module DPL
11
11
  @lambda ||= ::Aws::Lambda::Client.new(lambda_options)
12
12
  end
13
13
 
14
+ def access_key_id
15
+ options[:access_key_id] || context.env['AWS_ACCESS_KEY_ID'] || raise(Error, "missing access_key_id")
16
+ end
17
+
18
+ def secret_access_key
19
+ options[:secret_access_key] || context.env['AWS_SECRET_ACCESS_KEY'] || raise(Error, "missing secret_access_key")
20
+ end
21
+
14
22
  def lambda_options
15
23
  {
16
24
  region: options[:region] || 'us-east-1',
17
- credentials: ::Aws::Credentials.new(option(:access_key_id), option(:secret_access_key))
25
+ credentials: ::Aws::Credentials.new(access_key_id, secret_access_key)
18
26
  }
19
27
  end
20
28
 
@@ -157,7 +165,7 @@ module DPL
157
165
  end
158
166
 
159
167
  def check_auth
160
- log "Using Access Key: #{option(:access_key_id)[-4..-1].rjust(20, '*')}"
168
+ log "Using Access Key: #{access_key_id[-4..-1].rjust(20, '*')}"
161
169
  end
162
170
 
163
171
  def output_file_path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl-lambda
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1.travis.2711.5
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-10 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dpl
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.9.1.travis.2711.5
19
+ version: 1.9.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.9.1.travis.2711.5
26
+ version: 1.9.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sdk
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -174,13 +174,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
174
  version: '2.2'
175
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - ">"
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: 1.3.1
179
+ version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.7.6
182
+ rubygems_version: 2.6.13
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: deploy tool
186
- test_files: []
186
+ test_files:
187
+ - spec/provider/lambda_spec.rb