setsy 0.1.7 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/setsy/attribute.rb +21 -1
- data/lib/setsy/version.rb +1 -1
- data/setsy.gemspec +2 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04ad40699e1872b91abc97f51dfb50fb2cdd3b55
|
4
|
+
data.tar.gz: 7c0ea1f4548c5728329f8760139bec404c7ec4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6030dc90b781559cdb3c93e145ad10d7b36ceae0efb7096571501c99bce4612dd1b8f399b0e348551aa333478708d963ef2a54066e7add4d447ab324028b714e
|
7
|
+
data.tar.gz: e2ac06fc4dd7f8f2cb0fef6a122b1eb78aa7b1ddc908e216a56b721824ecc7e2d40e6ae1ffa68bf3ad263aae5fd8cc6b310e36657d11c8bc5caa05c4111a8d1d
|
data/README.md
CHANGED
data/lib/setsy/attribute.rb
CHANGED
@@ -8,7 +8,6 @@ module Setsy
|
|
8
8
|
'fixnum' => 'Integer'
|
9
9
|
}.freeze
|
10
10
|
|
11
|
-
delegate_missing_to :to_s
|
12
11
|
def initialize(options)
|
13
12
|
@attribute_value = options[:value]
|
14
13
|
@default = options[:default]
|
@@ -32,6 +31,27 @@ module Setsy
|
|
32
31
|
value == default
|
33
32
|
end
|
34
33
|
|
34
|
+
def respond_to_missing?(name, include_private = false)
|
35
|
+
to_s.respond_to?(name) || super
|
36
|
+
end
|
37
|
+
|
38
|
+
def method_missing(method, *args, &block)
|
39
|
+
if to_s.respond_to?(method)
|
40
|
+
to_s.public_send(method, *args, &block)
|
41
|
+
else
|
42
|
+
begin
|
43
|
+
super
|
44
|
+
rescue NoMethodError
|
45
|
+
if to_s.nil?
|
46
|
+
raise DelegationError, "\#{to_s} delegated to #{to_s}, but #{to_s} is nil"
|
47
|
+
else
|
48
|
+
raise
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
|
35
55
|
private
|
36
56
|
|
37
57
|
def klass
|
data/lib/setsy/version.rb
CHANGED
data/setsy.gemspec
CHANGED
@@ -22,7 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
spec.files += Dir['lib/**/*.rb']
|
24
24
|
|
25
|
-
spec.add_dependency '
|
25
|
+
spec.add_dependency 'activemodel', '>= 3.0'
|
26
|
+
spec.add_development_dependency 'rails', '>= 3.0'
|
26
27
|
spec.add_development_dependency 'sqlite3'
|
27
28
|
spec.add_development_dependency 'bundler', '~> 1.15'
|
28
29
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Brody
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activemodel
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '3.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: sqlite3
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
147
|
version: '0'
|
134
148
|
requirements: []
|
135
149
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.6.
|
150
|
+
rubygems_version: 2.6.14
|
137
151
|
signing_key:
|
138
152
|
specification_version: 4
|
139
153
|
summary: Settings for your classes
|