typed-parameter 0.6.0 → 0.7.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: 8deba22f3280f1a4c5f01b83121402cd83822afb8602504a319faeb20ec10d8d
4
- data.tar.gz: 9723defcab7d274fd354d00d8d60f0a1c04bd4e3de0750ee932fe4b6237c7456
3
+ metadata.gz: 69e551b7c699d91a3f6a1f20616c32c3802027db6980b626a4b3ec01edda5eb0
4
+ data.tar.gz: 4650c2a5e68b02fc70b3c6718658a014e8de13f33466f9c7d1b9ebf627a013b7
5
5
  SHA512:
6
- metadata.gz: d8fbe3cfcdfcd1b3c5b30ee074cd958a9a38c3c2fb0b94545e9badd7f1757e7fce0378d6adec90058a70257b218f3b9c3ebc4bcd873900a18e7012837cafbb2c
7
- data.tar.gz: 0acdee06d0c4458b0f229b8898a72d9ae624328954715de6a2702d281b425f9be88a0d129a7b5616a963e71d7214d5a6a34c241aba9e3d0244e841eda50e9355
6
+ metadata.gz: c1a3fe4f14f1832ab4aaf757fd10b943d01d277e071e11592d6294af55183a23564cb1289e07b5033d218c7908864ef8158fea7153e423c97486da73038f31e9
7
+ data.tar.gz: 3f53cc4a56b7c26820205df4f6d4287b8086037d64db9c6e17f04246a01d893dd36ee56be8d327490fb1b1c2af882cf7c249f84c8c67f4bd3764b56d4aac5bfe
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # typed_parameter
2
- Create typed parameter class using strong paramter in rails.
2
+ Create typed parameter class using strong parameter in rails.
3
3
  You can cleanup parameter code for permit in your controller and convert it to the type you want.
4
+ You can get your OpenAPI JSON for parameter schemas.
5
+
4
6
  ## Installation
5
7
 
6
8
  Add this line to your application's Gemfile:
@@ -22,7 +24,7 @@ Or install it yourself as:
22
24
  Example 1. Type convert
23
25
  -----
24
26
  ~~~ruby
25
- class UserCreateParams < TypedParamter::Base
27
+ class UserCreateParams < TypedParameter::Base
26
28
  field :name, String
27
29
  field :age, Integer
28
30
  field :email, String
@@ -271,5 +273,5 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
271
273
 
272
274
  ## Contributing
273
275
 
274
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/typed-parameter.
276
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tranquilthink/typed-parameter.
275
277
 
@@ -25,7 +25,7 @@ module TypedParameter
25
25
  end
26
26
 
27
27
  def permit(params)
28
- raise Error::ParameterError unless params.class <= ActionController::Parameters
28
+ raise Error, "params class must be ActionController::Parameters" unless params.class <= ActionController::Parameters
29
29
 
30
30
  use_constraints(params).permit!
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module TypedParameter
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.7.0'.freeze
3
3
  end
@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|
4
4
  spec.name = 'typed-parameter'
5
5
  spec.version = TypedParameter::VERSION
6
6
  spec.authors = ['Minwoo Jo']
7
- spec.email = ['tranquilthink@example.com']
7
+ spec.email = ['tranquilthink@gmail.com']
8
8
  spec.summary = 'Typed Paramter For Rails'
9
9
  spec.description = 'Create typed parameter class using strong paramter in rails'
10
10
  spec.homepage = 'https://github.com/tranquilthink/typed-parameter'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typed-parameter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minwoo Jo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2023-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '0'
41
41
  description: Create typed parameter class using strong paramter in rails
42
42
  email:
43
- - tranquilthink@example.com
43
+ - tranquilthink@gmail.com
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []