cooperator 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db8f2410933f1cf1969814e8107a13a1ec91da44
4
- data.tar.gz: 76df18d6692bce61623fd4ecbaf8569174e71afa
3
+ metadata.gz: 08788d2ce3e7e095bc7ccfebc1e6c7c4e8de944f
4
+ data.tar.gz: b4ee50a54687e5fd0e95d2e308c617c7915f16d7
5
5
  SHA512:
6
- metadata.gz: f0e466bbe36fd11200b932bd45713a316d1efa3e6ded2159d17ccc5a88c597be182d1593119a4e4e7da8be993faa7ad3c008f5ca702754004623eb3c054bbf2b
7
- data.tar.gz: b399ce428ce275014a53df3345ffc2e405d2dd410b6b270a2fb5d0599b82da6f5718a8d1a49c507be34ef0d86fdd2bd6052690141ddb06d3b4cc569c107fe5ac
6
+ metadata.gz: ce60be388a1ce36debb365a0cbe9291a1db015540c2d75c3b22d097aa5b07a53d20f6840df84924b1e92800c0dc51c8ff226d8125b877f6bd80d74f8f4526876
7
+ data.tar.gz: a9c78f97264dd535638e83e9847852b30adb0ff0450161ef457ebf06581077141f5e5a410cabd9759f45529bdb6b7f53fa27f9e3e48d7b039777815972926499
data/lib/cooperator.rb CHANGED
@@ -119,6 +119,10 @@ module Cooperator
119
119
  base.extend ClassMethods
120
120
  end
121
121
 
122
+ def self.included(base)
123
+ base.include ClassMethods
124
+ end
125
+
122
126
  private
123
127
 
124
128
  def success!
@@ -18,7 +18,11 @@ module Cooperator
18
18
 
19
19
  def failure!(messages = {})
20
20
  messages.each do |key, message|
21
- errors[key].push message
21
+ if message.is_a? Array
22
+ errors[key].push *message
23
+ else
24
+ errors[key].push message
25
+ end
22
26
  end
23
27
 
24
28
  self[:_failure] = true
@@ -1,3 +1,3 @@
1
1
  module Cooperator
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cooperator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erol Fornoles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-25 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler