reaction 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reaction/type.rb +10 -0
- data/reaction.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7bd291e9bb4dac6cac077221f85dc5db8d40a46
|
4
|
+
data.tar.gz: 9c9eed65c8f56475c554ade3cee42b554d31ee4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0adfc4f7a0ad92072540edb45bcda96f83b43a10a367079b42881185701e60171ceec5e7354a84a12176781c512439416649facecd94cc34dc36b9abdd06d00b
|
7
|
+
data.tar.gz: c62d6751050fa25a322d4c0d63a214b5bda26a635c5b6134a2117ef9b8db6914458dfc8126145b2d8f78919c764fed02b5c46ddfd99894476cb2a5d6788272a8
|
data/lib/reaction/type.rb
CHANGED
@@ -51,6 +51,16 @@ module Reaction
|
|
51
51
|
true
|
52
52
|
end
|
53
53
|
|
54
|
+
def process_subtype(raw_value, type_sym, options = {}, error = nil)
|
55
|
+
type = Reaction::TypeBuilder.new(type_sym, options).build(action)
|
56
|
+
if !type.process(raw_value)
|
57
|
+
failure(error || type.error)
|
58
|
+
nil
|
59
|
+
else
|
60
|
+
type.result
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
54
64
|
# This isn't perfect but works well enough.
|
55
65
|
def self.to_type_symbol
|
56
66
|
ret = self.to_s
|
data/reaction.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = 'reaction'
|
7
|
-
gem.version = '1.0.
|
7
|
+
gem.version = '1.0.7'
|
8
8
|
gem.authors = ["Jon Calhoun", "Jon Calhoun", "Ryan Jackson"]
|
9
9
|
gem.email = ["joncalhoun@gmail.com", "jon@paidlabs.com", "ryan@paidlabs.com"]
|
10
10
|
gem.description = 'Reaction makes it easy to build reusable controller actions along with reusable validators and param type converters.'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Calhoun
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-05-
|
13
|
+
date: 2016-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: redcarpet
|