webpacker_uploader 0.2.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afcb36d0e425f938651b2aea9ac9e51044213196a4b962b3a40ab12f0a7d7aa0
4
- data.tar.gz: 11a5794d1f92a496cbd174a6e17c6c416e31c21f7939d21f9a724ce72bf0ca2a
3
+ metadata.gz: b1f1e410b9ed124323d818d4b436581aecd735717f47176bf9754091209e608d
4
+ data.tar.gz: e8732c0cab079cf51864b1addd8a3e8d94c1487fa371872213f5343f2473de03
5
5
  SHA512:
6
- metadata.gz: 0f29b023448d8b68eb5ac8029ec88a8be63a15dc0e5e960b0064b7d69fb4d5abd8d64aa236541f3fc8eb8a9378ead16e15ce74825359de2a4dbe5a69c9149ab1
7
- data.tar.gz: ac84915b894fb2dc9c46f1c89c738fd31001abfb4c66f190ff3676fd58ca92a31e49eb30f6c9f7342ac5a5fbab5e89eeda91b17af7a201feb2c1b6f7f5433bf9
6
+ metadata.gz: 0c52c1f98939ca6338579e23fbe186fadfa1b22204bf62ceaffdb3ec4e2387c2f0763330a0db7cfcbc898e7a77035719749458b5828a0d5b7ba3b3b78ecde8e0
7
+ data.tar.gz: 2dde591f7f50548ad64a14f401b325aa3a4e83566c78463602406a458d6d6bc331843ab188fd7142c8be616722671574bf43ec36d0d0dcc9155f9253bdc61c84
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  .ruby-version
10
10
  *.gem
11
11
  /test/test_app/log/
12
+ /integration/dummy/log/
data/.rubocop.yml CHANGED
@@ -1,20 +1,18 @@
1
- require: rubocop-performance
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-minitest
2
4
 
3
5
  AllCops:
4
6
  TargetRubyVersion: 2.5
5
7
  # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
6
8
  # to ignore them, so only the ones explicitly set in this file are enabled.
7
9
  DisabledByDefault: true
10
+ SuggestExtensions: false
8
11
 
9
12
  # Prefer &&/|| over and/or.
10
13
  Style/AndOr:
11
14
  Enabled: true
12
15
 
13
- # Do not use braces for hash literals when they are the last argument of a
14
- # method call.
15
- Style/BracesAroundHashParameters:
16
- Enabled: true
17
-
18
16
  # Align `when` with `case`.
19
17
  Layout/CaseIndentation:
20
18
  Enabled: true
@@ -47,7 +45,7 @@ Style/HashSyntax:
47
45
  # extra level of indentation.
48
46
  Layout/IndentationConsistency:
49
47
  Enabled: true
50
- EnforcedStyle: rails
48
+ EnforcedStyle: indented_internal_methods
51
49
 
52
50
  # Two spaces, no tabs (for indentation).
53
51
  Layout/IndentationWidth:
@@ -96,11 +94,11 @@ Style/StringLiterals:
96
94
  EnforcedStyle: double_quotes
97
95
 
98
96
  # Detect hard tabs, no hard tabs.
99
- Layout/Tab:
97
+ Layout/IndentationStyle:
100
98
  Enabled: true
101
99
 
102
100
  # Blank lines should not have any spaces.
103
- Layout/TrailingBlankLines:
101
+ Layout/TrailingEmptyLines:
104
102
  Enabled: true
105
103
 
106
104
  # No trailing whitespace.
@@ -108,7 +106,7 @@ Layout/TrailingWhitespace:
108
106
  Enabled: true
109
107
 
110
108
  # Use quotes for string literals when they are enough.
111
- Style/UnneededPercentQ:
109
+ Style/RedundantPercentQ:
112
110
  Enabled: true
113
111
 
114
112
  # Align `end` with the matching keyword or starting expression except for
@@ -120,3 +118,192 @@ Layout/EndAlignment:
120
118
  # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
121
119
  Lint/RequireParentheses:
122
120
  Enabled: true
121
+
122
+ Minitest/AssertEmpty:
123
+ Enabled: true
124
+
125
+ Minitest/AssertEmptyLiteral:
126
+ Enabled: true
127
+
128
+ Minitest/AssertEqual:
129
+ Enabled: true
130
+
131
+ Minitest/AssertionInLifecycleHook:
132
+ Enabled: true
133
+
134
+ Minitest/AssertMatch:
135
+ Enabled: true
136
+
137
+ Minitest/AssertIncludes:
138
+ Enabled: true
139
+
140
+ Minitest/AssertInstanceOf:
141
+ Enabled: true
142
+
143
+ Minitest/AssertKindOf:
144
+ Enabled: true
145
+
146
+ Minitest/AssertNil:
147
+ Enabled: true
148
+
149
+ Minitest/AssertOutput:
150
+ Enabled: true
151
+
152
+ Minitest/AssertPathExists:
153
+ Enabled: true
154
+
155
+ Minitest/AssertRespondTo:
156
+ Enabled: true
157
+
158
+ Minitest/AssertSilent:
159
+ Enabled: true
160
+
161
+ Minitest/AssertTruthy:
162
+ Enabled: true
163
+
164
+ Minitest/GlobalExpectations:
165
+ Enabled: true
166
+
167
+ Minitest/LiteralAsActualArgument:
168
+ Enabled: true
169
+
170
+ Minitest/RefuteEmpty:
171
+ Enabled: true
172
+
173
+ Minitest/RefuteEqual:
174
+ Enabled: true
175
+
176
+ Minitest/RefuteFalse:
177
+ Enabled: true
178
+
179
+ Minitest/RefuteIncludes:
180
+ Enabled: true
181
+
182
+ Minitest/RefuteMatch:
183
+ Enabled: true
184
+
185
+ Minitest/RefuteInstanceOf:
186
+ Enabled: true
187
+
188
+ Minitest/RefuteKindOf:
189
+ Enabled: true
190
+
191
+ Minitest/RefuteNil:
192
+ Enabled: true
193
+
194
+ Minitest/RefutePathExists:
195
+ Enabled: true
196
+
197
+ Minitest/RefuteRespondTo:
198
+ Enabled: true
199
+
200
+ Minitest/TestMethodName:
201
+ Enabled: true
202
+
203
+ Minitest/UnspecifiedException:
204
+ Enabled: true
205
+
206
+ # Use `bind_call(obj, args, ...)` instead of `bind(obj).call(args, ...)`.
207
+ Performance/BindCall:
208
+ Enabled: true
209
+
210
+ # Use `caller(n..n)` instead of `caller`.
211
+ Performance/Caller:
212
+ Enabled: true
213
+
214
+ # Use `casecmp` for case comparison.
215
+ Performance/Casecmp:
216
+ Enabled: true
217
+
218
+ # Extract Array and Hash literals outside of loops into local variables or constants.
219
+ Performance/CollectionLiteralInLoop:
220
+ Enabled: true
221
+
222
+ # Prefer `sort_by(&:foo)` instead of `sort { |a, b| a.foo <=> b.foo }`.
223
+ Performance/CompareWithBlock:
224
+ Enabled: true
225
+
226
+ # Use `count` instead of `{select,find_all,filter,reject}...{size,count,length}`.
227
+ Performance/Count:
228
+ Enabled: true
229
+
230
+ # Use `delete_prefix` instead of `gsub`.
231
+ Performance/DeletePrefix:
232
+ Enabled: true
233
+
234
+ # Use `delete_suffix` instead of `gsub`.
235
+ Performance/DeleteSuffix:
236
+ Enabled: true
237
+
238
+ # Use `detect` instead of `select.first`, `find_all.first`, `filter.first`, `select.last`, `find_all.last`, and `filter.last`.
239
+ Performance/Detect:
240
+ Enabled: true
241
+
242
+ # Use `str.{start,end}_with?(x, ..., y, ...)` instead of `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
243
+ Performance/DoubleStartEndWith:
244
+ Enabled: true
245
+
246
+ # Use `end_with?` instead of a regex match anchored to the end of a string.
247
+ Performance/EndWith:
248
+ Enabled: true
249
+
250
+ # Do not compute the size of statically sized objects except in constants.
251
+ Performance/FixedSize:
252
+ Enabled: true
253
+
254
+ # Use `Enumerable#flat_map` instead of `Enumerable#map...Array#flatten(1).
255
+ Performance/FlatMap:
256
+ Enabled: true
257
+
258
+ # Use `key?` or `value?` instead of `keys.include?` or `values.include?`.
259
+ Performance/InefficientHashSearch:
260
+ Enabled: true
261
+
262
+ # Use `Range#cover?` instead of `Range#include?` (or `Range#member?`).
263
+ Performance/RangeInclude:
264
+ Enabled: true
265
+
266
+ # Use `yield` instead of `block.call`.
267
+ Performance/RedundantBlockCall:
268
+ Enabled: true
269
+
270
+ # Use `=~` instead of `String#match` or `Regexp#match` in a context where the returned `MatchData` is not needed.
271
+ Performance/RedundantMatch:
272
+ Enabled: true
273
+
274
+ # Use Hash#[]=, rather than Hash#merge! with a single key-value pair.
275
+ Performance/RedundantMerge:
276
+ Enabled: true
277
+
278
+ # Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===`, or `=~` when `MatchData` is not used.
279
+ Performance/RegexpMatch:
280
+ Enabled: true
281
+
282
+ # Use `reverse_each` instead of `reverse.each`.
283
+ Performance/ReverseEach:
284
+ Enabled: true
285
+
286
+ # Use `size` instead of `count` for counting the number of elements in `Array` and `Hash`.
287
+ Performance/Size:
288
+ Enabled: true
289
+
290
+ # Use `start_with?` instead of a regex match anchored to the beginning of a string.
291
+ Performance/StartWith:
292
+ Enabled: true
293
+
294
+ # Use `tr` instead of `gsub` when you are replacing the same number of characters.
295
+ # Use `delete` instead of `gsub` when you are deleting characters.
296
+ Performance/StringReplacement:
297
+ Enabled: true
298
+
299
+ # Checks for .times.map calls.
300
+ Performance/TimesMap:
301
+ Enabled: true
302
+
303
+ # Use unary plus to get an unfrozen string literal.
304
+ Performance/UnfreezeString:
305
+ Enabled: true
306
+
307
+ # Use `URI::DEFAULT_PARSER` instead of `URI::Parser.new`.
308
+ Performance/UriDefaultParser:
309
+ Enabled: true
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ --title "WebpackerUploader Documentation"
2
+ --readme README.md
3
+ --markup markdown
4
+ --hide-void-return
5
+ --no-private
6
+ -
7
+ CHANGELOG.md
8
+ MIT-LICENSE
data/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ All notable changes to this project will be documented in this file. The format
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [[0.6.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.6.0) - 2021-07-20
8
+
9
+ ### Added
10
+
11
+ - Allow passing arbitrary options to the AWS S3 Client through the AWS provider. ([#11](https://github.com/tlatsas/webpacker_uploader/pull/11), [@tlatsas](https://github.com/tlatsas))
12
+
13
+ ### Fixed
14
+
15
+ - Fix undefined method delegate for WebpackerUploader:Module when using the console script. ([#13](https://github.com/tlatsas/webpacker_uploader/pull/13), [@tlatsas](https://github.com/tlatsas))
16
+
17
+ ## [[0.5.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.5.0) - 2021-07-12
18
+
19
+ ### Fixed
20
+
21
+ - Change the way we pass the named profile option in the AWS provider. This allows the full resolution of credentials implemented
22
+ 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))
23
+
24
+ ## [[0.4.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.4.0) - 2021-05-25
25
+
26
+ ### Changed
27
+
28
+ - Logger is now part of the configuration object instead of a class attribute. ([#9](https://github.com/tlatsas/webpacker_uploader/pull/9), [@tlatsas](https://github.com/tlatsas))
29
+
30
+ ## [[0.3.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.3.0) - 2021-03-06
31
+
32
+ ### Added
33
+
34
+ - Allow gem configuration. ([@tlatsas](https://github.com/tlatsas))
35
+
36
+ ### Changed
37
+
38
+ - With the newly introduced configuration options, ignored file extension list is now empty by default.
39
+ This means that every file type will be uploaded unless otherwise specified. ([@tlatsas](https://github.com/tlatsas))
40
+
7
41
  ## [[0.2.1]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.2.1) - 2021-02-09
8
42
 
9
43
  ### Added
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ gemspec
4
4
 
5
5
  gem "rake", ">= 11.1"
6
6
  gem "aws-sdk-s3"
7
+ gem "yard", "~> 0.9"
7
8
 
8
9
  group :test do
9
10
  gem "minitest", "~> 5.0"
data/Gemfile.lock CHANGED
@@ -1,73 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker_uploader (0.2.1)
4
+ webpacker_uploader (0.6.0)
5
5
  mime-types
6
+ rack (~> 2.0)
6
7
  webpacker (>= 5.1)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actionpack (6.1.1)
12
- actionview (= 6.1.1)
13
- activesupport (= 6.1.1)
12
+ actionpack (6.1.4)
13
+ actionview (= 6.1.4)
14
+ activesupport (= 6.1.4)
14
15
  rack (~> 2.0, >= 2.0.9)
15
16
  rack-test (>= 0.6.3)
16
17
  rails-dom-testing (~> 2.0)
17
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.1.1)
19
- activesupport (= 6.1.1)
19
+ actionview (6.1.4)
20
+ activesupport (= 6.1.4)
20
21
  builder (~> 3.1)
21
22
  erubi (~> 1.4)
22
23
  rails-dom-testing (~> 2.0)
23
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activesupport (6.1.1)
25
+ activesupport (6.1.4)
25
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
26
27
  i18n (>= 1.6, < 2)
27
28
  minitest (>= 5.1)
28
29
  tzinfo (~> 2.0)
29
30
  zeitwerk (~> 2.3)
30
- ast (2.4.1)
31
- aws-eventstream (1.1.0)
32
- aws-partitions (1.376.0)
33
- aws-sdk-core (3.108.0)
31
+ ast (2.4.2)
32
+ aws-eventstream (1.1.1)
33
+ aws-partitions (1.477.0)
34
+ aws-sdk-core (3.117.0)
34
35
  aws-eventstream (~> 1, >= 1.0.2)
35
36
  aws-partitions (~> 1, >= 1.239.0)
36
37
  aws-sigv4 (~> 1.1)
37
38
  jmespath (~> 1.0)
38
- aws-sdk-kms (1.38.0)
39
- aws-sdk-core (~> 3, >= 3.99.0)
39
+ aws-sdk-kms (1.44.0)
40
+ aws-sdk-core (~> 3, >= 3.112.0)
40
41
  aws-sigv4 (~> 1.1)
41
- aws-sdk-s3 (1.81.1)
42
- aws-sdk-core (~> 3, >= 3.104.3)
42
+ aws-sdk-s3 (1.96.1)
43
+ aws-sdk-core (~> 3, >= 3.112.0)
43
44
  aws-sdk-kms (~> 1)
44
45
  aws-sigv4 (~> 1.1)
45
- aws-sigv4 (1.2.2)
46
+ aws-sigv4 (1.2.4)
46
47
  aws-eventstream (~> 1, >= 1.0.2)
47
48
  builder (3.2.4)
48
- concurrent-ruby (1.1.7)
49
+ concurrent-ruby (1.1.9)
49
50
  crass (1.0.6)
50
51
  erubi (1.10.0)
51
- i18n (1.8.7)
52
+ i18n (1.8.10)
52
53
  concurrent-ruby (~> 1.0)
53
- jaro_winkler (1.5.4)
54
54
  jmespath (1.4.0)
55
- loofah (2.8.0)
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
- mime-types-data (3.2020.0512)
61
+ mime-types-data (3.2021.0704)
62
+ mini_portile2 (2.5.3)
62
63
  minitest (5.14.2)
63
- nokogiri (1.11.1-x86_64-darwin)
64
+ nokogiri (1.11.7)
65
+ mini_portile2 (~> 2.5.0)
64
66
  racc (~> 1.4)
65
- parallel (1.19.2)
66
- parser (2.7.1.4)
67
+ parallel (1.20.1)
68
+ parser (3.0.0.0)
67
69
  ast (~> 2.4.1)
68
70
  racc (1.5.2)
69
71
  rack (2.2.3)
70
- rack-proxy (0.6.5)
72
+ rack-proxy (0.7.0)
71
73
  rack
72
74
  rack-test (1.1.0)
73
75
  rack (>= 1.0, < 3)
@@ -76,34 +78,44 @@ GEM
76
78
  nokogiri (>= 1.6)
77
79
  rails-html-sanitizer (1.3.0)
78
80
  loofah (~> 2.3)
79
- railties (6.1.1)
80
- actionpack (= 6.1.1)
81
- activesupport (= 6.1.1)
81
+ railties (6.1.4)
82
+ actionpack (= 6.1.4)
83
+ activesupport (= 6.1.4)
82
84
  method_source
83
- rake (>= 0.8.7)
85
+ rake (>= 0.13)
84
86
  thor (~> 1.0)
85
87
  rainbow (3.0.0)
86
88
  rake (12.3.3)
87
- rubocop (0.68.1)
88
- jaro_winkler (~> 1.5.1)
89
+ regexp_parser (2.1.1)
90
+ rexml (3.2.5)
91
+ rubocop (1.11.0)
89
92
  parallel (~> 1.10)
90
- parser (>= 2.5, != 2.5.1.1)
93
+ parser (>= 3.0.0.0)
91
94
  rainbow (>= 2.2.2, < 4.0)
95
+ regexp_parser (>= 1.8, < 3.0)
96
+ rexml
97
+ rubocop-ast (>= 1.2.0, < 2.0)
92
98
  ruby-progressbar (~> 1.7)
93
- unicode-display_width (>= 1.4.0, < 1.6)
94
- rubocop-performance (1.3.0)
95
- rubocop (>= 0.68.0)
96
- ruby-progressbar (1.10.1)
97
- semantic_range (2.3.1)
98
- thor (1.0.1)
99
+ unicode-display_width (>= 1.4.0, < 3.0)
100
+ rubocop-ast (1.4.1)
101
+ parser (>= 2.7.1.5)
102
+ rubocop-minitest (0.10.3)
103
+ rubocop (>= 0.87, < 2.0)
104
+ rubocop-performance (1.10.1)
105
+ rubocop (>= 0.90.0, < 2.0)
106
+ rubocop-ast (>= 0.4.0)
107
+ ruby-progressbar (1.11.0)
108
+ semantic_range (3.0.0)
109
+ thor (1.1.0)
99
110
  tzinfo (2.0.4)
100
111
  concurrent-ruby (~> 1.0)
101
- unicode-display_width (1.5.0)
102
- webpacker (5.2.1)
112
+ unicode-display_width (2.0.0)
113
+ webpacker (5.4.0)
103
114
  activesupport (>= 5.2)
104
115
  rack-proxy (>= 0.6.1)
105
116
  railties (>= 5.2)
106
117
  semantic_range (>= 2.3.0)
118
+ yard (0.9.26)
107
119
  zeitwerk (2.4.2)
108
120
 
109
121
  PLATFORMS
@@ -114,9 +126,11 @@ DEPENDENCIES
114
126
  bundler (>= 1.3.0)
115
127
  minitest (~> 5.0)
116
128
  rake (>= 11.1)
117
- rubocop (< 0.69)
129
+ rubocop (= 1.11.0)
130
+ rubocop-minitest
118
131
  rubocop-performance
119
132
  webpacker_uploader!
133
+ yard (~> 0.9)
120
134
 
121
135
  BUNDLED WITH
122
136
  2.1.4