parameter_substitution 1.3.0 → 1.3.1.pre.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: 9b63fba8d03676790dc3e2dae080de2954298061b8c0d159b966eab4c33c70f5
4
- data.tar.gz: c00fe3373fe30323f8d7bb2f90c83dd43b575615b51752d6e63b6386f3f78cad
3
+ metadata.gz: 727ab4eeca4872c67af4817685232b7159a717042d0409afa2d822b92deb991c
4
+ data.tar.gz: e530bc8ba18629698b3cb44945f76417d9db8bd583be526ca61552c9316319b2
5
5
  SHA512:
6
- metadata.gz: 895c38f6d723c6dfa601ef6c974cd2c5764bc9e284ef498ea125ed630f70ffe7269b29340330e8b453ccdb82f50b92de3965aaa1ea19b6d5ec0e9b333723ee51
7
- data.tar.gz: 1eccaaeebd4644836d1a52db75ad3e28b39c05582ddad7a7a22a3dc4d4f27eda99130bbac71d3562e697f53eaed8b7efb293fbccefe14fddd88138869855147c
6
+ metadata.gz: 8c49d5d09dcb7fb69728c0da3a12f28deb1414f95265839294c7a64a843245f96ac3cdfc7232d02e6fe3cdebd4fb4e1b87a92cb23b15bfc22ea5aed7643bc342
7
+ data.tar.gz: f26728ca48eef035f41bab7dcfdf2e7b8e6ad235d6885ee665821531217962ad13cbf1249b424f84575d25377d15536a07d5c4f66611f44e1b5cba81fc943552
@@ -6,6 +6,8 @@ class ParameterSubstitution::Formatters::HexToBase64 < ParameterSubstitution::Fo
6
6
  end
7
7
 
8
8
  def self.format(value)
9
+ raise ArgumentError, "Bad non-hex input to hex_to_base64" if value !~ /^\h+$/
10
+
9
11
  [[value].pack("H*")].pack("m0")
10
12
  end
11
13
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ParameterSubstitution::Formatters::StringToBase64 < ParameterSubstitution::Formatters::Base
4
+ def self.description
5
+ "Converts strings to base64 encoding"
6
+ end
7
+
8
+ def self.format(value)
9
+ return nil if value.nil?
10
+
11
+ [value].pack("m0")
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ParameterSubstitution
4
- VERSION = "1.3.0"
4
+ VERSION = "1.3.1.pre.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parameter_substitution
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1.pre.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-11 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -127,6 +127,7 @@ files:
127
127
  - lib/parameter_substitution/formatters/split_after_colon.rb
128
128
  - lib/parameter_substitution/formatters/split_and_find.rb
129
129
  - lib/parameter_substitution/formatters/split_before_colon.rb
130
+ - lib/parameter_substitution/formatters/string_to_base64.rb
130
131
  - lib/parameter_substitution/formatters/time_with_seconds.rb
131
132
  - lib/parameter_substitution/formatters/trim.rb
132
133
  - lib/parameter_substitution/formatters/upper.rb
@@ -152,9 +153,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  requirements:
155
- - - ">="
156
+ - - ">"
156
157
  - !ruby/object:Gem::Version
157
- version: '0'
158
+ version: 1.3.1
158
159
  requirements: []
159
160
  rubygems_version: 3.1.6
160
161
  signing_key: