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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d4a6febf9f8f524d048670f7d5448ca762f11c8
4
- data.tar.gz: 0adcb11a4177e39bebf7388e414372b2cd45dc37
3
+ metadata.gz: 0c2200e547ac2adeb77d8ab2394037f7006550c5
4
+ data.tar.gz: d8865ebe73d8d765f8452b31db58ed24b804f69c
5
5
  SHA512:
6
- metadata.gz: 3018b241c4e794f31c5fd22a8f1f3c987ffb9520f2d9a102fe63e3e9c682eed98663a53a5af082806017fae7521d691b44ea17c5d91d87b62d8f8de97985b102
7
- data.tar.gz: 81b4b7072f415438303a66fe04e198b953214c925f28a73f0011f823cc3c3d84d0ddf06a64e3146346f4a4d0c739448d79cbb2dd2aa340822d096dc9c4786737
6
+ metadata.gz: cb086adc3bb250d211d585f92379ca3fa9292c4b5336676e49beb2cf59c0f18d2274f7137cd1480e2ef82a6f8854c20467b8d453788cb36fda5da85b0e134f94
7
+ data.tar.gz: 63a124f87db6bd8ee1c6aa2808adfbe6a6cb82cfdf214ab56c9a7191a8e9f3e82e4f21df88f7bafd4cb2e475b3a99e52ad0adc875bfd488e82b6d6c11b9aead5
@@ -2,3 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3.0
4
4
  before_install: gem install bundler -v 1.11.2
5
+ script: rubocop -D && bundle exec rspec
6
+ addons:
7
+ code_climate:
8
+ repo_token: 905e0dd5ba043366250b9ddaf662dd6e1fab6b97b492b11c7a4cd8501877279f
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Actionizer
2
2
 
3
+ [![Build Status](https://travis-ci.org/mikenichols/actionizer.svg?branch=master)](https://travis-ci.org/mikenichols/actionizer)
4
+ [![Test Coverage](https://codeclimate.com/github/mikenichols/actionizer/badges/coverage.svg)](https://codeclimate.com/github/mikenichols/actionizer/coverage)
5
+ [![Code Climate](https://codeclimate.com/github/mikenichols/actionizer/badges/gpa.svg)](https://codeclimate.com/github/mikenichols/actionizer)
6
+
3
7
  ## Turn your classes into small, modular, resuable Actions!
4
8
 
5
9
  ## Installation
@@ -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(inputs = {})
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 = {})
@@ -3,8 +3,10 @@ require 'hashie'
3
3
  module Actionizer
4
4
  class Result < Hashie::Mash
5
5
 
6
- def initialize
6
+ def initialize(initial_hash = {})
7
7
  @success = true
8
+
9
+ initial_hash.each_pair { |key, value| self[key] = value }
8
10
  end
9
11
 
10
12
  def success?
@@ -1,3 +1,3 @@
1
1
  module Actionizer
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
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.2.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-02 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie