reaction 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/reaction/action.rb +5 -0
- data/lib/reaction/has_params.rb +1 -1
- data/lib/reaction/has_types.rb +1 -1
- data/reaction.gemspec +6 -6
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aca4aad215915e667e9c711483c2cfc9ff476868
|
4
|
+
data.tar.gz: d54fd1353ef63abad3c25aae23e09031f111beae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b6a817db4c326691a171514987a0d4bd98b12a568d51c771db34f7eec84eaa917d47f8a653252c2191cc514d15b3fea5d9fff075099c14d546f3298056a744
|
7
|
+
data.tar.gz: 26262301db8e8898ce28e399019cb11b6b083b8ebb7ee51ed6c97a7e68b1a06e358cd77e7df3fc3e1dfc688e59ab3d514cc21b43b98cd32e22b1fe1e0c8e6475
|
data/lib/reaction/action.rb
CHANGED
@@ -32,6 +32,11 @@ module Reaction
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def validate!
|
35
|
+
params.each do |name, value|
|
36
|
+
unless self.class.class_for_type(name)
|
37
|
+
errors.add(name, 'is not a valid parameter.')
|
38
|
+
end
|
39
|
+
end
|
35
40
|
self.class.types.each do |name, type|
|
36
41
|
type.validate_each(self, name, raw_param(name))
|
37
42
|
end
|
data/lib/reaction/has_params.rb
CHANGED
data/lib/reaction/has_types.rb
CHANGED
data/reaction.gemspec
CHANGED
@@ -4,12 +4,12 @@ $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 = '0.
|
8
|
-
gem.authors = ["
|
9
|
-
gem.email = ["joncalhoun@gmail.com"]
|
10
|
-
gem.description = 'Reaction
|
11
|
-
gem.summary = '
|
12
|
-
gem.homepage = 'https://github.com/
|
7
|
+
gem.version = '0.2.0'
|
8
|
+
gem.authors = ["Jon Calhoun", "Jon Calhoun", "Ryan Jackson"]
|
9
|
+
gem.email = ["joncalhoun@gmail.com", "jon@paidlabs.com", "ryan@paidlabs.com"]
|
10
|
+
gem.description = 'Reaction makes it easy to build reusable controller actions along with reusable validators and param type converters.'
|
11
|
+
gem.summary = 'Reusable controller actions and validators.'
|
12
|
+
gem.homepage = 'https://github.com/paidlabs/reaction'
|
13
13
|
|
14
14
|
gem.files = `git ls-files`.split($/)
|
15
15
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jon Calhoun
|
8
|
+
- Jon Calhoun
|
9
|
+
- Ryan Jackson
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date: 2016-02
|
13
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
14
|
dependencies: []
|
13
|
-
description: Reaction
|
15
|
+
description: Reaction makes it easy to build reusable controller actions along with
|
16
|
+
reusable validators and param type converters.
|
14
17
|
email:
|
15
18
|
- joncalhoun@gmail.com
|
19
|
+
- jon@paidlabs.com
|
20
|
+
- ryan@paidlabs.com
|
16
21
|
executables: []
|
17
22
|
extensions: []
|
18
23
|
extra_rdoc_files: []
|
@@ -34,7 +39,7 @@ files:
|
|
34
39
|
- lib/reaction/type.rb
|
35
40
|
- lib/reaction/types/raw_type.rb
|
36
41
|
- reaction.gemspec
|
37
|
-
homepage: https://github.com/
|
42
|
+
homepage: https://github.com/paidlabs/reaction
|
38
43
|
licenses: []
|
39
44
|
metadata: {}
|
40
45
|
post_install_message:
|
@@ -56,5 +61,5 @@ rubyforge_project:
|
|
56
61
|
rubygems_version: 2.4.5
|
57
62
|
signing_key:
|
58
63
|
specification_version: 4
|
59
|
-
summary:
|
64
|
+
summary: Reusable controller actions and validators.
|
60
65
|
test_files: []
|