actionizer 0.2.0 → 0.3.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/.travis.yml +4 -0
- data/README.md +4 -0
- data/lib/actionizer.rb +3 -12
- data/lib/actionizer/result.rb +3 -1
- data/lib/actionizer/version.rb +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: 0c2200e547ac2adeb77d8ab2394037f7006550c5
|
4
|
+
data.tar.gz: d8865ebe73d8d765f8452b31db58ed24b804f69c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb086adc3bb250d211d585f92379ca3fa9292c4b5336676e49beb2cf59c0f18d2274f7137cd1480e2ef82a6f8854c20467b8d453788cb36fda5da85b0e134f94
|
7
|
+
data.tar.gz: 63a124f87db6bd8ee1c6aa2808adfbe6a6cb82cfdf214ab56c9a7191a8e9f3e82e4f21df88f7bafd4cb2e475b3a99e52ad0adc875bfd488e82b6d6c11b9aead5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Actionizer
|
2
2
|
|
3
|
+
[](https://travis-ci.org/mikenichols/actionizer)
|
4
|
+
[](https://codeclimate.com/github/mikenichols/actionizer/coverage)
|
5
|
+
[](https://codeclimate.com/github/mikenichols/actionizer)
|
6
|
+
|
3
7
|
## Turn your classes into small, modular, resuable Actions!
|
4
8
|
|
5
9
|
## Installation
|
data/lib/actionizer.rb
CHANGED
@@ -3,7 +3,7 @@ require 'actionizer/failure'
|
|
3
3
|
require 'actionizer/version'
|
4
4
|
|
5
5
|
module Actionizer
|
6
|
-
attr_reader :output
|
6
|
+
attr_reader :input, :output
|
7
7
|
|
8
8
|
def self.included(base)
|
9
9
|
base.class_eval do
|
@@ -19,18 +19,9 @@ module Actionizer
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def initialize(
|
22
|
+
def initialize(initial_input = {})
|
23
|
+
@input = Hashie::Mash.new(initial_input)
|
23
24
|
@output = Actionizer::Result.new
|
24
|
-
|
25
|
-
inputs.each_pair do |key, value|
|
26
|
-
next if key.to_s == 'output'
|
27
|
-
|
28
|
-
instance_variable_set("@#{key}".to_sym, value)
|
29
|
-
|
30
|
-
self.class.class_eval do
|
31
|
-
attr_reader key
|
32
|
-
end
|
33
|
-
end
|
34
25
|
end
|
35
26
|
|
36
27
|
def fail!(params = {})
|
data/lib/actionizer/result.rb
CHANGED
data/lib/actionizer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nichols
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|