dry-auto_inject 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +78 -27
- data/LICENSE +1 -1
- data/README.md +15 -43
- data/dry-auto_inject.gemspec +25 -17
- data/lib/dry/auto_inject/builder.rb +8 -5
- data/lib/dry/auto_inject/dependency_map.rb +7 -2
- data/lib/dry/auto_inject/injector.rb +6 -4
- data/lib/dry/auto_inject/method_parameters.rb +19 -39
- data/lib/dry/auto_inject/strategies/args.rb +22 -15
- data/lib/dry/auto_inject/strategies/constructor.rb +5 -3
- data/lib/dry/auto_inject/strategies/hash.rb +17 -7
- data/lib/dry/auto_inject/strategies/kwargs.rb +13 -12
- data/lib/dry/auto_inject/strategies.rb +4 -4
- data/lib/dry/auto_inject/version.rb +1 -1
- data/lib/dry/auto_inject.rb +1 -1
- data/lib/dry-auto_inject.rb +1 -1
- metadata +16 -34
- data/.codeclimate.yml +0 -12
- data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
- data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
- data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
- data/.github/workflows/ci.yml +0 -76
- data/.github/workflows/docsite.yml +0 -34
- data/.github/workflows/sync_configs.yml +0 -34
- data/.gitignore +0 -10
- data/.rspec +0 -4
- data/.rubocop.yml +0 -95
- data/.rubocop_todo.yml +0 -6
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -29
- data/Gemfile +0 -17
- data/Rakefile +0 -14
- data/bin/console +0 -11
- data/bin/setup +0 -7
- data/docsite/source/basic-usage.html.md +0 -104
- data/docsite/source/how-does-it-work.html.md +0 -45
- data/docsite/source/index.html.md +0 -53
- data/docsite/source/injection-strategies.html.md +0 -94
- data/rakelib/rubocop.rake +0 -20
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "dry/auto_inject/strategies/constructor"
|
4
|
+
require "dry/auto_inject/method_parameters"
|
5
5
|
|
6
6
|
module Dry
|
7
7
|
module AutoInject
|
@@ -24,13 +24,23 @@ module Dry
|
|
24
24
|
|
25
25
|
def define_initialize(klass)
|
26
26
|
super_params = MethodParameters.of(klass, :initialize).first
|
27
|
-
super_pass = super_params.empty? ?
|
27
|
+
super_pass = super_params.empty? ? "" : "options"
|
28
|
+
assignments = dependency_map.names.map do |name|
|
29
|
+
<<~RUBY
|
30
|
+
unless !options.key?(:#{name}) && instance_variable_defined?(:'@#{name}')
|
31
|
+
@#{name} = options[:#{name}]
|
32
|
+
end
|
33
|
+
RUBY
|
34
|
+
end
|
35
|
+
body = assignments.join("\n")
|
28
36
|
|
29
37
|
instance_mod.class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
30
|
-
def initialize(options)
|
31
|
-
|
32
|
-
|
33
|
-
|
38
|
+
def initialize(options) # def initialize(options)
|
39
|
+
# unless !options.key?(:dep) && instance_variable_defined?(:@dep)
|
40
|
+
#{body} # @dep = options[:dep]
|
41
|
+
# end
|
42
|
+
super(#{super_pass}) # super(options)
|
43
|
+
end # end
|
34
44
|
RUBY
|
35
45
|
end
|
36
46
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "dry/auto_inject/strategies/constructor"
|
4
|
+
require "dry/auto_inject/method_parameters"
|
5
5
|
|
6
6
|
module Dry
|
7
7
|
module AutoInject
|
@@ -14,19 +14,20 @@ module Dry
|
|
14
14
|
class_mod.class_exec(container, dependency_map) do |container, dependency_map|
|
15
15
|
map = dependency_map.to_h
|
16
16
|
|
17
|
-
define_method :new do |*args, **kwargs|
|
17
|
+
define_method :new do |*args, **kwargs, &block|
|
18
18
|
map.each do |name, identifier|
|
19
19
|
kwargs[name] = container[identifier] unless kwargs.key?(name)
|
20
20
|
end
|
21
21
|
|
22
|
-
super(*args, **kwargs)
|
22
|
+
super(*args, **kwargs, &block)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
def define_initialize(klass)
|
28
28
|
super_parameters = MethodParameters.of(klass, :initialize).each do |ps|
|
29
|
-
# Look upwards past `def foo(*)`
|
29
|
+
# Look upwards past `def foo(*)` and `def foo(...)` methods
|
30
|
+
# until we get an explicit list of parameters
|
30
31
|
break ps unless ps.pass_through?
|
31
32
|
end
|
32
33
|
|
@@ -44,15 +45,15 @@ module Dry
|
|
44
45
|
slice_kwargs = method(:slice_kwargs)
|
45
46
|
|
46
47
|
instance_mod.class_exec do
|
47
|
-
define_method :initialize do |**kwargs|
|
48
|
+
define_method :initialize do |**kwargs, &block|
|
48
49
|
assign_dependencies.(kwargs, self)
|
49
50
|
|
50
51
|
super_kwargs = slice_kwargs.(kwargs, super_parameters)
|
51
52
|
|
52
53
|
if super_kwargs.any?
|
53
|
-
super(**super_kwargs)
|
54
|
+
super(**super_kwargs, &block)
|
54
55
|
else
|
55
|
-
super()
|
56
|
+
super(&block)
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|
@@ -63,18 +64,18 @@ module Dry
|
|
63
64
|
slice_kwargs = method(:slice_kwargs)
|
64
65
|
|
65
66
|
instance_mod.class_exec do
|
66
|
-
define_method :initialize do |*args, **kwargs|
|
67
|
+
define_method :initialize do |*args, **kwargs, &block|
|
67
68
|
assign_dependencies.(kwargs, self)
|
68
69
|
|
69
70
|
if super_parameters.splat?
|
70
|
-
super(*args, **kwargs)
|
71
|
+
super(*args, **kwargs, &block)
|
71
72
|
else
|
72
73
|
super_kwargs = slice_kwargs.(kwargs, super_parameters)
|
73
74
|
|
74
75
|
if super_kwargs.any?
|
75
|
-
super(*args, **super_kwargs)
|
76
|
+
super(*args, **super_kwargs, &block)
|
76
77
|
else
|
77
|
-
super(*args)
|
78
|
+
super(*args, &block)
|
78
79
|
end
|
79
80
|
end
|
80
81
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "dry-container"
|
4
4
|
|
5
5
|
module Dry
|
6
6
|
module AutoInject
|
@@ -16,6 +16,6 @@ module Dry
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
require
|
20
|
-
require
|
21
|
-
require
|
19
|
+
require "dry/auto_inject/strategies/args"
|
20
|
+
require "dry/auto_inject/strategies/hash"
|
21
|
+
require "dry/auto_inject/strategies/kwargs"
|
data/lib/dry/auto_inject.rb
CHANGED
data/lib/dry-auto_inject.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-auto_inject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-container
|
@@ -56,47 +56,26 @@ dependencies:
|
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description:
|
68
|
+
version: '0'
|
69
|
+
description: Container-agnostic automatic constructor injection
|
70
70
|
email:
|
71
71
|
- piotr.solnica@gmail.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- ".codeclimate.yml"
|
77
|
-
- ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
|
78
|
-
- ".github/ISSUE_TEMPLATE/---bug-report.md"
|
79
|
-
- ".github/ISSUE_TEMPLATE/---feature-request.md"
|
80
|
-
- ".github/workflows/ci.yml"
|
81
|
-
- ".github/workflows/docsite.yml"
|
82
|
-
- ".github/workflows/sync_configs.yml"
|
83
|
-
- ".gitignore"
|
84
|
-
- ".rspec"
|
85
|
-
- ".rubocop.yml"
|
86
|
-
- ".rubocop_todo.yml"
|
87
76
|
- CHANGELOG.md
|
88
|
-
- CODE_OF_CONDUCT.md
|
89
|
-
- CONTRIBUTING.md
|
90
|
-
- Gemfile
|
91
77
|
- LICENSE
|
92
78
|
- README.md
|
93
|
-
- Rakefile
|
94
|
-
- bin/console
|
95
|
-
- bin/setup
|
96
|
-
- docsite/source/basic-usage.html.md
|
97
|
-
- docsite/source/how-does-it-work.html.md
|
98
|
-
- docsite/source/index.html.md
|
99
|
-
- docsite/source/injection-strategies.html.md
|
100
79
|
- dry-auto_inject.gemspec
|
101
80
|
- lib/dry-auto_inject.rb
|
102
81
|
- lib/dry/auto_inject.rb
|
@@ -110,11 +89,14 @@ files:
|
|
110
89
|
- lib/dry/auto_inject/strategies/hash.rb
|
111
90
|
- lib/dry/auto_inject/strategies/kwargs.rb
|
112
91
|
- lib/dry/auto_inject/version.rb
|
113
|
-
-
|
114
|
-
homepage: https://github.com/dry-rb/dry-auto_inject
|
92
|
+
homepage: https://dry-rb.org/gems/dry-auto_inject
|
115
93
|
licenses:
|
116
94
|
- MIT
|
117
|
-
metadata:
|
95
|
+
metadata:
|
96
|
+
allowed_push_host: https://rubygems.org
|
97
|
+
changelog_uri: https://github.com/dry-rb/dry-auto_inject/blob/master/CHANGELOG.md
|
98
|
+
source_code_uri: https://github.com/dry-rb/dry-auto_inject
|
99
|
+
bug_tracker_uri: https://github.com/dry-rb/dry-auto_inject/issues
|
118
100
|
post_install_message:
|
119
101
|
rdoc_options: []
|
120
102
|
require_paths:
|
@@ -123,14 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
105
|
requirements:
|
124
106
|
- - ">="
|
125
107
|
- !ruby/object:Gem::Version
|
126
|
-
version: 2.
|
108
|
+
version: 2.7.0
|
127
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
110
|
requirements:
|
129
111
|
- - ">="
|
130
112
|
- !ruby/object:Gem::Version
|
131
113
|
version: '0'
|
132
114
|
requirements: []
|
133
|
-
rubygems_version: 3.1.
|
115
|
+
rubygems_version: 3.1.6
|
134
116
|
signing_key:
|
135
117
|
specification_version: 4
|
136
118
|
summary: Container-agnostic automatic constructor injection
|
data/.codeclimate.yml
DELETED
@@ -1,30 +0,0 @@
|
|
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 `CONTRIBUTING.md`.
|
13
|
-
|
14
|
-
**Describe the bug**
|
15
|
-
|
16
|
-
A clear and concise description of what the bug is.
|
17
|
-
|
18
|
-
**To Reproduce**
|
19
|
-
|
20
|
-
Provide detailed steps to reproduce, an executable script would be best.
|
21
|
-
|
22
|
-
**Expected behavior**
|
23
|
-
|
24
|
-
A clear and concise description of what you expected to happen.
|
25
|
-
|
26
|
-
**Your environment**
|
27
|
-
|
28
|
-
- Affects my production application: **YES/NO**
|
29
|
-
- Ruby version: ...
|
30
|
-
- OS: ...
|
@@ -1,18 +0,0 @@
|
|
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/.github/workflows/ci.yml
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
name: ci
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
paths:
|
8
|
-
- .github/workflows/ci.yml
|
9
|
-
- lib/**
|
10
|
-
- spec/**
|
11
|
-
- Gemfile
|
12
|
-
- "*.gemspec"
|
13
|
-
|
14
|
-
jobs:
|
15
|
-
tests-mri:
|
16
|
-
runs-on: ubuntu-latest
|
17
|
-
strategy:
|
18
|
-
fail-fast: false
|
19
|
-
matrix:
|
20
|
-
ruby: ["2.6.x", "2.5.x", "2.4.x"]
|
21
|
-
include:
|
22
|
-
- ruby: "2.6.x"
|
23
|
-
coverage: "true"
|
24
|
-
steps:
|
25
|
-
- uses: actions/checkout@v1
|
26
|
-
- name: Set up Ruby
|
27
|
-
uses: actions/setup-ruby@v1
|
28
|
-
with:
|
29
|
-
ruby-version: ${{matrix.ruby}}
|
30
|
-
- name: Download test reporter
|
31
|
-
if: "matrix.coverage == 'true'"
|
32
|
-
run: |
|
33
|
-
mkdir -p tmp/
|
34
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
|
35
|
-
chmod +x ./tmp/cc-test-reporter
|
36
|
-
./tmp/cc-test-reporter before-build
|
37
|
-
- name: Bundle install
|
38
|
-
run: |
|
39
|
-
gem install bundler
|
40
|
-
bundle install --jobs 4 --retry 3 --without tools docs benchmarks
|
41
|
-
- name: Run all tests
|
42
|
-
env:
|
43
|
-
COVERAGE: ${{matrix.coverage}}
|
44
|
-
run: bundle exec rake
|
45
|
-
- name: Send coverage results
|
46
|
-
if: "matrix.coverage == 'true'"
|
47
|
-
env:
|
48
|
-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
|
49
|
-
GIT_COMMIT_SHA: ${{github.sha}}
|
50
|
-
GIT_BRANCH: ${{github.ref}}
|
51
|
-
GIT_COMMITTED_AT: ${{github.event.head_commit.timestamp}}
|
52
|
-
run: |
|
53
|
-
GIT_BRANCH=`ruby -e "puts ENV['GITHUB_REF'].split('/', 3).last"` \
|
54
|
-
GIT_COMMITTED_AT=`ruby -r time -e "puts Time.iso8601(ENV['GIT_COMMITTED_AT']).to_i"` \
|
55
|
-
./tmp/cc-test-reporter after-build
|
56
|
-
|
57
|
-
tests-others:
|
58
|
-
runs-on: ubuntu-latest
|
59
|
-
strategy:
|
60
|
-
fail-fast: false
|
61
|
-
matrix:
|
62
|
-
image: ["jruby:9.2.9", "ruby:2.7"]
|
63
|
-
container:
|
64
|
-
image: ${{matrix.image}}
|
65
|
-
steps:
|
66
|
-
- uses: actions/checkout@v1
|
67
|
-
- name: Install git
|
68
|
-
run: |
|
69
|
-
apt-get update
|
70
|
-
apt-get install -y --no-install-recommends git
|
71
|
-
- name: Bundle install
|
72
|
-
run: |
|
73
|
-
gem install bundler
|
74
|
-
bundle install --jobs 4 --retry 3 --without tools docs benchmarks
|
75
|
-
- name: Run all tests
|
76
|
-
run: bundle exec rake
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
name: docsite
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
paths:
|
8
|
-
- docsite/**
|
9
|
-
- .github/workflows/docsite.yml
|
10
|
-
branches:
|
11
|
-
- master
|
12
|
-
- release-**
|
13
|
-
tags:
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
update-docs:
|
17
|
-
runs-on: ubuntu-latest
|
18
|
-
steps:
|
19
|
-
- uses: actions/checkout@v1
|
20
|
-
- name: Set up Ruby
|
21
|
-
uses: actions/setup-ruby@v1
|
22
|
-
with:
|
23
|
-
ruby-version: "2.6.x"
|
24
|
-
- name: Install dependencies
|
25
|
-
run: |
|
26
|
-
gem install bundler
|
27
|
-
bundle install --jobs 4 --retry 3 --without benchmarks sql
|
28
|
-
- name: Symlink ossy
|
29
|
-
run: mkdir -p bin && ln -sf "$(bundle show ossy)/bin/ossy" bin/ossy
|
30
|
-
- name: Trigger dry-rb.org deploy
|
31
|
-
env:
|
32
|
-
GITHUB_LOGIN: dry-bot
|
33
|
-
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
34
|
-
run: bin/ossy github workflow dry-rb/dry-rb.org ci
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
name: sync_configs
|
4
|
-
|
5
|
-
on:
|
6
|
-
repository_dispatch:
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
sync-configs:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
if: github.event.action == 'sync_configs'
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v1
|
14
|
-
- name: Update configuration files from devtools
|
15
|
-
env:
|
16
|
-
GITHUB_LOGIN: dry-bot
|
17
|
-
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
18
|
-
run: |
|
19
|
-
git clone https://github.com/dry-rb/devtools.git tmp/devtools
|
20
|
-
|
21
|
-
if [ -f ".github/workflows/custom_ci.yml" ]; then
|
22
|
-
rsync -av --exclude '.github/workflows/ci.yml' tmp/devtools/shared/ . ;
|
23
|
-
else
|
24
|
-
rsync -av tmp/devtools/shared/ . ;
|
25
|
-
fi
|
26
|
-
|
27
|
-
git config --local user.email "dry-bot@dry-rb.org"
|
28
|
-
git config --local user.name "dry-bot"
|
29
|
-
git add -A
|
30
|
-
git commit -m "[devtools] config sync" || echo "nothing changed"
|
31
|
-
- name: Push changes
|
32
|
-
uses: ad-m/github-push-action@master
|
33
|
-
with:
|
34
|
-
github_token: ${{ secrets.GH_PAT }}
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
AllCops:
|
4
|
-
TargetRubyVersion: 2.4
|
5
|
-
|
6
|
-
Style/EachWithObject:
|
7
|
-
Enabled: false
|
8
|
-
|
9
|
-
Style/StringLiterals:
|
10
|
-
Enabled: true
|
11
|
-
EnforcedStyle: single_quotes
|
12
|
-
|
13
|
-
Style/Alias:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
Style/LambdaCall:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Style/StabbyLambdaParentheses:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/FormatString:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Style/Documentation:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Layout/SpaceInLambdaLiteral:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Layout/MultilineMethodCallIndentation:
|
32
|
-
Enabled: true
|
33
|
-
EnforcedStyle: indented
|
34
|
-
|
35
|
-
Metrics/LineLength:
|
36
|
-
Max: 100
|
37
|
-
|
38
|
-
Metrics/MethodLength:
|
39
|
-
Max: 22
|
40
|
-
|
41
|
-
Metrics/ClassLength:
|
42
|
-
Max: 150
|
43
|
-
|
44
|
-
Metrics/AbcSize:
|
45
|
-
Max: 20
|
46
|
-
|
47
|
-
Metrics/BlockLength:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Metrics/CyclomaticComplexity:
|
51
|
-
Enabled: true
|
52
|
-
Max: 10
|
53
|
-
|
54
|
-
Lint/BooleanSymbol:
|
55
|
-
Enabled: false
|
56
|
-
|
57
|
-
Style/AccessModifierDeclarations:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
Style/BlockDelimiters:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
Layout/IndentFirstArrayElement:
|
64
|
-
EnforcedStyle: consistent
|
65
|
-
|
66
|
-
Style/ClassAndModuleChildren:
|
67
|
-
Exclude:
|
68
|
-
- "spec/**/*_spec.rb"
|
69
|
-
|
70
|
-
Lint/HandleExceptions:
|
71
|
-
Exclude:
|
72
|
-
- "spec/spec_helper.rb"
|
73
|
-
|
74
|
-
Naming/FileName:
|
75
|
-
Exclude:
|
76
|
-
- "lib/dry-*.rb"
|
77
|
-
|
78
|
-
Style/SymbolArray:
|
79
|
-
Exclude:
|
80
|
-
- "spec/**/*_spec.rb"
|
81
|
-
|
82
|
-
Style/ConditionalAssignment:
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
Naming/MethodName:
|
86
|
-
Enabled: false
|
87
|
-
|
88
|
-
Style/AsciiComments:
|
89
|
-
Enabled: false
|
90
|
-
|
91
|
-
Style/DateTime:
|
92
|
-
Enabled: false
|
93
|
-
|
94
|
-
Style/IfUnlessModifier:
|
95
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2015-08-19 22:11:28 +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/CODE_OF_CONDUCT.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
-
|
5
|
-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
-
|
7
|
-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
-
|
9
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
-
|
11
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
-
|
13
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.4.0, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
|
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](https://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](https://discourse.dry-rb.org) or join [our chat](https://dry-rb.zulipchat.com).
|
data/Gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in dry-auto_inject.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
group :test do
|
9
|
-
gem "simplecov"
|
10
|
-
gem "codeclimate-test-reporter", require: nil
|
11
|
-
end
|
12
|
-
|
13
|
-
group :tools do
|
14
|
-
gem 'byebug', platforms: :mri
|
15
|
-
gem 'pry'
|
16
|
-
gem "ossy", git: "https://github.com/solnic/ossy.git", branch: "master"
|
17
|
-
end
|