duckface-interfaces 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +2 -2
- data/MIT-LICENSE +22 -0
- data/lib/duckface/method_implementation.rb +9 -1
- data/lib/duckface/services/check_class_implements_interface.rb +1 -0
- data/lib/duckface/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78c7146b486750ef72851c62e8d1906022cbe9da
|
4
|
+
data.tar.gz: cf4ef06c1d3593808a248eef813aa37583e6af48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 721b26281cc32e0ce30625930d071cddd6c611f1ed381a42d6b5dfa40e724b5ae06e47c9050aa2ee393638faa905f48c5e78b881450c9849c324e0a021d0875a
|
7
|
+
data.tar.gz: 9a5716a76cbac9fc27c8a613b90b35e343b3a83eb9e0e7e71b4a02becaf4b96d03cb85a4d575d182e27290ebfe692bbc11a1e67d441578c1a9b1cfeca7a8c0d5
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018-2019 Samuel Giles
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -34,7 +34,15 @@ module Duckface
|
|
34
34
|
|
35
35
|
def present_in_schema?
|
36
36
|
return false unless schema?
|
37
|
-
|
37
|
+
|
38
|
+
schema_keys = @klass.schema.keys
|
39
|
+
if schema_keys.first.is_a?(Symbol)
|
40
|
+
@klass.schema.keys.include?(@method_name)
|
41
|
+
elsif schema_keys.first.respond_to?(:name)
|
42
|
+
@klass.schema.keys.map(&:name).include?(@method_name)
|
43
|
+
else
|
44
|
+
raise "Can't determine schema methods. `Class.schema.keys` returns array of unknown types."
|
45
|
+
end
|
38
46
|
end
|
39
47
|
|
40
48
|
def schema?
|
data/lib/duckface/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duckface-interfaces
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bellroy Tech Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- Gemfile
|
70
70
|
- Gemfile.lock
|
71
71
|
- Guardfile
|
72
|
+
- MIT-LICENSE
|
72
73
|
- README.md
|
73
74
|
- Rakefile
|
74
75
|
- bin/console
|