dry-container 0.7.2 → 0.10.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.
metadata CHANGED
@@ -1,110 +1,81 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-09 00:00:00.000000000 Z
11
+ date: 2022-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: concurrent-ruby
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
19
  version: '1.0'
19
- name: concurrent-ruby
20
- prerelease: false
21
20
  type: :runtime
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '0.1'
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: 0.1.3
36
- name: dry-configurable
37
21
  prerelease: false
38
- type: :runtime
39
22
  version_requirements: !ruby/object:Gem::Requirement
40
23
  requirements:
41
24
  - - "~>"
42
25
  - !ruby/object:Gem::Version
43
- version: '0.1'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.1.3
26
+ version: '1.0'
47
27
  - !ruby/object:Gem::Dependency
28
+ name: bundler
48
29
  requirement: !ruby/object:Gem::Requirement
49
30
  requirements:
50
31
  - - ">="
51
32
  - !ruby/object:Gem::Version
52
33
  version: '0'
53
- name: bundler
54
- prerelease: false
55
34
  type: :development
35
+ prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
37
  requirements:
58
38
  - - ">="
59
39
  - !ruby/object:Gem::Version
60
40
  version: '0'
61
41
  - !ruby/object:Gem::Dependency
42
+ name: rake
62
43
  requirement: !ruby/object:Gem::Requirement
63
44
  requirements:
64
45
  - - ">="
65
46
  - !ruby/object:Gem::Version
66
47
  version: '0'
67
- name: rake
68
- prerelease: false
69
48
  type: :development
49
+ prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
52
  - - ">="
73
53
  - !ruby/object:Gem::Version
74
54
  version: '0'
75
55
  - !ruby/object:Gem::Dependency
56
+ name: rspec
76
57
  requirement: !ruby/object:Gem::Requirement
77
58
  requirements:
78
59
  - - ">="
79
60
  - !ruby/object:Gem::Version
80
61
  version: '0'
81
- name: rspec
82
- prerelease: false
83
62
  type: :development
63
+ prerelease: false
84
64
  version_requirements: !ruby/object:Gem::Requirement
85
65
  requirements:
86
66
  - - ">="
87
67
  - !ruby/object:Gem::Version
88
68
  version: '0'
89
- description:
69
+ description: A simple, configurable object container implemented in Ruby
90
70
  email:
91
71
  - andyholland1991@aol.com
92
72
  executables: []
93
73
  extensions: []
94
74
  extra_rdoc_files: []
95
75
  files:
96
- - ".codeclimate.yml"
97
- - ".gitignore"
98
- - ".rspec"
99
- - ".rubocop.yml"
100
- - ".rubocop_todo.yml"
101
- - ".travis.yml"
102
76
  - CHANGELOG.md
103
- - CONTRIBUTING.md
104
- - Gemfile
105
77
  - LICENSE
106
78
  - README.md
107
- - Rakefile
108
79
  - dry-container.gemspec
109
80
  - lib/dry-container.rb
110
81
  - lib/dry/container.rb
@@ -120,16 +91,15 @@ files:
120
91
  - lib/dry/container/resolver.rb
121
92
  - lib/dry/container/stub.rb
122
93
  - lib/dry/container/version.rb
123
- - rakelib/rubocop.rake
124
- - spec/integration/container_spec.rb
125
- - spec/integration/mixin_spec.rb
126
- - spec/spec_helper.rb
127
- - spec/support/shared_examples/container.rb
128
- homepage: https://github.com/dry-rb/dry-container
94
+ homepage: https://dry-rb.org/gems/dry-container
129
95
  licenses:
130
96
  - MIT
131
- metadata: {}
132
- post_install_message:
97
+ metadata:
98
+ allowed_push_host: https://rubygems.org
99
+ changelog_uri: https://github.com/dry-rb/dry-container/blob/master/CHANGELOG.md
100
+ source_code_uri: https://github.com/dry-rb/dry-container
101
+ bug_tracker_uri: https://github.com/dry-rb/dry-container/issues
102
+ post_install_message:
133
103
  rdoc_options: []
134
104
  require_paths:
135
105
  - lib
@@ -137,20 +107,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
107
  requirements:
138
108
  - - ">="
139
109
  - !ruby/object:Gem::Version
140
- version: 2.3.0
110
+ version: 2.7.0
141
111
  required_rubygems_version: !ruby/object:Gem::Requirement
142
112
  requirements:
143
113
  - - ">="
144
114
  - !ruby/object:Gem::Version
145
115
  version: '0'
146
116
  requirements: []
147
- rubyforge_project:
148
- rubygems_version: 2.7.9
149
- signing_key:
117
+ rubygems_version: 3.1.6
118
+ signing_key:
150
119
  specification_version: 4
151
- summary: A simple container intended for use as an IoC container
152
- test_files:
153
- - spec/integration/container_spec.rb
154
- - spec/integration/mixin_spec.rb
155
- - spec/spec_helper.rb
156
- - spec/support/shared_examples/container.rb
120
+ summary: A simple, configurable object container implemented in Ruby
121
+ test_files: []
data/.codeclimate.yml DELETED
@@ -1,32 +0,0 @@
1
- engines:
2
- rubocop:
3
- enabled: true
4
- checks:
5
- Rubocop/Metrics/LineLength:
6
- enabled: true
7
- max: 120
8
- Rubocop/Style/Documentation:
9
- enabled: false
10
- Rubocop/Lint/HandleExceptions:
11
- enabled: true
12
- exclude:
13
- - rakelib/*.rake
14
- Rubocop/Lint/NestedMethodDefinition:
15
- enabled: true
16
- exclude:
17
- - lib/dry/container/mixin.rb
18
- Rubocop/Metrics/MethodLength:
19
- enabled: true
20
- exclude:
21
- - lib/dry/container/mixin.rb
22
- Rubocop/Style/FileName:
23
- enabled: true
24
- exclude:
25
- - lib/dry-container.rb
26
-
27
- ratings:
28
- paths:
29
- - lib/**/*.rb
30
- exclude_paths:
31
- - spec/**/*
32
- - examples/**/*
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- .DS_Store
2
- coverage
3
- /.bundle
4
- vendor/bundle
5
- bin/
6
- tmp/
7
- .idea/
8
- Gemfile.lock
9
- spec/examples.txt
10
- pkg/
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require ./spec/spec_helper.rb
data/.rubocop.yml DELETED
@@ -1,24 +0,0 @@
1
- # Generated by `rubocop --auto-gen-config`
2
- inherit_from: .rubocop_todo.yml
3
-
4
- Metrics/LineLength:
5
- Max: 120
6
-
7
- Style/Documentation:
8
- Enabled: false
9
-
10
- Lint/HandleExceptions:
11
- Exclude:
12
- - rakelib/*.rake
13
-
14
- Lint/NestedMethodDefinition:
15
- Exclude:
16
- - lib/dry/container/mixin.rb
17
-
18
- Metrics/MethodLength:
19
- Exclude:
20
- - lib/dry/container/mixin.rb
21
-
22
- Style/FileName:
23
- Exclude:
24
- - lib/dry-container.rb
data/.rubocop_todo.yml DELETED
@@ -1,6 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-06-16 19:51:19 +0100 using RuboCop version 0.32.0.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
data/.travis.yml DELETED
@@ -1,30 +0,0 @@
1
- language: ruby
2
- dist: trusty
3
- sudo: required
4
- cache: bundler
5
- bundler_args: --without console
6
- script:
7
- - bundle exec rake spec
8
- after_success:
9
- - '[ -d coverage ] && bundle exec codeclimate-test-reporter'
10
- rvm:
11
- - 2.4.6
12
- - 2.5.5
13
- - 2.6.3
14
- - jruby-9.2.7.0
15
- - truffleruby
16
- matrix:
17
- allow_failures:
18
- - rvm: truffleruby
19
- env:
20
- global:
21
- - JRUBY_OPTS='--dev -J-Xmx1024M'
22
- - COVERAGE='true'
23
- notifications:
24
- email: false
25
- webhooks:
26
- urls:
27
- - https://webhooks.gitter.im/e/19098b4253a72c9796db
28
- on_success: change # options: [always|never|change] default: always
29
- on_failure: always # options: [always|never|change] default: always
30
- on_start: false # default: false
data/CONTRIBUTING.md DELETED
@@ -1,29 +0,0 @@
1
- # Issue Guidelines
2
-
3
- ## Reporting bugs
4
-
5
- If you found a bug, report an issue and describe what's the expected behavior versus what actually happens. If the bug causes a crash, attach a full backtrace. If possible, a reproduction script showing the problem is highly appreciated.
6
-
7
- ## Reporting feature requests
8
-
9
- Report a feature request **only after discussing it first on [discourse.dry-rb.org](http://discourse.dry-rb.org)** where it was accepted. Please provide a concise description of the feature, don't link to a discussion thread, and instead summarize what was discussed.
10
-
11
- ## Reporting questions, support requests, ideas, concerns etc.
12
-
13
- **PLEASE DON'T** - use [discourse.dry-rb.org](http://discourse.dry-rb.org) instead.
14
-
15
- # Pull Request Guidelines
16
-
17
- A Pull Request will only be accepted if it addresses a specific issue that was reported previously, or fixes typos, mistakes in documentation etc.
18
-
19
- Other requirements:
20
-
21
- 1) Do not open a pull request if you can't provide tests along with it. If you have problems writing tests, ask for help in the related issue.
22
- 2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
23
- 3) Add API documentation if it's a new feature
24
- 4) Update API documentation if it changes an existing feature
25
- 5) Bonus points for sending a PR to [github.com/dry-rb/dry-rb.org](github.com/dry-rb/dry-rb.org) which updates user documentation and guides
26
-
27
- # Asking for help
28
-
29
- If these guidelines aren't helpful, and you're stuck, please post a message on [[discourse.dry-rb.org](http://discourse.dry-rb.org).
data/Gemfile DELETED
@@ -1,19 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :test do
6
- platforms :mri do
7
- gem 'codeclimate-test-reporter', require: false
8
- gem 'simplecov', require: false
9
- end
10
- end
11
-
12
- group :tools do
13
- gem 'rubocop'
14
- gem 'guard'
15
- gem 'guard-rspec'
16
- gem 'guard-rubocop'
17
- gem 'listen', '3.0.6'
18
- gem 'pry-byebug', platform: :mri
19
- end
data/Rakefile DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
-
4
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
5
-
6
- require 'rspec/core'
7
- require 'rspec/core/rake_task'
8
-
9
- task default: :spec
10
-
11
- desc 'Run all specs in spec directory'
12
- RSpec::Core::RakeTask.new(:spec)
data/rakelib/rubocop.rake DELETED
@@ -1,18 +0,0 @@
1
- begin
2
- require 'rubocop/rake_task'
3
-
4
- Rake::Task[:default].enhance [:rubocop]
5
-
6
- RuboCop::RakeTask.new do |task|
7
- task.options << '--display-cop-names'
8
- end
9
-
10
- namespace :rubocop do
11
- desc 'Generate a configuration file acting as a TODO list.'
12
- task :auto_gen_config do
13
- exec 'bundle exec rubocop --auto-gen-config'
14
- end
15
- end
16
-
17
- rescue LoadError
18
- end
@@ -1,18 +0,0 @@
1
- RSpec.describe Dry::Container do
2
- let(:klass) { Dry::Container }
3
- let(:container) { klass.new }
4
-
5
- it_behaves_like 'a container'
6
-
7
- describe 'inheritance' do
8
- it 'sets up a container for a child class' do
9
- parent = Class.new { extend Dry::Container::Mixin }
10
- child = Class.new(parent)
11
-
12
- parent.register(:foo, 'foo')
13
- child.register(:foo, 'foo')
14
-
15
- expect(parent[:foo]).to_not be(child[:foo])
16
- end
17
- end
18
- end
@@ -1,32 +0,0 @@
1
- RSpec.describe Dry::Container::Mixin do
2
- describe 'extended' do
3
- let(:klass) do
4
- Class.new { extend Dry::Container::Mixin }
5
- end
6
- let(:container) { klass }
7
-
8
- it_behaves_like 'a container'
9
- end
10
-
11
- describe 'included' do
12
- let(:klass) do
13
- Class.new { include Dry::Container::Mixin }
14
- end
15
- let(:container) { klass.new }
16
-
17
- it_behaves_like 'a container'
18
-
19
- context 'into a class with a custom .initialize method' do
20
- let(:klass) do
21
- Class.new do
22
- include Dry::Container::Mixin
23
- def initialize; end
24
- end
25
- end
26
-
27
- it 'does not fail on missing member variable' do
28
- expect { container.register :key, -> {} }.to_not raise_error
29
- end
30
- end
31
- end
32
- end
data/spec/spec_helper.rb DELETED
@@ -1,104 +0,0 @@
1
- # require 'pathname'
2
-
3
- if RUBY_ENGINE == 'ruby' && ENV['COVERAGE'] == 'true'
4
- require 'yaml'
5
- rubies = YAML.load(File.read(File.join(__dir__, '..', '.travis.yml')))['rvm']
6
- latest_mri = rubies.select { |v| v =~ /\A\d+\.\d+.\d+\z/ }.max
7
-
8
- if RUBY_VERSION == latest_mri
9
- require 'simplecov'
10
- SimpleCov.start do
11
- add_filter '/spec/'
12
- end
13
- end
14
- end
15
-
16
- begin
17
- require 'pry-byebug'
18
- rescue LoadError
19
- end
20
-
21
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
22
- RSpec.configure do |config|
23
- config.expect_with :rspec do |expectations|
24
- # This option will default to `true` in RSpec 4. It makes the `description`
25
- # and `failure_message` of custom matchers include text for helper methods
26
- # defined using `chain`, e.g.:
27
- # be_bigger_than(2).and_smaller_than(4).description
28
- # # => "be bigger than 2 and smaller than 4"
29
- # ...rather than:
30
- # # => "be bigger than 2"
31
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
- end
33
-
34
- config.mock_with :rspec do |mocks|
35
- # Prevents you from mocking or stubbing a method that does not exist on
36
- # a real object. This is generally recommended, and will default to
37
- # `true` in RSpec 4.
38
- mocks.verify_partial_doubles = true
39
- end
40
-
41
- # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
42
- # have no way to turn it off -- the option exists only for backwards
43
- # compatibility in RSpec 3). It causes shared context metadata to be
44
- # inherited by the metadata hash of host groups and examples, rather than
45
- # triggering implicit auto-inclusion in groups with matching metadata.
46
- config.shared_context_metadata_behavior = :apply_to_host_groups
47
-
48
- # This allows you to limit a spec run to individual examples or groups
49
- # you care about by tagging them with `:focus` metadata. When nothing
50
- # is tagged with `:focus`, all examples get run. RSpec also provides
51
- # aliases for `it`, `describe`, and `context` that include `:focus`
52
- # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
53
- config.filter_run_when_matching :focus
54
-
55
- # Allows RSpec to persist some state between runs in order to support
56
- # the `--only-failures` and `--next-failure` CLI options. We recommend
57
- # you configure your source control system to ignore this file.
58
- config.example_status_persistence_file_path = 'spec/examples.txt'
59
-
60
- # Limits the available syntax to the non-monkey patched syntax that is
61
- # recommended. For more details, see:
62
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
63
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
64
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
65
- config.disable_monkey_patching!
66
-
67
- # This setting enables warnings. It's recommended, but in some cases may
68
- # be too noisy due to issues in dependencies.
69
- config.warnings = true
70
-
71
- # Many RSpec users commonly either run the entire suite or an individual
72
- # file, and it's useful to allow more verbose output when running an
73
- # individual spec file.
74
- if config.files_to_run.one?
75
- # Use the documentation formatter for detailed output,
76
- # unless a formatter has already been configured
77
- # (e.g. via a command-line flag).
78
- config.default_formatter = 'doc'
79
- end
80
-
81
- # Print the n slowest examples and example groups at the
82
- # end of the spec run, to help surface which specs are running
83
- # particularly slow.
84
- config.profile_examples = 3
85
-
86
- # Run specs in random order to surface order dependencies. If you find an
87
- # order dependency and want to debug it, you can fix the order by providing
88
- # the seed, which is printed after each run.
89
- # --seed 1234
90
- config.order = :random
91
-
92
- # Seed global randomization in this process using the `--seed` CLI option.
93
- # Setting this allows you to use `--seed` to deterministically reproduce
94
- # test failures related to randomization by passing the same `--seed` value
95
- # as the one that triggered the failure.
96
- Kernel.srand config.seed
97
- end
98
-
99
- require 'dry/container'
100
- require 'dry/container/stub'
101
-
102
- Dir[Pathname(__FILE__).dirname.join('support/**/*.rb').to_s].each do |file|
103
- require file
104
- end