spicy_validation 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adca10ddbd3676bc61ee4d78a3e5235f61305420981d94eb80d2dc617f24d51c
4
- data.tar.gz: 3f4bb42d116517423f7b5b24c80017ee16efb6ebdfe9516b29cfc69089f86017
3
+ metadata.gz: df694a3fd2d00347e95cfc64ab1d0133755416c00ad03a32621eda654a0a01ed
4
+ data.tar.gz: 01475f210130e3a320d100030027518c012e2c179dd32286b20d7c3333cbfba4
5
5
  SHA512:
6
- metadata.gz: b40c8c2cd9f538f1dbd11026cd984dec1c633ee3cf2b901ff944220000c01d8c95f1b5c9987febcef8413e7687c8f0c25b1d8bb23dcc192f3041607566eb5937
7
- data.tar.gz: 13b0f54827475b77d7f4da39b1404bc43259ae8cc872a16aae7ae185402148c44a03e0e3b6f6dcc01360db46d207192ec217e88d4024120c20e6a9a92a95619d
6
+ metadata.gz: 7432ca4cae8930fd5b36b494a48c1b5ec6067f06370481d8b370c51d2d000f5f3df8ebe8bdab7919dffd74757762f5b727425f49c28092f74ab4d9901bd3ceb9
7
+ data.tar.gz: 0e3ce4286c873ee342f4beb8fc22dcb51dc86575540fb6196bb61c7c50dfb88a4347920dfdbe62b5286d56c9b207d4dae34deb782751f4512c59d4748fbdd951
data/README.md CHANGED
@@ -33,41 +33,37 @@ Type a number you wanna generate validation > ex) 0
33
33
 
34
34
  ## Example
35
35
 
36
- ```ruby
37
- # db/migrate/20210227054155_create_users.rb
38
- class CreateUsers < ActiveRecord::Migration[6.1]
39
- def change
40
- create_table :users do |t|
41
- t.string :name, null: false
42
- t.string :message, null: true
43
- t.integer :age, null: false
44
- t.integer :score
45
- t.boolean :premium
46
- t.timestamps
47
- end
48
- add_index :users, [:age, :name], unique: true
49
- end
50
- end
36
+ ```sql
37
+ +------------+--------------+------+-----+---------+----------------+
38
+ | Field | Type | Null | Key | Default | Extra |
39
+ +------------+--------------+------+-----+---------+----------------+
40
+ | id | bigint(20) | NO | PRI | NULL | auto_increment |
41
+ | name | varchar(255) | NO | | NULL | |
42
+ | message | varchar(255) | YES | | NULL | |
43
+ | age | int(11) | NO | | NULL | |
44
+ | score | int(11) | YES | | NULL | |
45
+ | premium | tinyint(1) | YES | | NULL | |
46
+ | created_at | datetime(6) | NO | | NULL | |
47
+ | updated_at | datetime(6) | NO | | NULL | |
48
+ +------------+--------------+------+-----+---------+----------------+
49
+ ```
51
50
 
51
+ ```ruby
52
52
  # app/models/user.rb
53
53
  class User < ApplicationRecord
54
-
55
- validates :message, presence: true
56
- validates :age, numericality: true
57
- validates :score, presence: true, numericality: true, allow_nil: true
58
- validates :premium, presence: true
59
- validates_uniqueness_of :age, scope: :name
54
+ validates :name, presence: true
55
+ validates :age, presence: true, numericality: true
56
+ validates :score, numericality: true, allow_nil: true
60
57
  end
61
-
62
-
63
58
  ```
59
+
64
60
  ## Development
65
61
 
66
62
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
67
63
 
68
64
  ## Contributing
69
65
 
70
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/spicy_validation. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/spicy_validation/blob/master/CODE_OF_CONDUCT.md).
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ono-max/spicy_validation. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ono-max/spicy_validation/blob/master/CODE_OF_CONDUCT.md).
71
67
 
72
68
  ## License
73
69
 
@@ -75,7 +71,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
75
71
 
76
72
  ## Code of Conduct
77
73
 
78
- Everyone interacting in the SpicyValidation project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/spicy_validation/blob/master/CODE_OF_CONDUCT.md).
74
+ Everyone interacting in the SpicyValidation project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ono-max/spicy_validation/blob/master/CODE_OF_CONDUCT.md).
79
75
 
80
76
  ## Reference
81
77
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpicyValidation
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spicy_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoto Ono
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-04 00:00:00.000000000 Z
11
+ date: 2021-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -145,8 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.7.6.2
148
+ rubygems_version: 3.2.11
150
149
  signing_key:
151
150
  specification_version: 4
152
151
  summary: SpicyValidation generate validation from database schema.