kind 0.3.0 → 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: d0f8c5e797f181f52a5c27fec17d22c4569c6c9c7ada6bc0d374d64ec0d33142
4
- data.tar.gz: 5fca4d34a15a049d57c1c9fb86b6de672309a581b21f3ace634063edcceadc5f
3
+ metadata.gz: db734da8b7d777098f049983dce40d7a0f36d6a6d9c61ade223275c5d023c22e
4
+ data.tar.gz: 0e1dea80ac9fdebdf2af1e0a6becd1aa970294906e5f5f8cd7c8836a9c4dc5f5
5
5
  SHA512:
6
- metadata.gz: 37a4923bdde1c6cc3e5921c7090e69d50ed8405e9a3783e877e175aa853da8250c68bee76c851c8e1297e8704d1ce4a396cbc6ffea4f1a91a03c032f68fe3a87
7
- data.tar.gz: 9bdbae7d4b146af928c944a7e935e612964c9c629101aaf72a163391cff62859d85c796b1612a6c2e9ab7544c411bcfcdc93e5ed616ec3dc6ac605eadbc53c5c
6
+ metadata.gz: 96346a48789ccc9fcd7a0308eca390753bc3b8e397a048c7bb049929252214c7ba6d100ae17fb14a1e98595817120aa8c4900d57a4638bc8ee9494eb8682b259
7
+ data.tar.gz: 07410f5ec41a04cfaaaf660f1ad933e238efb1b2845b7e11c2ba69602c31bd69517ece4d3056c1e62b4c89faa04824344cdd8634ba593470c48b227bc7a9e8c8
@@ -1,6 +1,20 @@
1
1
  ---
2
2
  language: ruby
3
+
3
4
  cache: bundler
5
+
4
6
  rvm:
5
- - 2.6.5
6
- before_install: gem install bundler -v 2.1.2
7
+ - 2.2.0
8
+ - 2.3.0
9
+ - 2.4.0
10
+ - 2.5.0
11
+ - 2.6.0
12
+ - 2.7.0
13
+
14
+ before_install:
15
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
16
+ - gem install bundler -v '< 2'
17
+
18
+ install: bundle install --jobs=3 --retry=3
19
+
20
+ script: bundle exec rake test
data/Gemfile CHANGED
@@ -5,3 +5,4 @@ gemspec
5
5
 
6
6
  gem "rake", "~> 12.0"
7
7
  gem "minitest", "~> 5.0"
8
+ gem "simplecov", "~> 0.17.1"
data/README.md CHANGED
@@ -1,19 +1,7 @@
1
- - [Kind](#kind)
2
- - [Installation](#installation)
3
- - [Usage](#usage)
4
- - [Verifying the kind of some object](#verifying-the-kind-of-some-object)
5
- - [Verifying the kind of some class/module](#verifying-the-kind-of-some-classmodule)
6
- - [Built-in type checkers](#built-in-type-checkers)
7
- - [Special type checkers](#special-type-checkers)
8
- - [Kind.of](#kindof)
9
- - [Kind.is](#kindis)
10
- - [How to create a new type checker?](#how-to-create-a-new-type-checker)
11
- - [Development](#development)
12
- - [Contributing](#contributing)
13
- - [License](#license)
14
- - [Code of Conduct](#code-of-conduct)
15
-
16
- # Kind
1
+ [![Gem](https://img.shields.io/gem/v/kind.svg?style=flat-square)](https://rubygems.org/gems/kind)
2
+ [![Build Status](https://travis-ci.com/serradura/kind.svg?branch=master)](https://travis-ci.com/serradura/kind)
3
+
4
+ # Kind <!-- omit in toc -->
17
5
 
18
6
  Basic type system for Ruby.
19
7
 
@@ -23,6 +11,21 @@ As a creator of Ruby gems, I have a common need that I have to handle in many of
23
11
 
24
12
  One of the goals of this project is to do simple type checking like `"some string".is_a?(String)`, but using a bunch of basic abstractions. So, after reading this README and realizing that you need something more robust, I recommend to you check out the [dry-types gem](https://dry-rb.org/gems/dry-types).
25
13
 
14
+ ## Table of Contents <!-- omit in toc -->
15
+ - [Installation](#installation)
16
+ - [Usage](#usage)
17
+ - [Verifying the kind of some object](#verifying-the-kind-of-some-object)
18
+ - [Verifying the kind of some class/module](#verifying-the-kind-of-some-classmodule)
19
+ - [Built-in type checkers](#built-in-type-checkers)
20
+ - [Special type checkers](#special-type-checkers)
21
+ - [Kind.of](#kindof)
22
+ - [Kind.is](#kindis)
23
+ - [How to create a new type checker?](#how-to-create-a-new-type-checker)
24
+ - [Development](#development)
25
+ - [Contributing](#contributing)
26
+ - [License](#license)
27
+ - [Code of Conduct](#code-of-conduct)
28
+
26
29
  ## Installation
27
30
 
28
31
  Add this line to your application's Gemfile:
@@ -39,6 +42,8 @@ Or install it yourself as:
39
42
 
40
43
  $ gem install kind
41
44
 
45
+ [⬆️ Back to Top](#table-of-contents-)
46
+
42
47
  ## Usage
43
48
 
44
49
  ### Verifying the kind of some object
@@ -116,6 +121,8 @@ Kind.of.Hash.class?(ActiveSupport::HashWithIndifferentAccess)
116
121
  # true
117
122
  ```
118
123
 
124
+ [⬆️ Back to Top](#table-of-contents-)
125
+
119
126
  ## Built-in type checkers
120
127
 
121
128
  The list of types (classes and modules) available to use with `Kind.of.*` or `Kind.is.*` are:
@@ -154,6 +161,8 @@ The list of types (classes and modules) available to use with `Kind.of.*` or `Ki
154
161
  - `Kind.of.Module()`
155
162
  - `Kind.of.Boolean()`
156
163
 
164
+ [⬆️ Back to Top](#table-of-contents-)
165
+
157
166
  ## How to create a new type checker?
158
167
 
159
168
  Use `Kind::Types.add()`. e.g:
@@ -192,6 +201,8 @@ Kind.of.User.instance?(User) # true
192
201
  Kind.of.User.class?(User) # true
193
202
  ```
194
203
 
204
+ [⬆️ Back to Top](#table-of-contents-)
205
+
195
206
  ## Development
196
207
 
197
208
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.email = ['rodrigo.serradura@gmail.com']
8
8
 
9
9
  spec.summary = %q{Basic type system for Ruby.}
10
- spec.description = %q{Basic type system for Ruby.}
10
+ spec.description = %q{Basic type system for Ruby (free of dependencies).}
11
11
  spec.homepage = 'https://github.com/serradura/kind'
12
12
  spec.license = 'MIT'
13
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
13
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.2.0')
14
14
 
15
15
  spec.metadata['homepage_uri'] = spec.homepage
16
16
  spec.metadata['source_code_uri'] = 'https://github.com/serradura/kind'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kind
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura
@@ -10,7 +10,7 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2020-01-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Basic type system for Ruby.
13
+ description: Basic type system for Ruby (free of dependencies).
14
14
  email:
15
15
  - rodrigo.serradura@gmail.com
16
16
  executables: []
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 2.3.0
46
+ version: 2.2.0
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - ">="