dry-types 0.15.0 → 1.2.0

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.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +10 -0
  3. data/.github/ISSUE_TEMPLATE/---bug-report.md +34 -0
  4. data/.github/ISSUE_TEMPLATE/---feature-request.md +18 -0
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +18 -2
  7. data/.travis.yml +10 -5
  8. data/.yardopts +6 -2
  9. data/CHANGELOG.md +186 -3
  10. data/Gemfile +11 -5
  11. data/README.md +4 -3
  12. data/Rakefile +4 -2
  13. data/benchmarks/hash_schemas.rb +10 -6
  14. data/benchmarks/lax_schema.rb +15 -0
  15. data/benchmarks/profile_invalid_input.rb +15 -0
  16. data/benchmarks/profile_lax_schema_valid.rb +16 -0
  17. data/benchmarks/profile_valid_input.rb +15 -0
  18. data/benchmarks/schema_valid_vs_invalid.rb +21 -0
  19. data/benchmarks/setup.rb +17 -0
  20. data/docsite/source/array-with-member.html.md +13 -0
  21. data/docsite/source/built-in-types.html.md +116 -0
  22. data/docsite/source/constraints.html.md +31 -0
  23. data/docsite/source/custom-types.html.md +93 -0
  24. data/docsite/source/default-values.html.md +91 -0
  25. data/docsite/source/enum.html.md +69 -0
  26. data/docsite/source/getting-started.html.md +57 -0
  27. data/docsite/source/hash-schemas.html.md +169 -0
  28. data/docsite/source/index.html.md +155 -0
  29. data/docsite/source/map.html.md +17 -0
  30. data/docsite/source/optional-values.html.md +96 -0
  31. data/docsite/source/sum.html.md +21 -0
  32. data/dry-types.gemspec +21 -19
  33. data/lib/dry-types.rb +2 -0
  34. data/lib/dry/types.rb +60 -17
  35. data/lib/dry/types/any.rb +21 -10
  36. data/lib/dry/types/array.rb +17 -1
  37. data/lib/dry/types/array/constructor.rb +32 -0
  38. data/lib/dry/types/array/member.rb +72 -13
  39. data/lib/dry/types/builder.rb +49 -5
  40. data/lib/dry/types/builder_methods.rb +43 -16
  41. data/lib/dry/types/coercions.rb +84 -19
  42. data/lib/dry/types/coercions/json.rb +22 -3
  43. data/lib/dry/types/coercions/params.rb +98 -30
  44. data/lib/dry/types/compiler.rb +35 -12
  45. data/lib/dry/types/constrained.rb +78 -27
  46. data/lib/dry/types/constrained/coercible.rb +36 -6
  47. data/lib/dry/types/constraints.rb +15 -1
  48. data/lib/dry/types/constructor.rb +77 -62
  49. data/lib/dry/types/constructor/function.rb +200 -0
  50. data/lib/dry/types/container.rb +5 -0
  51. data/lib/dry/types/core.rb +35 -14
  52. data/lib/dry/types/decorator.rb +37 -10
  53. data/lib/dry/types/default.rb +48 -16
  54. data/lib/dry/types/enum.rb +31 -16
  55. data/lib/dry/types/errors.rb +73 -7
  56. data/lib/dry/types/extensions.rb +6 -0
  57. data/lib/dry/types/extensions/maybe.rb +52 -5
  58. data/lib/dry/types/extensions/monads.rb +29 -0
  59. data/lib/dry/types/fn_container.rb +5 -0
  60. data/lib/dry/types/hash.rb +32 -14
  61. data/lib/dry/types/hash/constructor.rb +16 -3
  62. data/lib/dry/types/inflector.rb +2 -0
  63. data/lib/dry/types/json.rb +7 -5
  64. data/lib/dry/types/{safe.rb → lax.rb} +33 -16
  65. data/lib/dry/types/map.rb +70 -32
  66. data/lib/dry/types/meta.rb +51 -0
  67. data/lib/dry/types/module.rb +10 -5
  68. data/lib/dry/types/nominal.rb +105 -14
  69. data/lib/dry/types/options.rb +12 -25
  70. data/lib/dry/types/params.rb +14 -3
  71. data/lib/dry/types/predicate_inferrer.rb +197 -0
  72. data/lib/dry/types/predicate_registry.rb +34 -0
  73. data/lib/dry/types/primitive_inferrer.rb +97 -0
  74. data/lib/dry/types/printable.rb +5 -1
  75. data/lib/dry/types/printer.rb +70 -64
  76. data/lib/dry/types/result.rb +26 -0
  77. data/lib/dry/types/schema.rb +177 -80
  78. data/lib/dry/types/schema/key.rb +48 -35
  79. data/lib/dry/types/spec/types.rb +43 -6
  80. data/lib/dry/types/sum.rb +70 -21
  81. data/lib/dry/types/type.rb +49 -0
  82. data/lib/dry/types/version.rb +3 -1
  83. metadata +91 -62
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e14386ca189be49fd569c297a7d1ac385806569218fb172a63761ba0045a7fd6
4
- data.tar.gz: 353f074f3cf5fe2718eb4e5eb4f3ff4273f3c565a67f2267f0b2014ba67f22dd
3
+ metadata.gz: 87e78ecf331ef9c4d95759bf28c2694e413df18fd0397d3c3c51380320328417
4
+ data.tar.gz: ca84bf0a23d37d7f0beda024d573852d2a0701a76f54dee2255166981bd716c5
5
5
  SHA512:
6
- metadata.gz: cff40f66df4f87bee0bed14f033c49d8e6b1ffa98200f6f076def32a4bb4fdecf5906e9d3be6ee5a6cb611a21fa2f1fae6653c40ef49e3f21cfaf285ae4455b4
7
- data.tar.gz: 0cdadfae930f5833efd33f8e73189b9880d4606b0ebf3f1fe0f2e948d1eec8cb4896abccd2b0e4f2d9269c92d6b5aa41c29431fb247f56337b9dc82a7d998488
6
+ metadata.gz: 8ae0d71644bfc391ada28229a68010a378b07e252c6ea5fdc27327065cdfc980b27a25bd9d63068966803a800a262958ef4ea0fc0296d4e865534e3fb3458dc8
7
+ data.tar.gz: a1e899fb498a414f3920f9a19bc8ca22fc4db2bf7e6063a7baca389c528c0fb4d9114522d57606d7143c872b6847b9f1134f04326d1dc5ba694853a0c3977390
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "⚠️ Please don't ask for support via issues"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: "\U0001F41B Bug report"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Before you submit this: WE ONLY ACCEPT BUG REPORTS AND FEATURE REQUESTS**
11
+
12
+ For more information see [our contribution guidelines](https://github.com/rom-rb/rom/blob/master/CONTRIBUTING.md)
13
+
14
+ **Before you report**
15
+
16
+ :warning: If you have a problem related to a schema, please **report it under [dry-schema issues](https://github.com/dry-rb/dry-schema/issues/new?assignees=&labels=bug&template=---bug-report.md&title=)** instead.
17
+
18
+ **Describe the bug**
19
+
20
+ A clear and concise description of what the bug is.
21
+
22
+ **To Reproduce**
23
+
24
+ Provide detailed steps to reproduce, an executable script would be best.
25
+
26
+ **Expected behavior**
27
+
28
+ A clear and concise description of what you expected to happen.
29
+
30
+ **Your environment**
31
+
32
+ - Affects my production application: **YES/NO**
33
+ - Ruby version: ...
34
+ - OS: ...
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: "\U0001F6E0 Feature request"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: feature
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Summary of what the feature is supposed to do.
11
+
12
+ ## Examples
13
+
14
+ Code examples showing how the feature could be used.
15
+
16
+ ## Resources
17
+
18
+ Additional information, like a link to the discussion forum thread where the feature was discussed etc.
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  log/
11
+ .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,6 +1,9 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.4
3
3
 
4
+ Style/EachWithObject:
5
+ Enabled: false
6
+
4
7
  Style/StringLiterals:
5
8
  Enabled: true
6
9
  EnforcedStyle: single_quotes
@@ -14,12 +17,18 @@ Style/LambdaCall:
14
17
  Style/StabbyLambdaParentheses:
15
18
  Enabled: false
16
19
 
20
+ Style/FormatString:
21
+ Enabled: false
22
+
23
+ Layout/SpaceInLambdaLiteral:
24
+ Enabled: false
25
+
17
26
  Layout/MultilineMethodCallIndentation:
18
27
  Enabled: true
19
28
  EnforcedStyle: indented
20
29
 
21
- Metrics/LineLength:
22
- Max: 100
30
+ Metrics/LineLength:
31
+ Max: 100
23
32
 
24
33
  Metrics/MethodLength:
25
34
  Max: 22
@@ -41,3 +50,10 @@ Metrics/CyclomaticComplexity:
41
50
 
42
51
  Lint/BooleanSymbol:
43
52
  Enabled: false
53
+
54
+ Style/AccessModifierDeclarations:
55
+ Enabled: false
56
+
57
+ Style/BlockDelimiters:
58
+ EnforcedStyle: semantic
59
+
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- sudo: false
4
3
  bundler_args: --without benchmarks tools
5
4
  before_script:
6
5
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
@@ -11,13 +10,19 @@ after_script:
11
10
  script:
12
11
  - bundle exec rake
13
12
  rvm:
14
- - 2.6.1
15
- - 2.5.3
16
- - 2.4.5
17
- - jruby-9.2.6.0
13
+ - 2.6.5
14
+ - 2.5.7
15
+ - 2.4.9
16
+ - ruby-head
18
17
  env:
19
18
  global:
20
19
  - COVERAGE=true
20
+ matrix:
21
+ allow_failures:
22
+ - rvm: ruby-head
23
+ include:
24
+ - rvm: jruby-9.2.8.0
25
+ jdk: openjdk8
21
26
  notifications:
22
27
  email: false
23
28
  webhooks:
data/.yardopts CHANGED
@@ -1,5 +1,9 @@
1
1
  --title 'dry-types'
2
- --markup markdown
2
+ --query '@api.text != "private"'
3
+ --embed-mixins
4
+ --output doc
3
5
  --readme README.md
4
- --private
6
+ --files CHANGELOG.md
7
+ --markup markdown
8
+ --markup-provider=redcarpet
5
9
  lib/**/*.rb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,174 @@
1
+ # 1.2.0 2019-10-06
2
+
3
+ ## Changed
4
+
5
+ - `Dry::Types.[]` used to work with classes, now it's deprecated (flash-gordon)
6
+
7
+ ## Fixed
8
+
9
+ - Bug with using a `Bool`-named struct as a schema key (flash-gordon)
10
+ - A bunch of issues related to using `meta` on complex types (flash-gordon)
11
+ - `Types.Constructor(...)` returns a `Types::Array` as it should (flash-gordon)
12
+
13
+ ## Added
14
+
15
+ - `Optional::Params` types that coerce empty strings to `nil` (flash-gordon)
16
+ ```ruby
17
+ Dry::Types['optional.params.integer'].('') # => nil
18
+ Dry::Types['optional.params.integer'].('140') # => 140
19
+ Dry::Types['optional.params.integer'].('asd') # => exception!
20
+ ```
21
+ Keep in mind, Dry::Types['optional.params.integer'] and Dry::Types['params.integer'].optional are not the same, the latter doesn't handle empty strings.
22
+ - Predicate inferrer was ported from dry-schema (authored by solnic)
23
+ ```ruby
24
+ require 'dry/types/predicate_inferrer'
25
+ Dry::Types::PredicateInferrer.new[Types::String]
26
+ # => [:str?]
27
+ Dry::Types::PredicateInferrer.new[Types::String | Types::Integer]
28
+ # => [[[:str?], [:int?]]]
29
+ ```
30
+ Note that the API of the predicate inferrer can change in the stable version, it's dictated by the needs of dry-schema so it should be considered as semi-stable. If you depend on it, write specs covering the desired behavior. Another option is copy-and-paste the whole thing to your project.
31
+ - Primitive inferrer was ported from dry-schema (authored by solnic)
32
+ ```ruby
33
+ require 'dry/types/primitive_inferrer'
34
+ Dry::Types::PrimitiveInferrer.new[Types::String]
35
+ # => [String]
36
+ Dry::Types::PrimitiveInferrer.new[Types::String | Types::Integer]
37
+ # => [String, Integer]
38
+ Dry::Types::PrimitiveInferrer.new[Types::String.optional]
39
+ # => [NilClass, String]
40
+ ```
41
+ The primitive inferrer should be stable by now, you can rely on it.
42
+ - The `monads` extension adds `Dry::Types::Result#to_monad`. This makes it compatible with do notation from dry-monads. Load it with `Dry::Types.load_extensions(:monads)` (skryukov)
43
+
44
+ ```ruby
45
+ Types = Dry.Types
46
+ Dry::Types.load_extensions(:monads)
47
+
48
+ class AddTen
49
+ include Dry::Monads[:result, :do]
50
+
51
+ def call(input)
52
+ integer = yield Types::Coercible::Integer.try(input)
53
+
54
+ Success(integer + 10)
55
+ end
56
+ end
57
+ ```
58
+
59
+ [Compare v1.1.1...v1.2.0](https://github.com/dry-rb/dry-types/compare/v1.1.1...v1.2.0)
60
+
61
+ # 1.1.1 2019-07-26
62
+
63
+ ## Fixed
64
+
65
+ - A bug where meta was lost for lax array types (flash-gordon)
66
+
67
+ [Compare v1.1.0...v1.1.1](https://github.com/dry-rb/dry-types/compare/v1.1.0...v1.1.1)
68
+
69
+ # 1.1.0 2019-07-02
70
+
71
+ ## Added
72
+
73
+ - New builder method `Interface` constructs a type which accepts objects that respond to the given methods (waiting-for-dev)
74
+ ```ruby
75
+ Types = Dry.Types()
76
+ Types::Callable = Types.Interface(:call)
77
+ Types::Callable.valid?(Object.new) # => false
78
+ Types::Callable.valid?(proc {}) # => true
79
+ ```
80
+ - New types: `coercible.symbol`, `params.symbol`, and `json.symbol`, all use `.to_sym` for coercion (waiting-for-dev)
81
+
82
+ ## Fixed
83
+
84
+ - Converting schema keys to maybe types (flash-gordon)
85
+ - Using `Schema#key` and `Array#member` on constuctors (flash-gordon)
86
+ - Using `meta(omittable: true)` within `transform_types` works again but produces a warning, please migrate to `.omittable` or `.required(false)` (flash-gordon)
87
+ - Bug with a constructror defined on top of enum (flash-gordon)
88
+
89
+ [Compare v1.0.1...v1.1.0](https://github.com/dry-rb/dry-types/compare/v1.0.1...v1.1.0)
90
+
91
+ # 1.0.1 2019-06-04
92
+
93
+ ## Added
94
+
95
+ - In a case of failure the constructor block can now pass a different value (flash-gordon)
96
+ ```ruby
97
+ not_empty_string = Types::String.constructor do |value, &failure|
98
+ value.strip.empty? ? failure.(nil) : value.strip
99
+ end
100
+ not_empty_string.(' ') { |v| v } # => nil
101
+ not_empty_string.lax.(' ') # => nil
102
+ not_empty_string.lax.(' foo ') # => "foo"
103
+ ```
104
+ - `Schema#strict` now accepts an boolean argument. If `fales` is passed this will turn a strict schema into a non-strict one (flash-gordon)
105
+
106
+ [Compare v1.0.0...v1.0.1](https://github.com/dry-rb/dry-types/compare/v1.0.0...v1.0.1)
107
+
108
+ # 1.0.0 2019-04-23
109
+
110
+ ## Changed
111
+
112
+ - [BREAKING] Behavior of built-in constructor types was changed to be more strict. They will always raise an error on failed coercion (flash-gordon)
113
+ Compare:
114
+
115
+ ```ruby
116
+ # 0.15.0
117
+ Types::Params::Integer.('foo')
118
+ # => "foo"
119
+
120
+ # 1.0.0
121
+ Types::Params::Integer.('foo')
122
+ # => Dry::Types::CoercionError: invalid value for Integer(): "foo"
123
+ ```
124
+
125
+ To handle coercion errors `Type#call` now yields a block:
126
+
127
+ ```ruby
128
+ Types::Params::Integer.('foo') { :invalid } # => :invalid
129
+ ```
130
+
131
+ This makes work with coercions more straightforward and way faster.
132
+
133
+ - [BREAKING] Safe types were renamed to Lax, this name better serves their purpose. The previous name is available but prints a warning (flash-gordon)
134
+ - [BREAKING] Metadata is now pushed down to the decorated type. It is not likely you will notice a difference but this a breaking change that enables some use cases in rom related to the usage of default types in relations (flash-gordon)
135
+ - Nominal types are now completely unconstrained. This fixes some inconsistencies when using them with constraints. `Nominal#try` will always return a successful result, for the previous behavior use `Nominal#try_coerce` or switch to strict types with passing a block to `#call` (flash-gordon)
136
+
137
+ ## Performance improvements
138
+
139
+ - During the work on this release, a lot of performance improvements were made. dry-types 1.0 combined with dry-logic 1.0 are multiple times faster than dry-types 0.15 and dry-logic 0.5 for common cases including constraints checking and coercion (flash-gordon)
140
+
141
+ ## Added
142
+
143
+ - API for custom constructor types was enhanced. If you pass your own callable to `.constructor` it can have a block in its signature. If a block is passed, you must call it on failed coercion, otherwise raise a type coercion error (flash-gordon)
144
+ Example:
145
+ ```ruby
146
+ proc do |input, &block|
147
+ if input.is_a? String
148
+ Integer(input, 10)
149
+ else
150
+ Integer(input)
151
+ end
152
+ rescue ArgumentError, TypeError => error
153
+ if block
154
+ block.call
155
+ else
156
+ raise Dry::Types::CoercionError.new(
157
+ error.message,
158
+ backtrace: error.backtrace
159
+ )
160
+ end
161
+ end
162
+ ```
163
+ This makes the exception handling your job so that dry-types won't have to catch and re-wrap all possible errors (this is not safe, generally speaking).
164
+ - Types now can be converted to procs thus you can pass them as blocks (flash-gordon)
165
+ ```ruby
166
+ %w(1 2 3).map(&Types::Coercible::Integer)
167
+ # => [1, 2, 3]
168
+ ```
169
+
170
+ [Compare v0.15.0...v1.0.0](https://github.com/dry-rb/dry-types/compare/v0.15.0...v1.0.0)
171
+
1
172
  # 0.15.0 2019-03-22
2
173
 
3
174
  ## Changed
@@ -81,6 +252,7 @@
81
252
  )
82
253
  ```
83
254
  - Key types have API for making keys omittable and back (flash-gordon)
255
+
84
256
  ```ruby
85
257
  # defining a base schema with optional keys
86
258
  lax_hash = Dry::Types['hash'].with_type_transform { |key| key.required(false) }
@@ -90,8 +262,10 @@
90
262
  # keys in user_schema are not required
91
263
  user_schema = lax_hash.schema(name: 'string', age: 'integer')
92
264
  ```
265
+
93
266
  - `Type#optional?` now recognizes more cases where `nil` is an allowed value (flash-gordon)
94
267
  - `Constructor#{prepend,append}` with `<<` and `>>` as aliases. `Constructor#append` works the same way `Constructor#constrcutor` does. `Constuctor#prepend` chains functions in the reverse order, see examples (flash-gordon)
268
+
95
269
  ```ruby
96
270
  to_int = Types::Coercible::Integer
97
271
  inc = to_int.append { |x| x + 2 }
@@ -100,6 +274,7 @@
100
274
  inc = to_int.prepend { |x| x + "2" }
101
275
  inc.("1") # => "1" -> "12" -> 12
102
276
  ```
277
+
103
278
  - Partial schema application for cases when you want to validate only a subset of keys (flash-gordon)
104
279
  This is useful when you want to update a key or two in an already-validated hash. A perfect example is `Dry::Struct#new` where this feature is now used.
105
280
  ```ruby
@@ -111,12 +286,20 @@
111
286
 
112
287
  ## Fixed
113
288
 
114
- * `Hash::Map` now behaves as a constrained type if its values are constrained (flash-gordon)
115
- * `coercible.integer` now doesn't blow up on invalid strings (exterm)
289
+ - `Hash::Map` now behaves as a constrained type if its values are constrained (flash-gordon)
290
+ - `coercible.integer` now doesn't blow up on invalid strings (exterm)
116
291
 
117
292
  [Compare v0.14.0...v0.15.0](https://github.com/dry-rb/dry-types/compare/v0.14.0...v0.15.0)
118
293
 
119
- # 0.14.0 2019-01-29
294
+ # v0.14.1 2019-03-25
295
+
296
+ ## Fixed
297
+
298
+ - `coercible.integer` now doesn't blow up on invalid strings (exterm)
299
+
300
+ [Compare v0.14.0...v0.14.1](https://github.com/dry-rb/dry-types/compare/v0.14.0...v0.14.1)
301
+
302
+ # v0.14.0 2019-01-29
120
303
 
121
304
  ## Changed
122
305
 
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
@@ -12,12 +14,16 @@ end
12
14
 
13
15
  group :tools do
14
16
  gem 'pry-byebug', platform: :mri
17
+ gem 'rubocop'
15
18
  end
16
19
 
17
20
  group :benchmarks do
18
- gem 'benchmark-ips'
19
- gem 'virtus'
20
- gem 'fast_attributes'
21
- gem 'attrio'
22
- gem 'dry-struct'
21
+ platform :mri do
22
+ gem 'attrio'
23
+ gem 'benchmark-ips'
24
+ gem 'dry-struct'
25
+ gem 'fast_attributes'
26
+ gem 'hotch'
27
+ gem 'virtus'
28
+ end
23
29
  end
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  [gem]: https://rubygems.org/gems/dry-types
2
- [travis]: https://travis-ci.org/dry-rb/dry-types
2
+ [travis]: https://travis-ci.com/dry-rb/dry-types
3
3
  [codeclimate]: https://codeclimate.com/github/dry-rb/dry-types
4
4
  [coveralls]: https://coveralls.io/r/dry-rb/dry-types
5
5
  [inchpages]: http://inch-ci.org/github/dry-rb/dry-types
6
+ [chat]: https://dry-rb.zulipchat.com
6
7
 
7
- # dry-types [![Join the chat at https://gitter.im/dry-rb/chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dry-rb/chat)
8
+ # dry-types [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
8
9
 
9
10
  [![Gem Version](https://badge.fury.io/rb/dry-types.svg)][gem]
10
- [![Build Status](https://travis-ci.org/dry-rb/dry-types.svg?branch=master)][travis]
11
+ [![Build Status](https://travis-ci.com/dry-rb/dry-types.svg?branch=master)][travis]
11
12
  [![Code Climate](https://codeclimate.com/github/dry-rb/dry-types/badges/gpa.svg)][codeclimate]
12
13
  [![Test Coverage](https://codeclimate.com/github/dry-rb/dry-types/badges/coverage.svg)][codeclimate]
13
14
  [![Inline docs](http://inch-ci.org/github/dry-rb/dry-types.svg?branch=master)][inchpages]
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  task :run_specs do
5
7
  require 'rspec/core'