input_sanitizer 0.3.33 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gempush.yml +28 -0
- data/.travis.yml +1 -2
- data/CHANGELOG +4 -0
- data/LICENSE +1 -1
- data/README.md +7 -1
- data/input_sanitizer.gemspec +3 -8
- data/lib/input_sanitizer/v1/sanitizer.rb +6 -3
- data/lib/input_sanitizer/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4830f8e0493abf23ddd9af334427529fd4075fbc4e5cab74f263921e21bd9310
|
4
|
+
data.tar.gz: c416c81bb32662258bc645325cec329736dccd9b250b9860f750ee292ec39888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51b81975793f215b595b64585e6f1bcdff0fa60a92756dec511cca368bd2064c6a269aeb205dcbe01f5a36186b499d471867e45e0262e14344300a4210cd0be5
|
7
|
+
data.tar.gz: 383cc4f7ed8c87530796941f6a35dae1ec84739a166499b400e82a923bc78b4ade54fedc9c25052fa49f085a4fed7965027d3187b22f4f4206e4c93d47360162
|
@@ -0,0 +1,28 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags: v*
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
name: Build + Publish
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: zendesk/checkout@v2
|
14
|
+
- name: Set up Ruby 2.6
|
15
|
+
uses: zendesk/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.6
|
18
|
+
|
19
|
+
- name: Publish to RubyGems
|
20
|
+
run: |
|
21
|
+
mkdir -p $HOME/.gem
|
22
|
+
touch $HOME/.gem/credentials
|
23
|
+
chmod 0600 $HOME/.gem/credentials
|
24
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
+
gem build *.gemspec
|
26
|
+
gem push *.gem
|
27
|
+
env:
|
28
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright
|
189
|
+
Copyright 2012 Zendesk
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -76,8 +76,14 @@ end
|
|
76
76
|
4. Push to the branch (`git push origin my-new-feature`)
|
77
77
|
5. Create new Pull Request
|
78
78
|
|
79
|
+
## Releasing new version of gem
|
80
|
+
|
81
|
+
1. Update version [lib/input_sanitizer/version.rb](lib/input_sanitizer/version.rb) and push to `master`
|
82
|
+
2. Create new GitHub release with tag name starting with `v` and the version, for example `v0.3.0`
|
83
|
+
3. Gem will be automatically built and pushed to rubygems.org with GitHub Action
|
84
|
+
|
79
85
|
## Copyright and license
|
80
86
|
|
81
|
-
Copyright
|
87
|
+
Copyright 2012 Zendesk
|
82
88
|
|
83
89
|
Licensed under the [Apache License, Version 2.0](LICENSE)
|
data/input_sanitizer.gemspec
CHANGED
@@ -19,14 +19,9 @@ Gem::Specification.new do |gem|
|
|
19
19
|
|
20
20
|
gem.add_runtime_dependency "method_struct", ">= 0.2.2"
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
else
|
26
|
-
gem.add_runtime_dependency "activesupport", ">= 3.0.0"
|
27
|
-
gem.add_development_dependency "pry", "~> 0.10.1"
|
28
|
-
gem.add_development_dependency "simplecov", "~> 0.9.2"
|
29
|
-
end
|
22
|
+
gem.add_runtime_dependency "activesupport", ">= 3.0.0"
|
23
|
+
gem.add_development_dependency "pry", "~> 0.10.1"
|
24
|
+
gem.add_development_dependency "simplecov", "~> 0.9.2"
|
30
25
|
|
31
26
|
gem.add_development_dependency "rspec", "~> 3.2.0"
|
32
27
|
end
|
@@ -139,10 +139,13 @@ class InputSanitizer::V1::Sanitizer
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def symbolize_keys(data)
|
142
|
-
|
143
|
-
|
144
|
-
|
142
|
+
symbolized_hash = {}
|
143
|
+
|
144
|
+
data.each do |key, value|
|
145
|
+
symbolized_hash[key.to_sym] = value
|
145
146
|
end
|
147
|
+
|
148
|
+
symbolized_hash
|
146
149
|
end
|
147
150
|
|
148
151
|
def self.set_keys_to_converter(keys, converter_or_type)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: input_sanitizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zendesk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_struct
|
@@ -87,6 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
+
- ".github/workflows/gempush.yml"
|
90
91
|
- ".gitignore"
|
91
92
|
- ".rspec"
|
92
93
|
- ".travis.yml"
|
@@ -151,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
152
|
- !ruby/object:Gem::Version
|
152
153
|
version: '0'
|
153
154
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
+
rubygems_version: 3.0.3
|
155
156
|
signing_key:
|
156
157
|
specification_version: 4
|
157
158
|
summary: Gem to sanitize hash of incoming data
|