association_matcher 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +35 -0
- data/.gitignore +9 -0
- data/.gitlab-ci.yml +33 -0
- data/.pryrc +3 -0
- data/.rubocop.yml +11 -0
- data/.rubocop_yoshiki.yml +2 -0
- data/Dockerfile +14 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +68 -0
- data/LICENSE.txt +21 -0
- data/README.md +36 -0
- data/Rakefile +12 -0
- data/association_matcher.gemspec +36 -0
- data/bin/console +7 -0
- data/docker-compose.yml +23 -0
- data/lib/association_matcher.rb +8 -0
- data/lib/association_matcher/version.rb +7 -0
- metadata +173 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: db874e7ae045f056abea9d39cd6af189abf7dc5f
|
4
|
+
data.tar.gz: 4c193e24778ecabf81482737fdec35bf9c8c41fa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 711c9cbcecc22555b66cbded560deae4267ad86f13278625fe617b076e3902aeb8aa34dd4becb4e5f28c1b3ca2599b5b12b71152e1855ca96a532f98c523721d
|
7
|
+
data.tar.gz: f1b7d741aee536513bb0b7639e1efe0b90482b7637e3de8ec30c7ed69742eb0e243cde9b1e2b18ac03c99e8113cac3922fce1174b70af65733aa156236fa6204
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
engines:
|
3
|
+
bundler-audit:
|
4
|
+
enabled: true
|
5
|
+
duplication:
|
6
|
+
config:
|
7
|
+
count_threshold: 3
|
8
|
+
languages:
|
9
|
+
- ruby
|
10
|
+
enabled: true
|
11
|
+
exclude_paths:
|
12
|
+
- Rakefile
|
13
|
+
fixme:
|
14
|
+
enabled: true
|
15
|
+
flog:
|
16
|
+
enabled: true
|
17
|
+
config:
|
18
|
+
all: false
|
19
|
+
threshold: 0.6
|
20
|
+
reek:
|
21
|
+
enabled: true
|
22
|
+
rubocop:
|
23
|
+
enabled: true
|
24
|
+
prepare:
|
25
|
+
fetch:
|
26
|
+
- url: "https://gitlab.devfu.com/devfu/yoshiki/raw/v4.1.0/.devfu-rubocop.yml"
|
27
|
+
path: ".rubocop_yoshiki.yml"
|
28
|
+
ratings:
|
29
|
+
paths:
|
30
|
+
- Gemfile.lock
|
31
|
+
- "**.rb"
|
32
|
+
exclude_paths:
|
33
|
+
- coverage/
|
34
|
+
- test/
|
35
|
+
- vendor/
|
data/.gitignore
ADDED
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
codeclimate:
|
2
|
+
artifacts:
|
3
|
+
paths: ["codeclimate.json"]
|
4
|
+
except: ["tags"]
|
5
|
+
image: docker:latest
|
6
|
+
script:
|
7
|
+
- docker pull codeclimate/codeclimate
|
8
|
+
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate validate-config
|
9
|
+
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate prepare
|
10
|
+
- docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json > codeclimate.json
|
11
|
+
services: ["docker:dind"]
|
12
|
+
tags: ["dind"]
|
13
|
+
variables:
|
14
|
+
DOCKER_DRIVER: overlay2
|
15
|
+
|
16
|
+
tests:
|
17
|
+
before_script: ["bundle install"]
|
18
|
+
artifacts:
|
19
|
+
expire_in: 1 day
|
20
|
+
paths: ["coverage"]
|
21
|
+
cache:
|
22
|
+
key: "$CI_COMMIT_REF_NAME"
|
23
|
+
paths: ["vendor/bundle"]
|
24
|
+
dependencies: []
|
25
|
+
except: ["tags"]
|
26
|
+
image: devfu/ci:2.4-alpine
|
27
|
+
script:
|
28
|
+
- cc-test-reporter before-build
|
29
|
+
- bundle exec rake test
|
30
|
+
- cc-test-reporter after-build --exit-code $?
|
31
|
+
variables:
|
32
|
+
BUNDLE_PATH: "vendor/bundle"
|
33
|
+
BUNDLE_RETRY: "3"
|
data/.pryrc
ADDED
data/.rubocop.yml
ADDED
data/Dockerfile
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
association_matcher (0.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.3.0)
|
10
|
+
codeclimate-test-reporter (1.0.8)
|
11
|
+
simplecov (<= 0.13)
|
12
|
+
coderay (1.1.1)
|
13
|
+
docile (1.1.5)
|
14
|
+
json (2.1.0)
|
15
|
+
method_source (0.8.2)
|
16
|
+
minitest (5.10.3)
|
17
|
+
parallel (1.12.0)
|
18
|
+
parser (2.4.0.0)
|
19
|
+
ast (~> 2.2)
|
20
|
+
powerpack (0.1.1)
|
21
|
+
pry (0.10.4)
|
22
|
+
coderay (~> 1.1.0)
|
23
|
+
method_source (~> 0.8.1)
|
24
|
+
slop (~> 3.4)
|
25
|
+
pry-doc (0.11.1)
|
26
|
+
pry (~> 0.9)
|
27
|
+
yard (~> 0.9)
|
28
|
+
rainbow (2.2.2)
|
29
|
+
rake
|
30
|
+
rake (10.5.0)
|
31
|
+
rubocop (0.51.0)
|
32
|
+
parallel (~> 1.10)
|
33
|
+
parser (>= 2.3.3.1, < 3.0)
|
34
|
+
powerpack (~> 0.1)
|
35
|
+
rainbow (>= 2.2.2, < 3.0)
|
36
|
+
ruby-progressbar (~> 1.7)
|
37
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
38
|
+
rubocop-rspec (1.19.0)
|
39
|
+
rubocop (>= 0.51.0)
|
40
|
+
ruby-progressbar (1.9.0)
|
41
|
+
simplecov (0.13.0)
|
42
|
+
docile (~> 1.1.0)
|
43
|
+
json (>= 1.8, < 3)
|
44
|
+
simplecov-html (~> 0.10.0)
|
45
|
+
simplecov-html (0.10.2)
|
46
|
+
slop (3.6.0)
|
47
|
+
unicode-display_width (1.3.0)
|
48
|
+
yard (0.9.9)
|
49
|
+
yoshiki (4.1.0)
|
50
|
+
rubocop (~> 0.51.0)
|
51
|
+
rubocop-rspec (~> 1.19.0)
|
52
|
+
|
53
|
+
PLATFORMS
|
54
|
+
ruby
|
55
|
+
|
56
|
+
DEPENDENCIES
|
57
|
+
association_matcher!
|
58
|
+
bundler (~> 1.15)
|
59
|
+
codeclimate-test-reporter
|
60
|
+
minitest (~> 5.0)
|
61
|
+
pry
|
62
|
+
pry-doc
|
63
|
+
rake
|
64
|
+
simplecov
|
65
|
+
yoshiki
|
66
|
+
|
67
|
+
BUNDLED WITH
|
68
|
+
1.15.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Byron Bowerman
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# AssociationMatcher
|
2
|
+
|
3
|
+
RSpec matcher for ActiveRecord associations.
|
4
|
+
|
5
|
+
[![code climate][cq-image]][cq]
|
6
|
+
[![code coverage][cc-image]][cc]
|
7
|
+
[![build status][ci-image]][ci]
|
8
|
+
[![gem version][gem-image]][gem]
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'association_matcher', group: :test
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install association_matcher
|
25
|
+
|
26
|
+
<!-- links -->
|
27
|
+
[cc]: https://codeclimate.com/repos/59f26d581c9507028b000080/test_coverage "code coverage"
|
28
|
+
[ci]: https://gitlab.devfu.com/bm5k/association_matcher/pipelines "ci pipelines"
|
29
|
+
[cq]: https://codeclimate.com/repos/59f26d581c9507028b000080/maintainability "maintainability"
|
30
|
+
[gem]: http://badge.fury.io/rb/validation_matcher "gem version"
|
31
|
+
|
32
|
+
<!-- images -->
|
33
|
+
[cc-image]: https://api.codeclimate.com/v1/badges/eeff7bdfcb6a67bd550a/test_coverage
|
34
|
+
[ci-image]: https://gitlab.devfu.com/bm5k/association_matcher/badges/master/pipeline.svg
|
35
|
+
[cq-image]: https://api.codeclimate.com/v1/badges/eeff7bdfcb6a67bd550a/maintainability
|
36
|
+
[gem-image]:https://badge.fury.io/rb/association_matcher.svg
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path '../lib', __FILE__
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'association_matcher/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'association_matcher'
|
9
|
+
spec.version = AssociationMatcher::VERSION
|
10
|
+
spec.authors = %w[ BM5k ]
|
11
|
+
spec.email = %w[ me@bm5k.com ]
|
12
|
+
spec.summary = 'RSpec matcher for ActiveRecord associations'
|
13
|
+
spec.description = 'Use reflection to spec ActiveRecord associations'
|
14
|
+
spec.homepage = 'https://gitlab.devfu.com/bm5k/association_matcher'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.require_paths = %w[ lib ]
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
+
f.match %r{^(test|spec)/}
|
21
|
+
end
|
22
|
+
|
23
|
+
spec.required_ruby_version = '~> 2.2'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
26
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
27
|
+
spec.add_development_dependency 'pry'
|
28
|
+
spec.add_development_dependency 'pry-doc'
|
29
|
+
spec.add_development_dependency 'rake'
|
30
|
+
spec.add_development_dependency 'simplecov'
|
31
|
+
spec.add_development_dependency 'yoshiki'
|
32
|
+
|
33
|
+
# use legacy codeclimate reporter
|
34
|
+
# until the ci docker images support the new reporter
|
35
|
+
spec.add_development_dependency 'codeclimate-test-reporter'
|
36
|
+
end
|
data/bin/console
ADDED
data/docker-compose.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# https://docs.docker.com/compose/compose-file/#compose-and-docker-compatibility-matrix
|
2
|
+
|
3
|
+
version: '3'
|
4
|
+
|
5
|
+
services:
|
6
|
+
bundle:
|
7
|
+
build: .
|
8
|
+
command: install
|
9
|
+
entrypoint: ["bundle"]
|
10
|
+
volumes: &ruby_volumes
|
11
|
+
- .:/src:cached
|
12
|
+
- gems:/bundle:cached
|
13
|
+
|
14
|
+
console:
|
15
|
+
build: .
|
16
|
+
command: bin/console
|
17
|
+
entrypoint: ["bundle", "exec"]
|
18
|
+
volumes: *ruby_volumes
|
19
|
+
|
20
|
+
volumes:
|
21
|
+
gems:
|
22
|
+
external:
|
23
|
+
name: docker-gems
|
metadata
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: association_matcher
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- BM5k
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-doc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: yoshiki
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: codeclimate-test-reporter
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Use reflection to spec ActiveRecord associations
|
126
|
+
email:
|
127
|
+
- me@bm5k.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".codeclimate.yml"
|
133
|
+
- ".gitignore"
|
134
|
+
- ".gitlab-ci.yml"
|
135
|
+
- ".pryrc"
|
136
|
+
- ".rubocop.yml"
|
137
|
+
- ".rubocop_yoshiki.yml"
|
138
|
+
- Dockerfile
|
139
|
+
- Gemfile
|
140
|
+
- Gemfile.lock
|
141
|
+
- LICENSE.txt
|
142
|
+
- README.md
|
143
|
+
- Rakefile
|
144
|
+
- association_matcher.gemspec
|
145
|
+
- bin/console
|
146
|
+
- docker-compose.yml
|
147
|
+
- lib/association_matcher.rb
|
148
|
+
- lib/association_matcher/version.rb
|
149
|
+
homepage: https://gitlab.devfu.com/bm5k/association_matcher
|
150
|
+
licenses:
|
151
|
+
- MIT
|
152
|
+
metadata: {}
|
153
|
+
post_install_message:
|
154
|
+
rdoc_options: []
|
155
|
+
require_paths:
|
156
|
+
- lib
|
157
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - "~>"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '2.2'
|
162
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
requirements: []
|
168
|
+
rubyforge_project:
|
169
|
+
rubygems_version: 2.6.14
|
170
|
+
signing_key:
|
171
|
+
specification_version: 4
|
172
|
+
summary: RSpec matcher for ActiveRecord associations
|
173
|
+
test_files: []
|