Skip to content

Commit

Permalink
Prepare ostruct-sanitizer for release
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmoretti committed Oct 3, 2023
1 parent bb0987b commit 2a8323e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ CamelTrail makes it easy to keep a history of attribute changes on a model.

Delicious and sanitized data samples for development and testing.

[ostruct-sanitizer](https://github.com/powerhome/power-tools/blob/main/packages/ostruct-sanitizer/docs/README.md) 💎

Rails-like sanitization hooks to be applied to OpenStruct fields.

## Installation 🛠

These packages are all meant to install inside of an application and aren't intended to stand alone; currently, they are all published to [RubyGems](https://rubygems.org/) or [npm](https://www.npmjs.com/) and you can use standard methods to install them.
Expand Down
2 changes: 2 additions & 0 deletions packages/ostruct-sanitizer/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-powerhome

Expand Down
12 changes: 12 additions & 0 deletions packages/ostruct-sanitizer/.rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-10-03 12:17:25 UTC using RuboCop version 1.56.3.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/ostruct/sanitizer.rb'
1 change: 1 addition & 0 deletions packages/ostruct-sanitizer/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gemspec

gem "bundler", "~> 2.4.7"
gem "byebug"
gem "license_finder", "~> 7.0"
gem "rake", "13.0.6"
gem "rspec", "3.12.0"
gem "rubocop-powerhome", "0.5.0"
4 changes: 1 addition & 3 deletions packages/ostruct-sanitizer/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# OStruct::Sanitizer

[![Build Status](https://travis-ci.org/powerhome/ostruct-sanitizer.svg?branch=master)](https://travis-ci.org/powerhome/ostruct-sanitizer)
# OStruct::Sanitizer 🧹

Provides Rails-like sanitization hooks to be applied to OpenStruct fields upon their assignment, allowing for better encapsulation of such rules and simple extensibility.

Expand Down
2 changes: 1 addition & 1 deletion packages/ostruct-sanitizer/lib/ostruct/sanitizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def initialize(attrs = {})
# @param [Symbol] method the missing method
# @param [Array<Any>] args the method's arguments list
#
def method_missing(method, *args) # rubocop:disable Style/MissingRespondToMissing
def method_missing(method, *args)
# Give OpenStruct a chance to create getters and setters for the
# corresponding field
super method, *args
Expand Down

0 comments on commit 2a8323e

Please sign in to comment.