silueta 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gems +1 -0
- data/README.md +7 -0
- data/lib/silueta.rb +1 -1
- data/lib/silueta/version.rb +1 -1
- data/makefile +9 -2
- data/silueta.gemspec +0 -1
- data/test/helper.rb +2 -0
- data/test/silueta_test.rb +7 -4
- data/test/types_test.rb +0 -5
- metadata +5 -19
- data/.gitignore +0 -2
- data/Gemfile +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1dcfa28a749a543fb077b2e5fd661c962a12deff
|
4
|
+
data.tar.gz: 5769a167493807fa1b21226b22e414b9dacaf2fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c5801d21f530f3967e8ff75485d427a842a55171cdbc52a25ab26ec420ee0c976cf69d546dd66297138633b2bb90059f48eb5bad1b7b7607abd704ed8903c3
|
7
|
+
data.tar.gz: 0257d53eb4dcf46895cc32c7b695818cfce0684d02ed8a8d6674ae4b78bf21d33f545af8e79b97d5a1bc6446b2c51622fb7189e42a71f02114e54a946edb2f4e
|
data/.gems
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
cutest:1.2.2
|
data/README.md
CHANGED
@@ -43,6 +43,13 @@ user.attributes
|
|
43
43
|
|
44
44
|
See all types supported by Silueta [here][types].
|
45
45
|
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
- Fork the project.
|
49
|
+
- Use `make install` to install dependencies.
|
50
|
+
- Use `make test` to run the test suite.
|
51
|
+
- Create a pull request with your changes.
|
52
|
+
|
46
53
|
## Installation
|
47
54
|
|
48
55
|
```
|
data/lib/silueta.rb
CHANGED
data/lib/silueta/version.rb
CHANGED
data/makefile
CHANGED
data/silueta.gemspec
CHANGED
data/test/helper.rb
ADDED
data/test/silueta_test.rb
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
require "bundler/setup"
|
2
|
-
require "cutest"
|
3
|
-
require_relative "../lib/silueta"
|
4
|
-
|
5
1
|
class User
|
6
2
|
include Silueta
|
7
3
|
|
@@ -42,3 +38,10 @@ test "inheritance" do
|
|
42
38
|
|
43
39
|
assert_equal(User.attributes + [:superpowers], Admin.attributes)
|
44
40
|
end
|
41
|
+
|
42
|
+
test "ignore unlisted attributes" do
|
43
|
+
user = User.new(name: "Jane", email: "jane@mail.com", age: "25", alignment: "chaotic neutral")
|
44
|
+
|
45
|
+
assert !user.respond_to?(:alignment)
|
46
|
+
end
|
47
|
+
|
data/test/types_test.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: silueta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mayn Ektvedt Kjær
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
12
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.10'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.10'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: cutest
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,8 +31,7 @@ executables: []
|
|
45
31
|
extensions: []
|
46
32
|
extra_rdoc_files: []
|
47
33
|
files:
|
48
|
-
- ".
|
49
|
-
- Gemfile
|
34
|
+
- ".gems"
|
50
35
|
- LICENSE
|
51
36
|
- README.md
|
52
37
|
- lib/silueta.rb
|
@@ -54,6 +39,7 @@ files:
|
|
54
39
|
- lib/silueta/version.rb
|
55
40
|
- makefile
|
56
41
|
- silueta.gemspec
|
42
|
+
- test/helper.rb
|
57
43
|
- test/silueta_test.rb
|
58
44
|
- test/types_test.rb
|
59
45
|
homepage: https://github.com/harmoni/silueta
|
@@ -76,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
62
|
version: '0'
|
77
63
|
requirements: []
|
78
64
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.4
|
65
|
+
rubygems_version: 2.6.4
|
80
66
|
signing_key:
|
81
67
|
specification_version: 4
|
82
68
|
summary: Initialize an object with a hash of attributes
|
data/.gitignore
DELETED
data/Gemfile
DELETED