dry-container 0.3.2 → 0.3.3

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
  SHA1:
3
- metadata.gz: 3e247b38c6467b612e9f91370863e0f480575e61
4
- data.tar.gz: 7ae5ba11fa02be3f61ad865027251996e8ba5609
3
+ metadata.gz: 85ad7d2b0515119daa9e1840d597bed1fc82b69f
4
+ data.tar.gz: e77878822230cb288da40f26ad55bdf6679f7fd7
5
5
  SHA512:
6
- metadata.gz: b056febb9992fb1ce6e13fe0208962d6da2ce27ab55fdbb43549fb0aba2dc2e0d1d321c810793b6b13a56099dda6baf5a678919d2533286cf8c70b22fbaaeaad
7
- data.tar.gz: 903cc09aa85365a8d246e236b5f68990f45a1c529840c056efa9e66dc8ec56e64833c177136e2082b50cd39a73bd41e56ae8a73c340808b055b7cbe92cc89fe5
6
+ metadata.gz: e0782b05d105930731abc653912f1701ce2890069b5f76dd398af257d00e4ee501a42555a464226ba46640bb109cbb52977f2593a8b89f7be870589d9a26cd86
7
+ data.tar.gz: 575b242cb7e46fc64f81385e743f590e0a690c6d470097544b10f1c474497c58339a9fa75fb4799c2d1be811a5d749dbd4ff750f42ee2db93a387893a18b7a77
@@ -9,7 +9,6 @@ rvm:
9
9
  - 2.1
10
10
  - 2.2
11
11
  - rbx-2
12
- - jruby
13
12
  - ruby-head
14
13
  - jruby-head
15
14
  env:
@@ -19,6 +18,9 @@ matrix:
19
18
  allow_failures:
20
19
  - rvm: ruby-head
21
20
  - rvm: jruby-head
21
+ include:
22
+ - rvm: jruby-9.0.0.0
23
+ before_install: rvm get master && rvm install jruby-9.0.0.0 && gem install bundler --no-ri --no-rdoc
22
24
  notifications:
23
25
  email: false
24
26
  webhooks:
@@ -9,7 +9,7 @@ module Dry
9
9
  def initialize(item, options = {})
10
10
  @item = item
11
11
  @options = {
12
- call: item.is_a?(::Proc) && item.arity == 0
12
+ call: item.is_a?(::Proc) && item.parameters.empty?
13
13
  }.merge(options)
14
14
  end
15
15
 
@@ -1,6 +1,6 @@
1
1
  module Dry
2
2
  class Container
3
3
  # @api public
4
- VERSION = '0.3.2'.freeze
4
+ VERSION = '0.3.3'.freeze
5
5
  end
6
6
  end
@@ -128,6 +128,13 @@ shared_examples 'a container' do
128
128
 
129
129
  expect(container.resolve(:item).call('item')).to eq('item')
130
130
  end
131
+
132
+ it 'does not call a proc on resolving if one accepts an arbitrary number of keyword arguments' do
133
+ container.register(:item) { |**kw| 'item' }
134
+
135
+ expect(container.resolve(:item)).to be_a_kind_of Proc
136
+ expect(container.resolve(:item).call).to eq('item')
137
+ end
131
138
  end
132
139
  end
133
140
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby