webpacker_uploader 0.1.0 → 0.5.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: fbdb29fdfafeddb7feb884a38b52e8805a42551a9d6562a74b011b9673926cd1
4
- data.tar.gz: 925e5c75c02b4b227b243a2a016de589e18b9072421ff20f4cc632a72834a74e
3
+ metadata.gz: 1b7937b7a57c7be6ea442c7d321feb36005dab87386227ad7f9bdbd262dbe838
4
+ data.tar.gz: abd3a34e04a85979607905611e354bbddaa6aa1c8059ed945e28bd5ed5bb7b13
5
5
  SHA512:
6
- metadata.gz: d5ac3ffbf041da9ec25dbc52e7dd8c6e63ee501a5a3eff6355efbf37124089d29c4ba6720b88310b5e083749aea1ac7c8be1a9c5692fb0eecfa6931a202cc8d5
7
- data.tar.gz: 9d16ddae2c7ca1efcbc0f1f4dbb4c5002c0b28281f652ff92e2a0bc28d849c7bb9828ee9e26121c157cdcc9d0221c78983d8c093865da35cacfe2433b9bcc30f
6
+ metadata.gz: b61d0ab52871ad4700df2ce3a79ad89d7aed913073aaba4370c580878d3dfc556c6f4a52332fde1b63430e7d9aea253e6bb07ac8fff14be2c295d835f560a40e
7
+ data.tar.gz: d41c5bb9716983ca88c6d3f8be8e93961b8cff4c57ffe635f2a9ef299fc0577856734d5da015e8a5e7232f2eb3ea98922989f535e202be283522ab2ec0494a64
data/.rubocop.yml CHANGED
@@ -1,23 +1,18 @@
1
- require: rubocop-performance
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-minitest
4
+
2
5
  AllCops:
3
6
  TargetRubyVersion: 2.5
4
7
  # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
5
8
  # to ignore them, so only the ones explicitly set in this file are enabled.
6
9
  DisabledByDefault: true
7
- Exclude:
8
- - 'lib/install/templates/**'
9
- - 'vendor/**/*'
10
- - 'node_modules/**/*'
10
+ SuggestExtensions: false
11
11
 
12
12
  # Prefer &&/|| over and/or.
13
13
  Style/AndOr:
14
14
  Enabled: true
15
15
 
16
- # Do not use braces for hash literals when they are the last argument of a
17
- # method call.
18
- Style/BracesAroundHashParameters:
19
- Enabled: true
20
-
21
16
  # Align `when` with `case`.
22
17
  Layout/CaseIndentation:
23
18
  Enabled: true
@@ -50,7 +45,7 @@ Style/HashSyntax:
50
45
  # extra level of indentation.
51
46
  Layout/IndentationConsistency:
52
47
  Enabled: true
53
- EnforcedStyle: rails
48
+ EnforcedStyle: indented_internal_methods
54
49
 
55
50
  # Two spaces, no tabs (for indentation).
56
51
  Layout/IndentationWidth:
@@ -99,11 +94,11 @@ Style/StringLiterals:
99
94
  EnforcedStyle: double_quotes
100
95
 
101
96
  # Detect hard tabs, no hard tabs.
102
- Layout/Tab:
97
+ Layout/IndentationStyle:
103
98
  Enabled: true
104
99
 
105
100
  # Blank lines should not have any spaces.
106
- Layout/TrailingBlankLines:
101
+ Layout/TrailingEmptyLines:
107
102
  Enabled: true
108
103
 
109
104
  # No trailing whitespace.
@@ -111,7 +106,7 @@ Layout/TrailingWhitespace:
111
106
  Enabled: true
112
107
 
113
108
  # Use quotes for string literals when they are enough.
114
- Style/UnneededPercentQ:
109
+ Style/RedundantPercentQ:
115
110
  Enabled: true
116
111
 
117
112
  # Align `end` with the matching keyword or starting expression except for
@@ -123,3 +118,192 @@ Layout/EndAlignment:
123
118
  # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
124
119
  Lint/RequireParentheses:
125
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 ADDED
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
+
5
+ ## [Unreleased]
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
+
14
+ ## [[0.4.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.4.0) - 2021-05-25
15
+
16
+ ### Changed
17
+
18
+ - 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))
19
+
20
+ ## [[0.3.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.3.0) - 2021-03-06
21
+
22
+ ### Added
23
+
24
+ - Allow gem configuration. ([@tlatsas](https://github.com/tlatsas))
25
+
26
+ ### Changed
27
+
28
+ - With the newly introduced configuration options, ignored file extension list is now empty by default.
29
+ This means that every file type will be uploaded unless otherwise specified. ([@tlatsas](https://github.com/tlatsas))
30
+
31
+ ## [[0.2.1]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.2.1) - 2021-02-09
32
+
33
+ ### Added
34
+
35
+ - Make file exclusion list configurable. ([#3](https://github.com/tlatsas/webpacker_uploader/pull/3), [@estebanz01](https://github.com/estebanz01))
36
+ - Support prefixing remote S3 paths. ([#2](https://github.com/tlatsas/webpacker_uploader/pull/2), [@estebanz01](https://github.com/estebanz01))
37
+ - AWS provider: Add support for EC2 instance profile credentials. ([#2](https://github.com/tlatsas/webpacker_uploader/pull/2), [@estebanz01](https://github.com/estebanz01))
38
+
39
+ ## [[0.1.0]](https://github.com/tlatsas/webpacker_uploader/releases/tag/v0.1.0) - 2020-10-01
40
+
41
+ ### Added
42
+
43
+ - Initial release. ([@tlatsas](https://github.com/tlatsas))
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,33 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker_uploader (0.1.0)
4
+ webpacker_uploader (0.5.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.0.3.3)
12
- actionview (= 6.0.3.3)
13
- activesupport (= 6.0.3.3)
14
- rack (~> 2.0, >= 2.0.8)
12
+ actionpack (6.1.4)
13
+ actionview (= 6.1.4)
14
+ activesupport (= 6.1.4)
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.0.3.3)
19
- activesupport (= 6.0.3.3)
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.0.3.3)
25
+ activesupport (6.1.4)
25
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
26
- i18n (>= 0.7, < 2)
27
- minitest (~> 5.1)
28
- tzinfo (~> 1.1)
29
- zeitwerk (~> 2.2, >= 2.2.2)
30
- ast (2.4.1)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ zeitwerk (~> 2.3)
31
+ ast (2.4.2)
31
32
  aws-eventstream (1.1.0)
32
33
  aws-partitions (1.376.0)
33
34
  aws-sdk-core (3.108.0)
@@ -45,29 +46,28 @@ GEM
45
46
  aws-sigv4 (1.2.2)
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
- erubi (1.9.0)
51
- i18n (1.8.5)
51
+ erubi (1.10.0)
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.7.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)
62
- mini_portile2 (2.4.0)
61
+ mime-types-data (3.2021.0225)
63
62
  minitest (5.14.2)
64
- nokogiri (1.10.10)
65
- mini_portile2 (~> 2.4.0)
66
- parallel (1.19.2)
67
- parser (2.7.1.4)
63
+ nokogiri (1.11.7-x86_64-darwin)
64
+ racc (~> 1.4)
65
+ parallel (1.20.1)
66
+ parser (3.0.0.0)
68
67
  ast (~> 2.4.1)
68
+ racc (1.5.2)
69
69
  rack (2.2.3)
70
- rack-proxy (0.6.5)
70
+ rack-proxy (0.7.0)
71
71
  rack
72
72
  rack-test (1.1.0)
73
73
  rack (>= 1.0, < 3)
@@ -76,36 +76,45 @@ GEM
76
76
  nokogiri (>= 1.6)
77
77
  rails-html-sanitizer (1.3.0)
78
78
  loofah (~> 2.3)
79
- railties (6.0.3.3)
80
- actionpack (= 6.0.3.3)
81
- activesupport (= 6.0.3.3)
79
+ railties (6.1.4)
80
+ actionpack (= 6.1.4)
81
+ activesupport (= 6.1.4)
82
82
  method_source
83
- rake (>= 0.8.7)
84
- thor (>= 0.20.3, < 2.0)
83
+ rake (>= 0.13)
84
+ thor (~> 1.0)
85
85
  rainbow (3.0.0)
86
86
  rake (12.3.3)
87
- rubocop (0.68.1)
88
- jaro_winkler (~> 1.5.1)
87
+ regexp_parser (2.1.1)
88
+ rexml (3.2.5)
89
+ rubocop (1.11.0)
89
90
  parallel (~> 1.10)
90
- parser (>= 2.5, != 2.5.1.1)
91
+ parser (>= 3.0.0.0)
91
92
  rainbow (>= 2.2.2, < 4.0)
93
+ regexp_parser (>= 1.8, < 3.0)
94
+ rexml
95
+ rubocop-ast (>= 1.2.0, < 2.0)
92
96
  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.0)
98
- thor (1.0.1)
99
- thread_safe (0.3.6)
100
- tzinfo (1.2.7)
101
- thread_safe (~> 0.1)
102
- unicode-display_width (1.5.0)
103
- webpacker (5.2.1)
97
+ unicode-display_width (>= 1.4.0, < 3.0)
98
+ rubocop-ast (1.4.1)
99
+ parser (>= 2.7.1.5)
100
+ rubocop-minitest (0.10.3)
101
+ rubocop (>= 0.87, < 2.0)
102
+ rubocop-performance (1.10.1)
103
+ rubocop (>= 0.90.0, < 2.0)
104
+ rubocop-ast (>= 0.4.0)
105
+ ruby-progressbar (1.11.0)
106
+ semantic_range (3.0.0)
107
+ thor (1.1.0)
108
+ tzinfo (2.0.4)
109
+ concurrent-ruby (~> 1.0)
110
+ unicode-display_width (2.0.0)
111
+ webpacker (5.4.0)
104
112
  activesupport (>= 5.2)
105
113
  rack-proxy (>= 0.6.1)
106
114
  railties (>= 5.2)
107
115
  semantic_range (>= 2.3.0)
108
- zeitwerk (2.4.0)
116
+ yard (0.9.26)
117
+ zeitwerk (2.4.2)
109
118
 
110
119
  PLATFORMS
111
120
  ruby
@@ -115,9 +124,11 @@ DEPENDENCIES
115
124
  bundler (>= 1.3.0)
116
125
  minitest (~> 5.0)
117
126
  rake (>= 11.1)
118
- rubocop (< 0.69)
127
+ rubocop (= 1.11.0)
128
+ rubocop-minitest
119
129
  rubocop-performance
120
130
  webpacker_uploader!
131
+ yard (~> 0.9)
121
132
 
122
133
  BUNDLED WITH
123
134
  2.1.4