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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f59d8ae098bd3a822f1a4377412421f3860a55bbc8b0e3cfe078800b11a6fb46
4
- data.tar.gz: 89613d28b02091c0386f809001a1bdbfeaaa668b2e0c2be6a211b01843476433
3
+ metadata.gz: 4830f8e0493abf23ddd9af334427529fd4075fbc4e5cab74f263921e21bd9310
4
+ data.tar.gz: c416c81bb32662258bc645325cec329736dccd9b250b9860f750ee292ec39888
5
5
  SHA512:
6
- metadata.gz: d241f06a15d1c85c527ec6fe7098eab724c1346495f29a1b2d1af78963c6f9bb1867a11f956f780d090c9094a73641352b66b0676b4c32cfa1ddfc507da924f0
7
- data.tar.gz: '0843a109ee082218066e3d90bfc6c9e9bb8c21a50fdb6ea7cfc12ddd5b073a3b463ed638199dfa7faab237b0128bb2b6a23aeeee172e3ef1cdd2a238ce8d0d1b'
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}}
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
  script: bundle exec rspec spec
3
3
  rvm:
4
- - 1.8.7
5
- - 1.9.3
6
4
  - 2.0.0
7
5
  - 2.1.0
8
6
  - 2.2.0
7
+ - 2.5.8
9
8
  - jruby-19mode
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.4.0
2
+ * Stopped supporting Ruby 1.8 and 1.9
3
+ * Added support for Rails 5.1 and ruby 2.5.8
4
+
1
5
  0.3.33
2
6
  * Updated license to Apache License 2.0
3
7
 
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 2020 Zendesk
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 2020 Zendesk
87
+ Copyright 2012 Zendesk
82
88
 
83
89
  Licensed under the [Apache License, Version 2.0](LICENSE)
@@ -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
- if RUBY_VERSION =~ /^1\.8/
23
- gem.add_runtime_dependency "activesupport", ">= 3.0.0", "< 3.2.0"
24
- gem.add_development_dependency "pry", "~> 0.9.0"
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
- data.inject({}) do |memo, kv|
143
- memo[kv.first.to_sym] = kv.last
144
- memo
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)
@@ -1,3 +1,3 @@
1
1
  module InputSanitizer
2
- VERSION = "0.3.33"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'bundler'
2
2
  Bundler.setup(:test)
3
3
 
4
- skip_coverage = ENV['CI'] || RUBY_VERSION =~ /^1\.8/
4
+ skip_coverage = ENV['CI']
5
5
 
6
6
  unless skip_coverage
7
7
  require 'simplecov'
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.3.33
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-04-24 00:00:00.000000000 Z
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.1.2
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