attributor-flatpack 1.2.4 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -1
- data/CHANGELOG.md +7 -3
- data/lib/attributor/flatpack.rb +1 -0
- data/lib/attributor/flatpack/types/multiline_string.rb +18 -0
- data/lib/attributor/flatpack/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7ba5d07df3cd10ee6e98585c8b11179a9076277
|
4
|
+
data.tar.gz: 3086f4ea1f236e744771245993917855eff749e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939304f1c55c7a9efcd26b0d2b9aa06f97b4b0941d6f1df24bb714ed5e4dd1c4d9424c02b932c05a61a3b7e4c3b4b12a3283c5f9c0c3790e4a9cb564154f087b
|
7
|
+
data.tar.gz: 21b3fa39b3701e4e28d42c9798c2cb64a70740304e5e5857afa09e7af39a0207337552ebe73107f2018c341242488fcf9de3de155e2878241fe8f4afc8a8ffc0
|
data/.rubocop.yml
CHANGED
@@ -13,8 +13,13 @@ Metrics/MethodLength:
|
|
13
13
|
Metrics/ClassLength:
|
14
14
|
Enabled: false
|
15
15
|
Metrics/LineLength:
|
16
|
-
Max:
|
16
|
+
Max: 160
|
17
|
+
Exclude:
|
18
|
+
- "spec/**/*.rb"
|
17
19
|
Style/RedundantSelf:
|
18
20
|
Enabled: false
|
19
21
|
Style/DoubleNegation:
|
20
22
|
Enabled: false
|
23
|
+
Metrics/BlockLength:
|
24
|
+
Exclude:
|
25
|
+
- spec/**/*.rb
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,17 @@
|
|
1
1
|
# attributor-flatpack changelog
|
2
2
|
|
3
|
+
## 1.3
|
4
|
+
|
5
|
+
- Add `Attributor::Flatpack::MultilineString` type to handle multiline strings from environment variables.
|
6
|
+
|
3
7
|
## 1.2
|
4
8
|
|
5
|
-
|
9
|
+
- Add support for redefining the separator
|
6
10
|
|
7
11
|
## 1.1
|
8
12
|
|
9
|
-
|
13
|
+
- Significant performance improvements. See [benchmark results](benchmark/output.txt) for comparisons.
|
10
14
|
|
11
15
|
## 1.0
|
12
16
|
|
13
|
-
|
17
|
+
- Initial Release
|
data/lib/attributor/flatpack.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Sometimes a multline string when read in by ruby has escaped newlines, sometimes not.
|
2
|
+
# This type will remove any escaping of newline from a string.
|
3
|
+
|
4
|
+
module Attributor
|
5
|
+
module Flatpack
|
6
|
+
class MultilineString < Attributor::String
|
7
|
+
def self.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options)
|
8
|
+
value.gsub('\\n', "\n")
|
9
|
+
rescue StandardError
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.example(*)
|
14
|
+
'-----BEGIN EC PRIVATE KEY-----\\nMIHcAgEBBEI\\n3abcdefghijklmnop==\\n-----END EC PRIVATE KEY-----'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attributor-flatpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dane Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attributor
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- lib/attributor/flatpack.rb
|
222
222
|
- lib/attributor/flatpack/config.rb
|
223
223
|
- lib/attributor/flatpack/config_dsl_compiler.rb
|
224
|
+
- lib/attributor/flatpack/types/multiline_string.rb
|
224
225
|
- lib/attributor/flatpack/undefined_key.rb
|
225
226
|
- lib/attributor/flatpack/version.rb
|
226
227
|
homepage: https://github.com/careo/attributor-flatpack
|