dry-core 0.4.8 → 0.4.9

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: 248dbedf379c8c7c585274a2334bd6b6347641d59d66f2348bb78990ac60d921
4
- data.tar.gz: 2abd02588d6151cbe2ce1ddb6d547b841a6a5c6dd73eeedf2adf92fb760ad06a
3
+ metadata.gz: dfe5b98793bc0e200a3a226a60d8c0f5234de170f033c9c3f06fc779979a1f63
4
+ data.tar.gz: de24e4b5d0bead8d577c3594bea81986ea7e7cf8124f17ce471f734d143d7319
5
5
  SHA512:
6
- metadata.gz: d0a1a31e66dcac988307bbff851611773d0d8bc2b561a76b0dcdd18d17199d49e4eabcf84e42e7443fdc0e5b16bfdde86d532b6bbe78bd070f32945fc2506f3a
7
- data.tar.gz: 46afa1f06dd69b69a182f9d5cfa17cf8d0d9d419d22193d61b18f967f56fe3d0042de3c1bf38e5a41756faca5e230e246b80d5bf074666dac384ba2f93c813be
6
+ metadata.gz: 46141cc708525532152db4c692b8d5ac413ded55ee6484d672c6974a41a6487776ef2aeba3bb3abde5e22fcf4c4d8ac42900a391dcd7a38a5ff95fd4c5d9b717
7
+ data.tar.gz: 4871d4b68086c1521424d2510b47ab0448fbe344beed3bc7fd1ee1f9115306d3893b751f882a942f9321183724c8aecea1b7e69b81cb2fe7794dbec07d5222a6
@@ -13,7 +13,6 @@ rvm:
13
13
  - 2.4.6
14
14
  - 2.5.5
15
15
  - 2.6.3
16
- - jruby-9.2.7.0
17
16
  - truffleruby
18
17
  env:
19
18
  global:
@@ -22,6 +21,9 @@ env:
22
21
  matrix:
23
22
  allow_failures:
24
23
  - rvm: truffleruby
24
+ include:
25
+ - rvm: jruby-9.2.7.0
26
+ jdk: openjdk8
25
27
  notifications:
26
28
  email: false
27
29
  webhooks:
@@ -1,3 +1,18 @@
1
+ # v0.4.9
2
+
3
+ ### Added
4
+
5
+ - `Undefined.coalesce` takes a variable number of arguments and returns the first non-`Undefined` value (flash-gordon)
6
+ ```ruby
7
+ Undefined.coalesce(Undefined, Undefined, :foo) # => :foo
8
+ ```
9
+
10
+ ### Fixed
11
+
12
+ - `Undefined.{dup,clone}` returns `Undefined` back, `Undefined` is a singleton (flash-gordon)
13
+
14
+ [Compare v0.4.8...v0.4.9](https://github.com/dry-rb/dry-core/compare/v0.4.8...v0.4.9)
15
+
1
16
  # v0.4.8 2019-06-23
2
17
 
3
18
  ### Added
@@ -8,6 +8,7 @@ module Dry
8
8
  #
9
9
  # @example Just include this module to your class or module
10
10
  # class Foo
11
+ # include Dry::Core::Constants
11
12
  # def call(value = EMPTY_ARRAY)
12
13
  # value.map(&:to_s)
13
14
  # end
@@ -38,10 +39,15 @@ module Dry
38
39
  # end
39
40
  # end
40
41
  Undefined = Object.new.tap do |undefined|
42
+ # @api private
43
+ Self = -> { Undefined }
44
+
45
+ # @api public
41
46
  def undefined.to_s
42
47
  'Undefined'
43
48
  end
44
49
 
50
+ # @api public
45
51
  def undefined.inspect
46
52
  'Undefined'
47
53
  end
@@ -80,6 +86,21 @@ module Dry
80
86
  yield(value)
81
87
  end
82
88
  end
89
+
90
+ # @api public
91
+ def undefined.dup
92
+ self
93
+ end
94
+
95
+ # @api public
96
+ def undefined.clone
97
+ self
98
+ end
99
+
100
+ # @api public
101
+ def undefined.coalesce(*args)
102
+ args.find(Self) { |x| !equal?(x) }
103
+ end
83
104
  end.freeze
84
105
 
85
106
  def self.included(base)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Core
5
- VERSION = '0.4.8'.freeze
5
+ VERSION = '0.4.9'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shilnikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-23 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby