webpacker_uploader 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 9d407175001e05a3c3522b8c9bba99cafc72cb32a9df652365ce1439c52d767c
4
- data.tar.gz: df8db318be96fab4093276b64eab2af88a8a958b0770acd5c239435f76c84005
3
+ metadata.gz: 1b7937b7a57c7be6ea442c7d321feb36005dab87386227ad7f9bdbd262dbe838
4
+ data.tar.gz: abd3a34e04a85979607905611e354bbddaa6aa1c8059ed945e28bd5ed5bb7b13
5
5
  SHA512:
6
- metadata.gz: 8a633e9148248ad9b0e4650ebf45d6cfcb8a57cc1033ad4c070439e1a1b2883f45deec3b55e78b49f0f74b9f1c0047f6a0b5293ed4cdf593009aeff4c9a56342
7
- data.tar.gz: f69e05fbc4fff7ba958dd5d0075d0a85cea9edf4508917e5f3be78fb37442a980c1c85d0363151d37f1f2afef7a8248d080a7de49c141a7256c9c3b20ff53cff
6
+ metadata.gz: b61d0ab52871ad4700df2ce3a79ad89d7aed913073aaba4370c580878d3dfc556c6f4a52332fde1b63430e7d9aea253e6bb07ac8fff14be2c295d835f560a40e
7
+ data.tar.gz: d41c5bb9716983ca88c6d3f8be8e93961b8cff4c57ffe635f2a9ef299fc0577856734d5da015e8a5e7232f2eb3ea98922989f535e202be283522ab2ec0494a64
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [[0.5.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.5.0) - 2021-07-12
8
+
9
+ ### Fixed
10
+
11
+ - Change the way we pass the named profile option in the AWS provider. This allows the full resolution of credentials implemented
12
+ in Aws::CredentialProviderChain to work for all kinds of role assumptions, profile extensions, etc. ([#10](https://github.com/tlatsas/webpacker_uploader/pull/10), [@eirc](https://github.com/eirc))
13
+
7
14
  ## [[0.4.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.4.0) - 2021-05-25
8
15
 
9
16
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker_uploader (0.4.0)
4
+ webpacker_uploader (0.5.0)
5
5
  mime-types
6
6
  rack (~> 2.0)
7
7
  webpacker (>= 5.1)
@@ -9,20 +9,20 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.1.3.2)
13
- actionview (= 6.1.3.2)
14
- activesupport (= 6.1.3.2)
12
+ actionpack (6.1.4)
13
+ actionview (= 6.1.4)
14
+ activesupport (= 6.1.4)
15
15
  rack (~> 2.0, >= 2.0.9)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.3.2)
20
- activesupport (= 6.1.3.2)
19
+ actionview (6.1.4)
20
+ activesupport (= 6.1.4)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activesupport (6.1.3.2)
25
+ activesupport (6.1.4)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 1.6, < 2)
28
28
  minitest (>= 5.1)
@@ -46,30 +46,28 @@ GEM
46
46
  aws-sigv4 (1.2.2)
47
47
  aws-eventstream (~> 1, >= 1.0.2)
48
48
  builder (3.2.4)
49
- concurrent-ruby (1.1.8)
49
+ concurrent-ruby (1.1.9)
50
50
  crass (1.0.6)
51
51
  erubi (1.10.0)
52
52
  i18n (1.8.10)
53
53
  concurrent-ruby (~> 1.0)
54
54
  jmespath (1.4.0)
55
- loofah (2.9.1)
55
+ loofah (2.10.0)
56
56
  crass (~> 1.0.2)
57
57
  nokogiri (>= 1.5.9)
58
58
  method_source (1.0.0)
59
59
  mime-types (3.3.1)
60
60
  mime-types-data (~> 3.2015)
61
61
  mime-types-data (3.2021.0225)
62
- mini_portile2 (2.5.1)
63
62
  minitest (5.14.2)
64
- nokogiri (1.11.5)
65
- mini_portile2 (~> 2.5.0)
63
+ nokogiri (1.11.7-x86_64-darwin)
66
64
  racc (~> 1.4)
67
65
  parallel (1.20.1)
68
66
  parser (3.0.0.0)
69
67
  ast (~> 2.4.1)
70
68
  racc (1.5.2)
71
69
  rack (2.2.3)
72
- rack-proxy (0.6.5)
70
+ rack-proxy (0.7.0)
73
71
  rack
74
72
  rack-test (1.1.0)
75
73
  rack (>= 1.0, < 3)
@@ -78,11 +76,11 @@ GEM
78
76
  nokogiri (>= 1.6)
79
77
  rails-html-sanitizer (1.3.0)
80
78
  loofah (~> 2.3)
81
- railties (6.1.3.2)
82
- actionpack (= 6.1.3.2)
83
- activesupport (= 6.1.3.2)
79
+ railties (6.1.4)
80
+ actionpack (= 6.1.4)
81
+ activesupport (= 6.1.4)
84
82
  method_source
85
- rake (>= 0.8.7)
83
+ rake (>= 0.13)
86
84
  thor (~> 1.0)
87
85
  rainbow (3.0.0)
88
86
  rake (12.3.3)
@@ -45,7 +45,7 @@ module WebpackerUploader
45
45
  # }
46
46
  # provider = WebpackerUploader::Providers::Aws.new(provider_options)
47
47
  def initialize(options)
48
- @client = ::Aws::S3::Client.new(credentials: credentials(options[:credentials]), region: options[:region])
48
+ @client = ::Aws::S3::Client.new(client_options(options))
49
49
  @resource = ::Aws::S3::Resource.new(client: @client)
50
50
  @bucket = @resource.bucket(options[:bucket])
51
51
  end
@@ -62,13 +62,17 @@ module WebpackerUploader
62
62
  end
63
63
 
64
64
  private
65
+ def client_options(options)
66
+ opts = { region: options[:region] }
67
+ opts[:profile] = options[:profile_name] if options.key? :profile_name
68
+ opts[:credentials] = credentials(options) if credentials(options)
69
+ opts
70
+ end
65
71
 
66
72
  def credentials(options)
67
- if options[:profile_name].present?
68
- ::Aws::SharedCredentials.new(profile_name: options[:profile_name])
69
- elsif options.key?(:instance_profile) && options[:instance_profile]
73
+ if options.key?(:instance_profile) && options[:instance_profile]
70
74
  ::Aws::InstanceProfileCredentials.new
71
- else
75
+ elsif options.key?(:access_key_id)
72
76
  ::Aws::Credentials.new(options[:access_key_id], options[:secret_access_key])
73
77
  end
74
78
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebpackerUploader
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpacker_uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Latsas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-25 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: webpacker
@@ -147,7 +147,7 @@ metadata:
147
147
  homepage_uri: https://github.com/tlatsas/webpacker_uploader
148
148
  bug_tracker_uri: https://github.com/tlatsas/webpacker_uploader/issues
149
149
  changelog_uri: https://github.com/tlatsas/webpacker_uploader/blob/main/CHANGELOG.md
150
- source_code_uri: https://github.com/tlatsas/webpacker_uploader/tree/v0.4.0
150
+ source_code_uri: https://github.com/tlatsas/webpacker_uploader/tree/v0.5.0
151
151
  post_install_message:
152
152
  rdoc_options: []
153
153
  require_paths: